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

public Class OneStepIteratorForward

extends ChildTestIterator
Class Inheritance
Imports
com.sun.org.apache.xml.internal.dtm.DTM, .DTMFilter, com.sun.org.apache.xpath.internal.Expression, com.sun.org.apache.xpath.internal.compiler.Compiler, .OpMap

This class implements a general iterator for those LocationSteps with only one step, and perhaps a predicate, that only go forward (i.e. it can not be used with ancestors, preceding, etc.)
See Also
com.sun.org.apache.xpath.internal.axes#ChildTestIterator

Field Summary

Modifier and TypeField and Description
protected int
m_axis

The traversal axis from where the nodes will be filtered.

pack-priv static final long
Inherited from com.sun.org.apache.xpath.internal.axes.ChildTestIterator:
m_traverser

Constructor Summary

AccessConstructor and Description
pack-priv
OneStepIteratorForward(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 OneStepIterator object.

public
OneStepIteratorForward(int
One of the com.sun.org.apache.xml.internal.dtm.Axis integers.
axis
)

Create a OneStepIterator object that will just traverse the self axes.

Method Summary

Modifier and TypeMethod and Description
public boolean
deepEquals(Expression
Another expression object.
expr
)

Overrides com.sun.org.apache.xpath.internal.axes.PredicatedNodeTest.deepEquals.

Compare this object with another object and see if they are equal, include the sub heararchy.

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.ChildTestIterator.getAxis.

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

Returns the axis being iterated, if it is known.

protected int
getNextNode()

Overrides com.sun.org.apache.xpath.internal.axes.ChildTestIterator.getNextNode.

Get the next node via getFirstAttribute && getNextAttribute.

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.ChildTestIterator.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.ChildTestIterator:
cloneWithResetdetach

Field Detail

m_axisback to summary
protected int m_axis

The traversal axis from where the nodes will be filtered.

serialVersionUIDback to summary
pack-priv static final long serialVersionUID

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

Constructor Detail

OneStepIteratorForwardback to summary
pack-priv OneStepIteratorForward(Compiler compiler, int opPos, int analysis) throws TransformerException

Create a OneStepIterator 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.

OneStepIteratorForwardback to summary
public OneStepIteratorForward(int axis)

Create a OneStepIterator object that will just traverse the self axes.

Parameters
axis:int

One of the com.sun.org.apache.xml.internal.dtm.Axis integers.

Method Detail

deepEqualsback to summary
public boolean deepEquals(Expression expr)

Overrides com.sun.org.apache.xpath.internal.axes.PredicatedNodeTest.deepEquals.

Doc from com.sun.org.apache.xpath.internal.Expression.deepEquals.

Compare this object with another object and see if they are equal, include the sub heararchy.

Parameters
expr:Expression

Another expression object.

Returns:boolean

true if this objects class and the expr object's class are the same, and the data contained within both objects are considered equal.

See Also
Expression#deepEquals(Expression)
getAxisback to summary
public int getAxis()

Overrides com.sun.org.apache.xpath.internal.axes.ChildTestIterator.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()

Overrides com.sun.org.apache.xpath.internal.axes.ChildTestIterator.getNextNode.

Get the next node via getFirstAttribute && getNextAttribute.

Returns:int

Doc from com.sun.org.apache.xpath.internal.axes.ChildTestIterator.getNextNode.

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.ChildTestIterator.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.