org.dspace.app.bulkedit
Class MetadataImport

java.lang.Object
  extended by org.dspace.app.bulkedit.MetadataImport

public class MetadataImport
extends Object

Metadata importer to allow the batch import of metadata from a file

Author:
Stuart Lewis

Constructor Summary
MetadataImport(Context c, ArrayList<DSpaceCSVLine> toImport)
          Create an instance of the metadata importer.
 
Method Summary
static void main(String[] argv)
          main method to run the metadata exporter
 ArrayList<BulkEditChange> runImport(boolean change, boolean useWorkflow, boolean workflowNotify, boolean useTemplate)
          Run an import.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetadataImport

public MetadataImport(Context c,
                      ArrayList<DSpaceCSVLine> toImport)
Create an instance of the metadata importer. Requires a context and an array of CSV lines to examine.

Parameters:
c - The context
toImport - An array of CSV lines to examine
Method Detail

runImport

public ArrayList<BulkEditChange> runImport(boolean change,
                                           boolean useWorkflow,
                                           boolean workflowNotify,
                                           boolean useTemplate)
                                    throws MetadataImportException
Run an import. The import can either be read-only to detect changes, or can write changes as it goes.

Parameters:
change - Whether or not to write the changes to the database
useWorkflow - Whether the workflows should be used when creating new items
workflowNotify - If the workflows should be used, whether to send notifications or not
useTemplate - Use collection template if create new item
Returns:
An array of BulkEditChange elements representing the items that have changed
Throws:
MetadataImportException - if something goes wrong

main

public static void main(String[] argv)
main method to run the metadata exporter

Parameters:
argv - the command line arguments given


Copyright © 2010 DuraSpace. All Rights Reserved.