org.dspace.content.packager
Class DSpaceMETSDisseminator

java.lang.Object
  extended by org.dspace.content.packager.AbstractMETSDisseminator
      extended by org.dspace.content.packager.DSpaceMETSDisseminator
All Implemented Interfaces:
PackageDisseminator

public class DSpaceMETSDisseminator
extends AbstractMETSDisseminator

Packager plugin to produce a METS (Metadata Encoding & Transmission Standard) package that is accepted as a DSpace METS SIP (Submission Information Package). See http://www.loc.gov/standards/mets/ for more information on METS.

This class does not produce a true DSpace DIP, because there was no DIP standard when it was implemented. It does contain some features beyond the requirements of a SIP (e.g. deposit licenses), anticipating the DIP specification.

DSpaceMETSDisseminator was intended to be an useful example of a packager plugin, and a way to create packages acceptable to the METS SIP importer.

Version:
$Revision: 3761 $
Author:
Larry Stone

Field Summary
 
Fields inherited from class org.dspace.content.packager.AbstractMETSDisseminator
extraFiles, MANIFEST_FILE
 
Constructor Summary
DSpaceMETSDisseminator()
           
 
Method Summary
 void addRightsMd(Context context, Item item, edu.harvard.hul.ois.mets.AmdSec amdSec)
          Add rights MD (licenses) for DSpace item.
 void addStructMap(Context context, Item item, PackageParameters params, edu.harvard.hul.ois.mets.Mets mets)
          Add any additional structMap elements to the METS document, as required by this subclass.
 String bundleToFileGrp(String bname)
          Returns name of METS fileGrp corresponding to a DSpace bundle name.
 String[] getDmdTypes(PackageParameters params)
          Get DMD choice for Item.
 String getProfile()
          Return identifier string for the profile this produces.
 String getTechMdType(PackageParameters params)
          Get name of technical metadata crosswalk for Bitstreams.
 
Methods inherited from class org.dspace.content.packager.AbstractMETSDisseminator
disseminate, findOriginalBitstream, gensym, getMIMEType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DSpaceMETSDisseminator

public DSpaceMETSDisseminator()
Method Detail

getProfile

public String getProfile()
Return identifier string for the profile this produces.

Specified by:
getProfile in class AbstractMETSDisseminator
Returns:
string name of profile.

bundleToFileGrp

public String bundleToFileGrp(String bname)
Returns name of METS fileGrp corresponding to a DSpace bundle name. They are mostly the same except for bundle "ORIGINAL" maps to "CONTENT". Don't worry about the metadata bundles since they are not packaged as fileGrps, but in *mdSecs.

Specified by:
bundleToFileGrp in class AbstractMETSDisseminator
Parameters:
bname - name of DSpace bundle.
Returns:
string name of fileGrp

getDmdTypes

public String[] getDmdTypes(PackageParameters params)
                     throws SQLException,
                            IOException,
                            AuthorizeException
Get DMD choice for Item. It defaults to MODS, but is overridden by the package parameters if they contain any "dmd" keys. The params may contain one or more values for "dmd"; each of those is the name of a crosswalk plugin, optionally followed by colon and its METS MDTYPE name.

Specified by:
getDmdTypes in class AbstractMETSDisseminator
Parameters:
params - the PackageParameters passed to the disseminator.
Returns:
array of metadata type strings, never null.
Throws:
SQLException
IOException
AuthorizeException

getTechMdType

public String getTechMdType(PackageParameters params)
                     throws SQLException,
                            IOException,
                            AuthorizeException
Get name of technical metadata crosswalk for Bitstreams. Default is PREMIS. This is both the name of the crosswalk plugin and the METS MDTYPE.

Specified by:
getTechMdType in class AbstractMETSDisseminator
Parameters:
params - the PackageParameters passed to the disseminator.
Returns:
array of metadata type strings, never null.
Throws:
SQLException
IOException
AuthorizeException

addRightsMd

public void addRightsMd(Context context,
                        Item item,
                        edu.harvard.hul.ois.mets.AmdSec amdSec)
                 throws SQLException,
                        IOException,
                        AuthorizeException,
                        edu.harvard.hul.ois.mets.helper.MetsException
Add rights MD (licenses) for DSpace item. These may include a deposit license, and Creative Commons.

Specified by:
addRightsMd in class AbstractMETSDisseminator
Throws:
SQLException
IOException
AuthorizeException
edu.harvard.hul.ois.mets.helper.MetsException

addStructMap

public void addStructMap(Context context,
                         Item item,
                         PackageParameters params,
                         edu.harvard.hul.ois.mets.Mets mets)
                  throws SQLException,
                         IOException,
                         AuthorizeException,
                         edu.harvard.hul.ois.mets.helper.MetsException
Description copied from class: AbstractMETSDisseminator
Add any additional structMap elements to the METS document, as required by this subclass. A simple default structure map which fulfills the minimal DSpace METS DIP/SIP requirements is already present, so this does not need to do anything.

Specified by:
addStructMap in class AbstractMETSDisseminator
mets - the METS document to which to add structMaps
Throws:
SQLException
IOException
AuthorizeException
edu.harvard.hul.ois.mets.helper.MetsException


Copyright © 2010 DuraSpace. All Rights Reserved.