|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dspace.content.packager.AbstractMETSDisseminator
public abstract class AbstractMETSDisseminator
Base class for disseminator of
METS (Metadata Encoding & Transmission Standard) Package.
See http://www.loc.gov/standards/mets/
This is a generic packager framework intended to be subclassed to create packagers for more specific METS "profiles". METS is an abstract and flexible framework that can encompass many different kinds of metadata and inner package structures.
Package Parameters:
manifestOnly -- if true, generate a standalone XML
document of the METS manifest instead of a complete package. Any
other metadata (such as licenses) will be encoded inline.
Default is false.
unauthorized -- this determines what is done when the
packager encounters a Bundle or Bitstream it is not authorized to
read. By default, it just quits with an AuthorizeException.
If this option is present, it must be one of the following values:
skip -- simply exclude unreadable content from package.
zero -- include unreadable bitstreams as 0-length files;
unreadable Bundles will still cause authorize errors.
| Field Summary | |
|---|---|
protected Map |
extraFiles
Table of files to add to package, such as mdRef'd metadata. |
static String |
MANIFEST_FILE
Filename of manifest, relative to package toplevel. |
| Constructor Summary | |
|---|---|
AbstractMETSDisseminator()
|
|
| Method Summary | |
|---|---|
abstract void |
addRightsMd(Context context,
Item item,
edu.harvard.hul.ois.mets.AmdSec amdSec)
Add Rights metadata for the Item, in the form of ( rightsMd elements) to the given metadata section. |
abstract void |
addStructMap(Context context,
Item item,
PackageParameters params,
edu.harvard.hul.ois.mets.Mets mets)
Add any additional structMap elements to the
METS document, as required by this subclass. |
abstract String |
bundleToFileGrp(String bname)
Returns fileGrp's USE attribute value corresponding to a DSpace bundle name. |
void |
disseminate(Context context,
DSpaceObject dso,
PackageParameters params,
OutputStream pkg)
Export the object (Item, Collection, or Community) to a package file on the indicated OutputStream. |
protected static Bitstream |
findOriginalBitstream(Item item,
Bitstream derived)
For a bitstream that's a thumbnail or extracted text, find the corresponding bitstream it was derived from, in the ORIGINAL bundle. |
protected String |
gensym(String prefix)
Make a new unique ID with specified prefix. |
abstract String[] |
getDmdTypes(PackageParameters params)
Get the types of Item-wide DMD to include in package. |
String |
getMIMEType(PackageParameters params)
Identifies the MIME-type of this package, e.g. |
abstract String |
getProfile()
Returns name of METS profile to which this package conforms, e.g. |
abstract String |
getTechMdType(PackageParameters params)
Get the type string of the technical metadata to create for each Bitstream in the Item. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String MANIFEST_FILE
protected Map extraFiles
InputStream
with contents to put in it.
New map is created by disseminate().
| Constructor Detail |
|---|
public AbstractMETSDisseminator()
| Method Detail |
|---|
protected String gensym(String prefix)
prefix - the prefix of the identifier, constrained to XML ID schema
public String getMIMEType(PackageParameters params)
PackageDisseminator"application/zip".
Required when sending the package via HTTP, to
provide the Content-Type header.
getMIMEType in interface PackageDisseminator
public void disseminate(Context context,
DSpaceObject dso,
PackageParameters params,
OutputStream pkg)
throws PackageValidationException,
CrosswalkException,
AuthorizeException,
SQLException,
IOException
disseminate in interface PackageDisseminatorcontext - - DSpace context.dso - - DSpace object (item, collection, etc)pkg - - output stream on which to write packageparams - Properties-style list of options specific to this packager
PackageException - if package cannot be created or there is
a fatal error in creating it.
PackageValidationException - if package cannot be created or there is
a fatal error in creating it.
CrosswalkException
AuthorizeException
SQLException
IOException
protected static Bitstream findOriginalBitstream(Item item,
Bitstream derived)
throws SQLException
item - the item we're dealing withderived - the derived bitstream
SQLExceptionpublic abstract String getProfile()
public abstract String bundleToFileGrp(String bname)
bname - name of DSpace bundle.
public abstract String[] getDmdTypes(PackageParameters params)
throws SQLException,
IOException,
AuthorizeException
"DC:qualifiedDublinCore" tells it to
create a METS section with MDTYPE="DC" and use the plugin
named "qualifiedDublinCore" to obtain the data.
params - the PackageParameters passed to the disseminator.
SQLException
IOException
AuthorizeException
public abstract String getTechMdType(PackageParameters params)
throws SQLException,
IOException,
AuthorizeException
getDmdTypes() above.
params - the PackageParameters passed to the disseminator.
SQLException
IOException
AuthorizeException
public abstract void addRightsMd(Context context,
Item item,
edu.harvard.hul.ois.mets.AmdSec amdSec)
throws SQLException,
IOException,
AuthorizeException,
edu.harvard.hul.ois.mets.helper.MetsException
rightsMd elements) to the given metadata section.
SQLException
IOException
AuthorizeException
edu.harvard.hul.ois.mets.helper.MetsException
public abstract void addStructMap(Context context,
Item item,
PackageParameters params,
edu.harvard.hul.ois.mets.Mets mets)
throws SQLException,
IOException,
AuthorizeException,
edu.harvard.hul.ois.mets.helper.MetsException
structMap elements to the
METS document, as required by this subclass. A simple default
structure map which fulfills the minimal DSpace METS DIP/SIP
requirements is already present, so this does not need to do anything.
mets - the METS document to which to add structMaps
SQLException
IOException
AuthorizeException
edu.harvard.hul.ois.mets.helper.MetsException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||