|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.xpath.Expression | +--org.apache.xpath.axes.UnionPathIterator
**For advanced use only** This class extends NodeSet, which implements NodeIterator, and fetches nodes one at a time in document order based on a XPath UnionExpr. As each node is iterated via nextNode(), the node is also stored in the NodeVector, so that previousNode() can easily be done.
Constructor Summary | |
UnionPathIterator()
**For advanced use only** Constructor to create an instance which you can add location paths to. |
|
UnionPathIterator(Compiler compiler,
int opPos)
**For advanced use only** Constructor. |
Method Summary | |
void |
addIterator(LocPathIterator iter)
**For advanced use only** Add an iterator to the union list. |
java.lang.Object |
clone()
**For advanced use only** Get a cloned UnionPathIterator. |
NodeIterator |
cloneWithReset()
**For advanced use only** Get a cloned UnionPathIterator. |
void |
detach()
**For advanced use only** Detaches the iterator from the set which it iterated over, releasing any computational resources and placing the iterator in the INVALID state. |
XObject |
execute(XPathContext xctxt)
**For advanced use only** |
Node |
getCurrentContextNode()
**For advanced use only** |
Node |
getCurrentNode()
**For advanced use only** Return the last fetched node. |
int |
getCurrentPos()
**For advanced use only** Get the current position, which is one less than the next nextNode() call will retreave. |
boolean |
getExpandEntityReferences()
**For advanced use only** The value of this flag determines whether the children of entity reference nodes are visible to the iterator. |
NodeFilter |
getFilter()
**For advanced use only** The filter used to screen nodes. |
Node |
getRoot()
**For advanced use only** The root node of the Iterator, as specified when it was created. |
int |
getWhatToShow()
**For advanced use only** This attribute determines which node types are presented via the iterator. |
void |
initContext(XPathContext execContext)
**For advanced use only** |
boolean |
isFresh()
**For advanced use only** Tells if this NodeSet is "fresh", in other words, if the first nextNode() that is called will return the first node in the set. |
Node |
nextNode()
**For advanced use only** Returns the next node in the set and advances the position of the iterator in the set. |
Node |
previousNode()
**For advanced use only** Returns the previous node in the set and moves the position of the iterator backwards in the set. |
void |
reset()
**For advanced use only** Reset the iterator. |
void |
runTo(int index)
**For advanced use only** If an index is requested, NodeSet will call this method to run the iterator to the index. |
void |
setCurrentPos(int i)
**For advanced use only** Set the current position in the node set. |
void |
setShouldCacheNodes(boolean b)
**For advanced use only** If setShouldCacheNodes(true) is called, then nodes will be cached. |
int |
size()
**For advanced use only** Get the length of the list. |
Methods inherited from class org.apache.xpath.Expression |
assert,
error,
warn |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public UnionPathIterator()
public UnionPathIterator(Compiler compiler, int opPos) throws SAXException
Method Detail |
public void initContext(XPathContext execContext)
public void detach()
detach
has been invoked, calls to
nextNode
orpreviousNode
will raise the
exception INVALID_STATE_ERR.public XObject execute(XPathContext xctxt) throws SAXException
public void setShouldCacheNodes(boolean b)
public void setCurrentPos(int i)
i
- Must be a valid index.public int size()
public boolean isFresh()
public Node previousNode() throws DOMException
Node
in the set being iterated over,
ornull
if there are no more members in that set.detach
method was invoked.public int getWhatToShow()
NodeFilter
interface.public NodeFilter getFilter()
public Node getRoot()
public boolean getExpandEntityReferences()
public void addIterator(LocPathIterator iter)
public NodeIterator cloneWithReset() throws java.lang.CloneNotSupportedException
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
public void reset()
public Node nextNode() throws DOMException
Node
in the set being iterated over, or
null
if there are no more members in that set.detach
method was invoked.public void runTo(int index)
public int getCurrentPos()
public Node getCurrentNode()
public Node getCurrentContextNode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |