| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.xpath.Expression
org.apache.xpath.patterns.NodeTest
org.apache.xpath.axes.PredicatedNodeTest
org.apache.xpath.axes.LocPathIterator
org.apache.xpath.axes.WalkingIterator
public class WalkingIterator
Location path iterator that uses Walkers.
| Nested Class Summary | 
|---|
| Nested classes/interfaces inherited from class org.apache.xpath.axes.PredicatedNodeTest | 
|---|
| PredicatedNodeTest.PredOwner | 
| Field Summary | |
|---|---|
| protected  AxesWalker | m_firstWalkerThe head of the step walker list. | 
| protected  AxesWalker | m_lastUsedWalkerThe last used step walker in the walker list. | 
| (package private) static long | serialVersionUID | 
| Fields inherited from class org.apache.xpath.axes.LocPathIterator | 
|---|
| m_allowDetach, m_cdtm, m_clones, m_context, m_currentContextNode, m_execContext, m_lastFetched, m_length, m_pos, m_stackFrame | 
| Fields inherited from class org.apache.xpath.axes.PredicatedNodeTest | 
|---|
| DEBUG_PREDICATECOUNTING, m_foundLast, m_lpi, m_predCount, m_predicateIndex, m_proximityPositions | 
| Fields inherited from class org.apache.xpath.patterns.NodeTest | 
|---|
| m_name, m_whatToShow, SCORE_NODETEST, SCORE_NONE, SCORE_NSWILD, SCORE_OTHER, SCORE_QNAME, SHOW_BYFUNCTION, SUPPORTS_PRE_STRIPPING, WILD | 
| Fields inherited from interface org.apache.xml.dtm.DTMIterator | 
|---|
| FILTER_ACCEPT, FILTER_REJECT, FILTER_SKIP | 
| Constructor Summary | |
|---|---|
| WalkingIterator(Compiler compiler,
                               int opPos,
                               int analysis,
                               boolean shouldLoadWalkers)Create a WalkingIterator iterator, including creation of step walkers from the opcode list, and call back into the Compiler to create predicate expressions. | |
| WalkingIterator(PrefixResolver nscontext)Create a WalkingIterator object. | |
| Method Summary | |
|---|---|
|  void | callVisitors(ExpressionOwner owner,
                         XPathVisitor visitor)This will traverse the heararchy, calling the visitor for each member. | 
|  java.lang.Object | clone()Get a cloned WalkingIterator that holds the same position as this iterator. | 
|  boolean | deepEquals(Expression expr)Compare this object with another object and see if they are equal, include the sub heararchy. | 
|  void | detach()Detaches the iterator from the set which it iterated over, releasing any computational resources and placing the iterator in the INVALID state. | 
|  void | fixupVariables(java.util.Vector vars,
                             int globalsSize)This function is used to fixup variables from QNames to stack frame indexes at stylesheet build time. | 
|  int | getAnalysisBits()Get the analysis bits for this walker, as defined in the WalkerFactory. | 
|  Expression | getExpression()Get the raw Expression object that this class wraps. | 
|  AxesWalker | getFirstWalker()Get the head of the walker list. | 
|  AxesWalker | getLastUsedWalker()Get the last used walker. | 
|  int | nextNode()Returns the next node in the set and advances the position of the iterator in the set. | 
|  void | reset()Reset the iterator. | 
|  void | setExpression(Expression exp)Set the raw expression object for this object. | 
|  void | setFirstWalker(AxesWalker walker)Set the head of the walker list. | 
|  void | setLastUsedWalker(AxesWalker walker)Set the last used walker. | 
|  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, cloneWithReset, execute, executeCharsToContentHandler, getAxis, getContext, getCurrentContextNode, getCurrentNode, getCurrentPos, getDTM, getDTMManager, getExpandEntityReferences, getFilter, getFoundLast, getIsTopLevel, getLastPos, getLength, getPrefixResolver, getRoot, getWhatToShow, getXPathContext, incrementCurrentPos, isDocOrdered, isFresh, isMutable, isNodesetExpr, item, previousNode, returnNextNode, runTo, setCurrentContextNode, setCurrentPos, setEnvironment, setIsTopLevel, setItem, setNextPosition, setShouldCacheNodes, size | 
| Methods inherited from class org.apache.xpath.patterns.NodeTest | 
|---|
| calcScore, debugWhatToShow, execute, execute, getDefaultScore, getLocalName, getNamespace, getNodeTypeTest, getStaticScore, initNodeTest, initNodeTest, setLocalName, setNamespace, setStaticScore, setWhatToShow | 
| Methods inherited from class org.apache.xpath.Expression | 
|---|
| asIteratorRaw, assertion, error, execute, exprAddChild, exprGetChild, exprGetNumChildren, exprGetParent, exprSetParent, getColumnNumber, getExpressionOwner, getLineNumber, getPublicId, getSystemId, isSameClass, isStableNumber, num, warn, xstr | 
| Methods inherited from class java.lang.Object | 
|---|
| equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
static final long serialVersionUID
protected AxesWalker m_lastUsedWalker
protected AxesWalker m_firstWalker
| Constructor Detail | 
|---|
WalkingIterator(Compiler compiler,
                int opPos,
                int analysis,
                boolean shouldLoadWalkers)
          throws javax.xml.transform.TransformerException
