public interface Atom extends ContentElement
Atom class represents the smallest content entity. It
extends the ContentElement by methods that allow read and write
access to the contentbus.| Modifier and Type | Method and Description |
|---|---|
double |
getNumber()
Get the number representation of the atom value throwing exceptions
if an error occurrs.
|
AtomStatus |
getStat()
Gets the status of an atom.
|
java.io.InputStream |
getStream()
Gets a inputstream of the content of the atom or
null if
the atom is empty. |
java.lang.String |
getString()
Returns the string of the content of the atom.
|
Value |
getValue()
Returns the internal value of the content or
null if the
atom is empty. |
boolean |
hasContent()
Indicates, if the atom has content.
|
boolean |
isBinary()
Returns the information if the content is, or could be, in binary format.
|
boolean |
isReadOnly()
Returns if this atom is defined as read only.
|
void |
setStream(java.io.InputStream value)
Sets the content of the atom by passing a
InputStream. |
void |
setString(java.lang.String value)
Writes a string content to the atom.
|
void |
setValue(Value value)
Sets the internal value of the atom.
|
double |
toNumber()
Get the number representation of the atom value.
|
java.lang.String |
toString()
Return the string of the content of the atom.
|
accept, clear, copyTo, getDeepElement, getDeepElement, getElement, getLabel, getModificationTime, getQualident, getUUID, hasElement, isEmpty, parentjava.lang.String toString()
toString in class java.lang.ObjectgetString(),
ContentElement.isEmpty()java.lang.String getString()
throws ContentBusException
ContentBusException - if error occurs.toString(),
ContentElement.isEmpty()void setString(java.lang.String value)
throws ContentBusException
value - the stringContentBusException - if the content can't be stored in the atomjava.lang.IllegalStateException - if the page of this atom is not ina transactionsetValue(Value),
Page.startTransaction(),
Page.commit()double getNumber()
throws ContentBusException,
java.lang.NumberFormatException
Double.NaN is the atom is empty.ContentBusException - if an error occurs during content accessjava.lang.NumberFormatException - if the content can't be converted to a doubleContentElement.isEmpty(),
toNumber()double toNumber()
Double.NaN is returned.Double.NaN
if the atom is empty or if an error occurred.ContentElement.isEmpty(),
getNumber()java.io.InputStream getStream()
throws ContentBusException
null if
the atom is empty.null if empty.ContentBusException - if an error during content access occurred.ContentElement.isEmpty()void setStream(java.io.InputStream value)
throws ContentBusException
InputStream. The
actualy reading of the stream is not done until the writeback of the atom.
At the time this method is called, the page this atom belongs to, must be
in a transaction. If this atom is defined as read only, this call has
no effect.value - a stream containing contentContentBusException - if an error during content access occurresjava.lang.IllegalStateException - if the page of this atom is not in a
transaction.setValue(Value),
Page.startTransaction(),
Page.commit()Value getValue() throws ContentBusException
null if the
atom is empty.ContentBusException - if an error during content access occurres.ContentElement.isEmpty()void setValue(Value value) throws ContentBusException
value - the value to storeContentBusException - if an error during content access occurresjava.lang.IllegalStateException - if the page of this atom is not in a
transaction.Page.startTransaction(),
Page.commit()AtomStatus getStat() throws ContentBusException
ContentBusException - if an error occurresboolean isBinary()
throws ContentBusException
true if the value is binary;
false otherwise.ContentBusException - if an error occurresboolean hasContent()
throws ContentBusException
ContentElement.isEmpty().true if the atom has content;
false otherwise.ContentBusException - if an error occurresboolean isReadOnly()
true if this atom is defined as read only;
false otherwise.