public class EmbeddedDataElement extends java.lang.Object implements DataElement
| Constructor and Description |
|---|
EmbeddedDataElement(EmbeddedDigitalObject digitalObject,
android.net.Uri uri,
java.lang.String elementName) |
| Modifier and Type | Method and Description |
|---|---|
void |
delete()
Deletes the data element from its digital object.
|
void |
deleteAttribute(java.lang.String name) |
void |
deleteAttributes(java.util.List<java.lang.String> names) |
java.lang.String |
getAttribute(java.lang.String name) |
java.util.Map<java.lang.String,java.lang.String> |
getAttributes() |
DigitalObject |
getDigitalObject()
Returns the digital object of this data element.
|
java.lang.String |
getName()
Returns the name of this data element.
|
long |
getSize()
Returns the number of bytes of data in this data element.
|
java.lang.String |
getType()
Returns the MIME type of the given data.
|
android.net.Uri |
getUri() |
CloseableIterator<java.util.Map.Entry<java.lang.String,java.lang.String>> |
listAttributes() |
java.io.InputStream |
read()
Provides access to the data as an InputStream.
|
java.io.InputStream |
read(long start,
long len)
Provides access to a specified portion of the data as an InputStream.
|
void |
setAttribute(java.lang.String name,
java.lang.String value) |
void |
setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes) |
void |
setContext(android.content.Context context) |
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.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdeleteAttribute, deleteAttributes, getAttribute, getAttributes, listAttributes, setAttribute, setAttributespublic EmbeddedDataElement(EmbeddedDigitalObject digitalObject, android.net.Uri uri, java.lang.String elementName)
public void setContext(android.content.Context context)
throws RepositoryException
RepositoryExceptionpublic DigitalObject getDigitalObject()
DataElementgetDigitalObject in interface DataElementpublic java.lang.String getName()
DataElementgetName in interface DataElementpublic void delete()
throws RepositoryException
DataElementdelete in interface DataElementRepositoryExceptionpublic android.net.Uri getUri()
public 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 java.io.InputStream read()
throws RepositoryException
DataElementread in interface DataElementRepositoryExceptionpublic 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 sendRepositoryExceptionpublic long write(java.io.InputStream data)
throws java.io.IOException,
RepositoryException
DataElementwrite in interface DataElementdata - an InputStream streaming the new datajava.io.IOExceptionRepositoryExceptionpublic long write(java.io.InputStream data,
boolean append)
throws java.io.IOException,
RepositoryException
DataElementwrite in interface DataElementdata - an InputStream streaming the new dataappend - whether to append the new data to the existing datajava.io.IOExceptionRepositoryExceptionpublic long getSize()
throws RepositoryException
DataElementgetSize in interface DataElementRepositoryExceptionpublic java.util.Map<java.lang.String,java.lang.String> getAttributes()
throws RepositoryException
RepositoryExceptionpublic CloseableIterator<java.util.Map.Entry<java.lang.String,java.lang.String>> listAttributes() throws RepositoryException
RepositoryExceptionpublic java.lang.String getAttribute(java.lang.String name)
throws RepositoryException
RepositoryExceptionpublic void setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
throws RepositoryException
RepositoryExceptionpublic void setAttribute(java.lang.String name,
java.lang.String value)
throws RepositoryException
RepositoryExceptionpublic void deleteAttributes(java.util.List<java.lang.String> names)
throws RepositoryException
RepositoryExceptionpublic void deleteAttribute(java.lang.String name)
throws RepositoryException
RepositoryException