no.sesat.search.query.analyser
Class AnalysisRuleFactory

java.lang.Object
  extended by no.sesat.search.query.analyser.AnalysisRuleFactory
All Implemented Interfaces:
SiteKeyedFactory

public final class AnalysisRuleFactory
extends Object
implements SiteKeyedFactory

Responsible for loading and serving all the AnalysisRule instances. These rules consisting of score sets come from the configuration file SearchConstants.ANALYSIS_RULES_XMLFILE. Rules are inherited on a per-rule basis. Global predicates are inherited as well. Inherited global predicates can only be overidden by global predicates. Private predicates does no

Version:
$Revision: 7225 $

Nested Class Summary
static interface AnalysisRuleFactory.Context
          The context the AnalysisRuleFactory must work against.
 
Field Summary
static String ANALYSIS_RULES_XMLFILE
          Name of the configuration file.
 
Method Summary
 AnalysisRule getRule(String ruleName)
          Returns the rule with the name ruleName.
 Map<String,AnalysisRule> getRulesMap()
           
static AnalysisRuleFactory instanceOf(AnalysisRuleFactory.Context cxt)
          Main method to retrieve the correct AnalysisRuleFactory to further obtain AnalysisRule.
 boolean remove(Site site)
          Remove the factory the maps to the given site.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ANALYSIS_RULES_XMLFILE

public static final String ANALYSIS_RULES_XMLFILE
Name of the configuration file.

See Also:
Constant Field Values
Method Detail

getRulesMap

public Map<String,AnalysisRule> getRulesMap()

getRule

public AnalysisRule getRule(String ruleName)
Returns the rule with the name ruleName.

Parameters:
ruleName - the name of the rule
Returns:
the rule.

instanceOf

public static AnalysisRuleFactory instanceOf(AnalysisRuleFactory.Context cxt)
Main method to retrieve the correct AnalysisRuleFactory to further obtain AnalysisRule.

Parameters:
cxt - the contextual needs this factory must use to operate.
Returns:
AnalysisRuleFactory for this site.

remove

public boolean remove(Site site)
Description copied from interface: SiteKeyedFactory
Remove the factory the maps to the given site. *

Specified by:
remove in interface SiteKeyedFactory
Parameters:
site - remove factory corresponding to this site.
Returns:
true if a factory was successfully removed.


Copyright © 2005-2009 Schibsted ASA. All Rights Reserved.