public class EmbeddedDigitalObject extends java.lang.Object implements DigitalObject, SupportsFastCopyForLayeredRepo
| Constructor and Description |
|---|
EmbeddedDigitalObject(EmbeddedRepository repository,
android.net.Uri uri,
java.lang.String handle) |
| Modifier and Type | Method and Description |
|---|---|
void |
copyTo(DigitalObject dobj)
Copy this digital object (in the bottom repository of a
LayeredRepository
to another digital object (in the top repository). |
DataElement |
createDataElement(java.lang.String name)
Creates a new data element with the given name in this digital object.
|
void |
delete()
Deletes this digital object from the repository through which it is being accessed.
|
void |
deleteAttribute(java.lang.String name) |
void |
deleteAttributes(java.util.List<java.lang.String> names) |
void |
deleteDataElement(java.lang.String name)
Deletes any data element of the given name.
|
java.lang.String |
getAttribute(java.lang.String name) |
java.util.Map<java.lang.String,java.lang.String> |
getAttributes() |
DataElement |
getDataElement(java.lang.String name)
Returns the data element with the given name.
|
java.util.List<java.lang.String> |
getDataElementNames()
Return a list of the names of the data elements in this digital object.
|
java.util.List<DataElement> |
getDataElements()
Returns a list of the data elements in this digital object.
|
java.lang.String |
getHandle()
Returns the identifier for this digital object.
|
DataElement |
getOrCreateDataElement(java.lang.String name)
Returns the data element with the given name, creating it if it does not exist.
|
Repository |
getRepository()
Returns the repository through which this digital object is being accessed.
|
CloseableIterator<java.util.Map.Entry<java.lang.String,java.lang.String>> |
listAttributes() |
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) |
void |
setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes) |
void |
setContext(android.content.Context context) |
boolean |
verifyDataElement(java.lang.String name)
Verifies whether a data element with the given name exists within this digital object
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdeleteAttribute, deleteAttributes, getAttribute, getAttributes, listAttributes, setAttribute, setAttributespublic EmbeddedDigitalObject(EmbeddedRepository repository, android.net.Uri uri, java.lang.String handle)
public void setContext(android.content.Context context)
throws RepositoryException
RepositoryExceptionpublic Repository getRepository()
DigitalObjectgetRepository in interface DigitalObjectpublic java.lang.String getHandle()
DigitalObjectgetHandle in interface DigitalObjectpublic void delete()
throws RepositoryException
DigitalObjectdelete in interface DigitalObjectRepositoryExceptionpublic boolean verifyDataElement(java.lang.String name)
throws RepositoryException
DigitalObjectverifyDataElement in interface DigitalObjectname - an identifier for a data elementRepositoryExceptionpublic DataElement 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 DataElement getOrCreateDataElement(java.lang.String name) throws RepositoryException
DigitalObjectgetOrCreateDataElement in interface DigitalObjectname - the identifier for the data elementRepositoryExceptionpublic DataElement 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 DigitalObjectname - the identifier for the data elementRepositoryExceptionpublic java.util.List<java.lang.String> getDataElementNames()
throws RepositoryException
DigitalObjectgetDataElementNames in interface DigitalObjectRepositoryExceptionpublic java.util.List<DataElement> getDataElements() throws RepositoryException
DigitalObjectgetDataElements in interface DigitalObjectRepositoryExceptionpublic CloseableIterator<java.lang.String> listDataElementNames() throws RepositoryException
DigitalObjectlistDataElementNames in interface DigitalObjectRepositoryExceptionpublic CloseableIterator<DataElement> listDataElements() throws RepositoryException
DigitalObjectlistDataElements in interface DigitalObjectRepositoryExceptionpublic void copyTo(DigitalObject dobj) 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 SupportsFastCopyForLayeredRepodobj - the digital object to copy intoRepositoryExceptionjava.io.IOExceptionpublic java.util.Map<java.lang.String,java.lang.String> getAttributes()
throws RepositoryException
RepositoryExceptionpublic CloseableIterator<java.util.Map.Entry<java.lang.String,java.lang.String>> listAttributes() throws RepositoryException
RepositoryExceptionpublic java.lang.String getAttribute(java.lang.String name)
throws RepositoryException
RepositoryExceptionpublic void setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
throws RepositoryException
RepositoryExceptionpublic void setAttribute(java.lang.String name,
java.lang.String value)
throws RepositoryException
RepositoryExceptionpublic void deleteAttributes(java.util.List<java.lang.String> names)
throws RepositoryException
RepositoryExceptionpublic void deleteAttribute(java.lang.String name)
throws RepositoryException
RepositoryException