public class RestDigitalObject extends AbstractDigitalObject
| Constructor and Description |
|---|
RestDigitalObject(RestRepository repo,
MemoryDigitalObject memDobj) |
| Modifier and Type | Method and Description |
|---|---|
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)
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.
|
DataElement |
getDataElement(java.lang.String id)
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.
|
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()
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 id)
Verifies whether a data element with the given name exists within this digital object
|
equals, getOrCreateDataElement, hashCodepublic RestDigitalObject(RestRepository repo, MemoryDigitalObject memDobj)
public java.util.Map<java.lang.String,java.lang.String> getAttributes()
DigitalObjectgetAttributes in interface DigitalObjectgetAttributes in class AbstractDigitalObjectpublic CloseableIterator<java.util.Map.Entry<java.lang.String,java.lang.String>> listAttributes()
DigitalObjectlistAttributes in interface DigitalObjectlistAttributes in class AbstractDigitalObjectpublic java.lang.String getAttribute(java.lang.String id)
DigitalObjectgetAttribute in interface DigitalObjectgetAttribute in class AbstractDigitalObjectid - the attribute namepublic boolean verifyDataElement(java.lang.String id)
DigitalObjectverifyDataElement in interface DigitalObjectverifyDataElement in class AbstractDigitalObjectid - an identifier for a data elementpublic DataElement getDataElement(java.lang.String id)
DigitalObjectid - the identifier for the data elementpublic CloseableIterator<java.lang.String> listDataElementNames()
DigitalObjectlistDataElementNames in interface DigitalObjectlistDataElementNames in class AbstractDigitalObjectpublic CloseableIterator<DataElement> listDataElements()
DigitalObjectlistDataElements in interface DigitalObjectlistDataElements in class AbstractDigitalObjectpublic Repository getRepository()
DigitalObjectpublic java.lang.String getHandle()
DigitalObjectpublic void delete()
throws RepositoryException
DigitalObjectdelete in interface DigitalObjectdelete in class AbstractDigitalObjectRepositoryExceptionpublic 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
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
DigitalObjectname - the name of the attribute to deleteRepositoryExceptionpublic DataElement createDataElement(java.lang.String name) throws CreationException, RepositoryException
DigitalObjectname - the identifier for the new data elementCreationException - if a data element with the given name already existsRepositoryExceptionpublic void deleteDataElement(java.lang.String name)
throws RepositoryException
DigitalObjectdeleteDataElement in interface DigitalObjectdeleteDataElement in class AbstractDigitalObjectname - the identifier for the data elementRepositoryExceptionpublic java.util.List<java.lang.String> getDataElementNames()
throws RepositoryException
DigitalObjectgetDataElementNames in interface DigitalObjectgetDataElementNames in class AbstractDigitalObjectRepositoryExceptionpublic java.util.List<DataElement> getDataElements() throws RepositoryException
DigitalObjectgetDataElements in interface DigitalObjectgetDataElements in class AbstractDigitalObjectRepositoryException