com.caucho.xpath.pattern
Class NamespaceIterator

java.lang.Object
  extended by com.caucho.xpath.pattern.NodeIterator
      extended by com.caucho.xpath.pattern.NamespaceIterator
All Implemented Interfaces:
ExprEnvironment, java.util.Iterator<org.w3c.dom.Node>

public class NamespaceIterator
extends NodeIterator

Selects namespace nodes.


Field Summary
protected  AbstractPattern _match
           
protected  NamespaceNode _next
           
protected  NamespaceNode _node
           
protected  NodeIterator _parentIter
           
 
Fields inherited from class com.caucho.xpath.pattern.NodeIterator
_contextNode, _env, _position, _size, log
 
Constructor Summary
protected NamespaceIterator(ExprEnvironment env)
           
  NamespaceIterator(org.w3c.dom.Node node, NodeIterator parentIter, ExprEnvironment env, AbstractPattern match)
          Creates the new NamespaceIterator.
 
Method Summary
 java.lang.Object clone()
          clones the iterator
 int getContextSize()
          Returns the number of nodes in the context list.
 boolean hasNext()
          True if there's more data.
 org.w3c.dom.Node nextNode()
          Returns the next selected node.
 SelectedNode nextSelectedNode()
          Returns the next selected node.
 java.lang.String toString()
           
 
Methods inherited from class com.caucho.xpath.pattern.NodeIterator
copy, getContextNode, getContextPosition, getCurrentNode, getFunction, getOwnerDocument, getPositionIndex, getStylesheetEnv, getVar, next, remove, setContextNode, setMorePositions, stringValue, systemProperty
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_parentIter

protected NodeIterator _parentIter

_match

protected AbstractPattern _match

_node

protected NamespaceNode _node

_next

protected NamespaceNode _next
Constructor Detail

NamespaceIterator

protected NamespaceIterator(ExprEnvironment env)

NamespaceIterator

public NamespaceIterator(org.w3c.dom.Node node,
                         NodeIterator parentIter,
                         ExprEnvironment env,
                         AbstractPattern match)
                  throws XPathException
Creates the new NamespaceIterator.

Parameters:
node - the initial node
parentIter - the parent iterator
env - the variable environment
match - the node matching pattern
Throws:
XPathException
Method Detail

hasNext

public boolean hasNext()
True if there's more data.

Specified by:
hasNext in interface java.util.Iterator<org.w3c.dom.Node>
Specified by:
hasNext in class NodeIterator

nextNode

public org.w3c.dom.Node nextNode()
                          throws XPathException
Returns the next selected node.

Specified by:
nextNode in class NodeIterator
Throws:
XPathException

nextSelectedNode

public SelectedNode nextSelectedNode()
                              throws XPathException
Returns the next selected node.

Overrides:
nextSelectedNode in class NodeIterator
Throws:
XPathException

getContextSize

public int getContextSize()
Returns the number of nodes in the context list.

Specified by:
getContextSize in interface ExprEnvironment
Overrides:
getContextSize in class NodeIterator

clone

public java.lang.Object clone()
Description copied from class: NodeIterator
clones the iterator

Specified by:
clone in class NodeIterator

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object