org.sourceforge.beanindex.store.writer
Class RAMDictionaryWriter

java.lang.Object
  extended byorg.sourceforge.beanindex.store.writer.DictionaryWriter
      extended byorg.sourceforge.beanindex.store.writer.RAMDictionaryWriter

public class RAMDictionaryWriter
extends DictionaryWriter


Constructor Summary
RAMDictionaryWriter(java.lang.String path, java.lang.String[] indexNames)
           
 
Method Summary
 void add(int beanId, java.lang.String keywords, java.lang.reflect.Field field, int fieldIndex, java.lang.String indexName)
          Adds the keywords to dictionary and the bean id to the applicable inverted index nodes.
 void close()
          closes the data files.Before closing writes the terms data into dictionary.dat file and writes all the inverted index file data into c corresponding files ending with ***invx_x.dat and ***invx.lcx
 
Methods inherited from class org.sourceforge.beanindex.store.writer.DictionaryWriter
findItemIndex, getInstance, getInstance, removeDuplicates
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RAMDictionaryWriter

public RAMDictionaryWriter(java.lang.String path,
                           java.lang.String[] indexNames)
                    throws java.lang.Exception
Parameters:
path -
indexNames -
Throws:
java.lang.Exception
Method Detail

add

public void add(int beanId,
                java.lang.String keywords,
                java.lang.reflect.Field field,
                int fieldIndex,
                java.lang.String indexName)
         throws java.lang.Exception
Adds the keywords to dictionary and the bean id to the applicable inverted index nodes.

Specified by:
add in class DictionaryWriter
Parameters:
beanId -
keywords -
field -
fieldIndex -
indexName -
Throws:
java.lang.Exception

close

public void close()
           throws java.lang.Exception
closes the data files.Before closing writes the terms data into dictionary.dat file and writes all the inverted index file data into c corresponding files ending with ***invx_x.dat and ***invx.lcx

Specified by:
close in class DictionaryWriter
Throws:
java.lang.Exception