Class DSpaceAIPDisseminator

  • All Implemented Interfaces:
    PackageDisseminator

    public class DSpaceAIPDisseminator
    extends AbstractMETSDisseminator
    Subclass of the METS packager framework to disseminate a DSpace Archival Information Package (AIP). The AIP is intended to be, foremost, a _complete_ and _accurate_ representation of one object in the DSpace object model. An AIP contains all of the information needed to restore the object precisely in another DSpace archive instance.

    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:
    AbstractMETSDisseminator, AbstractPackageDisseminator
    • Field Detail

      • PROFILE_1_0

        public static final String 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:
        Constant Field Values
      • PARENT_DIV_TYPE

        public static final String PARENT_DIV_TYPE
        TYPE of the div containing AIP's parent handle in its mptr.
        See Also:
        Constant Field Values
      • filterBundles

        protected List<String> filterBundles
      • excludeBundles

        protected boolean excludeBundles
    • Constructor Detail

      • DSpaceAIPDisseminator

        public DSpaceAIPDisseminator()
    • Method Detail

      • bundleToFileGrp

        public String bundleToFileGrp​(String bname)
        Returns name of METS fileGrp corresponding to a DSpace bundle name. For AIP the mapping is direct.
        Specified by:
        bundleToFileGrp in class AbstractMETSDisseminator
        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:
        makeMetsHdr in class AbstractMETSDisseminator
        Parameters:
        context - DSpace Context
        dso - current DSpace Object
        params - Packager Parameters
        Returns:
        List of crosswalk names to run
        Throws:
        SQLException - if 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:
        addStructMap in class AbstractMETSDisseminator
        Parameters:
        context - DSpace context
        dso - Current DSpace object
        params - Packager Parameters
        mets - METS manifest
        Throws:
        SQLException - if database error
        IOException - if IO error
        AuthorizeException - if authorization error
        edu.harvard.hul.ois.mets.helper.MetsException - METS Java toolkit exception class.
      • includeBundle

        public boolean includeBundle​(Bundle bundle)
        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:
        includeBundle in class AbstractMETSDisseminator
        Parameters:
        bundle - Bundle to check for
        Returns:
        true if bundle should be disseminated when disseminating Item AIPs
      • getBundleList

        protected List<String> 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

        public 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.
        Specified by:
        getParameterHelp in interface PackageDisseminator
        Overrides:
        getParameterHelp in class AbstractMETSDisseminator
        Returns:
        a string describing additional command-line options available with this packager