public class SyncingDigitalObject extends DigitalObjectWrapper implements DigitalObject
Constructor and Description |
---|
SyncingDigitalObject(SyncingRepository repo,
DigitalObject localObject) |
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 |
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.
|
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.
|
copyTo, delete, getAttribute, getAttributes, getDataElement, getDataElementNames, getDataElements, getHandle, getOrCreateDataElement, getRepository, listAttributes, listDataElementNames, listDataElements, verifyDataElement
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
delete, getAttribute, getAttributes, getDataElement, getDataElementNames, getDataElements, getHandle, getOrCreateDataElement, getRepository, listAttributes, listDataElementNames, listDataElements, verifyDataElement
public SyncingDigitalObject(SyncingRepository repo, DigitalObject localObject)
public void setAttribute(java.lang.String name, java.lang.String value) throws RepositoryException
DigitalObject
setAttribute
in interface DigitalObject
setAttribute
in class DigitalObjectWrapper
name
- the attribute namevalue
- the attribute value; if null, the attribute will be deleted.RepositoryException
public void setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes) throws RepositoryException
DigitalObject
setAttributes
in interface DigitalObject
setAttributes
in class DigitalObjectWrapper
attributes
- the attributes to set, mapped to their new valuesRepositoryException
public void deleteAttribute(java.lang.String name) throws RepositoryException
DigitalObject
deleteAttribute
in interface DigitalObject
deleteAttribute
in class DigitalObjectWrapper
name
- the name of the attribute to deleteRepositoryException
public void deleteAttributes(java.util.List<java.lang.String> names) throws RepositoryException
DigitalObject
deleteAttributes
in interface DigitalObject
deleteAttributes
in class DigitalObjectWrapper
names
- the names of the attributes to deleteRepositoryException
public DataElement createDataElement(java.lang.String name) throws CreationException, RepositoryException
DigitalObject
createDataElement
in interface DigitalObject
createDataElement
in class DigitalObjectWrapper
name
- the identifier for the new data elementCreationException
- if a data element with the given name already existsRepositoryException
public void deleteDataElement(java.lang.String name) throws RepositoryException
DigitalObject
deleteDataElement
in interface DigitalObject
deleteDataElement
in class DigitalObjectWrapper
name
- the identifier for the data elementRepositoryException