maiolum.plainxml.indexing
Class IndexReader

java.lang.Object
  extended bymaiolum.plainxml.indexing.IndexReader

public class IndexReader
extends java.lang.Object

Provides methods to retrieve IndexItem-s from the underlying index stored in plain textfile by identifiers or other properties.


Constructor Summary
IndexReader()
           
 
Method Summary
 java.lang.String getElement(FID id)
          Returns String representation of XML element given by ID.
 java.lang.String getFileLocation()
           
 IndexItem getIndexItem(FID id)
          Parses from the index a IndexItem which has ID equal to ID given in the String parameter.
 java.lang.String getIndexLocation()
           
 java.lang.String getNextElement(FID id)
          Returns String representation of next XML element relative to the element given by ID in the document order.
 FID getNextFID(FID fid)
           
 IndexItem getNextIndexItem(FID fid)
           
 java.lang.String getPreviousElement(FID fid)
          Returns String representation of next XML element relative to the element given by ID in the document order.
 FID getPreviousFID(FID fid)
           
 IndexItem getPreviousIndexItem(FID fid)
           
 void loadIndex()
           
static void main(java.lang.String[] args)
           
 void setFileLocation(java.lang.String fileLocation)
           
 void setIndexLocation(java.lang.String indexLocation)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexReader

public IndexReader()
Method Detail

getIndexLocation

public java.lang.String getIndexLocation()

setIndexLocation

public void setIndexLocation(java.lang.String indexLocation)
                      throws IndexIOException
Throws:
IndexIOException

loadIndex

public void loadIndex()
               throws IndexIOException
Throws:
IndexIOException

getFileLocation

public java.lang.String getFileLocation()

setFileLocation

public void setFileLocation(java.lang.String fileLocation)
                     throws IndexIOException
Throws:
IndexIOException

getElement

public java.lang.String getElement(FID id)
                            throws IndexIOException
Returns String representation of XML element given by ID.

Throws:
IndexIOException

getNextElement

public java.lang.String getNextElement(FID id)
                                throws IndexIOException
Returns String representation of next XML element relative to the element given by ID in the document order.

Throws:
IndexIOException

getIndexItem

public IndexItem getIndexItem(FID id)
                       throws IndexIOException
Parses from the index a IndexItem which has ID equal to ID given in the String parameter.

Parameters:
id -
Returns:
IndexItem with data read from the index.
Throws:
IndexIOException

getPreviousElement

public java.lang.String getPreviousElement(FID fid)
                                    throws IndexIOException
Returns String representation of next XML element relative to the element given by ID in the document order.

Throws:
IndexIOException

getPreviousIndexItem

public IndexItem getPreviousIndexItem(FID fid)
                               throws IndexIOException
Throws:
IndexIOException

getNextIndexItem

public IndexItem getNextIndexItem(FID fid)
                           throws IndexIOException
Throws:
IndexIOException

getNextFID

public FID getNextFID(FID fid)

getPreviousFID

public FID getPreviousFID(FID fid)

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception