|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.labs.minion.SearchEngineFactory
public class SearchEngineFactory
This is a factory class that can be used to get a search engine instance.
| Field Summary | |
|---|---|
static java.lang.String[] |
configFiles
|
static java.lang.String |
DEFAULT_ENGINE
The configuration name of the default search engine. |
static java.lang.String |
GLOBAL_INDEX_DIRECTORY
The name of the global property in the configuration containing the index directory. |
static java.lang.String |
logTag
|
| Constructor Summary | |
|---|---|
SearchEngineFactory()
Creates a SearchEngineFactory |
|
| Method Summary | |
|---|---|
static java.io.File |
getDefaultConfigFile(java.lang.String indexDir)
|
static com.sun.labs.util.props.ConfigurationManager |
getDefaultConfiguration(java.lang.String indexDir)
Gets the default configuration for an index in the given directory. |
static SearchEngine |
getSearchEngine(com.sun.labs.util.props.ConfigurationManager cm)
|
static SearchEngine |
getSearchEngine(java.lang.String indexDir)
Gets a search engine for the index in the provided directory. |
static SearchEngine |
getSearchEngine(java.lang.String indexDir,
java.lang.String engineName)
Gets a search engine that combines the given configuration management file with the default. |
static SearchEngine |
getSearchEngine(java.lang.String indexDir,
java.lang.String engineName,
java.net.URL configFile)
Gets a search engine that combines the given configuration management file with the default. |
static SearchEngine |
getSearchEngine(java.lang.String indexDir,
java.net.URL configFile)
Gets a search engine that combines the given configuration management file with the default. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String GLOBAL_INDEX_DIRECTORY
public static final java.lang.String DEFAULT_ENGINE
public static final java.lang.String logTag
public static final java.lang.String[] configFiles
| Constructor Detail |
|---|
public SearchEngineFactory()
| Method Detail |
|---|
public static SearchEngine getSearchEngine(java.lang.String indexDir)
throws SearchEngineException
indexDir - the directory containing the index that the search engine will use
SearchEngineException - if there is any error opening the index
public static SearchEngine getSearchEngine(java.lang.String indexDir,
java.lang.String engineName)
throws SearchEngineException
indexDir - the directory where the index is. If this value is null,
the value should be specified in the configuration file!engineName - the configuration name of the search engine that should
be instantiated
SearchEngineException - if there is an error
opening the search engine
public static SearchEngine getSearchEngine(java.lang.String indexDir,
java.net.URL configFile)
throws SearchEngineException
indexDir - the directory where the index is. If this value is null,
the value should be specified in the configuration file!configFile - a URL that points to a configuration file for the engine. This value may be null.
SearchEngineException - if there is an error
opening the search engine
public static SearchEngine getSearchEngine(java.lang.String indexDir,
java.lang.String engineName,
java.net.URL configFile)
throws SearchEngineException
indexDir - the directory where the index is. If this value is null,
the value should be specified in the configuration file!engineName - the configuration name of the search engine that should
be instantiatedconfigFile - a URL that points to a configuration file for the engine. This value may be null.
SearchEngineException - if there is an error
opening the search engine
public static SearchEngine getSearchEngine(com.sun.labs.util.props.ConfigurationManager cm)
throws SearchEngineException
SearchEngineException
public static com.sun.labs.util.props.ConfigurationManager getDefaultConfiguration(java.lang.String indexDir)
throws SearchEngineException
indexDir - the index directory containing the config
SearchEngineException - if there is an error
getting the configurationpublic static java.io.File getDefaultConfigFile(java.lang.String indexDir)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||