public class DSpaceAIPDisseminator extends AbstractMETSDisseminator
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
AbstractMETSDisseminator
,
AbstractPackageDisseminator
AbstractMETSDisseminator.MdStreamCache
Modifier and Type | Field and Description |
---|---|
static String |
PARENT_DIV_TYPE
TYPE of the div containing AIP's parent handle in its mptr.
|
static String |
PROFILE_1_0
Unique identifier for the profile of the METS document.
|
TEMPLATE_TYPE_SUFFIX
Constructor and Description |
---|
DSpaceAIPDisseminator() |
Modifier and Type | Method and Description |
---|---|
void |
addStructMap(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.
|
String |
bundleToFileGrp(String bname)
Returns name of METS fileGrp corresponding to a DSpace bundle name.
|
void |
disseminate(Context context,
DSpaceObject dso,
PackageParameters params,
File pkgFile)
Export the object (Item, Collection, or Community) as a
"package" on the indicated OutputStream.
|
protected List<String> |
getBundleList()
Get our list of bundles to include/exclude in this AIP,
based on the passed in parameters
|
String[] |
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.
|
String |
getParameterHelp()
Returns a user help string which should describe the
additional valid command-line options that this packager
implementation will accept when using the
-o or
--option flags with the Packager script. |
String |
getProfile()
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.
|
boolean |
includeBundle(Bundle bundle)
By default, include all bundles in AIP as content.
|
edu.harvard.hul.ois.mets.MetsHdr |
makeMetsHdr(Context context,
DSpaceObject dso,
PackageParameters params)
Create the metsHdr element for the AIP METS Manifest.
|
addAmdSec, addBitstreamsToZip, addLogoBitstream, addToAmdSec, findOriginalBitstream, gensym, getHandleURN, getMIMEType, getObjectTypeString, linkLicenseRefsToBitstreams, makeBitstreamURL, makeChildDiv, makeFileDiv, makeManifest, makeMdSec, makePersistentID, resetCounter, setMdType, setMdType, writeZipPackage
addToPackageList, disseminateAll, getPackageList
public static final String PROFILE_1_0
public static final String PARENT_DIV_TYPE
public void disseminate(Context context, DSpaceObject dso, PackageParameters params, File pkgFile) throws PackageValidationException, CrosswalkException, AuthorizeException, SQLException, IOException
AbstractMETSDisseminator
Use the params
parameter 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.
disseminate
in interface PackageDisseminator
disseminate
in class AbstractMETSDisseminator
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 writtenPackageValidationException
- if package cannot be created or there
is a fatal error in creating it.CrosswalkException
AuthorizeException
SQLException
IOException
public String getProfile()
getProfile
in class AbstractMETSDisseminator
public String bundleToFileGrp(String bname)
bundleToFileGrp
in class AbstractMETSDisseminator
bname
- name of DSpace bundle.public edu.harvard.hul.ois.mets.MetsHdr makeMetsHdr(Context context, DSpaceObject dso, PackageParameters params)
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.
makeMetsHdr
in class AbstractMETSDisseminator
context
- DSpace Contextdso
- current DSpace Objectparams
- Packager ParametersSQLException
IOException
AuthorizeException
public String[] getDmdTypes(Context context, DSpaceObject dso, PackageParameters params) throws SQLException, IOException, AuthorizeException
Default is DIM (DSpace Internal Metadata) and MODS.
getDmdTypes
in class AbstractMETSDisseminator
context
- DSpace Contextdso
- current DSpace Objectparams
- Packager ParametersSQLException
IOException
AuthorizeException
public String[] getTechMdTypes(Context context, DSpaceObject dso, PackageParameters params) throws SQLException, IOException, AuthorizeException
Default is PREMIS.
getTechMdTypes
in class AbstractMETSDisseminator
context
- DSpace Contextdso
- current DSpace Objectparams
- Packager ParametersSQLException
IOException
AuthorizeException
public String[] getSourceMdTypes(Context context, DSpaceObject dso, PackageParameters params) throws SQLException, IOException, AuthorizeException
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.
getSourceMdTypes
in class AbstractMETSDisseminator
context
- DSpace Contextdso
- current DSpace Objectparams
- Packager ParametersSQLException
IOException
AuthorizeException
public String[] getDigiprovMdTypes(Context context, DSpaceObject dso, PackageParameters params) throws SQLException, IOException, AuthorizeException
By default, none are returned
getDigiprovMdTypes
in class AbstractMETSDisseminator
context
- DSpace Contextdso
- current DSpace Objectparams
- Packager ParametersSQLException
IOException
AuthorizeException
public String[] getRightsMdTypes(Context context, DSpaceObject dso, PackageParameters params) throws SQLException, IOException, AuthorizeException
By default, Deposit Licenses and CC Licenses will be added for Items. Also, by default METSRights info will be added for all objects.
getRightsMdTypes
in class AbstractMETSDisseminator
context
- DSpace Contextdso
- current DSpace Objectparams
- Packager ParametersSQLException
IOException
AuthorizeException
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
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.
addStructMap
in class AbstractMETSDisseminator
context
- DSpace contextdso
- Current DSpace objectparams
- Packager Parametersmets
- METS manifestSQLException
IOException
AuthorizeException
edu.harvard.hul.ois.mets.helper.MetsException
public boolean includeBundle(Bundle bundle)
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.
includeBundle
in class AbstractMETSDisseminator
bundle
- Bundle to check forprotected List<String> getBundleList()
public String getParameterHelp()
-o
or
--option
flags with the Packager script.getParameterHelp
in interface PackageDisseminator
getParameterHelp
in class AbstractMETSDisseminator
Copyright © 2016 DuraSpace. All Rights Reserved.