|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dspace.content.packager.AbstractPackageDisseminator
org.dspace.content.packager.AbstractMETSDisseminator
org.dspace.content.packager.DSpaceAIPDisseminator
public class DSpaceAIPDisseminator
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
AbstractMETSDisseminator,
AbstractPackageDisseminator| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.dspace.content.packager.AbstractMETSDisseminator |
|---|
AbstractMETSDisseminator.MdStreamCache |
| Field Summary | |
|---|---|
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. |
| Fields inherited from class org.dspace.content.packager.AbstractMETSDisseminator |
|---|
TEMPLATE_TYPE_SUFFIX |
| Constructor Summary | |
|---|---|
DSpaceAIPDisseminator()
|
|
| Method Summary | |
|---|---|
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. |
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 |
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. |
String |
makeBitstreamURL(Bitstream bitstream,
PackageParameters params)
Get the URL by which the METS manifest refers to a Bitstream member within the same package. |
edu.harvard.hul.ois.mets.MetsHdr |
makeMetsHdr(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, findOriginalBitstream, gensym, getHandleURN, getMIMEType, getObjectTypeString, getParameterHelp, linkLicenseRefsToBitstreams, makeChildDiv, makeFileDiv, makeManifest, makeMdSec, makePersistentID, setMdType, setMdType, writeZipPackage |
| Methods inherited from class org.dspace.content.packager.AbstractPackageDisseminator |
|---|
addToPackageList, disseminateAll, getPackageList |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String PROFILE_1_0
public static final String PARENT_DIV_TYPE
| Constructor Detail |
|---|
public DSpaceAIPDisseminator()
| Method Detail |
|---|
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 PackageDisseminatordisseminate in class AbstractMETSDisseminatorcontext - 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
PackageValidationException - if package cannot be created or there is
a fatal error in creating it.
CrosswalkException
AuthorizeException
SQLException
IOExceptionpublic String getProfile()
getProfile in class AbstractMETSDisseminatorpublic String bundleToFileGrp(String bname)
bundleToFileGrp in class AbstractMETSDisseminatorbname - 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 AbstractMETSDisseminatorcontext - DSpace Contextdso - current DSpace Objectparams - Packager Parameters
SQLException
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 AbstractMETSDisseminatorcontext - DSpace Contextdso - current DSpace Objectparams - Packager Parameters
SQLException
IOException
AuthorizeException
public String[] getTechMdTypes(Context context,
DSpaceObject dso,
PackageParameters params)
throws SQLException,
IOException,
AuthorizeException
Default is PREMIS.
getTechMdTypes in class AbstractMETSDisseminatorcontext - DSpace Contextdso - current DSpace Objectparams - Packager Parameters
SQLException
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 AbstractMETSDisseminatorcontext - DSpace Contextdso - current DSpace Objectparams - Packager Parameters
SQLException
IOException
AuthorizeException
public String[] getDigiprovMdTypes(Context context,
DSpaceObject dso,
PackageParameters params)
throws SQLException,
IOException,
AuthorizeException
By default, none are returned
getDigiprovMdTypes in class AbstractMETSDisseminatorcontext - DSpace Contextdso - current DSpace Objectparams - Packager Parameters
SQLException
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 AbstractMETSDisseminatorcontext - DSpace Contextdso - current DSpace Objectparams - Packager Parameters
SQLException
IOException
AuthorizeException
public String makeBitstreamURL(Bitstream bitstream,
PackageParameters params)
For a manifest-only AIP, this is a reference to an HTTP URL where the bitstream should be able to be downloaded from. An external AIP names a file in the package with a relative URL, that is, relative pathname.
makeBitstreamURL in class AbstractMETSDisseminatorbitstream - the Bitstreamparams - Packager Parameters
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 AbstractMETSDisseminatorcontext - DSpace contextdso - Current DSpace objectparams - Packager Parametersmets - METS manifest
SQLException
IOException
AuthorizeException
edu.harvard.hul.ois.mets.helper.MetsExceptionpublic boolean includeBundle(Bundle bundle)
However, if the user specified a comma separated list of bundle names via the "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 AbstractMETSDisseminatorbundle - Bundle to check for
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||