anl.aida.ae.lucene
Class CacheCreator
java.lang.Object
anl.aida.ae.lucene.CacheCreator
public class CacheCreator
- extends java.lang.Object
Date: Mar 5, 2009 11:38:37 AM
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LUCENE_INDEX_NAME
private static final java.lang.String LUCENE_INDEX_NAME
- See Also:
- Constant Field Values
filter
private Filter<org.apache.lucene.index.Term> filter
reader
private org.apache.lucene.index.IndexReader reader
format
private java.text.DateFormat format
drProducer
private DateRangeProducer drProducer
CacheCreator
public CacheCreator(DateRangeProducer drProducer,
org.apache.lucene.index.IndexReader reader)
CacheCreator
public CacheCreator(DateRangeProducer drProducer,
Filter<org.apache.lucene.index.Term> filter,
org.apache.lucene.index.IndexReader reader)
deleteFiles
private void deleteFiles(java.io.File dir)
makeFileName
private java.lang.String makeFileName(java.io.File outputDir,
DateRange range,
java.lang.String prefix)
createCache
public void createCache(java.io.File outputDir,
ReaderProducer readerProducer,
Keywords keywords)
throws java.io.IOException,
AIDAException,
java.text.ParseException
- Creates the cache in the specified directory. If the output directory exists,
it will be deleted and recreated.
- Parameters:
outputDir
- the directory in which the cache is created
- Throws:
java.io.IOException
- if there is a file error while creating the cache
AIDAException
- if there is a general error while creating the cache
java.text.ParseException
copyIndex
private void copyIndex(java.io.File outputDir)
throws java.io.IOException
- Throws:
java.io.IOException
createSTC
private void createSTC(java.io.File indexDir,
java.lang.String filename,
DateRange range)
throws java.io.IOException,
AIDAException
- Throws:
java.io.IOException
AIDAException
createTmpIndex
private void createTmpIndex(java.io.File tmpDir,
DateRange range,
ReaderProducer rProducer,
Keywords keywords)
throws java.io.IOException,
java.text.ParseException
- Throws:
java.io.IOException
java.text.ParseException