org.apache.xpath.axes
Class  OneStepIterator
java.lang.Object
  |
  +--org.apache.xpath.Expression
        |
        +--org.apache.xpath.patterns.NodeTest
              |
              +--org.apache.xpath.axes.PredicatedNodeTest
                    |
                    +--org.apache.xpath.axes.LocPathIterator
                          |
                          +--org.apache.xpath.axes.ChildTestIterator
                                |
                                +--org.apache.xpath.axes.OneStepIterator
- public class OneStepIterator- extends ChildTestIterator
**For advanced use only** 
 This class implements a general iterator for
 those LocationSteps with only one step, and perhaps a predicate.
- See Also: 
- org.apache.xpath.axes.WalkerFactory#newLocPathIterator, Serialized Form
 
 
 
| Method Summary | 
|  java.lang.Object | clone()Get a cloned iterator.
 | 
|  int | findLastPos(XPathContext xctxt)Get the number of nodes in this node list.
 | 
|  int | getAxis()Returns the axis being iterated, if it is known.
 | 
|  boolean | isReverseAxes()Tells if this is a reverse axes.
 | 
|  void | reset()Reset the iterator.
 | 
|  void | setRoot(int context,
        java.lang.Object environment)Initialize the context values for this expression
 after it is cloned.
 | 
 
 
| Methods inherited from class org.apache.xpath.axes.LocPathIterator | 
| allowDetachToRelease, 
asIterator, 
asNode, 
bool, 
detach, 
execute, 
getCachedNodes, 
getContext, 
getCurrentContextNode, 
getCurrentNode, 
getCurrentPos, 
getDTM, 
getDTMManager, 
getExpandEntityReferences, 
getFilter, 
getFoundLast, 
getIsTopLevel, 
getLast, 
getLastPos, 
getLength, 
getPrefixResolver, 
getRoot, 
getWhatToShow, 
getXPathContext, 
isDocOrdered, 
isFresh, 
isMutable, 
isNodesetExpr, 
item, 
previousNode, 
runTo, 
setCurrentContextNode, 
setCurrentPos, 
setEnvironment, 
setIsTopLevel, 
setItem, 
setLast, 
setShouldCacheNodes, 
size | 
 
| Methods inherited from class org.apache.xpath.axes.PredicatedNodeTest | 
| acceptNode, 
canTraverseOutsideSubtree, 
fixupVariables, 
getLocPathIterator, 
getPredicateCount, 
getPredicateIndex, 
getProximityPosition, 
getProximityPosition, 
initProximityPosition, 
resetProximityPositions, 
setLocPathIterator, 
setPredicateCount | 
 
| Methods inherited from class org.apache.xpath.patterns.NodeTest | 
| debugWhatToShow, 
execute, 
execute, 
getDefaultScore, 
getLocalName, 
getNamespace, 
getNodeTypeTest, 
getStaticScore, 
initNodeTest, 
initNodeTest, 
setLocalName, 
setNamespace, 
setStaticScore, 
setWhatToShow | 
 
 
| Methods inherited from class java.lang.Object | 
| equals, 
getClass, 
hashCode, 
notify, 
notifyAll, 
toString, 
wait, 
wait, 
wait | 
 
OneStepIterator
public OneStepIterator(DTMAxisIterator iterator,
                       int axis)
                throws javax.xml.transform.TransformerException
- Create a OneStepIterator object.- 
- Parameters:
- iterator- The DTM iterator which this iterator will use.
- axis- One of Axis.Child, etc., or -1 if the axis is unknown.
- Throws:
- javax.xml.transform.TransformerException -  
 
setRoot
public void setRoot(int context,
                    java.lang.Object environment)
- Initialize the context values for this expression
 after it is cloned.- 
- Parameters:
- execContext- The XPath runtime context for this
 transformation.
- Overrides:
- setRoot in class ChildTestIterator
 
clone
public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
- Get a cloned iterator.- 
- Returns:
- A new iterator that can be used without mutating this one.
- Throws:
- java.lang.CloneNotSupportedException -  
- Overrides:
- clone in class PredicatedNodeTest
 
isReverseAxes
public boolean isReverseAxes()
- Tells if this is a reverse axes.  Overrides AxesWalker#isReverseAxes.- 
- Returns:
- true for this class.
- Overrides:
- isReverseAxes in class PredicatedNodeTest
 
findLastPos
public int findLastPos(XPathContext xctxt)
- Get the number of nodes in this node list.  The function is probably ill
 named?- 
- Parameters:
- xctxt- The XPath runtime context.
- Returns:
- the number of nodes in this node list.
- Overrides:
- findLastPos in class LocPathIterator
 
reset
public void reset()
- Reset the iterator.- 
- Overrides:
- reset in class LocPathIterator
 
getAxis
public int getAxis()
- Returns the axis being iterated, if it is known.- 
- Returns:
- Axis.CHILD, etc., or -1 if the axis is not known or is of multiple 
 types.
- Overrides:
- getAxis in class ChildTestIterator
 
Copyright © 2001 Apache XML Project. All Rights Reserved.