Class DSpaceAIPDisseminator
- All Implemented Interfaces:
PackageDisseminator
Configuration keys:
The following take as values a space-and-or-comma-separated list of plugin names that name *either* a DisseminationCrosswalk or StreamDisseminationCrosswalk plugin. Shown are the default values. The value may be a simple crosswalk name, or a METS MDsec-name followed by a colon and the crosswalk name e.g. "DSpaceDepositLicense:DSPACE_DEPLICENSE" # MD types to put in the sourceMD section of the object. aip.disseminate.sourceMD = AIP-TECHMD # MD types to put in the techMD section of the object (and member Bitstreams if an Item) aip.disseminate.techMD = PREMIS # MD types to put in digiprovMD section of the object. #aip.disseminate.digiprovMD = # MD types to put in the rightsMD section of the object. aip.disseminate.rightsMD = DSpaceDepositLicense:DSPACE_DEPLICENSE, \ CreativeCommonsRDF:DSPACE_CCRDF, CreativeCommonsText:DSPACE_CCTXT, METSRights # MD types to put in dmdSec's corresponding the object. aip.disseminate.dmd = MODS, DIM
- Version:
- $Revision: 1.1 $
- Author:
- Larry Stone, Tim Donohue
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.dspace.content.packager.AbstractMETSDisseminator
AbstractMETSDisseminator.MdStreamCache -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ConfigurationServiceprotected static final Stringprotected static final Stringprotected PackageParametersprotected static final Stringprotected booleanstatic final StringTYPE of the div containing AIP's parent handle in its mptr.static final StringUnique identifier for the profile of the METS document.Fields inherited from class org.dspace.content.packager.AbstractMETSDisseminator
authorizeService, bitstreamService, creativeCommonsService, DEFAULT_MODIFIED_DATE, idCounter, outputter, siteService, TEMPLATE_TYPE_SUFFIXFields inherited from class org.dspace.content.packager.AbstractPackageDisseminator
communityService, itemService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddStructMap(Context context, DSpaceObject dso, PackageParameters params, edu.harvard.hul.ois.mets.Mets mets) Adds another structMap element to contain the "parent link" that is an essential part of every AIP.bundleToFileGrp(String bname) Returns name of METS fileGrp corresponding to a DSpace bundle name.voiddisseminate(Context context, DSpaceObject dso, PackageParameters params, File pkgFile) Export the object (Item, Collection, or Community) as a "package" on the indicated OutputStream.Get our list of bundles to include/exclude in this AIP, based on the passed in parametersString[]getDigiprovMdTypes(Context context, DSpaceObject dso, PackageParameters params) Return the name of all crosswalks to run for the digiprovMD section of the METS Manifest.String[]getDmdTypes(Context context, DSpaceObject dso, PackageParameters params) Return the name of all crosswalks to run for the dmdSec section of the METS Manifest.Returns a user help string which should describe the additional valid command-line options that this packager implementation will accept when using the-oor--optionflags with the Packager script.Return identifier string for the METS profile this produces.String[]getRightsMdTypes(Context context, DSpaceObject dso, PackageParameters params) Return the name of all crosswalks to run for the rightsMD section of the METS Manifest.String[]getSourceMdTypes(Context context, DSpaceObject dso, PackageParameters params) Return the name of all crosswalks to run for the sourceMD section of the METS Manifest.String[]getTechMdTypes(Context context, DSpaceObject dso, PackageParameters params) Return the name of all crosswalks to run for the techMD section of the METS Manifest.booleanincludeBundle(Bundle bundle) By default, include all bundles in AIP as content.edu.harvard.hul.ois.mets.MetsHdrmakeMetsHdr(Context context, DSpaceObject dso, PackageParameters params) Create the metsHdr element for the AIP METS Manifest.Methods inherited from class org.dspace.content.packager.AbstractMETSDisseminator
addAmdSec, addBitstreamsToZip, addLogoBitstream, addToAmdSec, crosswalkToMetsElement, findOriginalBitstream, gensym, getHandleURN, getMIMEType, getObjectTypeString, linkLicenseRefsToBitstreams, makeBitstreamURL, makeChildDiv, makeFileDiv, makeManifest, makeMdSec, makePersistentID, resetCounter, setMdType, setMdType, writeZipPackageMethods inherited from class org.dspace.content.packager.AbstractPackageDisseminator
addToPackageList, disseminateAll, getPackageList
-
Field Details
-
PROFILE_1_0
Unique identifier for the profile of the METS document. To ensure uniqueness, it is the URL that the XML schema document would have _if_ there were to be one. There is no schema at this time.- See Also:
-
PARENT_DIV_TYPE
TYPE of the div containing AIP's parent handle in its mptr.- See Also:
-
DSPACE_DEPOSIT_LICENSE_MDTYPE
- See Also:
-
CREATIVE_COMMONS_RDF_MDTYPE
- See Also:
-
CREATIVE_COMMONS_TEXT_MDTYPE
- See Also:
-
disseminateParams
-
filterBundles
-
excludeBundles
protected boolean excludeBundles -
configurationService
-
-
Constructor Details
-
DSpaceAIPDisseminator
public DSpaceAIPDisseminator()
-
-
Method Details
-
disseminate
public void disseminate(Context context, DSpaceObject dso, PackageParameters params, File pkgFile) throws PackageValidationException, CrosswalkException, AuthorizeException, SQLException, IOException Description copied from class:AbstractMETSDisseminatorExport the object (Item, Collection, or Community) as a "package" on the indicated OutputStream. Package is any serialized representation of the item, at the discretion of the implementing class. It does not have to include content bitstreams.Use the
paramsparameter list to adjust the way the package is made, e.g. including a "metadataOnly" parameter might make the package a bare manifest in XML instead of a Zip file including manifest and contents.Throws an exception of the chosen object is not acceptable or there is a failure creating the package.
- Specified by:
disseminatein interfacePackageDisseminator- Overrides:
disseminatein classAbstractMETSDisseminator- Parameters:
context- DSpace context.dso- DSpace object (item, collection, etc)params- Properties-style list of options specific to this packagerpkgFile- File where export package should be written- Throws:
PackageValidationException- if package cannot be created or there is a fatal error in creating it.CrosswalkException- if crosswalk errorAuthorizeException- if authorization errorSQLException- if database errorIOException- if IO error
-
getProfile
Return identifier string for the METS profile this produces.- Specified by:
getProfilein classAbstractMETSDisseminator- Returns:
- string name of profile.
-
bundleToFileGrp
Returns name of METS fileGrp corresponding to a DSpace bundle name. For AIP the mapping is direct.- Specified by:
bundleToFileGrpin classAbstractMETSDisseminator- Parameters:
bname- name of DSpace bundle.- Returns:
- string name of fileGrp
-
makeMetsHdr
public edu.harvard.hul.ois.mets.MetsHdr makeMetsHdr(Context context, DSpaceObject dso, PackageParameters params) throws SQLException Create the metsHdr element for the AIP METS Manifest.CREATEDATE is time at which the package (i.e. this manifest) was created. LASTMODDATE is last-modified time of the target object, if available. Agent describes the archive this belongs to.
- Specified by:
makeMetsHdrin classAbstractMETSDisseminator- Parameters:
context- DSpace Contextdso- current DSpace Objectparams- Packager Parameters- Returns:
- List of crosswalk names to run
- Throws:
SQLException- if error
-
getDmdTypes
public String[] getDmdTypes(Context context, DSpaceObject dso, PackageParameters params) throws SQLException, IOException, AuthorizeException Return the name of all crosswalks to run for the dmdSec section of the METS Manifest.Default is DIM (DSpace Internal Metadata) and MODS.
- Specified by:
getDmdTypesin classAbstractMETSDisseminator- Parameters:
context- DSpace Contextdso- current DSpace Objectparams- Packager Parameters- Returns:
- List of crosswalk names to run
- Throws:
SQLException- if database errorIOException- if IO errorAuthorizeException- if authorization error
-
getTechMdTypes
public String[] getTechMdTypes(Context context, DSpaceObject dso, PackageParameters params) throws SQLException, IOException, AuthorizeException Return the name of all crosswalks to run for the techMD section of the METS Manifest.Default is PREMIS.
- Specified by:
getTechMdTypesin classAbstractMETSDisseminator- Parameters:
context- DSpace Contextdso- current DSpace Objectparams- Packager Parameters- Returns:
- List of crosswalk names to run
- Throws:
SQLException- if database errorIOException- if IO errorAuthorizeException- if authorization error
-
getSourceMdTypes
public String[] getSourceMdTypes(Context context, DSpaceObject dso, PackageParameters params) throws SQLException, IOException, AuthorizeException Return the name of all crosswalks to run for the sourceMD section of the METS Manifest.Default is AIP-TECHMD.
In an AIP, the sourceMD element MUST include the original persistent identifier (Handle) of the object, and the original persistent ID (Handle) of its parent in the archive, so that it can be restored.
- Specified by:
getSourceMdTypesin classAbstractMETSDisseminator- Parameters:
context- DSpace Contextdso- current DSpace Objectparams- Packager Parameters- Returns:
- List of crosswalk names to run
- Throws:
SQLException- if database errorIOException- if IO errorAuthorizeException- if authorization error
-
getDigiprovMdTypes
public String[] getDigiprovMdTypes(Context context, DSpaceObject dso, PackageParameters params) throws SQLException, IOException, AuthorizeException Return the name of all crosswalks to run for the digiprovMD section of the METS Manifest.By default, none are returned
- Specified by:
getDigiprovMdTypesin classAbstractMETSDisseminator- Parameters:
context- DSpace Contextdso- current DSpace Objectparams- Packager Parameters- Returns:
- List of crosswalk names to run
- Throws:
SQLException- if database errorIOException- if IO errorAuthorizeException- if authorization error
-
getRightsMdTypes
public String[] getRightsMdTypes(Context context, DSpaceObject dso, PackageParameters params) throws SQLException, IOException, AuthorizeException Return the name of all crosswalks to run for the rightsMD section of the METS Manifest.By default, Deposit Licenses and CC Licenses will be added for Items. Also, by default METSRights info will be added for all objects.
- Specified by:
getRightsMdTypesin classAbstractMETSDisseminator- Parameters:
context- DSpace Contextdso- current DSpace Objectparams- Packager Parameters- Returns:
- List of crosswalk names to run
- Throws:
SQLException- if database errorIOException- if IO errorAuthorizeException- if authorization error
-
addStructMap
public void addStructMap(Context context, DSpaceObject dso, PackageParameters params, edu.harvard.hul.ois.mets.Mets mets) throws SQLException, IOException, AuthorizeException, edu.harvard.hul.ois.mets.helper.MetsException Adds another structMap element to contain the "parent link" that is an essential part of every AIP. This is a structmap of one div, which contains an mptr indicating the Handle of the parent of this object in the archive. The div has a unique TYPE attribute value, "AIP Parent Link", and the mptr has a LOCTYPE of "HANDLE" and an xlink:href containing the raw Handle value.Note that the parent Handle has to be stored here because the parent is needed to create a DSpace Object when restoring the AIP; it cannot be determined later once the ingester parses it out of the metadata when the crosswalks are run. So, since the crosswalks require an object to operate on, and creating the object requires a parent, we cannot depend on metadata processed by crosswalks (e.g. AIP techMd) for the parent, it has to be at a higher level in the AIP manifest. The structMap is an obvious and standards-compliant location for it.
- Specified by:
addStructMapin classAbstractMETSDisseminator- Parameters:
context- DSpace contextdso- Current DSpace objectparams- Packager Parametersmets- METS manifest- Throws:
SQLException- if database errorIOException- if IO errorAuthorizeException- if authorization erroredu.harvard.hul.ois.mets.helper.MetsException- METS Java toolkit exception class.
-
includeBundle
By default, include all bundles in AIP as content.However, if the user specified a comma separated list of bundle names via the "filterBundles" (or "includeBundles") option, then check if this bundle is in that list. If it is, return true. If it is not, return false.
- Specified by:
includeBundlein classAbstractMETSDisseminator- Parameters:
bundle- Bundle to check for- Returns:
- true if bundle should be disseminated when disseminating Item AIPs
-
getBundleList
Get our list of bundles to include/exclude in this AIP, based on the passed in parameters- Returns:
- List of bundles to filter on
-
getParameterHelp
Returns a user help string which should describe the additional valid command-line options that this packager implementation will accept when using the-oor--optionflags with the Packager script.- Specified by:
getParameterHelpin interfacePackageDisseminator- Overrides:
getParameterHelpin classAbstractMETSDisseminator- Returns:
- a string describing additional command-line options available with this packager
-