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
public class ItemImportCLI extends ItemImport
CLI variant for theItemImportclass. 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, zipvalid
-
Fields inherited from class org.dspace.scripts.DSpaceRunnable
commandLine, handler, helpCommandLine
-
-
Constructor Summary
Constructors Constructor Description ItemImportCLI()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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 voidsetMapFile()Set the mapfile optionprotected voidsetZip()Set the zip optionprotected voidvalidate(Context context)Validate the options-
Methods inherited from class org.dspace.app.itemimport.ItemImport
getScriptConfiguration, internalRun, readMapfile, setup, validateZip
-
Methods inherited from class org.dspace.scripts.DSpaceRunnable
getEpersonIdentifier, getFileNamesFromInputStreamOptions, initialize, printHelp, run, setEpersonIdentifier
-
-
-
-
Method Detail
-
validate
protected void validate(Context context)
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
protected void readZip(Context context, ItemImportService itemImportService) throws Exception
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
protected void setEPerson(Context context) throws SQLException
Description copied from class:ItemImportSet the eperson in the context- Overrides:
setEPersonin classItemImport- Throws:
SQLException
-
-