public class WalkingIterator extends LocPathIterator implements ExpressionOwner
Modifier and Type | Field and Description |
---|---|
protected AxesWalker |
m_firstWalker
The head of the step walker list.
|
protected AxesWalker |
m_lastUsedWalker
The last used step walker in the walker list.
|
m_allowDetach, m_cdtm, m_clones, m_context, m_currentContextNode, m_execContext, m_lastFetched, m_length, m_pos
m_foundLast, m_lpi, m_predCount, m_proximityPositions
m_name, m_whatToShow, SCORE_NODETEST, SCORE_NONE, SCORE_NSWILD, SCORE_OTHER, SCORE_QNAME, SHOW_BYFUNCTION, SUPPORTS_PRE_STRIPPING, WILD
FILTER_ACCEPT, FILTER_REJECT, FILTER_SKIP
Constructor and Description |
---|
WalkingIterator(PrefixResolver nscontext)
Create a WalkingIterator object.
|
Modifier and Type | Method and Description |
---|---|
void |
callVisitors(ExpressionOwner owner,
XPathVisitor visitor)
This will traverse the heararchy, calling the visitor for
each member.
|
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(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,
Object environment)
Initialize the context values for this expression
after it is cloned.
|
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
acceptNode, callPredicateVisitors, canTraverseOutsideSubtree, countProximityPosition, getLocPathIterator, getPredicate, getPredicateCount, getPredicateIndex, getProximityPosition, getProximityPosition, getProximityPosition, initPredicateInfo, initProximityPosition, isReverseAxes, nodeToString, resetProximityPositions, setLocPathIterator, setPredicateCount
calcScore, debugWhatToShow, execute, execute, getDefaultScore, getLocalName, getNamespace, getNodeTypeTest, getStaticScore, initNodeTest, initNodeTest, setLocalName, setNamespace, setStaticScore, setWhatToShow
asIteratorRaw, assertion, error, execute, exprAddChild, exprGetChild, exprGetNumChildren, exprGetParent, exprSetParent, getColumnNumber, getExpressionOwner, getLineNumber, getPublicId, getSystemId, isSameClass, isStableNumber, num, warn, xstr
protected AxesWalker m_lastUsedWalker
protected AxesWalker m_firstWalker
public WalkingIterator(PrefixResolver nscontext)
nscontext
- The namespace context for this iterator,
should be OK if null.public int getAnalysisBits()
getAnalysisBits
in interface PathComponent
getAnalysisBits
in class LocPathIterator
public Object clone() throws CloneNotSupportedException
clone
in interface DTMIterator
clone
in class PredicatedNodeTest
CloneNotSupportedException
public void reset()
reset
in interface DTMIterator
reset
in class LocPathIterator
public void setRoot(int context, Object environment)
setRoot
in interface DTMIterator
setRoot
in class LocPathIterator
context
- 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 DTMIterator
nextNode
in class LocPathIterator
Node
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 DTMIterator
detach
in class LocPathIterator
public void fixupVariables(Vector vars, int globalsSize)
fixupVariables
in class PredicatedNodeTest
vars
- 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 XPathVisitable
callVisitors
in class LocPathIterator
owner
- 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 ExpressionOwner
ExpressionOwner.getExpression()
public void setExpression(Expression exp)
ExpressionOwner
setExpression
in interface ExpressionOwner
exp
- the raw Expression object, which should not normally be null.ExpressionOwner.setExpression(Expression)
public boolean deepEquals(Expression expr)
Expression
deepEquals
in class PredicatedNodeTest
expr
- Another expression object.Expression.deepEquals(Expression)
Copyright © 2017 JBoss by Red Hat. All rights reserved.