net.aerith.misao.database
Class XmlDBMemoryAccessor

java.lang.Object
  |
  +--net.aerith.misao.database.XmlDBMemoryAccessor

public class XmlDBMemoryAccessor
extends java.lang.Object
implements XmlDBAccessor

The XmlDBMemoryAccessor represents a sequential accessor to the elements in the primitive database. It keeps the current position in the database.


Field Summary
protected  XmlDBHolder holder
          The holder of the XML elements.
protected  int index
          The index of the current element.
protected  XmlDBRecord[] records
          The list of XML elements.
 
Constructor Summary
XmlDBMemoryAccessor(XmlDBHolder holder)
          Constructs a XmlDBMemoryAccessor of the specified database.
 
Method Summary
 XmlDBRecord getFirstElement()
          Gets the first element in the database.
 XmlDBRecord getNextElement()
          Gets the next element in the database.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

holder

protected XmlDBHolder holder
The holder of the XML elements.

records

protected XmlDBRecord[] records
The list of XML elements.

index

protected int index
The index of the current element.
Constructor Detail

XmlDBMemoryAccessor

public XmlDBMemoryAccessor(XmlDBHolder holder)
Constructs a XmlDBMemoryAccessor of the specified database.
Parameters:
holder - the holder of the XML elements.
Method Detail

getFirstElement

public XmlDBRecord getFirstElement()
                            throws java.io.IOException
Gets the first element in the database.
Specified by:
getFirstElement in interface XmlDBAccessor
Returns:
the XML element.
Throws:
java.io.IOException - if I/O error occurs.

getNextElement

public XmlDBRecord getNextElement()
                           throws java.io.IOException
Gets the next element in the database.
Specified by:
getNextElement in interface XmlDBAccessor
Returns:
the XML element.
Throws:
java.io.IOException - if I/O error occurs.