org.dspace.app.itemupdate
Class ItemArchive

java.lang.Object
  extended by org.dspace.app.itemupdate.ItemArchive

public class ItemArchive
extends Object

Encapsulates the Item in the context of the DSpace Archive Format


Field Summary
static String DUBLIN_CORE_XML
           
 
Method Summary
 void addUndoDeleteContents(int bitstreamId)
          Add bitstream id to delete contents file
 void addUndoMetadataField(org.dspace.app.itemupdate.DtoMetadata dtom)
          Add metadata field to undo list
static ItemArchive create(Context context, File dir, String itemField)
          factory method Minimal requirements for dublin_core.xml for this application is the presence of dc.identifier.uri which must contain the handle for the item
 File getDirectory()
          Getter for directory in archive on disk
 String getDirectoryName()
          Getter for directory name in archive
 Item getItem()
          Getter for the DSpace item referenced in the archive
 List<org.dspace.app.itemupdate.DtoMetadata> getMetadataFields()
          Getter for list of metadata fields
 void writeUndo(File undoDir)
          write undo directory and files to Disk in archive format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DUBLIN_CORE_XML

public static final String DUBLIN_CORE_XML
See Also:
Constant Field Values
Method Detail

create

public static ItemArchive create(Context context,
                                 File dir,
                                 String itemField)
                          throws Exception
factory method Minimal requirements for dublin_core.xml for this application is the presence of dc.identifier.uri which must contain the handle for the item

Parameters:
context - - The DSpace context
dir - - The directory File in the source archive
itemField - - The metadata field in which the Item identifier is located if null, the default is the handle in the dc.identifier.uri field
Throws:
Exception

getItem

public Item getItem()
Getter for the DSpace item referenced in the archive

Returns:
DSpace item

getDirectory

public File getDirectory()
Getter for directory in archive on disk

Returns:
directory in archive

getDirectoryName

public String getDirectoryName()
Getter for directory name in archive

Returns:
directory name in archive

addUndoMetadataField

public void addUndoMetadataField(org.dspace.app.itemupdate.DtoMetadata dtom)
Add metadata field to undo list

Parameters:
dtom -

getMetadataFields

public List<org.dspace.app.itemupdate.DtoMetadata> getMetadataFields()
Getter for list of metadata fields

Returns:
list of metadata fields

addUndoDeleteContents

public void addUndoDeleteContents(int bitstreamId)
Add bitstream id to delete contents file

Parameters:
bitstreamId -

writeUndo

public void writeUndo(File undoDir)
               throws IOException,
                      ParserConfigurationException,
                      TransformerConfigurationException,
                      TransformerException,
                      FileNotFoundException
write undo directory and files to Disk in archive format

Parameters:
undoDir - - the root directory of the undo archive
Throws:
IOException
ParserConfigurationException
TransformerConfigurationException
TransformerException
FileNotFoundException


Copyright © 2010 DuraSpace. All Rights Reserved.