|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--org.mmbase.bridge.implementation.BasicFunctionValue
This implementation of the Field Value interface is used by getFunctionValue of Node. This represents the result of a `function' on a node and it (therefore) is a unmodifiable.
| Method Summary | |
boolean |
canModify()
Function values cannot be changed |
java.lang.Object |
get()
Returns the value as an Object. |
java.lang.Object |
getField()
Returns the Field object belonging to this value. |
Node |
getNode()
Returns the Node to which this value belongs. |
void |
set(java.lang.Object value)
Function values cannot be changed, and all set-functions throw an exception. |
void |
setBoolean(boolean value)
Function values cannot be changed, and all set-functions throw an exception. |
void |
setByte(byte[] value)
Function values cannot be changed, and all set-functions throw an exception. |
void |
setDouble(double value)
Function values cannot be changed, and all set-functions throw an exception. |
void |
setFLoat(float value)
Function values cannot be changed, and all set-functions throw an exception. |
void |
setInt(int value)
Function values cannot be changed, and all set-functions throw an exception. |
void |
setLong(long value)
Function values cannot be changed, and all set-functions throw an exception. |
void |
setNode(Node value)
Function values cannot be changed, and all set-functions throw an exception. |
void |
setString(java.lang.String value)
Function values cannot be changed, and all set-functions throw an exception. |
void |
setXML(org.w3c.dom.Document value)
Function values cannot be changed, and all set-functions throw an exception. |
boolean |
toBoolean()
Returns the value as an boolean ( true or false). |
byte[] |
toByte()
Returns the value as a byte array. |
double |
toDouble()
Returns the value as a double. |
float |
toFloat()
Returns the value as a float. |
int |
toInt()
Returns the value as an int. |
long |
toLong()
Returns the value as a long. |
Node |
toNode()
Returns the value as a Node. |
java.lang.String |
toString()
Returns the value as a String. |
org.w3c.dom.Document |
toXML()
Returns the value as a org.w3c.dom.Document
If the node value is not itself a Document, the method attempts to
attempts to convert the String value into an XML. |
org.w3c.dom.Element |
toXML(org.w3c.dom.Document tree)
Returns the value as a org.w3c.dom.Element
If the node value is not itself a Document, the method attempts to
attempts to convert the String value into an XML. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
public boolean canModify()
canModify in interface FieldValuepublic java.lang.Object get()
FieldValueget in interface FieldValueorg.mmbase.bridge.FieldValuepublic java.lang.Object getField()
FieldValuegetField in interface FieldValueorg.mmbase.bridge.FieldValuepublic Node getNode()
FieldValuegetNode in interface FieldValueorg.mmbase.bridge.FieldValuepublic boolean toBoolean()
FieldValuetrue or false).
If the actual value is numeric, this call returns true
if the value is a positive, non-zero, value. In other words, values '0'
and '-1' are concidered false.
If the value is a string, this call returns true if
the value is "true" or "yes" (case-insensitive).
In all other cases (including calling byte fields), false
is returned.toBoolean in interface FieldValueorg.mmbase.bridge.FieldValuepublic byte[] toByte()
FieldValuetoByte in interface FieldValueorg.mmbase.bridge.FieldValuepublic float toFloat()
FieldValuetoFloat in interface FieldValueorg.mmbase.bridge.FieldValuepublic double toDouble()
FieldValuetoDouble in interface FieldValueorg.mmbase.bridge.FieldValuepublic long toLong()
FieldValuetoLong in interface FieldValueorg.mmbase.bridge.FieldValuepublic int toInt()
FieldValuetoInt in interface FieldValueorg.mmbase.bridge.FieldValuepublic Node toNode()
FieldValuenull.toNode in interface FieldValueorg.mmbase.bridge.FieldValuepublic java.lang.String toString()
FieldValuetoString in interface FieldValuetoString in class java.lang.Objectorg.mmbase.bridge.FieldValue
public org.w3c.dom.Document toXML()
throws java.lang.IllegalArgumentException
FieldValueorg.w3c.dom.Document
If the node value is not itself a Document, the method attempts to
attempts to convert the String value into an XML.
If the value cannot be converted, this method returns nulltoXML in interface FieldValueorg.mmbase.bridge.FieldValuejava.lang.IllegalArgumentException - if the Field is not of type TYPE_XML.
public org.w3c.dom.Element toXML(org.w3c.dom.Document tree)
throws java.lang.IllegalArgumentException
FieldValueorg.w3c.dom.Element
If the node value is not itself a Document, the method attempts to
attempts to convert the String value into an XML.
This method fails (throws a IllegalArgumentException) if the Field is not of type TYPE_XML.
If the value cannot be converted, this method returns nulltoXML in interface FieldValueorg.mmbase.bridge.FieldValuetree - the DOM Document to which the Element is added
(as the document root element)java.lang.IllegalArgumentException - if the Field is not of type TYPE_XML.public void set(java.lang.Object value)
set in interface FieldValueBridgeException - public void setBoolean(boolean value)
setBoolean in interface FieldValueBridgeException - public void setFLoat(float value)
setFLoat in interface FieldValueBridgeException - public void setDouble(double value)
setDouble in interface FieldValueBridgeException - public void setLong(long value)
setLong in interface FieldValueBridgeException - public void setInt(int value)
setInt in interface FieldValueBridgeException - public void setByte(byte[] value)
setByte in interface FieldValueBridgeException - public void setString(java.lang.String value)
setString in interface FieldValueBridgeException - public void setNode(Node value)
setNode in interface FieldValueBridgeException - public void setXML(org.w3c.dom.Document value)
setXML in interface FieldValueBridgeException -
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||