Package org.dspace.app.itemexport
Class ItemExport
java.lang.Object
org.dspace.scripts.DSpaceRunnable<ItemExportScriptConfiguration>
org.dspace.app.itemexport.ItemExport
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
ItemExportCLI
Item exporter to create simple AIPs for DSpace content. Currently exports
individual items, or entire collections. For instructions on use, see
printUsage() method.
ItemExport creates the simple AIP package that the importer also uses. It consists of:
/exportdir/42/ (one directory per item) / dublin_core.xml - qualified dublin core in RDF schema / contents - text file, listing one file per line / file1 - files contained in the item / file2 / ...
issues -doesn't handle special characters in metadata (needs to turn &'s into
&, etc.)
Modified by David Little, UCSD Libraries 12/21/04 to allow the registration of files (bitstreams) into DSpace.
- Author:
- David Little, Jay Paz
-
Nested Class Summary
Nested classes/interfaces inherited from class org.dspace.scripts.DSpaceRunnable
DSpaceRunnable.StepResult -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Collectionprotected static CollectionServiceprotected Stringprotected static final EPersonServiceprotected booleanprotected static HandleServiceprotected booleanprotected Stringprotected Itemprotected static ItemServiceprotected booleanprotected intstatic final Stringprotected intprotected Stringprotected booleanstatic final Stringstatic final Stringstatic final Stringprotected StringFields inherited from class org.dspace.scripts.DSpaceRunnable
commandLine, handler, helpCommandLine -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThis method will return the Configuration that the implementing DSpaceRunnable usesvoidThis method has to be included in every script and this will be the main execution block for the script that'll contain all the logic neededprotected voidprocess(Context context, ItemExportService itemExportService) Process the exportprotected voidsetDestDirName(Context context, ItemExportService itemExportService) Set the destination directory optionprotected voidSet the number optionvoidsetup()This method has to be included in every script and handles the setup of the script by parsing the CommandLine and setting the variablesprotected voidSet the zip optionprotected voidvalidate()Validate the optionsMethods inherited from class org.dspace.scripts.DSpaceRunnable
getEpersonIdentifier, getFileNamesFromInputStreamOptions, initialize, printHelp, run, setEpersonIdentifier
-
Field Details
-
TEMP_DIR
- See Also:
-
ZIP_NAME
- See Also:
-
ZIP_FILENAME
- See Also:
-
ZIP_EXT
- See Also:
-
typeString
-
destDirName
-
idString
-
seqStart
protected int seqStart -
type
protected int type -
item
-
collection
-
migrate
protected boolean migrate -
zip
protected boolean zip -
zipFileName
-
excludeBitstreams
protected boolean excludeBitstreams -
help
protected boolean help -
handleService
-
itemService
-
collectionService
-
epersonService
-
-
Constructor Details
-
ItemExport
public ItemExport()
-
-
Method Details
-
getScriptConfiguration
Description copied from class:DSpaceRunnableThis method will return the Configuration that the implementing DSpaceRunnable uses- Specified by:
getScriptConfigurationin classDSpaceRunnable<ItemExportScriptConfiguration>- Returns:
- The
ScriptConfigurationthat this implementing DspaceRunnable uses
-
setup
public void setup() throws org.apache.commons.cli.ParseExceptionDescription copied from class:DSpaceRunnableThis method has to be included in every script and handles the setup of the script by parsing the CommandLine and setting the variables- Specified by:
setupin classDSpaceRunnable<ItemExportScriptConfiguration>- Throws:
org.apache.commons.cli.ParseException- If something goes wrong
-
internalRun
Description copied from class:DSpaceRunnableThis method has to be included in every script and this will be the main execution block for the script that'll contain all the logic needed- Specified by:
internalRunin classDSpaceRunnable<ItemExportScriptConfiguration>- Throws:
Exception- If something goes wrong
-
validate
protected void validate()Validate the options -
process
Process the export- Parameters:
context-- Throws:
Exception
-
setDestDirName
protected void setDestDirName(Context context, ItemExportService itemExportService) throws Exception Set the destination directory option- Throws:
Exception
-
setZip
Set the zip option -
setNumber
protected void setNumber()Set the number option
-