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

public Class ReverseAxesWalker

extends AxesWalker
Class Inheritance
Imports
com.sun.org.apache.xml.internal.dtm.DTM, .DTMAxisIterator, com.sun.org.apache.xpath.internal.XPathContext

Walker for a reverse axes.
See Also
XPath 2.4 Predicates

Field Summary

Modifier and TypeField and Description
protected DTMAxisIterator
m_iterator

The DTM inner traversal class, that corresponds to the super axis.

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

Constructor Summary

AccessConstructor and Description
pack-priv
ReverseAxesWalker(LocPathIterator
The location path iterator that 'owns' this walker.
locPathIterator
,
int axis)

Construct an AxesWalker using a LocPathIterator.

Method Summary

Modifier and TypeMethod and Description
protected void
countProximityPosition(int
The predicate index.
i
)

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

Count backwards one proximity position.

public void
detach()

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

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

public int

Returns:

the number of nodes in this node list.
getLastPos
(XPathContext
The XPath runtime context.
xctxt
)

Overrides com.sun.org.apache.xpath.internal.axes.AxesWalker.getLastPos.

Implements com.sun.org.apache.xpath.internal.axes.SubContextList.getLastPos.

Get the number of nodes in this node list.

protected int

Returns:

the next node in document order on the axes, or null.
getNextNode
()

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

Get the next node in document order on the axes.

protected int

Returns:

The pridicate index, or -1.
getProximityPosition
(int
The predicate index of the proximity position.
predicateIndex
)

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

Get the current sub-context position.

public boolean

Returns:

false.
isDocOrdered
()

Overrides com.sun.org.apache.xpath.internal.axes.AxesWalker.isDocOrdered.

Returns true if all the nodes in the iteration well be returned in document order.

public boolean

Returns:

true for this class.
isReverseAxes
()

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

Tells if this is a reverse axes.

public void
setRoot(int
The context node of this step.
root
)

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

Set the root node of the TreeWalker.

Inherited from com.sun.org.apache.xpath.internal.axes.AxesWalker:
callVisitorsclonecloneDeepdeepEqualsfindClonegetAnalysisBitsgetAxisgetCurrentNodegetDTMgetExpressiongetNextWalkergetPrevWalkergetRootinitnextNodesetDefaultDTMsetExpressionsetNextWalkersetPrevWalkerwi

Field Detail

m_iteratorback to summary
protected DTMAxisIterator m_iterator

The DTM inner traversal class, that corresponds to the super axis.

Annotations
@SuppressWarnings:serial
serialVersionUIDback to summary
pack-priv static final long serialVersionUID

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

Constructor Detail

ReverseAxesWalkerback to summary
pack-priv ReverseAxesWalker(LocPathIterator locPathIterator, int axis)

Construct an AxesWalker using a LocPathIterator.

Parameters
locPathIterator:LocPathIterator

The location path iterator that 'owns' this walker.

Method Detail

countProximityPositionback to summary
protected void countProximityPosition(int i)

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

Count backwards one proximity position.

Parameters
i:int

The predicate index.

detachback to summary
public void detach()

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

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

getLastPosback to summary
public int getLastPos(XPathContext xctxt)

Overrides com.sun.org.apache.xpath.internal.axes.AxesWalker.getLastPos.

Implements com.sun.org.apache.xpath.internal.axes.SubContextList.getLastPos.

Get the number of nodes in this node list. The function is probably ill named?

Parameters
xctxt:XPathContext

The XPath runtime context.

Returns:int

the number of nodes in this node list.

getNextNodeback to summary
protected int getNextNode()

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

Get the next node in document order on the axes.

Returns:int

the next node in document order on the axes, or null.

getProximityPositionback to summary
protected int getProximityPosition(int predicateIndex)

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

Get the current sub-context position. In order to do the reverse axes count, for the moment this re-searches the axes up to the predicate. An optimization on this is to cache the nodes searched, but, for the moment, this case is probably rare enough that the added complexity isn't worth it.

Parameters
predicateIndex:int

The predicate index of the proximity position.

Returns:int

The pridicate index, or -1.

isDocOrderedback to summary
public boolean isDocOrdered()

Overrides com.sun.org.apache.xpath.internal.axes.AxesWalker.isDocOrdered.

Returns true if all the nodes in the iteration well be returned in document order.

Warning

This can only be called after setRoot has been called!

Returns:boolean

false.

isReverseAxesback to summary
public boolean isReverseAxes()

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

Tells if this is a reverse axes. Overrides AxesWalker#isReverseAxes.

Returns:boolean

true for this class.

setRootback to summary
public void setRoot(int root)

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

Set the root node of the TreeWalker. (Not part of the DOM2 TreeWalker interface).

Parameters
root:int

The context node of this step.