org.exist.storage.dom
Class RawNodeIterator

java.lang.Object
  extended by org.exist.storage.dom.RawNodeIterator

public class RawNodeIterator
extends Object

An iterator that walks through the raw node data items in a document. The class keeps reading data items from the document's sequence of data pages until it encounters the end of the document. Each returned value contains the data of one node in the document.


Constructor Summary
RawNodeIterator(DBBroker broker, DOMFile db, NodeProxy proxy)
          Construct the iterator.
RawNodeIterator(DBBroker broker, DOMFile db, StoredNode node)
          Construct the iterator.
 
Method Summary
 void closeDocument()
           
 long currentAddress()
          Returns the internal virtual storage address of the node at the cursor's current position.
 Value next()
          Returns the raw data of the next node in document order.
 void seek(NodeProxy proxy)
          Reposition the iterator to the start of the specified node.
 void seek(StoredNode node)
          Reposition the iterator to the start of the specified node.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RawNodeIterator

public RawNodeIterator(DBBroker broker,
                       DOMFile db,
                       StoredNode node)
                throws IOException
Construct the iterator. The iterator will be positioned before the specified start node.

Parameters:
broker - the owner object used to acquire a lock on the underlying data file (usually a DBBroker)
db - the underlying data file
node - the start node where the iterator will be positioned.
Throws:
IOException

RawNodeIterator

public RawNodeIterator(DBBroker broker,
                       DOMFile db,
                       NodeProxy proxy)
                throws IOException
Construct the iterator. The iterator will be positioned before the specified start node.

Parameters:
broker - the owner object used to acquire a lock on the underlying data file (usually a DBBroker)
db - the underlying data file
proxy - the start node where the iterator will be positioned.
Throws:
IOException
Method Detail

seek

public void seek(StoredNode node)
          throws IOException
Reposition the iterator to the start of the specified node.

Parameters:
node - the start node where the iterator will be positioned.
Throws:
IOException

seek

public void seek(NodeProxy proxy)
          throws IOException
Reposition the iterator to the start of the specified node.

Parameters:
proxy - the start node where the iterator will be positioned.
Throws:
IOException

next

public Value next()
Returns the raw data of the next node in document order.

Returns:
the raw data of the node

closeDocument

public void closeDocument()

currentAddress

public long currentAddress()
Returns the internal virtual storage address of the node at the cursor's current position.

Returns:
internal virtual storage address of the node


Copyright (C) Wolfgang Meier. All rights reserved.