public abstract class AbstractDigitalObject extends java.lang.Object implements DigitalObject
Constructor and Description |
---|
AbstractDigitalObject() |
Modifier and Type | Method and Description |
---|---|
void |
delete()
Deletes this digital object from the repository through which it is being accessed.
|
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.
|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getAttribute(java.lang.String name)
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.
|
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.
|
DataElement |
getOrCreateDataElement(java.lang.String name)
Returns the data element with the given name, creating it if it does not exist.
|
int |
hashCode() |
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 |
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
|
getClass, notify, notifyAll, toString, wait, wait, wait
createDataElement, deleteAttribute, getDataElement, getHandle, getRepository, setAttribute
public void delete() throws RepositoryException
DigitalObject
delete
in interface DigitalObject
RepositoryException
public java.util.Map<java.lang.String,java.lang.String> getAttributes() throws RepositoryException
DigitalObject
getAttributes
in interface DigitalObject
RepositoryException
public CloseableIterator<java.util.Map.Entry<java.lang.String,java.lang.String>> listAttributes() throws RepositoryException
DigitalObject
listAttributes
in interface DigitalObject
RepositoryException
public java.lang.String getAttribute(java.lang.String name) throws RepositoryException
DigitalObject
getAttribute
in interface DigitalObject
name
- the attribute nameRepositoryException
public void setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes) throws RepositoryException
DigitalObject
setAttributes
in interface DigitalObject
attributes
- the attributes to set, mapped to their new valuesRepositoryException
public void deleteAttributes(java.util.List<java.lang.String> names) throws RepositoryException
DigitalObject
deleteAttributes
in interface DigitalObject
names
- the names of the attributes to deleteRepositoryException
public boolean verifyDataElement(java.lang.String name) throws RepositoryException
DigitalObject
verifyDataElement
in interface DigitalObject
name
- an identifier for a data elementRepositoryException
public DataElement getOrCreateDataElement(java.lang.String name) throws RepositoryException
DigitalObject
getOrCreateDataElement
in interface DigitalObject
name
- the identifier for the data elementRepositoryException
public void deleteDataElement(java.lang.String name) throws RepositoryException
DigitalObject
deleteDataElement
in interface DigitalObject
name
- the identifier for the data elementRepositoryException
public java.util.List<java.lang.String> getDataElementNames() throws RepositoryException
DigitalObject
getDataElementNames
in interface DigitalObject
RepositoryException
public java.util.List<DataElement> getDataElements() throws RepositoryException
DigitalObject
getDataElements
in interface DigitalObject
RepositoryException
public CloseableIterator<java.lang.String> listDataElementNames() throws RepositoryException
DigitalObject
listDataElementNames
in interface DigitalObject
RepositoryException
public CloseableIterator<DataElement> listDataElements() throws RepositoryException
DigitalObject
listDataElements
in interface DigitalObject
RepositoryException
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object