Top Description Fields Methods
com.sun.org.apache.xml.internal.dtm

public Interface DTMAxisIterator

extends Cloneable
Known Direct Implementers
com.sun.org.apache.xalan.internal.xsltc.dom.ArrayNodeListIterator, com.sun.org.apache.xml.internal.dtm.ref.DTMAxisIteratorBase, com.sun.org.apache.xml.internal.dtm.ref.EmptyIterator

This class iterates over a single XPath Axis, and returns node handles.

Field Summary

Modifier and TypeField and Description
public static final int
END

Specifies the end of the iteration, and is the same as DTM.NULL.

Method Summary

Modifier and TypeMethod and Description
public DTMAxisIterator

Returns:

a deep copy of this iterator. The clone should not be reset from its current position.
cloneIterator
()

public int

Returns:

the number of nodes in this iterator. This may be an expensive operation when called the first time.
getLast
()

public int

Returns:

The node at the given position.
getNodeByPosition
(int
The position
position
)

Return the node at the given position.

public int

Returns:

The position of the current node in the set, as defined by XPath.
getPosition
()

public int

Returns:

The root node of the iteration.
getStartNode
()

Get start to END should 'close' the iterator, i.e. subsequent call to next() should return END.

public void
gotoMark()

Restores the current node remembered by setMark().

public boolean

Returns:

true if this iterator has a reversed axis, else false.
isReverse
()

public int

Returns:

The next node handle in the iteration, or END.
next
()

Get the next node in the iteration.

public DTMAxisIterator

Returns:

A DTMAxisIterator, which may or may not be the same as this iterator.
reset
()

Resets the iterator to the last start node.

public void
setMark()

Remembers the current node for the next call to gotoMark().

public void
setRestartable(boolean isRestartable)

Set if restartable.

public DTMAxisIterator

Returns:

A DTMAxisIterator set to the start of the iteration.
setStartNode
(int
Sets the root of the iteration.
node
)

Set start to END should 'close' the iterator, i.e. subsequent call to next() should return END.

Field Detail

ENDback to summary
public static final int END

Specifies the end of the iteration, and is the same as DTM.NULL.

Method Detail

cloneIteratorback to summary
public DTMAxisIterator cloneIterator()
Returns:DTMAxisIterator

a deep copy of this iterator. The clone should not be reset from its current position.

getLastback to summary
public int getLast()
Returns:int

the number of nodes in this iterator. This may be an expensive operation when called the first time.

getNodeByPositionback to summary
public int getNodeByPosition(int position)

Return the node at the given position.

Parameters
position:int

The position

Returns:int

The node at the given position.

getPositionback to summary
public int getPosition()
Returns:int

The position of the current node in the set, as defined by XPath.

getStartNodeback to summary
public int getStartNode()

Get start to END should 'close' the iterator, i.e. subsequent call to next() should return END.

Returns:int

The root node of the iteration.

gotoMarkback to summary
public void gotoMark()

Restores the current node remembered by setMark().

isReverseback to summary
public boolean isReverse()
Returns:boolean

true if this iterator has a reversed axis, else false.

nextback to summary
public int next()

Get the next node in the iteration.

Returns:int

The next node handle in the iteration, or END.

resetback to summary
public DTMAxisIterator reset()

Resets the iterator to the last start node.

Returns:DTMAxisIterator

A DTMAxisIterator, which may or may not be the same as this iterator.

setMarkback to summary
public void setMark()

Remembers the current node for the next call to gotoMark().

setRestartableback to summary
public void setRestartable(boolean isRestartable)

Set if restartable.

setStartNodeback to summary
public DTMAxisIterator setStartNode(int node)

Set start to END should 'close' the iterator, i.e. subsequent call to next() should return END.

Parameters
node:int

Sets the root of the iteration.

Returns:DTMAxisIterator

A DTMAxisIterator set to the start of the iteration.