no.sesat.search.query.parser
Class AndNotClauseImpl
java.lang.Object
no.sesat.search.query.parser.AbstractClause
no.sesat.search.query.parser.AbstractUnaryClause
no.sesat.search.query.parser.AbstractBinaryClause
no.sesat.search.query.parser.AndNotClauseImpl
- All Implemented Interfaces:
- Serializable, no.sesat.commons.visitor.Visitable, AndNotClause, Clause, UnaryClause
public final class AndNotClauseImpl
- extends AbstractBinaryClause
- implements AndNotClause
The AndNotClauseImpl represents a joining not clause between two terms in the query.
For example: "term1 ANDNOT term2".
Objects of this class are immutable
- Version:
- $Id: AndNotClauseImpl.java 7225 2009-04-09 00:32:20Z ssmiweve $
- See Also:
- Serialized Form
| Methods inherited from interface no.sesat.commons.visitor.Visitable |
accept |
AndNotClauseImpl
protected AndNotClauseImpl(String term,
Clause first,
Clause second,
Set<TokenPredicate> knownPredicates,
Set<TokenPredicate> possiblePredicates)
- Create the AndNotClauseImpl with the given term, left and right child clauses, and known and possible predicate sets.
- Parameters:
term - the term for this AndClause.knownPredicates - set of known predicates.possiblePredicates - set of possible predicates.first - the left child clause.second - the right child clause.
createAndNotClause
public static AndNotClauseImpl createAndNotClause(Clause first,
TokenEvaluationEngine engine)
- Creator method for AndNotClauseImpl objects. By avoiding the constructors,
and assuming all AndNotClauseImpl objects are immutable, we can keep track
(via a weak reference map) of instances already in use in this JVM and reuse
them.
The methods also allow a chunk of creation logic for the AndNotClauseImpl to be moved
out of the QueryParserImpl.jj file to here.
- Parameters:
first - the left child clause of the operation clause we are about to create (or find).engine - the factory handing out evaluators against TokenPredicates.
Also holds state information about the current term/clause we are finding predicates against.
- Returns:
- returns a AndAndNotClauseImplstance matching the term, left and right child clauses.
May be either newly created or reused.
Copyright © 2005-2009 Schibsted ASA. All Rights Reserved.