public class ItemImport extends Object
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.
Constructor and Description |
---|
ItemImport() |
Modifier and Type | Method and Description |
---|---|
static 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.
|
static 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.
|
static void |
main(String[] argv) |
static void |
processUploadableImport(File file,
Collection[] collections,
String bteInputType,
Context context)
Given an uploaded file, this method calls the method to instantiate a BTE instance to
transform the input data and batch import them to DSpace
|
public static void processUploadableImport(File file, Collection[] collections, String bteInputType, Context context) throws Exception
file
- The input file to read data fromcollections
- The collections the created items will be inserted tobteInputType
- The input type of the data (bibtex, csv, etc.)context
- The contextException
public static void 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.MessagingException
public static void emailErrorMessage(EPerson eperson, String error) throws javax.mail.MessagingException
eperson
- - EPerson to send the error message toerror
- - the error messagejavax.mail.MessagingException
Copyright © 2016 DuraSpace. All Rights Reserved.