public class DataElement
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
long |
append(java.io.InputStream in)
Appends the bytes from the given InputStream to the data element, returning
the total number of bytes written.
|
void |
deleteAttribute(java.lang.String attributeName)
Delete the given attributeName for this
object.
|
void |
deleteAttributes(java.lang.String[] atts)
Atomically delete more than one attribute
|
java.lang.String |
getAttribute(java.lang.String attributeName,
java.lang.String defaultValue)
Associates the given attributeValue with the given attributeName for this
object.
|
HeaderSet |
getAttributes()
Return all attributes
|
java.lang.String |
getDataElementID()
Returns the data element's identifier within the object
|
java.util.Date |
getDateCreated()
Return the date that this object was created
|
java.util.Date |
getDateLastModified()
Return the date that this object was last modified
|
DigitalObject |
getDigitalObject()
Return the DigitalObject of which this element is a part
|
java.lang.String |
getObjectID() |
Repository |
getRepository() |
long |
getSize()
Gets the size in bytes of the data element, not including attributes
|
java.lang.String[] |
listAttributes()
Return the list of attribute names for this object
|
java.io.InputStream |
read()
Returns an InputStream from which the element's data can be read
|
void |
setAttribute(java.lang.String attributeName,
java.lang.String attributeValue)
Associates the given attributeValue with the given attributeName for this
object.
|
void |
setAttributes(HeaderSet atts)
Atomically set more than one attribute
|
java.lang.String |
toString() |
long |
write(java.io.InputStream in) |
long |
write(java.io.InputStream in,
boolean append)
Writes the bytes from the given InputStream to the data element, returning
the total number of bytes written.
|
public java.lang.String toString()
toString
in class java.lang.Object
public DigitalObject getDigitalObject()
public java.lang.String getObjectID()
public Repository getRepository()
public java.lang.String getDataElementID()
public java.io.InputStream read() throws DOException, java.io.IOException
DOException
java.io.IOException
public long append(java.io.InputStream in) throws DOException, java.io.IOException
DOException
java.io.IOException
public long write(java.io.InputStream in) throws DOException, java.io.IOException
DOException
java.io.IOException
public long write(java.io.InputStream in, boolean append) throws DOException, java.io.IOException
DOException
java.io.IOException
public java.util.Date getDateCreated() throws DOException, java.io.IOException
DOException
java.io.IOException
public java.util.Date getDateLastModified() throws DOException, java.io.IOException
DOException
java.io.IOException
public long getSize() throws DOException, java.io.IOException
DOException
java.io.IOException
public void setAttribute(java.lang.String attributeName, java.lang.String attributeValue) throws DOException, java.io.IOException
DOException
java.io.IOException
public void setAttributes(HeaderSet atts) throws DOException, java.io.IOException
DOException
java.io.IOException
public void deleteAttribute(java.lang.String attributeName) throws DOException, java.io.IOException
DOException
java.io.IOException
public void deleteAttributes(java.lang.String[] atts) throws DOException, java.io.IOException
DOException
java.io.IOException
public java.lang.String getAttribute(java.lang.String attributeName, java.lang.String defaultValue) throws DOException, java.io.IOException
DOException
java.io.IOException
public HeaderSet getAttributes() throws DOException, java.io.IOException
DOException
java.io.IOException
public java.lang.String[] listAttributes() throws DOException, java.io.IOException
DOException
java.io.IOException