Package org.dspace.app.itemupdate
Class ItemArchive
java.lang.Object
org.dspace.app.itemupdate.ItemArchive
Encapsulates the Item in the context of the DSpace Archive Format
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Fileprotected Stringprotected List<org.dspace.app.itemupdate.DtoMetadata>static final Stringprotected HandleServiceprotected Itemprotected ItemServiceprotected Transformerprotected List<org.dspace.app.itemupdate.DtoMetadata> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddUndoDeleteContents(UUID bitstreamId) Add bitstream id to delete contents filevoidaddUndoMetadataField(org.dspace.app.itemupdate.DtoMetadata dtom) Add metadata field to undo liststatic ItemArchivefactory method Minimal requirements for dublin_core.xml for this application is the presence of dc.identifier.uri which must contain the handle for the itemGetter for directory in archive on diskGetter for directory name in archivegetItem()Getter for the DSpace item referenced in the archiveList<org.dspace.app.itemupdate.DtoMetadata>Getter for list of metadata fieldsprotected TransformerGetter for Transformervoidwrite undo directory and files to Disk in archive format
-
Field Details
-
DUBLIN_CORE_XML
- See Also:
-
transformer
-
dtomList
-
undoDtomList
-
undoAddContents
-
item
-
dir
-
dirname
-
handleService
-
itemService
-
-
Constructor Details
-
ItemArchive
protected ItemArchive()
-
-
Method Details
-
create
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 contextdir- - The directory File in the source archiveitemField- - The metadata field in which the Item identifier is located if null, the default is the handle in the dc.identifier.uri field- Returns:
- ItemArchive object
- Throws:
Exception- if error
-
getTransformer
Getter for Transformer- Returns:
- Transformer
- Throws:
TransformerConfigurationException- if config error
-
getItem
Getter for the DSpace item referenced in the archive- Returns:
- DSpace item
-
getDirectory
Getter for directory in archive on disk- Returns:
- directory in archive
-
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- DtoMetadata (represents metadata field)
-
getMetadataFields
Getter for list of metadata fields- Returns:
- list of metadata fields
-
addUndoDeleteContents
Add bitstream id to delete contents file- Parameters:
bitstreamId- bitstream ID
-
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- if IO errorParserConfigurationException- if config errorTransformerConfigurationException- if transformer config errorTransformerException- if transformer errorFileNotFoundException- if file not found
-