|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xml.dtm.ref.DTMAxisIteratorBase org.apache.xalan.xsltc.dom.StepIterator
public class StepIterator
A step iterator is used to evaluate expressions like "BOOK/TITLE". A better name for this iterator would have been ParentIterator since both "BOOK" and "TITLE" are steps in XPath lingo. Step iterators are constructed from two other iterators which we are going to refer to as "outer" and "inner". Every node from the outer iterator (the one for BOOK in our example) is used to initialize the inner iterator. After this initialization, every node from the inner iterator is returned (in essence, implementing a "nested loop").
Field Summary | |
---|---|
protected DTMAxisIterator |
_iterator
A reference to the "inner" iterator. |
private int |
_pos
Temp variable to store a marked position. |
protected DTMAxisIterator |
_source
A reference to the "outer" iterator. |
Fields inherited from class org.apache.xml.dtm.ref.DTMAxisIteratorBase |
---|
_includeSelf, _isRestartable, _last, _markedNode, _position, _startNode |
Fields inherited from interface org.apache.xml.dtm.DTMAxisIterator |
---|
END |
Constructor Summary | |
---|---|
StepIterator(DTMAxisIterator source,
DTMAxisIterator iterator)
|
Method Summary | |
---|---|
DTMAxisIterator |
cloneIterator()
Returns a deep copy of this iterator. |
void |
gotoMark()
Restores the current node remembered by setMark(). |
int |
next()
Get the next node in the iteration. |
DTMAxisIterator |
reset()
Resets the iterator to the last start node. |
void |
setMark()
Remembers the current node for the next call to gotoMark(). |
void |
setRestartable(boolean isRestartable)
Set if restartable. |
DTMAxisIterator |
setStartNode(int node)
Set start to END should 'close' the iterator, i.e. |
Methods inherited from class org.apache.xml.dtm.ref.DTMAxisIteratorBase |
---|
getAxis, getLast, getNodeByPosition, getPosition, getStartNode, includeSelf, isDocOrdered, isReverse, resetPosition, returnNode |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected DTMAxisIterator _source
protected DTMAxisIterator _iterator
private int _pos
Constructor Detail |
---|
public StepIterator(DTMAxisIterator source, DTMAxisIterator iterator)
Method Detail |
---|
public void setRestartable(boolean isRestartable)
DTMAxisIterator
setRestartable
in interface DTMAxisIterator
setRestartable
in class DTMAxisIteratorBase
public DTMAxisIterator cloneIterator()
DTMAxisIteratorBase
cloneIterator
in interface DTMAxisIterator
cloneIterator
in class DTMAxisIteratorBase
public DTMAxisIterator setStartNode(int node)
DTMAxisIterator
node
- Sets the root of the iteration.
public DTMAxisIterator reset()
DTMAxisIterator
reset
in interface DTMAxisIterator
reset
in class DTMAxisIteratorBase
public int next()
DTMAxisIterator
public void setMark()
DTMAxisIterator
public void gotoMark()
DTMAxisIterator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |