|
||||||||||
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.CurrentNodeListIterator
public final class CurrentNodeListIterator
Iterators of this kind use a CurrentNodeListFilter to filter a subset of nodes from a source iterator. For each node from the source, the boolean method CurrentNodeListFilter.test() is called. All nodes from the source are read into an array upon calling setStartNode() (this is needed to determine the value of last, a parameter to CurrentNodeListFilter.test()). The method getLast() returns the last element after applying the filter.
Field Summary | |
---|---|
private int |
_currentIndex
Index in _nodes of the next node to filter. |
private int |
_currentNode
The current node in the stylesheet at the time of evaluation. |
private boolean |
_docOrder
A flag indicating if nodes are returned in document order. |
private CurrentNodeListFilter |
_filter
A reference to a filter object. |
private IntegerArray |
_nodes
An integer array to store nodes from source iterator. |
private DTMAxisIterator |
_source
The source for this iterator. |
private AbstractTranslet |
_translet
A reference to the translet. |
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 | |
---|---|
CurrentNodeListIterator(DTMAxisIterator source,
boolean docOrder,
CurrentNodeListFilter filter,
int currentNode,
AbstractTranslet translet)
|
|
CurrentNodeListIterator(DTMAxisIterator source,
CurrentNodeListFilter filter,
int currentNode,
AbstractTranslet translet)
|
Method Summary | |
---|---|
DTMAxisIterator |
cloneIterator()
Returns a deep copy of this iterator. |
private int |
computePositionOfLast()
|
DTMAxisIterator |
forceNaturalOrder()
|
int |
getLast()
Returns the position of the last node within the iteration, as defined by XPath. |
void |
gotoMark()
Restores the current node remembered by setMark(). |
boolean |
isReverse()
|
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, getNodeByPosition, getPosition, getStartNode, includeSelf, isDocOrdered, resetPosition, returnNode |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private boolean _docOrder
private DTMAxisIterator _source
private final CurrentNodeListFilter _filter
private IntegerArray _nodes
private int _currentIndex
private final int _currentNode
private AbstractTranslet _translet
Constructor Detail |
---|
public CurrentNodeListIterator(DTMAxisIterator source, CurrentNodeListFilter filter, int currentNode, AbstractTranslet translet)
public CurrentNodeListIterator(DTMAxisIterator source, boolean docOrder, CurrentNodeListFilter filter, int currentNode, AbstractTranslet translet)
Method Detail |
---|
public DTMAxisIterator forceNaturalOrder()
public void setRestartable(boolean isRestartable)
DTMAxisIterator
setRestartable
in interface DTMAxisIterator
setRestartable
in class DTMAxisIteratorBase
public boolean isReverse()
isReverse
in interface DTMAxisIterator
isReverse
in class DTMAxisIteratorBase
public DTMAxisIterator cloneIterator()
DTMAxisIteratorBase
cloneIterator
in interface DTMAxisIterator
cloneIterator
in class DTMAxisIteratorBase
public DTMAxisIterator reset()
DTMAxisIterator
reset
in interface DTMAxisIterator
reset
in class DTMAxisIteratorBase
public int next()
DTMAxisIterator
public DTMAxisIterator setStartNode(int node)
DTMAxisIterator
node
- Sets the root of the iteration.
public int getLast()
DTMAxisIteratorBase
getLast
in interface DTMAxisIterator
getLast
in class DTMAxisIteratorBase
public void setMark()
DTMAxisIterator
public void gotoMark()
DTMAxisIterator
private int computePositionOfLast()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |