public class SyncingDataElement extends DataElementWrapper implements DataElement
Constructor and Description |
---|
SyncingDataElement(DigitalObject syncingObject,
DataElement localElement) |
Modifier and Type | Method and Description |
---|---|
void |
deleteAttribute(java.lang.String name)
Deletes a particular attribute.
|
void |
deleteAttributes(java.util.List<java.lang.String> names)
Deletes multiple attributes.
|
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.
|
void |
setType(java.lang.String type)
Sets the MIME type of the given data.
|
long |
write(java.io.InputStream data)
Writes new data into the data element.
|
long |
write(java.io.InputStream data,
boolean append)
Writes new data into the data element.
|
delete, getAttribute, getAttributes, getDigitalObject, getName, getSize, getType, listAttributes, read, read
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
delete, getAttribute, getAttributes, getDigitalObject, getName, getSize, getType, listAttributes, read, read
public SyncingDataElement(DigitalObject syncingObject, DataElement localElement)
public void setAttribute(java.lang.String name, java.lang.String value) throws RepositoryException
DataElement
setAttribute
in interface DataElement
setAttribute
in class DataElementWrapper
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
DataElement
setAttributes
in interface DataElement
setAttributes
in class DataElementWrapper
attributes
- the attributes to set, mapped to their new valuesRepositoryException
public void deleteAttribute(java.lang.String name) throws RepositoryException
DataElement
deleteAttribute
in interface DataElement
deleteAttribute
in class DataElementWrapper
name
- the name of the attribute to deleteRepositoryException
public void deleteAttributes(java.util.List<java.lang.String> names) throws RepositoryException
DataElement
deleteAttributes
in interface DataElement
deleteAttributes
in class DataElementWrapper
names
- the names of the attributes to deleteRepositoryException
public void setType(java.lang.String type) throws RepositoryException
DataElement
setType
in interface DataElement
setType
in class DataElementWrapper
type
- the new MIME typeRepositoryException
public long write(java.io.InputStream data) throws java.io.IOException, RepositoryException
DataElement
write
in interface DataElement
write
in class DataElementWrapper
data
- an InputStream streaming the new datajava.io.IOException
RepositoryException
public long write(java.io.InputStream data, boolean append) throws java.io.IOException, RepositoryException
DataElement
write
in interface DataElement
write
in class DataElementWrapper
data
- an InputStream streaming the new dataappend
- whether to append the new data to the existing datajava.io.IOException
RepositoryException