Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.apache.xpath.Expression
org.apache.xpath.objects.XObject
org.apache.xpath.axes.NodeSequence
org.apache.xpath.objects.XNodeSet
public class XNodeSet
extends NodeSequence
Nested Class Summary |
Field Summary |
Fields inherited from class org.apache.xpath.objects.XObject | |
CLASS_BOOLEAN , CLASS_NODESET , CLASS_NULL , CLASS_NUMBER , CLASS_RTREEFRAG , CLASS_STRING , CLASS_UNKNOWN , CLASS_UNRESOLVEDVARIABLE |
Fields inherited from interface org.apache.xml.dtm.DTMIterator | |
FILTER_ACCEPT , FILTER_REJECT , FILTER_SKIP |
Constructor Summary | |
| |
| |
| |
Method Summary | |
void |
|
boolean |
|
boolean |
|
boolean | |
void |
|
boolean | |
XObject |
|
double |
|
XMLString |
|
int |
|
String |
|
boolean |
|
boolean |
|
DTMIterator |
|
DTMIterator |
|
boolean | |
boolean |
|
NodeSetDTM |
|
NodeList |
|
NodeIterator |
|
boolean | |
double |
|
double |
|
Object |
|
void |
|
String |
|
XMLString |
|
Methods inherited from class org.apache.xpath.axes.NodeSequence | |
allowDetachToRelease , clone , cloneWithReset , detach , fixupVariables , getAnalysisBits , getAxis , getContainedIter , getCurrentNode , getCurrentPos , getDTM , getDTMManager , getExpandEntityReferences , getLength , getRoot , getWhatToShow , hasCache , isDocOrdered , isFresh , isMutable , item , nextNode , previousNode , reset , runTo , setCurrentPos , setItem , setIter , setRoot , setShouldCacheNodes |
Methods inherited from class org.apache.xpath.objects.XObject | |
allowDetachToRelease , appendToFsb , bool , boolWithSideEffects , callVisitors , castToType , create , create , deepEquals , destruct , detach , dispatchCharactersEvents , equals , execute , fixupVariables , getFresh , getType , getTypeString , greaterThan , greaterThanOrEqual , iter , lessThan , lessThanOrEqual , mutableNodeset , nodelist , nodeset , notEquals , num , numWithSideEffects , object , reset , rtf , rtf , rtree , rtree , str , toString , xstr |
Methods inherited from class org.apache.xpath.Expression | |
asIterator , asIteratorRaw , asNode , assertion , bool , canTraverseOutsideSubtree , deepEquals , error , execute , execute , execute , execute , executeCharsToContentHandler , exprAddChild , exprGetChild , exprGetNumChildren , exprGetParent , exprSetParent , fixupVariables , getColumnNumber , getExpressionOwner , getLineNumber , getPublicId , getSystemId , isNodesetExpr , isStableNumber , num , warn , xstr |
public XNodeSet(int n, DTMManager dtmMgr)
Construct a XNodeSet object for one node.
- Parameters:
n
- Node to add to the new XNodeSet object
public XNodeSet(DTMIterator val)
Construct a XNodeSet object.
- Parameters:
val
- Value of the XNodeSet object
public XNodeSet(DTMManager dtmMgr)
Construct an empty XNodeSet object. This is used to create a mutable nodeset to which random nodes may be added.
public XNodeSet(XNodeSet val)
Construct a XNodeSet object.
- Parameters:
val
- Value of the XNodeSet object
public void appendToFsb(FastStringBuffer fsb)
Cast result object to a string.
- Overrides:
- appendToFsb in interface XObject
public boolean bool()
Cast result object to a boolean.
- Overrides:
- bool in interface XObject
- Returns:
- True if there is a next node in the nodeset
public boolean boolWithSideEffects()
Cast result object to a boolean, but allow side effects, such as the incrementing of an iterator.
- Overrides:
- boolWithSideEffects in interface XObject
- Returns:
- True if there is a next node in the nodeset
public boolean compare(XObject obj2, org.apache.xpath.objects.Comparator comparator) throws TransformerException
Tell if one object is less than the other.
- Parameters:
obj2
- Object to compare this nodeset tocomparator
- Comparator to use
- Returns:
- See the comments below for each object type comparison
- Throws:
TransformerException
-
public void dispatchCharactersEvents(ContentHandler ch) throws SAXException
Directly call the characters method on the passed ContentHandler for the string-value. Multiple calls to the ContentHandler's characters methods may well occur for a single call to this method.
- Overrides:
- dispatchCharactersEvents in interface XObject
- Parameters:
ch
- A non-null reference to a ContentHandler.
- Throws:
SAXException
-
public boolean equals(XObject obj2)
Tell if two objects are functionally equal.
- Overrides:
- equals in interface XObject
- Parameters:
obj2
- object to compare this nodeset to
- Returns:
- see this.compare(...)
public XObject getFresh()
Get a fresh copy of the object. For use with variables.
- Overrides:
- getFresh in interface XObject
- Returns:
- A fresh nodelist.
public double getNumberFromNode(int n)
Get numeric value of the string conversion from a single node.
- Parameters:
n
- Node to convert
- Returns:
- numeric value of the string conversion from a single node.
public XMLString getStringFromNode(int n)
Get the string conversion from a single node.
- Parameters:
n
- Node to convert
- Returns:
- the string conversion from a single node.
public int getType()
Tell that this is a CLASS_NODESET.
- Overrides:
- getType in interface XObject
- Returns:
- type CLASS_NODESET
public String getTypeString()
Given a request type, return the equivalent string. For diagnostic purposes.
- Overrides:
- getTypeString in interface XObject
- Returns:
- type string "#NODESET"
public boolean greaterThan(XObject obj2) throws TransformerException
Tell if one object is less than the other.
- Overrides:
- greaterThan in interface XObject
- Parameters:
obj2
- object to compare this nodeset to
- Returns:
- see this.compare(...)
- Throws:
TransformerException
-
public boolean greaterThanOrEqual(XObject obj2) throws TransformerException
Tell if one object is less than the other.
- Overrides:
- greaterThanOrEqual in interface XObject
- Parameters:
obj2
- object to compare this nodeset to
- Returns:
- see this.compare(...)
- Throws:
TransformerException
-
public DTMIterator iter()
Cast result object to a nodelist.
- Overrides:
- iter in interface XObject
- Returns:
- The nodeset as a nodelist
public boolean lessThan(XObject obj2) throws TransformerException
Tell if one object is less than the other.
- Overrides:
- lessThan in interface XObject
- Parameters:
obj2
- object to compare this nodeset to
- Returns:
- see this.compare(...)
- Throws:
TransformerException
-
public boolean lessThanOrEqual(XObject obj2) throws TransformerException
Tell if one object is less than or equal to the other.
- Overrides:
- lessThanOrEqual in interface XObject
- Parameters:
obj2
- object to compare this nodeset to
- Returns:
- see this.compare(...)
- Throws:
TransformerException
-
public NodeSetDTM mutableNodeset()
Cast result object to a mutableNodeset.
- Overrides:
- mutableNodeset in interface XObject
- Returns:
- The nodeset as a mutableNodeset
public NodeList nodelist() throws TransformerException
Cast result object to a nodelist.
- Overrides:
- nodelist in interface XObject
- Returns:
- a NodeList.
- Throws:
TransformerException
-
public NodeIterator nodeset() throws TransformerException
Cast result object to a nodelist.
- Overrides:
- nodeset in interface XObject
- Returns:
- a NodeIterator.
- Throws:
TransformerException
-
public boolean notEquals(XObject obj2) throws TransformerException
Tell if two objects are functionally not equal.
- Overrides:
- notEquals in interface XObject
- Parameters:
obj2
- object to compare this nodeset to
- Returns:
- see this.compare(...)
- Throws:
TransformerException
-
public double num()
Cast result object to a number.
- Overrides:
- num in interface XObject
- Returns:
- numeric value of the string conversion from the next node in the NodeSetDTM, or NAN if no node was found
public double numWithSideEffects()
Cast result object to a number, but allow side effects, such as the incrementing of an iterator.
- Overrides:
- numWithSideEffects in interface XObject
- Returns:
- numeric value of the string conversion from the next node in the NodeSetDTM, or NAN if no node was found
public Object object()
Return a java object that's closest to the representation that should be handed to an extension.
- Overrides:
- object in interface XObject
- Returns:
- The object that this class wraps
public String str()
Cast result object to a string.
- Overrides:
- str in interface XObject
- Returns:
- the string conversion from the next node in the nodeset or "" if there is no next node