|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.xml.dtm.ref.DTMAxisIteratorBase
org.apache.xalan.xsltc.dom.MultiValuedNodeHeapIterator
org.apache.xalan.xsltc.dom.KeyIndex.KeyIndexIterator
public class KeyIndex.KeyIndexIterator
An iterator representing the result of a reference to either the
XSLT key function or the XPath id function.
| Nested Class Summary | |
|---|---|
protected class |
KeyIndex.KeyIndexIterator.KeyIndexHeapNode
Represents the DTM nodes retrieved for one key value or one string argument to id for use as one heap node in a
MultiValuedNodeHeapIterator. |
| Nested classes/interfaces inherited from class org.apache.xalan.xsltc.dom.MultiValuedNodeHeapIterator |
|---|
MultiValuedNodeHeapIterator.HeapNode |
| Field Summary | |
|---|---|
private boolean |
_isKeyIterator
Indicates whether this object represents the result of a reference to the key function (true) or the
id function (false). |
private java.lang.String |
_keyValue
This field contains the iterator representing a non-node-set key value argument to the key function or a non-node-set
argument to the id function. |
private DTMAxisIterator |
_keyValueIterator
This field contains the iterator representing a node set key value argument to the key function or a node set argument
to the id function. |
private IntegerArray |
_nodes
A reference to the key function that only has one
key value or to the id function that has only one string
argument can be optimized to ignore the multi-valued heap. |
| Fields inherited from class org.apache.xml.dtm.ref.DTMAxisIteratorBase |
|---|
_includeSelf, _isRestartable, _last, _markedNode, _position, _startNode |
| Fields inherited from interface org.apache.xml.dtm.DTMAxisIterator |
|---|
END |
| Constructor Summary | |
|---|---|
KeyIndex.KeyIndexIterator(DTMAxisIterator keyValues,
boolean isKeyIterator)
Constructor used when the argument to key or
id is a node set. |
|
KeyIndex.KeyIndexIterator(java.lang.String keyValue,
boolean isKeyIterator)
Constructor used when the argument to key or
id is not a node set. |
|
| Method Summary | |
|---|---|
int |
getLast()
Returns the number of nodes in this iterator. |
int |
getNodeByPosition(int position)
Return the node at the given position. |
protected void |
init()
Evaluate the reference to the key or id
function with the context specified by setStartNode(int)
and set up this iterator to iterate over the DTM nodes that are
to be returned. |
protected IntegerArray |
lookupNodes(int root,
java.lang.String keyValue)
Retrieve nodes for a particular key value or a particular id argument value. |
int |
next()
Get the next node in the iteration. |
DTMAxisIterator |
reset()
Resets the iterator to the last start node. |
DTMAxisIterator |
setStartNode(int node)
Set context node for the iterator. |
| Methods inherited from class org.apache.xalan.xsltc.dom.MultiValuedNodeHeapIterator |
|---|
addHeapNode, cloneIterator, gotoMark, setMark |
| Methods inherited from class org.apache.xml.dtm.ref.DTMAxisIteratorBase |
|---|
getAxis, getPosition, getStartNode, includeSelf, isDocOrdered, isReverse, resetPosition, returnNode, setRestartable |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private IntegerArray _nodes
A reference to the key function that only has one
key value or to the id function that has only one string
argument can be optimized to ignore the multi-valued heap. This
field will be null otherwise.
private DTMAxisIterator _keyValueIterator
This field contains the iterator representing a node set key value
argument to the key function or a node set argument
to the id function.
Exactly one of this field and _keyValue must be
null.
private java.lang.String _keyValue
This field contains the iterator representing a non-node-set key
value argument to the key function or a non-node-set
argument to the id function.
Exactly one of this field and _keyValueIterator must be
null.
private boolean _isKeyIterator
key function (true) or the
id function (false).
| Constructor Detail |
|---|
KeyIndex.KeyIndexIterator(java.lang.String keyValue,
boolean isKeyIterator)
key or
id is not a node set.
keyValue - the argument to key or id
cast to a StringisKeyIterator - indicates whether the constructed iterator
represents a reference to key or
id.
KeyIndex.KeyIndexIterator(DTMAxisIterator keyValues,
boolean isKeyIterator)
key or
id is a node set.
keyValues - the argument to key or idisKeyIterator - indicates whether the constructed iterator
represents a reference to key or
id.| Method Detail |
|---|
protected IntegerArray lookupNodes(int root,
java.lang.String keyValue)
root - The root node of the document containing the context nodekeyValue - The key value of id string argument value
IntegerArray of the resulting nodespublic DTMAxisIterator setStartNode(int node)
setStartNode in interface DTMAxisIteratorsetStartNode in class MultiValuedNodeHeapIteratornode - the context node
DTMAxisIterator set to the start of the iteration.public int next()
next in interface DTMAxisIteratornext in class MultiValuedNodeHeapIteratorpublic DTMAxisIterator reset()
reset in interface DTMAxisIteratorreset in class MultiValuedNodeHeapIteratorprotected void init()
key or id
function with the context specified by setStartNode(int)
and set up this iterator to iterate over the DTM nodes that are
to be returned.
init in class MultiValuedNodeHeapIteratorpublic int getLast()
getLast in interface DTMAxisIteratorgetLast in class DTMAxisIteratorBasepublic int getNodeByPosition(int position)
getNodeByPosition in interface DTMAxisIteratorgetNodeByPosition in class DTMAxisIteratorBaseposition - The position
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||