BEA Systems, Inc.

WebLogic Server 6.1 API Reference

weblogic.apache.xpath.axes
Interface ContextNodeList

All Known Implementing Classes:
ExtensionError, LocPathIterator, NodeSet, XStatement, UnionPathIterator

public interface ContextNodeList

Classes who implement this interface can be a current node list, also refered to here as a context node list.

This class is based on an implementation from the Apache XML Project. In future releases the XML parser, XSLT processor, and associated classes will likely be updated to be based on a later version of the Apache implementations. Since Apache does not guarantee backwards compatibility between versions of their software, we cannot guarantee backwards compatibility of any of the classes contained in the weblogic.apache package or sub-packages.


Method Summary
 java.lang.Object clone()
          Get a clone of this iterator.
 org.w3c.dom.traversal.NodeIterator cloneWithReset()
          Get a cloned Iterator that is reset to the start of the iteration.
 org.w3c.dom.Node getCurrentNode()
          Get the current node.
 int getCurrentPos()
          Get the current position, which is one less than the next nextNode() call will retrieve.
 int getLast()
          Get the index of the last node in this list.
 boolean isFresh()
          Tells if this NodeSet is "fresh", in other words, if the first nextNode() that is called will return the first node in the set.
 void reset()
          Reset the iterator.
 void runTo(int index)
          If an index is requested, NodeSet will call this method to run the iterator to the index.
 void setCurrentPos(int i)
          Set the current position in the node set.
 void setLast(int last)
          Set the index of the last node in this list.
 void setShouldCacheNodes(boolean b)
          If setShouldCacheNodes(true) is called, then nodes will be cached.
 int size()
          Get the length of the list.
 

Method Detail

getCurrentNode

public org.w3c.dom.Node getCurrentNode()
Get the current node.

Returns:
The current node, or null.

getCurrentPos

public int getCurrentPos()
Get the current position, which is one less than the next nextNode() call will retrieve. i.e. if you call getCurrentPos() and the return is 0, the next fetch will take place at index 1.

Returns:
The position of the current node in the current node list.

reset

public void reset()
Reset the iterator.

setShouldCacheNodes

public void setShouldCacheNodes(boolean b)
If setShouldCacheNodes(true) is called, then nodes will be cached. They are not cached by default.

Parameters:
b - true if the nodes should be cached.

runTo

public void runTo(int index)
If an index is requested, NodeSet will call this method to run the iterator to the index. By default this sets m_next to the index. If the index argument is -1, this signals that the iterator should be run to the end.

Parameters:
index - The index to run to, or -1 if the iterator should be run to the end.

setCurrentPos

public void setCurrentPos(int i)
Set the current position in the node set.

Parameters:
i - Must be a valid index.

size

public int size()
Get the length of the list.

Returns:
The number of nodes in this node list.

isFresh

public boolean isFresh()
Tells if this NodeSet is "fresh", in other words, if the first nextNode() that is called will return the first node in the set.

Returns:
true if the iteration of this list has not yet begun.

cloneWithReset

public org.w3c.dom.traversal.NodeIterator cloneWithReset()
                                                  throws java.lang.CloneNotSupportedException
Get a cloned Iterator that is reset to the start of the iteration.

Returns:
A clone of this iteration that has been reset.
Throws:
java.lang.CloneNotSupportedException -  

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Get a clone of this iterator. Be aware that this operation may be somewhat expensive.

Returns:
A clone of this object.
Throws:
java.lang.CloneNotSupportedException -  
Overrides:
clone in class java.lang.Object

getLast

public int getLast()
Get the index of the last node in this list.

Returns:
the index of the last node in this list.

setLast

public void setLast(int last)
Set the index of the last node in this list.

Parameters:
last - the index of the last node in this list.

Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs61

WebLogic classes and methods that do not appear in this reference are not public and are not supported.