Class MetadataImport

  extended by

public class MetadataImport
extends Object

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

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


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.

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


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.

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
An array of BulkEditChange elements representing the items that have changed
MetadataImportException - if something goes wrong


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

argv - the command line arguments given

Copyright © 2010 DuraSpace. All Rights Reserved.