|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.cnri.do_api.DataElement
public class DataElement
This is a high level interface to a data element for a digital object.
Field Summary | |
---|---|
static java.lang.String |
ATTRIBUTE_MIME_TYPE
|
Method Summary | |
---|---|
void |
deleteAttribute(java.lang.String attributeName)
Removes any attribute to the data element that has the given name. |
java.lang.String |
getAttribute(java.lang.String attributeName,
java.lang.String defaultValue)
Returns the value of the data element attribute having the given name. |
java.lang.String |
getDataElementID()
Returns the data element's identifier within the object |
java.util.Date |
getDateCreated()
Returns the data element's creation date and time |
java.util.Date |
getDateLastModified()
Returns the date and time that the element was last modified |
DigitalObject |
getDigitalObject()
Return the DigitalObject of which this element is a part |
long |
getSize()
Gets the size in bytes of the data element, not including attributes |
java.lang.String[] |
listAttributes()
Lists all of the attribute name value pairs for the data element |
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 data element. |
java.lang.String |
toString()
|
long |
write(java.io.InputStream in)
Writes the bytes from the given InputStream to the data element, returning the total number of bytes written. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ATTRIBUTE_MIME_TYPE
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public DigitalObject getDigitalObject()
public java.lang.String getDataElementID()
public java.util.Date getDateCreated()
public java.util.Date getDateLastModified()
public long getSize()
public java.io.InputStream read() 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 java.lang.String getAttribute(java.lang.String attributeName, java.lang.String defaultValue)
public void setAttribute(java.lang.String attributeName, java.lang.String attributeValue) throws DOException, java.io.IOException
DOException
java.io.IOException
public java.lang.String[] listAttributes() 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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |