org.exolab.adaptx.xslt

Class TreeFragmentResult

public class TreeFragmentResult extends XSLTFunctionResult

Represents a TreeFragment result

Version: $Revision: 4092 $ $Date: 2004-01-26 18:43:54 -0500 (Mon, 26 Jan 2004) $

Author: Keith Visco

Constructor Summary
TreeFragmentResult()
Creates a new TreeFragmentResult that represents a "empty" fragment.
TreeFragmentResult(XPathNode node)
Creates a new TreeFragmentResult with the given XPathNode.
TreeFragmentResult(NodeSet nodes)
Creates a new TreeFragmentResult with the given NodeSet.
Method Summary
booleanbooleanValue()
Returns the value of this ExprResult as a boolean
booleanequals(XPathResult result)
Returns true if the given expression is the same tyoe as this result and has the same value as this result.
NodeSetgetValue()
Returns the value of this TreeFragmentResult
shortgetXSLTResultType()
Returns the type of this result.
ObjectjavaObject()
Returns the Result as a Java Object.
doublenumberValue()
Returns the value of this XPathResult as a double
voidsetValue(XPathNode node)
Sets the value of this TreeFragmentResult
voidsetValue(NodeSet nodes)
Sets the value of this TreeFragmentResult
StringstringValue()
Returns the result as a string value.
StringtoString()

Constructor Detail

TreeFragmentResult

public TreeFragmentResult()
Creates a new TreeFragmentResult that represents a "empty" fragment.

TreeFragmentResult

public TreeFragmentResult(XPathNode node)
Creates a new TreeFragmentResult with the given XPathNode.

Parameters: node the XPathNode which is the "tree fragment".

TreeFragmentResult

public TreeFragmentResult(NodeSet nodes)
Creates a new TreeFragmentResult with the given NodeSet.

Parameters: nodes the NodeSet which is the "tree fragment".

Method Detail

booleanValue

public boolean booleanValue()
Returns the value of this ExprResult as a boolean

Returns: the value of this ExprResult as a boolean

equals

public boolean equals(XPathResult result)
Returns true if the given expression is the same tyoe as this result and has the same value as this result.

Parameters: result An XPath result

Returns: True if same type and same value as this result

getValue

public NodeSet getValue()
Returns the value of this TreeFragmentResult

Returns: the value of this TreeFragmentResult

getXSLTResultType

public short getXSLTResultType()
Returns the type of this result.

Returns: The type of this result

javaObject

public Object javaObject()
Returns the Result as a Java Object. For tree-fragment this is simply an XPathNode.

Returns: the Result as a Java Object

numberValue

public double numberValue()
Returns the value of this XPathResult as a double

Returns: the value of this XPathResult as a double

setValue

public void setValue(XPathNode node)
Sets the value of this TreeFragmentResult

Parameters: node the XPathNode to use as the result fragment

setValue

public void setValue(NodeSet nodes)
Sets the value of this TreeFragmentResult

Parameters: nodes the NodeSet to use as the result fragment

stringValue

public String stringValue()
Returns the result as a string value. Returns "false" or "true" for a boolean result, the value of a string result, the string value of a number result, or the string value of a node-set.

Returns: The result as a string value

toString

public String toString()