no.sesat.search.query.finder
Class PredicateFinder

java.lang.Object
  extended by no.sesat.commons.visitor.AbstractReflectionVisitor
      extended by no.sesat.search.query.finder.PredicateFinder
All Implemented Interfaces:
no.sesat.commons.visitor.Visitor

public final class PredicateFinder
extends no.sesat.commons.visitor.AbstractReflectionVisitor

Responsible for Visiting the Query and finding where the predicate lies. This class is thread-safe. TODO Handle predicates under NOT and ANDNOT clauses. Currently they are ignored.

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

Field Summary
 
Fields inherited from class no.sesat.commons.visitor.AbstractReflectionVisitor
VISIT_METHOD_IMPL
 
Constructor Summary
PredicateFinder()
           
 
Method Summary
 Set<Clause> findClauses(Clause root, org.apache.commons.collections.Predicate predicate, TokenEvaluationEngine engine)
          find all the clauses containing the predicate.
 Clause findFirstClause(Clause root, org.apache.commons.collections.Predicate predicate, TokenEvaluationEngine engine)
          find the first clause containing the predicate.
protected  void visitImpl(AndNotClause clause)
          TODO comment me.
protected  void visitImpl(BinaryClause clause)
          TODO comment me.
protected  void visitImpl(Clause clause)
          TODO comment me.
protected  void visitImpl(NotClause clause)
          TODO comment me.
protected  void visitImpl(XorClause clause)
          TODO comment me.
 
Methods inherited from class no.sesat.commons.visitor.AbstractReflectionVisitor
visit, visitImpl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PredicateFinder

public PredicateFinder()
Method Detail

findFirstClause

public Clause findFirstClause(Clause root,
                              org.apache.commons.collections.Predicate predicate,
                              TokenEvaluationEngine engine)
find the first clause containing the predicate.

Parameters:
root -
predicate -
engine -
Returns:

findClauses

public Set<Clause> findClauses(Clause root,
                               org.apache.commons.collections.Predicate predicate,
                               TokenEvaluationEngine engine)
find all the clauses containing the predicate. returns largest multi-terms clauses and before leaf clauses.

Parameters:
root -
predicate -
engine -
Returns:

visitImpl

protected void visitImpl(BinaryClause clause)
TODO comment me. *

Parameters:
clause -

visitImpl

protected void visitImpl(XorClause clause)
TODO comment me. *

Parameters:
clause -

visitImpl

protected void visitImpl(NotClause clause)
TODO comment me. *

Parameters:
clause -

visitImpl

protected void visitImpl(AndNotClause clause)
TODO comment me. *

Parameters:
clause -

visitImpl

protected void visitImpl(Clause clause)
TODO comment me. *

Parameters:
clause -


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