no.sesat.search.query.token
Class RegExpEvaluatorFactory

java.lang.Object
  extended by no.sesat.search.query.token.AbstractEvaluatorFactory
      extended by no.sesat.search.query.token.RegExpEvaluatorFactory

public final class RegExpEvaluatorFactory
extends AbstractEvaluatorFactory

Responsible for loading and serving all the Regular Expression Token Evaluators. These regular expression patterns come from the configuration file SearchConstants.REGEXP_EVALUATOR_XMLFILE. RegExpEvaluator's are re-used across queries so to cache the compiled patterns.

Version:
$Id: RegExpEvaluatorFactory.java 7225 2009-04-09 00:32:20Z ssmiweve $

Nested Class Summary
 
Nested classes/interfaces inherited from class no.sesat.search.query.token.AbstractEvaluatorFactory
AbstractEvaluatorFactory.Context
 
Field Summary
static String REGEXP_EVALUATOR_XMLFILE
          The name of the file where regular expressions for each TokenPredicate will be configured.
 
Constructor Summary
RegExpEvaluatorFactory(AbstractEvaluatorFactory.Context cxt)
           
 
Method Summary
 TokenEvaluator getEvaluator(TokenPredicate token)
          If the evaluator is not found in this site it will fallback and look in the parent site.
 
Methods inherited from class no.sesat.search.query.token.AbstractEvaluatorFactory
getContext, instanceOf, isResponsibleFor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REGEXP_EVALUATOR_XMLFILE

public static final String REGEXP_EVALUATOR_XMLFILE
The name of the file where regular expressions for each TokenPredicate will be configured.

See Also:
Constant Field Values
Constructor Detail

RegExpEvaluatorFactory

public RegExpEvaluatorFactory(AbstractEvaluatorFactory.Context cxt)
                       throws SiteKeyedFactoryInstantiationException
Throws:
SiteKeyedFactoryInstantiationException
Method Detail

getEvaluator

public TokenEvaluator getEvaluator(TokenPredicate token)
                            throws EvaluationException
Description copied from class: AbstractEvaluatorFactory
If the evaluator is not found in this site it will fallback and look in the parent site.

Specified by:
getEvaluator in class AbstractEvaluatorFactory
Parameters:
token - the predicate the evaluator is to be used for
Returns:
the TokenEvaluator to use. Or TokenEvaluationEngineImpl.ALWAYS_FALSE_EVALUATOR if not found.
Throws:
EvaluationException


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