public class LayeredDigitalObject extends AbstractDigitalObject implements DigitalObject, SupportsFastCopyForLayeredRepo
| Constructor and Description |
|---|
LayeredDigitalObject(LayeredRepository repo,
java.lang.String handle,
DigitalObject top,
DigitalObject bottom,
java.util.concurrent.ExecutorService execServ) |
| Modifier and Type | Method and Description |
|---|---|
void |
copyTo(DigitalObject target)
Copy this digital object (in the bottom repository of a
LayeredRepository
to another digital object (in the top repository). |
LayeredDataElement |
createDataElement(java.lang.String name)
Creates a new data element with the given name in this digital object.
|
void |
deleteAttribute(java.lang.String name)
Deletes a particular attribute.
|
void |
deleteAttributes(java.util.List<java.lang.String> names)
Deletes multiple attributes.
|
void |
deleteDataElement(java.lang.String name)
Deletes any data element of the given name.
|
java.lang.String |
getAttribute(java.lang.String id)
Returns the value for a particular attribute
|
java.util.Map<java.lang.String,java.lang.String> |
getAttributes()
Returns a Map view of the attributes of the digital object.
|
LayeredDataElement |
getDataElement(java.lang.String name)
Returns the data element with the given name.
|
java.lang.String |
getHandle()
Returns the identifier for this digital object.
|
LayeredRepository |
getRepository()
Returns the repository through which this digital object is being accessed.
|
CloseableIterator<java.util.Map.Entry<java.lang.String,java.lang.String>> |
listAttributes()
Returns a CloseableIterator view of the attributes of the digital object.
|
CloseableIterator<java.lang.String> |
listDataElementNames()
Provides a CloseableIterator view of the names of the data elements in this digital object.
|
CloseableIterator<DataElement> |
listDataElements()
Provides a CloseableIterator view of the data elements in this digital object.
|
void |
setAttribute(java.lang.String name,
java.lang.String value)
Sets a particular attribute.
|
void |
setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
Sets the value of multiple attributes.
|
boolean |
verifyDataElement(java.lang.String name)
Verifies whether a data element with the given name exists within this digital object
|
delete, equals, getDataElementNames, getDataElements, getOrCreateDataElement, hashCodegetClass, notify, notifyAll, toString, wait, wait, waitdelete, getDataElementNames, getDataElements, getOrCreateDataElementpublic LayeredDigitalObject(LayeredRepository repo, java.lang.String handle, DigitalObject top, DigitalObject bottom, java.util.concurrent.ExecutorService execServ)
public LayeredRepository getRepository()
DigitalObjectgetRepository in interface DigitalObjectpublic java.lang.String getHandle()
DigitalObjectgetHandle in interface DigitalObjectpublic java.util.Map<java.lang.String,java.lang.String> getAttributes()
throws RepositoryException
DigitalObjectgetAttributes in interface DigitalObjectgetAttributes in class AbstractDigitalObjectRepositoryExceptionpublic CloseableIterator<java.util.Map.Entry<java.lang.String,java.lang.String>> listAttributes() throws RepositoryException
DigitalObjectlistAttributes in interface DigitalObjectlistAttributes in class AbstractDigitalObjectRepositoryExceptionpublic java.lang.String getAttribute(java.lang.String id)
throws RepositoryException
DigitalObjectgetAttribute in interface DigitalObjectgetAttribute in class AbstractDigitalObjectid - the attribute nameRepositoryExceptionpublic void setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
throws RepositoryException
DigitalObjectsetAttributes in interface DigitalObjectsetAttributes in class AbstractDigitalObjectattributes - the attributes to set, mapped to their new valuesRepositoryExceptionpublic void setAttribute(java.lang.String name,
java.lang.String value)
throws RepositoryException
DigitalObjectsetAttribute in interface DigitalObjectname - the attribute namevalue - the attribute value; if null, the attribute will be deleted.RepositoryExceptionpublic void deleteAttributes(java.util.List<java.lang.String> names)
throws RepositoryException
DigitalObjectdeleteAttributes in interface DigitalObjectdeleteAttributes in class AbstractDigitalObjectnames - the names of the attributes to deleteRepositoryExceptionpublic void deleteAttribute(java.lang.String name)
throws RepositoryException
DigitalObjectdeleteAttribute in interface DigitalObjectname - the name of the attribute to deleteRepositoryExceptionpublic boolean verifyDataElement(java.lang.String name)
throws RepositoryException
DigitalObjectverifyDataElement in interface DigitalObjectverifyDataElement in class AbstractDigitalObjectname - an identifier for a data elementRepositoryExceptionpublic LayeredDataElement createDataElement(java.lang.String name) throws CreationException, RepositoryException
DigitalObjectcreateDataElement in interface DigitalObjectname - the identifier for the new data elementCreationException - if a data element with the given name already existsRepositoryExceptionpublic LayeredDataElement getDataElement(java.lang.String name) throws RepositoryException
DigitalObjectgetDataElement in interface DigitalObjectname - the identifier for the data elementRepositoryExceptionpublic void deleteDataElement(java.lang.String name)
throws RepositoryException
DigitalObjectdeleteDataElement in interface DigitalObjectdeleteDataElement in class AbstractDigitalObjectname - the identifier for the data elementRepositoryExceptionpublic CloseableIterator<java.lang.String> listDataElementNames() throws RepositoryException
DigitalObjectlistDataElementNames in interface DigitalObjectlistDataElementNames in class AbstractDigitalObjectRepositoryExceptionpublic CloseableIterator<DataElement> listDataElements() throws RepositoryException
DigitalObjectlistDataElements in interface DigitalObjectlistDataElements in class AbstractDigitalObjectRepositoryExceptionpublic void copyTo(DigitalObject target) throws RepositoryException, java.io.IOException
SupportsFastCopyForLayeredRepoLayeredRepository
to another digital object (in the top repository). For implementations that can be faster than naive copying.
In general this does not copy the data of data elements, but sets the attribute
LayeredDataElement.ATTRIBUTE_DATA_ELEMENT_MISSING to 1 on each data element not copied.copyTo in interface SupportsFastCopyForLayeredRepotarget - the digital object to copy intoRepositoryExceptionjava.io.IOException