public class ItemArchive extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static DocumentBuilder |
builder |
protected File |
dir |
protected String |
dirname |
protected List<org.dspace.app.itemupdate.DtoMetadata> |
dtomList |
static String |
DUBLIN_CORE_XML |
protected HandleService |
handleService |
protected Item |
item |
protected ItemService |
itemService |
protected Transformer |
transformer |
protected List<UUID> |
undoAddContents |
protected List<org.dspace.app.itemupdate.DtoMetadata> |
undoDtomList |
| Modifier | Constructor and Description |
|---|---|
protected |
ItemArchive() |
| Modifier and Type | Method and Description |
|---|---|
void |
addUndoDeleteContents(UUID 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
|
protected static DocumentBuilder |
getDocumentBuilder() |
Item |
getItem()
Getter for the DSpace item referenced in the archive
|
List<org.dspace.app.itemupdate.DtoMetadata> |
getMetadataFields()
Getter for list of metadata fields
|
protected Transformer |
getTransformer()
Getter for Transformer
|
void |
writeUndo(File undoDir)
write undo directory and files to Disk in archive format
|
public static final String DUBLIN_CORE_XML
protected static DocumentBuilder builder
protected Transformer transformer
protected List<org.dspace.app.itemupdate.DtoMetadata> dtomList
protected List<org.dspace.app.itemupdate.DtoMetadata> undoDtomList
protected Item item
protected File dir
protected String dirname
protected HandleService handleService
protected ItemService itemService
public static ItemArchive create(Context context, File dir, String itemField) throws Exception
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 fieldException - if errorprotected static DocumentBuilder getDocumentBuilder() throws ParserConfigurationException
ParserConfigurationExceptionprotected Transformer getTransformer() throws TransformerConfigurationException
TransformerConfigurationException - if config errorpublic Item getItem()
public File getDirectory()
public String getDirectoryName()
public void addUndoMetadataField(org.dspace.app.itemupdate.DtoMetadata dtom)
dtom - DtoMetadata (represents metadata field)public List<org.dspace.app.itemupdate.DtoMetadata> getMetadataFields()
public void addUndoDeleteContents(UUID bitstreamId)
bitstreamId - bitstream IDpublic void writeUndo(File undoDir) throws IOException, ParserConfigurationException, TransformerConfigurationException, TransformerException, FileNotFoundException
undoDir - - the root directory of the undo archiveIOException - if IO errorParserConfigurationException - if config errorTransformerConfigurationException - if transformer config errorTransformerException - if transformer errorFileNotFoundException - if file not foundCopyright © 2022 LYRASIS. All rights reserved.