Top Description Fields Constructors Methods
com.sun.org.apache.xpath.internal.axes

public Class ChildTestIterator

extends BasicTestIterator
Class Inheritance
Known Direct Subclasses
com.sun.org.apache.xpath.internal.axes.OneStepIterator, com.sun.org.apache.xpath.internal.axes.OneStepIteratorForward, com.sun.org.apache.xpath.internal.axes.UnionChildIterator, com.sun.org.apache.xpath.internal.axes.AttributeIterator
Imports
com.sun.org.apache.xml.internal.dtm.Axis, .DTM, .DTMAxisTraverser, .DTMIterator, com.sun.org.apache.xpath.internal.compiler.Compiler

This class implements an optimized iterator for children patterns that have a node test, and possibly a predicate.
See Also
com.sun.org.apache.xpath.internal.axes.BasicTestIterator

Field Summary

Modifier and TypeField and Description
protected transient DTMAxisTraverser
m_traverser

The traverser to use to navigate over the descendants.

pack-priv static final long

Constructor Summary

AccessConstructor and Description
pack-priv
ChildTestIterator(Compiler
A reference to the Compiler that contains the op map.
compiler
,
int
The position within the op map, which contains the location path expression for this itterator.
opPos
,
int analysis)

Create a ChildTestIterator object.

public
ChildTestIterator(DTMAxisTraverser
Traverser that tells how the KeyIterator is to be handled.
traverser
)

Create a ChildTestIterator object.

Method Summary

Modifier and TypeMethod and Description
public DTMIterator

Returns:

A cloned NodeIterator set of the start of the query.
cloneWithReset
()

Overrides com.sun.org.apache.xpath.internal.axes.BasicTestIterator.cloneWithReset.

Implements com.sun.org.apache.xml.internal.dtm.DTMIterator.cloneWithReset.

Get a cloned Iterator that is reset to the beginning of the query.

public void
detach()

Overrides com.sun.org.apache.xpath.internal.axes.LocPathIterator.detach.

Implements com.sun.org.apache.xml.internal.dtm.DTMIterator.detach.

Detaches the iterator from the set which it iterated over, releasing any computational resources and placing the iterator in the INVALID state.

public int

Returns:

Axis.CHILD, etc., or -1 if the axis is not known or is of multiple types.
getAxis
()

Overrides com.sun.org.apache.xpath.internal.axes.LocPathIterator.getAxis.

Implements com.sun.org.apache.xml.internal.dtm.DTMIterator.getAxis.

Returns the axis being iterated, if it is known.

protected int

Returns:

The next node on the axis, or DTM.NULL.
getNextNode
()

Implements abstract com.sun.org.apache.xpath.internal.axes.BasicTestIterator.getNextNode.

Get the next node via getNextXXX.

public void
setRoot(int
The XPath runtime context for this transformation.
context
,
Object
The environment object. The environment in which this iterator operates, which should provide:
  • a node (the context node... same value as "root" defined below)
  • a pair of non-zero positive integers (the context position and the context size)
  • a set of variable bindings
  • a function library
  • the set of namespace declarations in scope for the expression.
    • At this time the exact implementation of this environment is application dependent. Probably a proper interface will be created fairly soon.

environment
)

Overrides com.sun.org.apache.xpath.internal.axes.LocPathIterator.setRoot.

Implements com.sun.org.apache.xml.internal.dtm.DTMIterator.setRoot.

Initialize the context values for this expression after it is cloned.

Inherited from com.sun.org.apache.xpath.internal.axes.BasicTestIterator:
nextNode

Field Detail

m_traverserback to summary
protected transient DTMAxisTraverser m_traverser

The traverser to use to navigate over the descendants.

serialVersionUIDback to summary
pack-priv static final long serialVersionUID

Hides com.sun.org.apache.xpath.internal.axes.BasicTestIterator.serialVersionUID.

Constructor Detail

ChildTestIteratorback to summary
pack-priv ChildTestIterator(Compiler compiler, int opPos, int analysis) throws TransformerException

Create a ChildTestIterator object.

Parameters
compiler:Compiler

A reference to the Compiler that contains the op map.

opPos:int

The position within the op map, which contains the location path expression for this itterator.

ChildTestIteratorback to summary
public ChildTestIterator(DTMAxisTraverser traverser)

Create a ChildTestIterator object.

Parameters
traverser:DTMAxisTraverser

Traverser that tells how the KeyIterator is to be handled.

Method Detail

cloneWithResetback to summary
public DTMIterator cloneWithReset() throws CloneNotSupportedException

Overrides com.sun.org.apache.xpath.internal.axes.BasicTestIterator.cloneWithReset.

Implements com.sun.org.apache.xml.internal.dtm.DTMIterator.cloneWithReset.

Get a cloned Iterator that is reset to the beginning of the query.

Returns:DTMIterator

A cloned NodeIterator set of the start of the query.

detachback to summary
public void detach()

Overrides com.sun.org.apache.xpath.internal.axes.LocPathIterator.detach.

Implements com.sun.org.apache.xml.internal.dtm.DTMIterator.detach.

Detaches the iterator from the set which it iterated over, releasing any computational resources and placing the iterator in the INVALID state. Afterdetach has been invoked, calls to nextNode orpreviousNode will raise the exception INVALID_STATE_ERR.

getAxisback to summary
public int getAxis()

Overrides com.sun.org.apache.xpath.internal.axes.LocPathIterator.getAxis.

Implements com.sun.org.apache.xml.internal.dtm.DTMIterator.getAxis.

Returns the axis being iterated, if it is known.

Returns:int

Axis.CHILD, etc., or -1 if the axis is not known or is of multiple types.

getNextNodeback to summary
protected int getNextNode()

Implements abstract com.sun.org.apache.xpath.internal.axes.BasicTestIterator.getNextNode.

Get the next node via getNextXXX. Bottlenecked for derived class override.

Returns:int

The next node on the axis, or DTM.NULL.

setRootback to summary
public void setRoot(int context, Object environment)

Overrides com.sun.org.apache.xpath.internal.axes.LocPathIterator.setRoot.

Implements com.sun.org.apache.xml.internal.dtm.DTMIterator.setRoot.

Initialize the context values for this expression after it is cloned.

Parameters
context:int

The XPath runtime context for this transformation.

environment:Object

Doc from com.sun.org.apache.xml.internal.dtm.DTMIterator.setRoot.

The environment object. The environment in which this iterator operates, which should provide:

  • a node (the context node... same value as "root" defined below)
  • a pair of non-zero positive integers (the context position and the context size)
  • a set of variable bindings
  • a function library
  • the set of namespace declarations in scope for the expression.
    • At this time the exact implementation of this environment is application dependent. Probably a proper interface will be created fairly soon.