no.sesat.search.query.parser
Class NumberGroupClauseImpl
java.lang.Object
no.sesat.search.query.parser.AbstractClause
no.sesat.search.query.parser.AbstractLeafClause
no.sesat.search.query.parser.NumberGroupClauseImpl
- All Implemented Interfaces:
- Serializable, no.sesat.commons.visitor.Visitable, Clause, IntegerClause, LeafClause, NumberGroupClause, WordClause
public final class NumberGroupClauseImpl
- extends AbstractLeafClause
- implements NumberGroupClause
Nine digit organisation clause.
May contain spaces.
Objects of this class are immutable
- Version:
- $Id: NumberGroupClauseImpl.java 7225 2009-04-09 00:32:20Z ssmiweve $
- See Also:
- Serialized Form
| Methods inherited from interface no.sesat.commons.visitor.Visitable |
accept |
NumberGroupClauseImpl
protected NumberGroupClauseImpl(String term,
String field,
Set<TokenPredicate> knownPredicates,
Set<TokenPredicate> possiblePredicates)
- Create clause with the given term, known and possible predicates.
- Parameters:
term - the term (query string) for this clause.field - the field for this clause. May be null.knownPredicates - the set of known predicates for this clause.possiblePredicates - the set of possible predicates for this clause.
createNumberGroupClause
public static NumberGroupClauseImpl createNumberGroupClause(String term,
String field,
TokenEvaluationEngine predicate2evaluatorFactory)
- Creator method for NumberGroupClauseImpl objects. By avoiding the constructors,
and assuming all NumberGroupClauseImpl 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 NumberGroupClauseImpl to be moved
out of the QueryParserImpl.jj file to here.
- Parameters:
term - the term this clause represents.field - any field this clause was specified against.predicate2evaluatorFactory - the factory handing out evaluators against TokenPredicates.
Also holds state information about the current term/clause we are finding predicates against.
- Returns:
- returns a OrgOrganisationNumberClauseImplstance matching the term, left and right child clauses.
May be either newly created or reused.
Copyright © 2005-2009 Schibsted ASA. All Rights Reserved.