no.sesat.search.query.transform
Class RegexpQueryTransformer

java.lang.Object
  extended by no.sesat.commons.visitor.AbstractReflectionVisitor
      extended by no.sesat.search.query.transform.AbstractQueryTransformer
          extended by no.sesat.search.query.transform.RegexpQueryTransformer
All Implemented Interfaces:
no.sesat.commons.visitor.Visitor, QueryTransformer

public final class RegexpQueryTransformer
extends AbstractQueryTransformer

A transformer to apply a regular expression to each term. TODO Does not handle multi-term applications yet. If the regular expression has a capturing group, it is only that group that is replacement, not the match to the whole regular expression. It is therefore critical to use non-capturing groups for |?+* operations in the expressions.

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

Nested Class Summary
 
Nested classes/interfaces inherited from interface no.sesat.search.query.transform.QueryTransformer
QueryTransformer.Context
 
Field Summary
 
Fields inherited from class no.sesat.commons.visitor.AbstractReflectionVisitor
VISIT_METHOD_IMPL
 
Constructor Summary
RegexpQueryTransformer(QueryTransformerConfig config)
           
 
Method Summary
 void visitImpl(BinaryClause clause)
           
 void visitImpl(LeafClause clause)
           
 void visitImpl(UnaryClause clause)
           
 
Methods inherited from class no.sesat.search.query.transform.AbstractQueryTransformer
getContext, getFilter, getFilter, getTransformedQuery, setContext, visitImpl, visitImpl
 
Methods inherited from class no.sesat.commons.visitor.AbstractReflectionVisitor
visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface no.sesat.commons.visitor.Visitor
visit
 

Constructor Detail

RegexpQueryTransformer

public RegexpQueryTransformer(QueryTransformerConfig config)
Parameters:
config -
Method Detail

visitImpl

public void visitImpl(LeafClause clause)
Parameters:
clause - The clause to prefix.

visitImpl

public void visitImpl(BinaryClause clause)
Parameters:
clause - The clause to prefix.

visitImpl

public void visitImpl(UnaryClause clause)
Parameters:
clause - The clause to prefix.


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