|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dspace.content.packager.RoleIngester
public class RoleIngester
Create EPersons and Groups from a file of external representations.
| Constructor Summary | |
|---|---|
RoleIngester()
|
|
| Method Summary | |
|---|---|
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. |
DSpaceObject |
ingest(Context context,
DSpaceObject parent,
File pkgFile,
PackageParameters params,
String license)
Create new DSpaceObject out of the ingested package. |
List<DSpaceObject> |
ingestAll(Context context,
DSpaceObject parent,
File pkgFile,
PackageParameters params,
String license)
Recursively create one or more DSpace Objects out of the contents of the ingested package (and all other referenced packages). |
static void |
ingestStream(Context context,
DSpaceObject parent,
PackageParameters params,
InputStream stream)
Ingest roles from an InputStream. |
DSpaceObject |
replace(Context context,
DSpaceObject dso,
File pkgFile,
PackageParameters params)
Replace an existing DSpace Object with contents of the ingested package. |
List<DSpaceObject> |
replaceAll(Context context,
DSpaceObject dso,
File pkgFile,
PackageParameters params)
Recursively replace one or more DSpace Objects out of the contents of the ingested package (and all other referenced packages). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RoleIngester()
| Method Detail |
|---|
public static void ingestStream(Context context,
DSpaceObject parent,
PackageParameters params,
InputStream stream)
throws PackageException,
SQLException,
AuthorizeException
context - DSpace Contextparent - the Parent DSpaceObjectstream - the XML Document InputStream
PackageException
SQLException
AuthorizeException
public DSpaceObject ingest(Context context,
DSpaceObject parent,
File pkgFile,
PackageParameters params,
String license)
throws PackageException,
CrosswalkException,
AuthorizeException,
SQLException,
IOException
PackageIngesterDSpaceObject. For Items, it is up to the caller to
decide whether to install it or submit it to normal DSpace Workflow.
The deposit license (Only significant for Item) 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.
Use ingestAll method to perform a recursive ingest of all
packages which are referenced by an initial package.
ingest in interface PackageIngestercontext - DSpace context.parent - parent under which to create new object
(may be null -- in which case ingester must determine parent from package
or throw an error).pkgFile - The package file to ingestparams - 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 a DSpaceObject.
PackageException
CrosswalkException
AuthorizeException
SQLException
IOException
public List<DSpaceObject> ingestAll(Context context,
DSpaceObject parent,
File pkgFile,
PackageParameters params,
String license)
throws PackageException,
UnsupportedOperationException,
CrosswalkException,
AuthorizeException,
SQLException,
IOException
PackageIngesterFor example, a scenario may be to create a Collection based on a collection-level package, and also create an Item for every item-level package referenced by the collection-level package.
The output of this method is one or more newly created
The packager may choose not to implement
The deposit license (Only significant for Item) 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
DspaceObjects.
ingestAll,
or simply forward the call to ingest if it is unable to support
recursive ingestion.
null.
ingestAll in interface PackageIngester
context - DSpace context.parent - parent under which to create the initial object
(may be null -- in which case ingester must determine parent from package
or throw an error).pkgFile - The initial package file to ingestparams - Properties-style list of options (interpreted by each packager).license - may be null, which takes default license.
PackageValidationException - if initial package (or any referenced package)
is unacceptable or there is a fatal error in creating a DSpaceObject
UnsupportedOperationException - if this packager does not
implement ingestAll
PackageException
CrosswalkException
AuthorizeException
SQLException
IOException
public DSpaceObject replace(Context context,
DSpaceObject dso,
File pkgFile,
PackageParameters params)
throws PackageException,
UnsupportedOperationException,
CrosswalkException,
AuthorizeException,
SQLException,
IOException
PackageIngesterreplace,
since it somewhat contradicts the archival nature of DSpace.
The exact function of this method is highly implementation-dependent.
Use replaceAll method to perform a recursive replace of
objects referenced by a set of packages.
replace in interface PackageIngestercontext - DSpace context.dso - existing DSpace Object to be replaced, may be null
if object to replace can be determined from packagepkgFile - The package file 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
public List<DSpaceObject> replaceAll(Context context,
DSpaceObject dso,
File pkgFile,
PackageParameters params)
throws PackageException,
UnsupportedOperationException,
CrosswalkException,
AuthorizeException,
SQLException,
IOException
PackageIngesterdso. All other
objects are replaced based on information provided in the referenced packages.
For example, a scenario may be to replace a Collection based on a collection-level package, and also replace *every* Item in that collection based on the item-level packages referenced by the collection-level package.
Please note that since the dso input only specifies the
initial object to replace, any additional objects to replace must be
determined based on the referenced packages (or initial package itself).
The output of this method is one or more replaced
The packager may choose not to implement
DspaceObjects.
replaceAll,
since it somewhat contradicts the archival nature of DSpace. It also
may choose to forward the call to replace if it is unable to
support recursive replacement.
replaceAll in interface PackageIngester
context - DSpace context.dso - initial existing DSpace Object to be replaced, may be null
if object to replace can be determined from packagepkgFile - The package file to ingest.params - Properties-style list of options specific to this packager
PackageValidationException - if initial package (or any referenced package)
is unacceptable or there is a fatal error in creating a DSpaceObject
UnsupportedOperationException - if this packager does not
implement replaceAll
PackageException
CrosswalkException
AuthorizeException
SQLException
IOException
public String getParameterHelp()
-o or
--option flags with the Packager script.
getParameterHelp in interface PackageIngester
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||