compiler - The Compiler which is creating
 this expression.opPos - The position of this iterator in the
 opcode list from the compiler.shouldLoadWalkers - True if walkers should be
 loaded, or false if this is a derived iterator and
 it doesn't wish to load child walkers.
javax.xml.transform.TransformerExceptionpublic WalkingIterator(PrefixResolver nscontext)
nscontext - The namespace context for this iterator,
 should be OK if null.| Method Detail | 
|---|
public int getAnalysisBits()
getAnalysisBits in interface PathComponentgetAnalysisBits in class LocPathIterator
public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
clone in interface DTMIteratorclone in class PredicatedNodeTestjava.lang.CloneNotSupportedExceptionpublic void reset()
reset in interface DTMIteratorreset in class LocPathIterator
public void setRoot(int context,
                    java.lang.Object environment)
setRoot in interface DTMIteratorsetRoot in class LocPathIteratorcontext - The XPath runtime context for this
 transformation.environment - The environment object.  
 The environment in which this iterator operates, which should provide:
 At this time the exact implementation of this environment is application dependent. Probably a proper interface will be created fairly soon.
public int nextNode()
nextNode in interface DTMIteratornextNode in class LocPathIteratorNode in the set being iterated over, or
   null if there are no more members in that set.public final AxesWalker getFirstWalker()
public final void setFirstWalker(AxesWalker walker)
walker - Should be a valid AxesWalker.public final void setLastUsedWalker(AxesWalker walker)
walker - The last used walker, or null.public final AxesWalker getLastUsedWalker()
public void detach()
detach has been invoked, calls to
 nextNode orpreviousNode will raise the
 exception INVALID_STATE_ERR.
detach in interface DTMIteratordetach in class LocPathIterator
public void fixupVariables(java.util.Vector vars,
                           int globalsSize)
fixupVariables in class PredicatedNodeTestvars - List of QNames that correspond to variables.  This list 
 should be searched backwards for the first qualified name that 
 corresponds to the variable reference qname.  The position of the 
 QName in the vector from the start of the vector will be its position 
 in the stack frame (but variables above the globalsTop value will need 
 to be offset to the current stack frame).
public void callVisitors(ExpressionOwner owner,
                         XPathVisitor visitor)
XPathVisitable
callVisitors in interface XPathVisitablecallVisitors in class LocPathIteratorowner - The owner of the visitor, where that path may be 
              rewritten if needed.visitor - The visitor whose appropriate method will be called.XPathVisitable.callVisitors(ExpressionOwner, XPathVisitor)public Expression getExpression()
ExpressionOwner
getExpression in interface ExpressionOwnerExpressionOwner.getExpression()public void setExpression(Expression exp)
ExpressionOwner
setExpression in interface ExpressionOwnerexp - the raw Expression object, which should not normally be null.ExpressionOwner.setExpression(Expression)public boolean deepEquals(Expression expr)
Expression
deepEquals in class PredicatedNodeTestexpr - Another expression object.
Expression.deepEquals(Expression)| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||