| 
 | BEA Systems, Inc. | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
  |
  +--weblogic.apache.xpath.Expression
        |
        +--weblogic.apache.xpath.patterns.NodeTest
              |
              +--weblogic.apache.xpath.axes.PredicatedNodeTest
                    |
                    +--weblogic.apache.xpath.axes.LocPathIterator
 This class extends NodeSet, which implements NodeIterator,
 and fetches nodes one at a time in document order based on a XPath
 
  This class is based on an implementation from the Apache XML
 Project. In future releases the XML parser, XSLT processor, and
 associated classes will likely be updated to be based on a later
 version of the Apache implementations. Since Apache does not guarantee
 backwards compatibility between versions of their software, we cannot
 guarantee backwards compatibility of any of the classes contained in
 the weblogic.apache package or sub-packages.
 
| Field Summary | |
| protected  int | m_analysisThe analysis pattern built by the WalkerFactory. | 
| protected  org.w3c.dom.Node | m_contextThe context node for this iterator, which doesn't change through the course of the iteration. | 
| protected  org.w3c.dom.Node | m_currentContextNodeThe node context from where the expression is being executed from (i.e. | 
| protected  DOMHelper | m_dhelperQuicker access to the DOM helper than going through the XPathContext object. | 
| protected  XPathContext | m_execContextThe XPathContext reference, needed for execution of many operations. | 
| protected  AxesWalker | m_firstWalkerThe head of the step walker list. | 
| protected  boolean | m_foundLastThis is true if nextNode returns null. | 
|  org.w3c.dom.Node | m_lastFetchedThe last node that was fetched, usually by nextNode. | 
| protected  AxesWalker | m_lastUsedWalkerThe last used step walker in the walker list. | 
| protected  int | m_nextThe index of the next node to be fetched. | 
| protected  PrefixResolver | m_prefixResolverFast access to the current prefix resolver. | 
| Fields inherited from class weblogic.apache.xpath.axes.PredicatedNodeTest | 
| m_lpi,  
m_proximityPositions | 
| Fields inherited from class weblogic.apache.xpath.patterns.NodeTest | 
| m_whatToShow,  
SCORE_NODETEST,  
SCORE_NONE,  
SCORE_NSWILD,  
SCORE_OTHER,  
SCORE_QNAME,  
SHOW_BYFUNCTION,  
SHOW_NAMESPACE,  
SUPPORTS_PRE_STRIPPING,  
WILD | 
| Fields inherited from class weblogic.apache.xpath.Expression | 
| m_slocator | 
| Constructor Summary | |
| LocPathIterator(Compiler compiler,
                int opPos,
                int analysis)Create a LocPathIterator object, including creation of step walkers from the opcode list, and call back into the Compiler to create predicate expressions. | |
| LocPathIterator(Compiler compiler,
                int opPos,
                int analysis,
                boolean shouldLoadWalkers)Create a LocPathIterator object, including creation of step walkers from the opcode list, and call back into the Compiler to create predicate expressions. | |
| LocPathIterator(PrefixResolver nscontext)Create a LocPathIterator object. | |
| Method Summary | |
|  void | addToWaitList(AxesWalker walker)Add a walker to the waiting list. | 
|  boolean | canTraverseOutsideSubtree()Tell if this expression or it's subexpressions can traverse outside the current subtree. | 
|  java.lang.Object | clone()Get a cloned LocPathIterator that holds the same position as this iterator. | 
|  org.w3c.dom.traversal.NodeIterator | cloneWithReset()Get a cloned Iterator that is reset to the beginning of the query. | 
|  void | detach()Detaches the iterator from the set which it iterated over, releasing any computational resources and placing the iterator in the INVALID state. | 
|  XObject | execute(XPathContext xctxt)Execute this iterator, meaning create a clone that can store state, and initialize it for fast execution from the current runtime state. | 
|  NodeSet | getCachedNodes()Get cached nodes. | 
|  org.w3c.dom.Node | getContext()The node context for the iterator. | 
|  org.w3c.dom.Node | getCurrentContextNode()The node context from where the expression is being executed from (i.e. | 
|  org.w3c.dom.Node | getCurrentNode()Return the last fetched node. | 
|  int | getCurrentPos()Get the current position, which is one less than the next nextNode() call will retrieve. | 
|  DOMHelper | getDOMHelper()The DOM helper for the given context; | 
|  boolean | getExpandEntityReferences()The value of this flag determines whether the children of entity reference nodes are visible to the iterator. | 
|  org.w3c.dom.traversal.NodeFilter | getFilter()The filter used to screen nodes. | 
|  AxesWalker | getFirstWalker()Get the head of the walker list. | 
|  boolean | getFoundLast()Tells if we've found the last node yet. | 
|  boolean | getIsTopLevel()Get if this is an iterator at the upper level of the XPath. | 
|  int | getLast()Get the index of the last node in the iteration. | 
|  int | getLastPos(XPathContext xctxt)Get the index of the last node that can be itterated to. | 
|  AxesWalker | getLastUsedWalker()Get the last used walker. | 
|  int | getLength()The number of nodes in the list. | 
|  PrefixResolver | getPrefixResolver()Return the saved reference to the prefix resolver that was in effect when this iterator was created. | 
|  org.w3c.dom.Node | getRoot()The root node of the Iterator, as specified when it was created. | 
|  int | getWhatToShow()This attribute determines which node types are presented via the iterator. | 
|  XPathContext | getXPathContext()The XPath execution context we are operating on. | 
|  void | initContext(XPathContext execContext)Initialize the context values for this expression after it is cloned. | 
|  boolean | isFresh()Tells if this NodeSet is "fresh", in other words, if the first nextNode() that is called will return the first node in the set. | 
|  org.w3c.dom.Node | item(int index)Returns the indexth item in the collection. | 
|  org.w3c.dom.Node | nextNode()Returns the next node in the set and advances the position of the iterator in the set. | 
|  org.w3c.dom.Node | previousNode()Returns the previous node in the set and moves the position of the iterator backwards in the set. | 
|  void | removeFromWaitList(AxesWalker walker)Remove a walker from the waiting list. | 
|  void | reset()Reset the iterator. | 
| protected  org.w3c.dom.Node | returnNextNode(org.w3c.dom.Node nextNode)Bottleneck the return of a next node, to make returns easier from nextNode(). | 
|  void | runTo(int index)If an index is requested, NodeSet will call this method to run the iterator to the index. | 
|  void | setCurrentContextNode(org.w3c.dom.Node n)Set the current context node for this iterator. | 
|  void | setCurrentPos(int i)Set the current position in the node set. | 
|  void | setIsTopLevel(boolean b)Set if this is an iterator at the upper level of the XPath. | 
|  void | setLast(int last)Set the index of the last node in the iteration. | 
|  void | setLastUsedWalker(AxesWalker walker)Set the last used walker. | 
| protected  void | setNextPosition(int next)Set the next position index of this iterator. | 
|  void | setShouldCacheNodes(boolean b)If setShouldCacheNodes(true) is called, then nodes will be cached. | 
|  int | size()Get the length of the cached nodes. | 
| Methods inherited from class weblogic.apache.xpath.axes.PredicatedNodeTest | 
| acceptNode, 
countProximityPosition, 
getLocPathIterator, 
getPredicateCount, 
getPredicateIndex, 
getProximityPosition, 
getProximityPosition, 
getProximityPosition, 
initPredicateInfo, 
initProximityPosition, 
isReverseAxes, 
nodeToString, 
resetProximityPositions, 
setLocPathIterator, 
setPredicateCount | 
| Methods inherited from class weblogic.apache.xpath.patterns.NodeTest | 
| calcScore, 
debugWhatToShow, 
execute, 
getDefaultScore, 
getLocalName, 
getNamespace, 
initNodeTest, 
initNodeTest | 
| Methods inherited from class weblogic.apache.xpath.Expression | 
| assert, 
error, 
setSourceLocator, 
warn | 
| Methods inherited from class java.lang.Object | 
| equals, 
finalize, 
getClass, 
hashCode, 
notify, 
notifyAll, 
toString, 
wait, 
wait, 
wait | 
| Field Detail | 
public transient org.w3c.dom.Node m_lastFetched
protected AxesWalker m_lastUsedWalker
protected AxesWalker m_firstWalker
protected transient boolean m_foundLast
protected transient DOMHelper m_dhelper
protected transient org.w3c.dom.Node m_context
protected transient org.w3c.dom.Node m_currentContextNode
protected PrefixResolver m_prefixResolver
protected transient XPathContext m_execContext
protected transient int m_next
protected int m_analysis
WalkerFactory| Constructor Detail | 
public LocPathIterator(PrefixResolver nscontext)
nscontext - The namespace context for this iterator,
 should be OK if null.
public LocPathIterator(Compiler compiler,
                       int opPos,
                       int analysis)
                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.
public LocPathIterator(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.| Method Detail | 
public XObject execute(XPathContext xctxt)
                throws javax.xml.transform.TransformerException
xctxt - The XPath execution context.public void setIsTopLevel(boolean b)
b - true if this location path is at the top level of the
          expression.public boolean getIsTopLevel()
public void initContext(XPathContext execContext)
execContext - The XPath runtime context for this
 transformation.protected void setNextPosition(int next)
next - A value greater than or equal to zero that indicates the next
 node position to fetch.public final int getCurrentPos()
public void setShouldCacheNodes(boolean b)
b - True if this iterator should cache nodes.public NodeSet getCachedNodes()
public void setCurrentPos(int i)
i - Must be a valid index greater
 than or equal to zero and less than m_cachedNodes.size().public int size()
Note: for the moment at least, this only returns the size of the nodes that have been fetched to date, it doesn't attempt to run to the end to make sure we have found everything. This should be reviewed.
public org.w3c.dom.Node item(int index)
index th item in the collection. If
 index is greater than or equal to the number of nodes in
 the list, this returns null .
index - Index into the collection.index th position in the
   NodeList , or null if that is not a valid
   index.public int getLength()
length-1 inclusive.
public boolean isFresh()
public org.w3c.dom.Node previousNode()
                              throws org.w3c.dom.DOMException
Node in the set being iterated over,
   ornull if there are no more members in that set.detach method was invoked.public int getWhatToShow()
NodeFilter interface.
 This is somewhat useless at this time, since it doesn't really return information that tells what this iterator will show. It is here only to fullfill the DOM NodeIterator interface.
NodeIteratorpublic org.w3c.dom.traversal.NodeFilter getFilter()
NodeIteratorpublic org.w3c.dom.Node getRoot()
public boolean getExpandEntityReferences()
public void detach()
detach has been invoked, calls to
 nextNode orpreviousNode will raise the
 exception INVALID_STATE_ERR.
public org.w3c.dom.traversal.NodeIterator cloneWithReset()
                                                  throws java.lang.CloneNotSupportedException
public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
public void reset()
public org.w3c.dom.Node nextNode()
                          throws org.w3c.dom.DOMException
Node in the set being iterated over, or
   null if there are no more members in that set.detach method was invoked.protected org.w3c.dom.Node returnNextNode(org.w3c.dom.Node nextNode)
nextNode - The next node found, may be null.public org.w3c.dom.Node getCurrentNode()
public void runTo(int index)
index - The index to run to, or -1 if the iterator
 should run to the end.public final AxesWalker getFirstWalker()
public final void setLastUsedWalker(AxesWalker walker)
walker - The last used walker, or null.public final AxesWalker getLastUsedWalker()
public final void addToWaitList(AxesWalker walker)
walker - A walker that is waiting for
 other step walkers to complete, before it can
 continue.AxesWalkerpublic final void removeFromWaitList(AxesWalker walker)
walker - A walker that is no longer waiting.AxesWalkerpublic final boolean getFoundLast()
public final XPathContext getXPathContext()
public final DOMHelper getDOMHelper()
public final org.w3c.dom.Node getContext()
public final org.w3c.dom.Node getCurrentContextNode()
public final void setCurrentContextNode(org.w3c.dom.Node n)
n - Must be a non-null reference to the node context.public final PrefixResolver getPrefixResolver()
public int getLast()
public void setLast(int last)
last - the index of the last node in the iteration.public int getLastPos(XPathContext xctxt)
xctxt - XPath runtime context.public boolean canTraverseOutsideSubtree()
| 
 | Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs61 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||