Package org.dspace.app.itemimport
Class ItemImportCLI
java.lang.Object
org.dspace.scripts.DSpaceRunnable<ItemImportScriptConfiguration>
org.dspace.app.itemimport.ItemImport
org.dspace.app.itemimport.ItemImportCLI
- All Implemented Interfaces:
Runnable
CLI variant for the
ItemImport class.
This was done to specify the specific behaviors for the CLI.- Author:
- Francesco Pio Scognamiglio (francescopio.scognamiglio at 4science.com)
-
Nested Class Summary
Nested classes/interfaces inherited from class org.dspace.scripts.DSpaceRunnable
DSpaceRunnable.StepResult -
Field Summary
Fields inherited from class org.dspace.app.itemimport.ItemImport
collections, collectionService, command, commandLineCollections, eperson, epersonService, handleService, help, isExcludeContent, isQuiet, isResume, isTest, mapfile, MAPFILE_BITSTREAM_TYPE, MAPFILE_FILENAME, remoteUrl, sourcedir, TEMP_DIR, template, useWorkflow, useWorkflowSendEmail, workDir, workFile, zip, zipfilename, zipvalidFields inherited from class org.dspace.scripts.DSpaceRunnable
commandLine, handler, helpCommandLine -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprocess(Context context, ItemImportService itemImportService, List<Collection> collections) Process the importprotected voidreadZip(Context context, ItemImportService itemImportService) Read the ZIP archive in SAF formatprotected voidsetEPerson(Context context) Set the eperson in the contextprotected voidSet the mapfile optionprotected voidsetZip()Set the zip optionprotected voidValidate the optionsMethods inherited from class org.dspace.app.itemimport.ItemImport
getScriptConfiguration, internalRun, readMapfile, setup, validateZipMethods inherited from class org.dspace.scripts.DSpaceRunnable
getEpersonIdentifier, getFileNamesFromInputStreamOptions, initialize, printHelp, run, setEpersonIdentifier
-
Constructor Details
-
ItemImportCLI
public ItemImportCLI()
-
-
Method Details
-
validate
Description copied from class:ItemImportValidate the options- Overrides:
validatein classItemImport
-
process
protected void process(Context context, ItemImportService itemImportService, List<Collection> collections) throws Exception Description copied from class:ItemImportProcess the import- Overrides:
processin classItemImport- Throws:
Exception
-
readZip
Description copied from class:ItemImportRead the ZIP archive in SAF format- Overrides:
readZipin classItemImport- Throws:
Exception
-
setMapFile
protected void setMapFile()Description copied from class:ItemImportSet the mapfile option- Overrides:
setMapFilein classItemImport
-
setZip
protected void setZip()Description copied from class:ItemImportSet the zip option- Overrides:
setZipin classItemImport
-
setEPerson
Description copied from class:ItemImportSet the eperson in the context- Overrides:
setEPersonin classItemImport- Throws:
SQLException
-