|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.icl.saxon.expr.Expression | +--com.icl.saxon.expr.Value | +--com.icl.saxon.expr.NodeSetValue
A node-set value. We use this both for node-sets and node-lists. The node set will only be sorted into document order when requested (using sort() or evaluate()). This is an abstract class with a number of concrete implementations including NodeSetExtent (for extensional node-sets) and NodeSetIntent (for intensional node-sets).
Fields inherited from class com.icl.saxon.expr.Value |
ANY, BOOLEAN, NODESET, NUMBER, OBJECT, STRING |
Fields inherited from class com.icl.saxon.expr.Expression |
staticContext |
Constructor Summary | |
NodeSetValue()
|
Method Summary | |
boolean |
asBoolean()
Evaluate as a boolean. |
double |
asNumber()
Evaluate as a number. |
abstract java.lang.String |
asString()
Convert to string value |
boolean |
compare(int operator,
Value other)
Test how a nodeset compares to another Value under a relational comparison |
abstract boolean |
contains(NodeInfo node)
Determine whether a particular node is present in the nodeset. |
abstract NodeEnumeration |
enumerate()
Return an enumeration of this nodeset value. |
NodeEnumeration |
enumerate(Context c,
boolean sorted)
Return an enumeration of this nodeset value. |
boolean |
equals(Value other)
Test whether a nodeset "equals" another Value |
Value |
evaluate(Context context)
Evaluate the Node Set. |
NodeSetValue |
evaluateAsNodeSet(Context context)
Evaluate an expression as a NodeSet. |
abstract int |
getCount()
Count the nodes in the node-set. |
int |
getDataType()
Determine the data type of the expression |
abstract NodeInfo |
getFirst()
Get the first node in the nodeset (in document order) |
abstract NodeInfo[] |
getNodes()
Return the nodes in the node-set as an array. |
abstract boolean |
isEmpty()
Determine whether the node-set is empty. |
boolean |
isSingular()
Determine whether the node-set is singular, that is, whether it has a single member. |
abstract boolean |
isSorted()
Test whether the value is known to be sorted |
boolean |
notEquals(Value other)
Test whether a nodeset "not-equals" another Value |
abstract void |
setSorted(boolean isSorted)
Set a flag to indicate whether the nodes are sorted. |
abstract NodeSetValue |
sort()
Sort the nodes into document order. |
Methods inherited from class com.icl.saxon.expr.Value |
getDependencies, inverse, numericCompare, reduce, simplify, stringToNumber |
Methods inherited from class com.icl.saxon.expr.Expression |
containsReferences, evaluateAsBoolean, evaluateAsNumber, evaluateAsString, getStaticContext, make, outputStringValue, setStaticContext, usesCurrent |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public NodeSetValue()
Method Detail |
public int getDataType()
getDataType
in class Expression
public Value evaluate(Context context) throws org.xml.sax.SAXException
evaluate
in class Value
context
- The context for evaluation (not used)public NodeSetValue evaluateAsNodeSet(Context context) throws org.xml.sax.SAXException
evaluateAsNodeSet
in class Expression
context
- The context in which the expression is to be evaluatedpublic abstract NodeEnumeration enumerate() throws org.xml.sax.SAXException
public NodeEnumeration enumerate(Context c, boolean sorted) throws org.xml.sax.SAXException
enumerate
in class Expression
context
- The context is ignored.sorted
- Indicates that the result must be in document orderpublic abstract void setSorted(boolean isSorted)
isSorted
- true if the caller wishes to assert that the nodes are in document order
and do not need to be further sortedpublic abstract boolean isSorted() throws org.xml.sax.SAXException
public abstract java.lang.String asString() throws org.xml.sax.SAXException
asString
in class Value
public double asNumber() throws org.xml.sax.SAXException
asNumber
in class Value
public boolean asBoolean() throws org.xml.sax.SAXException
asBoolean
in class Value
public abstract int getCount() throws org.xml.sax.SAXException
public abstract boolean isEmpty() throws org.xml.sax.SAXException
public boolean isSingular() throws org.xml.sax.SAXException
public abstract boolean contains(NodeInfo node) throws org.xml.sax.SAXException
public abstract NodeInfo[] getNodes() throws org.xml.sax.SAXException
public abstract NodeSetValue sort() throws org.xml.sax.SAXException
public abstract NodeInfo getFirst() throws org.xml.sax.SAXException
public boolean equals(Value other) throws org.xml.sax.SAXException
equals
in class Value
com.icl.saxon.expr.Value
public boolean notEquals(Value other) throws org.xml.sax.SAXException
notEquals
in class Value
com.icl.saxon.expr.Value
public boolean compare(int operator, Value other) throws org.xml.sax.SAXException
compare
in class Value
operator
- The comparison operator, one of Tokenizer.LE, Tokenizer.LT,
Tokenizer.GE, Tokenizer.GT,
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |