org.eaglei.search.provider.lucene
Class LuceneSearchProviderFactory

java.lang.Object
  extended by org.eaglei.search.provider.lucene.LuceneSearchProviderFactory

public final class LuceneSearchProviderFactory
extends java.lang.Object

Factory methods for creating LuceneProviders.

Author:
frost

Field Summary
static java.lang.String LUCENE_INDEX_DIR_PROP
          Name of SearchConfiguration property that holds a directory on classpath where provider looks for lucene index
 
Constructor Summary
LuceneSearchProviderFactory()
           
 
Method Summary
static LuceneSearchProvider createProviderForGeneratedData(org.eaglei.services.InstitutionRegistry institutionRegistry, org.eaglei.model.EIOntModel eagleiOntModel, org.eaglei.search.datagen.DataGenParams datagenParams)
          Creates a LuceneProvider for generated data.
static org.apache.lucene.analysis.Analyzer getAnalyzer()
          Creates the Lucene Analyzer to use for searching and indexing.
static org.apache.lucene.store.Directory getDirectory()
          Retrieves the Lucene Directory to use as a search index.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LUCENE_INDEX_DIR_PROP

public static final java.lang.String LUCENE_INDEX_DIR_PROP
Name of SearchConfiguration property that holds a directory on classpath where provider looks for lucene index

See Also:
Constant Field Values
Constructor Detail

LuceneSearchProviderFactory

public LuceneSearchProviderFactory()
Method Detail

createProviderForGeneratedData

public static LuceneSearchProvider createProviderForGeneratedData(org.eaglei.services.InstitutionRegistry institutionRegistry,
                                                                  org.eaglei.model.EIOntModel eagleiOntModel,
                                                                  org.eaglei.search.datagen.DataGenParams datagenParams)
                                                           throws java.io.IOException
Creates a LuceneProvider for generated data.

Parameters:
datagenParams - Generation params
Returns:
The LuceneProvider
Throws:
java.io.IOException - Thrown if an error is encountered creating the provider.

getDirectory

public static org.apache.lucene.store.Directory getDirectory()
                                                      throws java.io.IOException
Retrieves the Lucene Directory to use as a search index.

Returns:
Lucene Directory.
Throws:
java.io.IOException - Thrown if an error is encountered.

getAnalyzer

public static org.apache.lucene.analysis.Analyzer getAnalyzer()
Creates the Lucene Analyzer to use for searching and indexing.

Returns:
Analyzer.


Copyright © 2009-2010 Eagle-I. All Rights Reserved.