maiolum.plainxml.indexing
Class SimpleIndexReader

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

public class SimpleIndexReader
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
SimpleIndexReader()
           
 
Method Summary
 java.lang.String getElement(java.lang.String id)
          Returns String representation of XML element given by ID.
 java.lang.String getFileLocation()
           
 IndexItem getIndexItem(java.lang.String 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(java.lang.String id)
          Returns String representation of next XML element relative to the element given by ID in the document order.
 IndexItem getNextIndexItem(java.lang.String id)
           
 java.lang.String getPreviousElement(java.lang.String id)
          Returns String representation of previous XML element relative to the element given by ID in the document order.
 IndexItem getPreviousIndexItem(java.lang.String id)
           
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

SimpleIndexReader

public SimpleIndexReader()
Method Detail

getIndexLocation

public java.lang.String getIndexLocation()

setIndexLocation

public void setIndexLocation(java.lang.String indexLocation)

getFileLocation

public java.lang.String getFileLocation()

setFileLocation

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

getElement

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

Throws:
IndexIOException

getNextElement

public java.lang.String getNextElement(java.lang.String 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(java.lang.String 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

getNextIndexItem

public IndexItem getNextIndexItem(java.lang.String id)
                           throws IndexIOException
Throws:
IndexIOException

getPreviousElement

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

Throws:
IndexIOException

getPreviousIndexItem

public IndexItem getPreviousIndexItem(java.lang.String id)
                               throws IndexIOException
Throws:
IndexIOException

main

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