|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.dspace.content.packager.AbstractIMSCPIngester
public abstract class AbstractIMSCPIngester
Base class for package ingester of the IMS Content Package spec, or IMSCP.
For more information about IMSCP, see IMS Global Learning Consortium, http://www.imsglobal.org/content/packaging/
This is a generic packager framework intended to be subclassed to create ingesters for more specific IMSCP "profiles". IMSCP is an abstract and flexible framework that can encompass many different kinds of metadata and inner package structures each with its own expectations and restrictions.
IMSCPManifest| Constructor Summary | |
|---|---|
AbstractIMSCPIngester()
|
|
| Method Summary | |
|---|---|
abstract void |
addLicense(Context context,
Collection collection,
Item item,
IMSCPManifest manifest,
String license)
Add license(s) to Item based on contents of manifest and other policies. |
abstract void |
checkPackageFiles(Set packageFiles,
Set missingFiles,
IMSCPManifest manifest)
Hook for subclass to modify the test of the package's integrity, and add other tests. |
abstract void |
crosswalk(Context context,
Item item,
IMSCPManifest manifest,
boolean validate)
Crosswalk item's descriptive (and other Item-level) metadata from the manifest. |
abstract void |
finishItem(Context context,
Item item,
Collection collection)
Hook for final "finishing" operations on the new Item. |
abstract Class |
getManifestClass()
Get flavor of manifest used by this ingester. |
WorkspaceItem |
ingest(Context context,
Collection collection,
InputStream pkg,
PackageParameters params,
String license)
Create a new DSpace item out of an IMSCP content package. |
Item |
replace(Context ctx,
Item item,
InputStream pckage,
PackageParameters params)
XXX FIXME Replace is not implemented yet. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractIMSCPIngester()
| Method Detail |
|---|
public WorkspaceItem ingest(Context context,
Collection collection,
InputStream pkg,
PackageParameters params,
String license)
throws PackageException,
CrosswalkException,
AuthorizeException,
SQLException,
IOException
ingest in interface PackageIngestercontext - - DSpace context.collection - - collection under which to create new item.pkg - - input stream containing package to ingest.license - - may be null, which takes default license.
PackageValidationException - if package is unacceptable or there is
a fatal error turning it into an Item.
PackageException
CrosswalkException
AuthorizeException
SQLException
IOException
public Item replace(Context ctx,
Item item,
InputStream pckage,
PackageParameters params)
throws PackageException,
UnsupportedOperationException,
CrosswalkException,
AuthorizeException,
SQLException,
IOException
replace in interface PackageIngesterPackageException
UnsupportedOperationException
CrosswalkException
AuthorizeException
SQLException
IOExceptionpublic abstract Class getManifestClass()
public abstract void checkPackageFiles(Set packageFiles,
Set missingFiles,
IMSCPManifest manifest)
throws PackageValidationException,
CrosswalkException
The packageFiles contains "extra" files that were in
the package but were not referenced by the IMSCP manifest.
The implementation of this method should look for any "extra" files
uses (e.g. a checksum or cryptographic signature for the manifest
itself) and remove them from the Set.
The missingFiles set is for
any files
referenced by the manifest but not found in the package.
The implementation can check it for "false positives", or add
other missing files it knows of.
If either of the Sets missingFiles
or packageFiles
is not empty, the ingest will fail.
packageFiles - files in package but not referenced by manifest.missingFiles - files referenced by manifest but not in package
PackageValidationException
CrosswalkException
public abstract void crosswalk(Context context,
Item item,
IMSCPManifest manifest,
boolean validate)
throws PackageException,
CrosswalkException,
AuthorizeException,
SQLException,
IOException
PackageException
CrosswalkException
AuthorizeException
SQLException
IOException
public abstract void addLicense(Context context,
Collection collection,
Item item,
IMSCPManifest manifest,
String license)
throws PackageException,
CrosswalkException,
AuthorizeException,
SQLException,
IOException
This framework does not add any licenses by default.
context - the DSpace contextcollection - DSpace Collection to which the item is being submitted.license - optional user-supplied Deposit License text (may be null)
PackageException
CrosswalkException
AuthorizeException
SQLException
IOException
public abstract void finishItem(Context context,
Item item,
Collection collection)
throws PackageException,
CrosswalkException,
AuthorizeException,
SQLException,
IOException
context - the DSpace contextitem - the itemcollection - the parent collection to-be
PackageException
CrosswalkException
AuthorizeException
SQLException
IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||