|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface PackageIngester
Plugin Interface to interpret a Submission Information Package (SIP) and create (or replace) a DSpace item from its contents.
A package is a single data stream containing enough information to construct an Item. It can be anything from an archive like a Zip file with a manifest and metadata, to a simple manifest containing external references to the content, to a self-contained file such as a PDF. The interpretation of the package is entirely at the discretion of the implementing class.
The ingest methods are also given an attribute-value list of "parameters" which may modify their actions. The parameters list is a generalized mechanism to pass parameters from the requestor to the packager, since different packagers will understand different sets of parameters.
PackageParameters| Method Summary | |
|---|---|
WorkspaceItem |
ingest(Context context,
Collection collection,
InputStream in,
PackageParameters params,
String license)
Create new Item out of the ingested package. |
Item |
replace(Context context,
Item item,
InputStream in,
PackageParameters params)
Replace an existing Item with contents of the ingested package. |
| Method Detail |
|---|
WorkspaceItem ingest(Context context,
Collection collection,
InputStream in,
PackageParameters params,
String license)
throws PackageException,
CrosswalkException,
AuthorizeException,
SQLException,
IOException
WorkspaceItem, so it is
up to the caller to decide whether to install it or submit
it to normal DSpace Workflow.
The deposit license is passed explicitly as a string since there
is no place for it in many package formats. It is optional and may
be given as null.
context - DSpace context.collection - collection under which to create new item.in - input stream containing package to ingest.params - Properties-style list of options (interpreted by each packager).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
Item replace(Context context,
Item item,
InputStream in,
PackageParameters params)
throws PackageException,
UnsupportedOperationException,
CrosswalkException,
AuthorizeException,
SQLException,
IOException
replace,
since it somewhat contradicts the archival nature of DSpace.
The exact function of this method is highly implementation-dependent.
context - DSpace context.item - existing item to be replacedin - input stream containing package to ingest.params - Properties-style list of options specific to this packager
PackageValidationException - if package is unacceptable or there is
a fatal error turning it into an Item.
UnsupportedOperationException - if this packager does not
implement replace.
PackageException
CrosswalkException
AuthorizeException
SQLException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||