|
|||||||||
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 | +--com.icl.saxon.expr.NodeSetExtent
A node-set value implemented extensionally.
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 | |
NodeSetExtent()
Default constructor creates an empty node set |
|
NodeSetExtent(NodeEnumeration enum)
Construct a node-set containing all the nodes in a NodeEnumeration |
|
NodeSetExtent(NodeInfo[] nodes)
Construct a node-set given the set of nodes as an array |
|
NodeSetExtent(java.util.Vector nodes)
Deprecated. It is more efficient to supply an array NodeInfo[] |
Method Summary | |
void |
append(NodeInfo node)
Append a node to the node-set. |
java.lang.String |
asString()
Convert to string value |
boolean |
contains(NodeInfo node)
Determine whether a particular node is present in the nodeset. |
NodeEnumeration |
enumerate()
Return an enumeration of this nodeset value. |
int |
getCount()
Count the nodes in the node-set. |
NodeInfo |
getFirst()
Get the first node in the nodeset (in document order) |
int |
getLength()
return the number of nodes in the list (DOM method) |
NodeInfo[] |
getNodes()
Return the nodes in the node-set as a Vector. |
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. |
boolean |
isSorted()
Test whether the value is known to be sorted |
org.w3c.dom.Node |
item(int index)
Return the n'th item in the list (DOM method) |
NodeInfo |
selectFirst(Context context)
Return the first node in the nodeset (in document order) |
void |
setSorted(boolean isSorted)
Set a flag to indicate whether the nodes are sorted. |
Expression |
simplify()
Simplify the expression |
NodeSetValue |
sort()
Sort the nodes into document order. |
java.lang.String |
toString()
Diagnostic output: get a string representation of the nodeset |
Methods inherited from class com.icl.saxon.expr.NodeSetValue |
asBoolean, asNumber, compare, enumerate, equals, evaluate, evaluateAsNodeSet, getDataType, notEquals |
Methods inherited from class com.icl.saxon.expr.Value |
getDependencies, inverse, numericCompare, reduce, 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, wait, wait, wait |
Constructor Detail |
public NodeSetExtent()
public NodeSetExtent(NodeInfo[] nodes)
nodes
- An array whose elements must be NodeInfo objectslength
- The number of significant elements in the array; any excess is ignoredpublic NodeSetExtent(java.util.Vector nodes)
nodes
- a Vector whose elements must be NodeInfo objectspublic NodeSetExtent(NodeEnumeration enum) throws org.xml.sax.SAXException
Method Detail |
public void append(NodeInfo node)
public Expression simplify() throws org.xml.sax.SAXException
simplify
in class Value
com.icl.saxon.expr.Value
public void setSorted(boolean isSorted)
setSorted
in class NodeSetValue
isSorted
- true if the caller wishes to assert that the nodes are in document order
and do not need to be further sortedpublic boolean isSorted()
isSorted
in class NodeSetValue
public java.lang.String asString() throws org.xml.sax.SAXException
asString
in class NodeSetValue
public int getCount() throws org.xml.sax.SAXException
getCount
in class NodeSetValue
public boolean isEmpty() throws org.xml.sax.SAXException
isEmpty
in class NodeSetValue
public boolean isSingular()
isSingular
in class NodeSetValue
public boolean contains(NodeInfo node)
contains
in class NodeSetValue
public NodeInfo[] getNodes()
getNodes
in class NodeSetValue
public NodeSetValue sort() throws org.xml.sax.SAXException
sort
in class NodeSetValue
public NodeInfo getFirst() throws org.xml.sax.SAXException
getFirst
in class NodeSetValue
public NodeInfo selectFirst(Context context) throws org.xml.sax.SAXException
context
- The context for the evaluation: not usedpublic NodeEnumeration enumerate() throws org.xml.sax.SAXException
enumerate
in class NodeSetValue
public java.lang.String toString()
toString
in class java.lang.Object
public int getLength()
getLength
in interface org.w3c.dom.NodeList
public org.w3c.dom.Node item(int index)
item
in interface org.w3c.dom.NodeList
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |