org.exolab.adaptx.xslt

Class XSLTFunctionResult

Implemented Interfaces:
java.io.Serializable
Known Direct Subclasses:
TreeFragmentResult

public abstract class XSLTFunctionResult
extends XPathResult

Abstract class representing the result of an XSLT extension function.
Version:
$Revision: 3633 $ $Date: 2003-03-01 02:38:44 -0500 (Sat, 01 Mar 2003) $
Author:
Keith Visco
See Also:
Serialized Form

Field Summary

static short
TREE_FRAGMENT
The tree-fragment result

Fields inherited from class org.exolab.adaptx.xpath.XPathResult

BOOLEAN, NODE_SET, NUMBER, STRING, USER_DEFINED

Method Summary

abstract boolean
booleanValue()
Returns the result as a boolean value.
abstract 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.
int
getResultType()
Returns the type of this result.
abstract short
getXSLTResultType()
Returns the type of this result.
abstract Object
javaObject()
Returns the result as a Java object.
abstract double
numberValue()
Returns the result as a number value.
abstract String
stringValue()
Returns the result as a string value.

Methods inherited from class org.exolab.adaptx.xpath.XPathResult

booleanValue, equals, getResultType, javaObject, numberValue, stringValue

Field Details

TREE_FRAGMENT

public static final short TREE_FRAGMENT
The tree-fragment result
Field Value:
0

Method Details

booleanValue

public abstract boolean booleanValue()
Returns the result as a boolean value. Returns the value of a boolean result, true for a non-empty string result, true for a non-zero number result, and true from a non-empty node-set.
Overrides:
booleanValue in interface XPathResult
Returns:
The result as a boolean value

equals

public abstract 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.
Overrides:
equals in interface XPathResult
Parameters:
result - An XPath result
Returns:
True if same type and same value as this result

getResultType

public int getResultType()
Returns the type of this result. This should always be XPathResult.USER_DEFINED.
Overrides:
getResultType in interface XPathResult
Returns:
The type of this result

getXSLTResultType

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

javaObject

public abstract Object javaObject()
Returns the result as a Java object. Returns an object of type java.lang.Boolean for a boolean result, an object of type java.lang.String for a string result, an object of type java.lang.Double for a number result, or an object of type NodeSet for a node-set.
Overrides:
javaObject in interface XPathResult
Returns:
The result as a Java object

numberValue

public abstract double numberValue()
Returns the result as a number value. Returns 0 or 1 for a boolean result, the parsed value for a string result, the value of a number result, or the parsed value of a node-set.
Overrides:
numberValue in interface XPathResult
Returns:
The result as a number value

stringValue

public abstract 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.
Overrides:
stringValue in interface XPathResult
Returns:
The result as a string value