org.dftproject.genesis.core.search.preferences
Class SearchPreferenceManager

java.lang.Object
  extended by org.dftproject.genesis.core.search.preferences.SearchPreferenceManager

public class SearchPreferenceManager
extends java.lang.Object

The SearchPreferenceManager is used to store and retrieve preferences related to search.


Field Summary
static java.lang.String P_HIT_COLLECTOR_ID
          Preference name for the current hit collector ID.
static java.lang.String P_QUERY_PARSER_ID
          Preference name for the current query parser ID.
 
Constructor Summary
SearchPreferenceManager()
           
 
Method Summary
static java.lang.String getDefaultHitCollectorID()
          Returns the default hit collector ID.
static java.lang.String getDefaultParserID()
          Returns the default query parser ID.
static java.util.List<org.eclipse.core.runtime.IConfigurationElement> getHitCollectors()
          Returns a list of hit collectors.
static java.util.List<org.eclipse.core.runtime.IConfigurationElement> getParsers()
          Returns the list of parsers.
static AbstractSearchHitCollector getSelectedHitCollector()
          Returns an instance of the current hit collector.
static java.lang.String getSelectedHitCollectorID()
          Returns the current hit collector ID.
static ISearchQueryParser getSelectedParser()
          Returns an instance of the current parser.
static java.lang.String getSelectedParserID()
          Returns the current parser ID.
static void setHitCollector(java.lang.String id)
          Sets the current hit collector by ID
static void setParser(java.lang.String id)
          Sets the current parser by ID.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

P_QUERY_PARSER_ID

public static final java.lang.String P_QUERY_PARSER_ID
Preference name for the current query parser ID.

See Also:
Constant Field Values

P_HIT_COLLECTOR_ID

public static final java.lang.String P_HIT_COLLECTOR_ID
Preference name for the current hit collector ID.

See Also:
Constant Field Values
Constructor Detail

SearchPreferenceManager

public SearchPreferenceManager()
Method Detail

getDefaultParserID

public static java.lang.String getDefaultParserID()
Returns the default query parser ID.

Returns:
the default query parser ID

getSelectedParserID

public static java.lang.String getSelectedParserID()
Returns the current parser ID.

Returns:
the current parser ID

getSelectedParser

public static ISearchQueryParser getSelectedParser()
Returns an instance of the current parser.

Returns:
a search query parser

getParsers

public static java.util.List<org.eclipse.core.runtime.IConfigurationElement> getParsers()
Returns the list of parsers.

Returns:
list of parsers

setParser

public static void setParser(java.lang.String id)
Sets the current parser by ID.

Parameters:
id - the current parser ID

getDefaultHitCollectorID

public static java.lang.String getDefaultHitCollectorID()
Returns the default hit collector ID.

Returns:
the default hit collector ID

getSelectedHitCollectorID

public static java.lang.String getSelectedHitCollectorID()
Returns the current hit collector ID.

Returns:
the current hit collector ID

getSelectedHitCollector

public static AbstractSearchHitCollector getSelectedHitCollector()
Returns an instance of the current hit collector.

Returns:
a hit collector

getHitCollectors

public static java.util.List<org.eclipse.core.runtime.IConfigurationElement> getHitCollectors()
Returns a list of hit collectors.

Returns:
a list of hit collectors

setHitCollector

public static void setHitCollector(java.lang.String id)
Sets the current hit collector by ID

Parameters:
id - a hit collector ID