| org.apache.xpath.axes.PredicatedNodeTest org.apache.xpath.axes.LocPathIterator org.apache.xpath.axes.BasicTestIterator org.apache.xpath.axes.ChildTestIterator org.apache.xpath.axes.OneStepIterator
OneStepIterator | public class OneStepIterator extends ChildTestIterator (Code) | | This class implements a general iterator for
those LocationSteps with only one step, and perhaps a predicate.
See Also: org.apache.xpath.axes.LocPathIterator |
Method Summary | |
public Object | clone() Get a cloned iterator. | public DTMIterator | cloneWithReset() Get a cloned Iterator that is reset to the beginning
of the query. | protected void | countProximityPosition(int i) Count backwards one proximity position. | public boolean | deepEquals(Expression expr) | public void | detach() Detaches the iterator from the set which it iterated over, releasing
any computational resources and placing the iterator in the INVALID
state. | public int | getAxis() Returns the axis being iterated, if it is known. | public int | getLength() The number of nodes in the list. | protected int | getNextNode() Get the next node via getFirstAttribute && getNextAttribute. | protected int | getProximityPosition(int predicateIndex) Get the current sub-context position. | public boolean | isReverseAxes() Tells if this is a reverse axes. | public void | reset() Reset the iterator. | public void | setRoot(int context, Object environment) Initialize the context values for this expression
after it is cloned. |
m_axis | protected int m_axis(Code) | | The traversal axis from where the nodes will be filtered.
|
m_iterator | protected DTMAxisIterator m_iterator(Code) | | The DTM inner traversal class, that corresponds to the super axis.
|
serialVersionUID | final static long serialVersionUID(Code) | | |
countProximityPosition | protected void countProximityPosition(int i)(Code) | | Count backwards one proximity position.
Parameters: i - The predicate index. |
detach | public void detach()(Code) | | Detaches the iterator from the set which it iterated over, releasing
any computational resources and placing the iterator in the INVALID
state. Afterdetach has been invoked, calls to
nextNode orpreviousNode will raise the
exception INVALID_STATE_ERR.
|
getAxis | public int getAxis()(Code) | | Returns the axis being iterated, if it is known.
Axis.CHILD, etc., or -1 if the axis is not known or is of multiple types. |
getLength | public int getLength()(Code) | | The number of nodes in the list. The range of valid child node indices
is 0 to length-1 inclusive.
The number of nodes in the list, always greater or equal to zero. |
getNextNode | protected int getNextNode()(Code) | | Get the next node via getFirstAttribute && getNextAttribute.
|
getProximityPosition | protected int getProximityPosition(int predicateIndex)(Code) | | Get the current sub-context position. In order to do the
reverse axes count, for the moment this re-searches the axes
up to the predicate. An optimization on this is to cache
the nodes searched, but, for the moment, this case is probably
rare enough that the added complexity isn't worth it.
Parameters: predicateIndex - The predicate index of the proximity position. The pridicate index, or -1. |
isReverseAxes | public boolean isReverseAxes()(Code) | | Tells if this is a reverse axes. Overrides AxesWalker#isReverseAxes.
true for this class. |
reset | public void reset()(Code) | | Reset the iterator.
|
setRoot | public void setRoot(int context, Object environment)(Code) | | Initialize the context values for this expression
after it is cloned.
Parameters: context - The XPath runtime context for thistransformation. |
Fields inherited from org.apache.xpath.axes.BasicTestIterator | final static long serialVersionUID(Code)(Java Doc)
|
|
|