public abstract class AbstractDataElement extends java.lang.Object implements DataElement
| Constructor and Description |
|---|
AbstractDataElement() |
| Modifier and Type | Method and Description |
|---|---|
void |
delete()
Deletes the data element from its digital object.
|
void |
deleteAttributes(java.util.List<java.lang.String> names)
Deletes multiple attributes.
|
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 data element.
|
java.lang.String |
getType()
Returns the MIME type of the given data.
|
CloseableIterator<java.util.Map.Entry<java.lang.String,java.lang.String>> |
listAttributes()
Returns a CloseableIterator view of the attributes of the data element.
|
java.io.InputStream |
read(long start,
long len)
Provides access to a specified portion of the data as an InputStream.
|
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.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdeleteAttribute, getDigitalObject, getName, getSize, read, setAttribute, writepublic void delete()
throws RepositoryException
DataElementdelete in interface DataElementRepositoryExceptionpublic java.util.Map<java.lang.String,java.lang.String> getAttributes()
throws RepositoryException
DataElementgetAttributes in interface DataElementRepositoryExceptionpublic CloseableIterator<java.util.Map.Entry<java.lang.String,java.lang.String>> listAttributes() throws RepositoryException
DataElementlistAttributes in interface DataElementRepositoryExceptionpublic java.lang.String getAttribute(java.lang.String name)
throws RepositoryException
DataElementgetAttribute in interface DataElementname - the attribute nameRepositoryExceptionpublic void setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
throws RepositoryException
DataElementsetAttributes in interface DataElementattributes - the attributes to set, mapped to their new valuesRepositoryExceptionpublic void deleteAttributes(java.util.List<java.lang.String> names)
throws RepositoryException
DataElementdeleteAttributes in interface DataElementnames - the names of the attributes to deleteRepositoryExceptionpublic java.lang.String getType()
throws RepositoryException
DataElementgetType in interface DataElementRepositoryExceptionpublic void setType(java.lang.String type)
throws RepositoryException
DataElementsetType in interface DataElementtype - the new MIME typeRepositoryExceptionpublic long write(java.io.InputStream data)
throws java.io.IOException,
RepositoryException
DataElementwrite in interface DataElementdata - an InputStream streaming the new datajava.io.IOExceptionRepositoryExceptionpublic java.io.InputStream read(long start,
long len)
throws RepositoryException
DataElementread in interface DataElementstart - the first byte of the data to sendlen - the number of bytes to sendRepositoryException