public interface ItemImportService
A second use assumes the bitstream files already exist in a storage resource accessible to DSpace. In this case the bitstreams are 'registered'. That is, the metadata is loaded to the DSpace database and DSpace is given the location of the file which is subsumed into DSpace.
The distinction is controlled by the format of lines in the 'contents' file. See comments in processContentsFile() below.
Modified by David Little, UCSD Libraries 12/21/04 to allow the registration of files (bitstreams) into DSpace.
| Modifier and Type | Method and Description |
|---|---|
void |
addBTEItems(Context c,
List<Collection> mycollections,
String sourcedir,
String mapfile,
boolean template,
String bteInputType,
String workingDir) |
void |
addItems(Context c,
List<Collection> mycollections,
String sourceDir,
String mapFile,
boolean template) |
void |
addItemsAtomic(Context c,
List<Collection> mycollections,
String sourceDir,
String mapFile,
boolean template) |
void |
cleanupZipTemp() |
void |
deleteBatchUpload(Context c,
String uploadId) |
void |
deleteItems(Context c,
String mapfile) |
void |
emailErrorMessage(EPerson eperson,
String error)
Since the BTE batch import is done in a new thread we are unable to communicate
with calling method about success or failure.
|
void |
emailSuccessMessage(Context context,
EPerson eperson,
String fileName)
Since the BTE batch import is done in a new thread we are unable to communicate
with calling method about success or failure.
|
List<BatchUpload> |
getImportsAvailable(EPerson eperson) |
String |
getImportUploadableDirectory(EPerson ePerson) |
String |
getTempWorkDir() |
File |
getTempWorkDirFile() |
void |
processUIImport(String url,
Collection owningCollection,
String[] collections,
String resumeDir,
String inputType,
Context context,
boolean template)
Given a public URL to a zip file that has the Simple Archive Format, this method imports the contents to DSpace
|
void |
replaceItems(Context c,
List<Collection> mycollections,
String sourcedir,
String mapfile,
boolean template) |
void |
setQuiet(boolean isQuiet) |
void |
setResume(boolean isResume) |
void |
setTest(boolean isTest) |
void |
setUseWorkflow(boolean useWorkflow) |
void |
setUseWorkflowSendEmail(boolean useWorkflow) |
String |
unzip(File zipfile) |
String |
unzip(File zipfile,
String destDir) |
String |
unzip(String sourcedir,
String zipfilename) |
void addItemsAtomic(Context c, List<Collection> mycollections, String sourceDir, String mapFile, boolean template) throws Exception
Exceptionvoid addItems(Context c, List<Collection> mycollections, String sourceDir, String mapFile, boolean template) throws Exception
ExceptionString unzip(File zipfile) throws IOException
IOExceptionString unzip(File zipfile, String destDir) throws IOException
IOExceptionString unzip(String sourcedir, String zipfilename) throws IOException
IOExceptionvoid processUIImport(String url, Collection owningCollection, String[] collections, String resumeDir, String inputType, Context context, boolean template) throws Exception
url - The public URL of the zip fileowningCollection - The owning collection the items will belong tocollections - The collections the created items will be inserted to, apart from the owning oneresumeDir - In case of a resume request, the directory that containsthe old mapfile and datacontext - The contextExceptionvoid emailSuccessMessage(Context context, EPerson eperson, String fileName) throws javax.mail.MessagingException
context - - the current Contexteperson - - eperson to send the email tofileName - - the filepath to the mapfile created by the batch importjavax.mail.MessagingExceptionvoid emailErrorMessage(EPerson eperson, String error) throws javax.mail.MessagingException
eperson - - EPerson to send the error message toerror - - the error messagejavax.mail.MessagingExceptionList<BatchUpload> getImportsAvailable(EPerson eperson) throws Exception
ExceptionString getImportUploadableDirectory(EPerson ePerson) throws Exception
Exceptionvoid deleteBatchUpload(Context c, String uploadId) throws Exception
Exceptionvoid replaceItems(Context c, List<Collection> mycollections, String sourcedir, String mapfile, boolean template) throws Exception
Exceptionvoid addBTEItems(Context c, List<Collection> mycollections, String sourcedir, String mapfile, boolean template, String bteInputType, String workingDir) throws Exception
ExceptionString getTempWorkDir()
File getTempWorkDirFile()
void cleanupZipTemp()
void setTest(boolean isTest)
void setResume(boolean isResume)
void setUseWorkflow(boolean useWorkflow)
void setUseWorkflowSendEmail(boolean useWorkflow)
void setQuiet(boolean isQuiet)
Copyright © 2016 DuraSpace. All Rights Reserved.