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() |
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 fieldExceptionprotected static DocumentBuilder getDocumentBuilder() throws ParserConfigurationException
ParserConfigurationExceptionprotected Transformer getTransformer() throws TransformerConfigurationException
public Item getItem()
public File getDirectory()
public String getDirectoryName()
public void addUndoMetadataField(org.dspace.app.itemupdate.DtoMetadata dtom)
dtom - public List<org.dspace.app.itemupdate.DtoMetadata> getMetadataFields()
public void addUndoDeleteContents(UUID bitstreamId)
bitstreamId - public void writeUndo(File undoDir) throws IOException, ParserConfigurationException, TransformerConfigurationException, TransformerException, FileNotFoundException
undoDir - - the root directory of the undo archiveIOExceptionParserConfigurationExceptionTransformerConfigurationExceptionTransformerExceptionFileNotFoundExceptionCopyright © 2016 DuraSpace. All Rights Reserved.