|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.WalkingIterator
Location path iterator that uses Walkers.
Nested Class Summary |
Nested classes inherited from class org.apache.xpath.axes.PredicatedNodeTest |
PredicatedNodeTest.PredOwner |
Field Summary | |
protected AxesWalker |
m_firstWalker
The head of the step walker list. |
protected AxesWalker |
m_lastUsedWalker
The last used step walker in the walker list. |
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 class org.apache.xpath.Expression |
|
Fields inherited from interface org.apache.xml.dtm.DTMIterator |
FILTER_ACCEPT, FILTER_REJECT, FILTER_SKIP |
Constructor Summary | |
(package private) |
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. |
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. |
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 |
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.TransformerException
public WalkingIterator(PrefixResolver nscontext)
nscontext
- The namespace context for this iterator,
should be OK if null.Method Detail |
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
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
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
Expression.deepEquals(Expression)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |