public class DSpaceAIPIngester extends AbstractMETSIngester
This ingester recognizes two distinct types of AIPs: "Manifest-Only" and "External". The Manifest-Only AIP, which is selected by specifying a PackageParameters key "manifestOnly" with the value "true", refers to all its contents by reference only. For Community or Collection AIPs this means all references to their child objects are just via Handles. For Item AIPs all Bitreams are just referenced by their asset store location instead of finding them in the "package". The Manifest-Only AIP package format is simply a METS XML document serialized into a file.
An "external" AIP (the default), is a conventional Zip-file based package that includes copies of all bitstreams referenced by the object as well as a serialized METS XML document in the path "mets.xml". Configuration keys: # instructs which xwalk plugin to use for a given type of metadata mets.dspaceAIP.ingest.crosswalk.{mdSecName} = {pluginName} mets.dspaceAIP.ingest.crosswalk.DC = QDC mets.dspaceAIP.ingest.crosswalk.DSpaceDepositLicense = NULLSTREAM # Option to save METS manifest in the item: (default is false) mets.default.ingest.preserveManifest = false
AbstractMETSIngester,
AbstractPackageIngester,
PackageIngester,
METSManifestAbstractMETSIngester.MdrefManagerbitstreamFormatService, bitstreamService, bundleService, collectionService, communityService, handleService, itemService, workspaceItemService| Constructor and Description |
|---|
DSpaceAIPIngester() |
| Modifier and Type | Method and Description |
|---|---|
void |
addLicense(Context context,
Item item,
String license,
Collection collection,
PackageParameters params)
Ignore license when restoring an manifest-only AIP, since it should
be a bitstream in the AIP already.
|
void |
crosswalkObjectDmd(Context context,
DSpaceObject dso,
METSManifest manifest,
AbstractMETSIngester.MdrefManager callback,
org.jdom.Element[] dmds,
PackageParameters params)
Choose DMD section(s) to crosswalk.
|
void |
finishBitstream(Context context,
Bitstream bs,
org.jdom.Element mfile,
METSManifest manifest,
PackageParameters params)
Nothing extra to do to bitstream after ingestion.
|
void |
finishObject(Context context,
DSpaceObject dso,
PackageParameters params)
Last change to fix up a DSpace Object.
|
String |
getConfigurationName()
Name used to distinguish DSpace Configuration entries for this subclass.
|
int |
getObjectType(METSManifest manifest)
Return the type of DSpaceObject in this package; it is
in the TYPE attribute of the mets:mets element.
|
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. |
addBitstreams, addContainerLogo, addManifestBitstream, addTemplateItem, decodeHandleURN, getFileInputStream, getManifestBitstreamFormat, getObjectHandle, getParentObject, ingest, ingestObject, parsePackage, preserveManifest, removeObject, replace, replaceObject, useCollectionTemplateaddPackageReference, addToIngestedMap, getIngestedList, getIngestedMap, getPackageReferences, ingestAll, replaceAllpublic void crosswalkObjectDmd(Context context, DSpaceObject dso, METSManifest manifest, AbstractMETSIngester.MdrefManager callback, org.jdom.Element[] dmds, PackageParameters params) throws CrosswalkException, PackageValidationException, AuthorizeException, SQLException, IOException
The algorithm is:
1. Use whatever the dmd parameter specifies as the primary DMD.
2. If (1) is unspecified, find DIM (preferably) or MODS as primary DMD.
3. If (1) or (2) succeeds, crosswalk it and ignore all other DMDs with
same GROUPID
4. Crosswalk remaining DMDs not eliminated already.
crosswalkObjectDmd in class AbstractMETSIngestercontext - the DSpace contextdso - DSpace Objectmanifest - the METSManifestcallback - the MdrefManager (manages all external metadata files
referenced by METS mdref elements)dmds - array of Elements, each a METS dmdSec that
applies to the Item as a whole.PackageValidationException - validation errorCrosswalkException - if crosswalk errorIOException - if IO errorSQLException - if database errorAuthorizeException - if authorization errorpublic void addLicense(Context context, Item item, String license, Collection collection, PackageParameters params) throws PackageValidationException, AuthorizeException, SQLException, IOException
addLicense in class AbstractMETSIngestercontext - the DSpace contextitem - Itemlicense - optional user-supplied Deposit License text (may be null)collection - DSpace Collection to which the item is being submitted.PackageValidationException - validation errorIOException - if IO errorSQLException - if database errorAuthorizeException - if authorization errorpublic void finishObject(Context context, DSpaceObject dso, PackageParameters params) throws PackageValidationException, CrosswalkException, AuthorizeException, SQLException, IOException
For AIPs, if the object is an Item, we may want to make sure all of its metadata fields already exist in the database (otherwise, the database will throw errors when we attempt to save/update the Item)
finishObject in class AbstractMETSIngestercontext - DSpace Contextdso - DSpace objectparams - Packager ParametersPackageValidationExceptionSQLExceptionCrosswalkExceptionIOExceptionAuthorizeExceptionpublic void finishBitstream(Context context, Bitstream bs, org.jdom.Element mfile, METSManifest manifest, PackageParameters params) throws MetadataValidationException, SQLException, AuthorizeException, IOException
finishBitstream in class AbstractMETSIngestercontext - contextbs - bitstreammfile - elementmanifest - METS manifestparams - package paramsMetadataValidationException - if validation errorIOException - if IO errorSQLException - if database errorAuthorizeException - if authorization errorpublic int getObjectType(METSManifest manifest) throws PackageValidationException
getObjectType in class AbstractMETSIngestermanifest - METS manifestPackageValidationException - if package validation errorpublic String getConfigurationName()
getConfigurationName in class AbstractMETSIngesterpublic String getParameterHelp()
-o or
--option flags with the Packager script.getParameterHelp in interface PackageIngestergetParameterHelp in class AbstractMETSIngesterCopyright © 2022 LYRASIS. All rights reserved.