no.sesat.search.query.parser
Interface QueryParser.Context

All Superinterfaces:
no.sesat.commons.ioc.BaseContext, QueryStringContext, TokenEvaluationEngineContext
All Known Subinterfaces:
Alternation.Context
All Known Implementing Classes:
AbstractQueryParserContext
Enclosing interface:
QueryParser

public static interface QueryParser.Context
extends no.sesat.commons.ioc.BaseContext, QueryStringContext, TokenEvaluationEngineContext

The Context an QueryParser implementation needs to work off. The QueryParser's context is responsible for: - holding the user's orginal inputted query string, - holding the tokenEvalautorFactory responsible for tokenPredicate to evaluator mappings, - creation of Clause subtypes (using the flyweight pattern).


Method Summary
 AndClause createAndClause(Clause first, Clause second)
          Creator wrapper method for AndClause objects.
 AndNotClause createAndNotClause(Clause first)
          Creator wrapper method for AndNotClause objects.
 DefaultOperatorClause createDefaultOperatorClause(Clause first, Clause second)
          Creator wrapper method for DefaultOperatorClause objects.
 EmailClause createEmailClause(String term, String field)
          Creator wrapper method for EmailClause objects.
 IntegerClause createIntegerClause(String term, String field)
          Creator wrapper method for IntegerClause objects.
 NotClause createNotClause(Clause first)
          Creator wrapper method for NotClause objects.
 NumberGroupClause createNumberGroupClause(String term, String field)
          Creator wrapper method for NumberGroupClause objects.
 OrClause createOrClause(Clause first, Clause second)
          Creator wrapper method for OrClause objects.
 PhoneNumberClause createPhoneNumberClause(String term, String field)
          Creator wrapper method for PhoneNumberClause objects.
 PhraseClause createPhraseClause(String term, String field)
          Creator wrapper method for PhraseClause objects.
 UrlClause createUrlClause(String term, String field)
          Creator wrapper method for UrlClause objects.
 WordClause createWordClause(String term, String field)
          Creator wrapper method for WordClause objects.
 XorClause createXorClause(Clause first, Clause second, XorClause.Hint hint)
          Creator wrapper method for XorClause objects.
 
Methods inherited from interface no.sesat.search.query.QueryStringContext
getQueryString
 
Methods inherited from interface no.sesat.search.query.token.TokenEvaluationEngineContext
getTokenEvaluationEngine
 

Method Detail

createDefaultOperatorClause

DefaultOperatorClause createDefaultOperatorClause(Clause first,
                                                  Clause second)
Creator wrapper method for DefaultOperatorClause objects. The methods also allow a chunk of creation logic for the DefaultOperatorClause 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).
second - the right child clause of the operation clause we are about to create (or find).
Returns:
returns a DefaultOperatorClause matching the term, left and right child clauses.

createAndClause

AndClause createAndClause(Clause first,
                          Clause second)
Creator wrapper method for AndClause objects. The methods also allow a chunk of creation logic for the AndClause 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).
second - the right child clause of the operation clause we are about to create (or find).
Returns:
returns a AndClause instance matching the term, left and right child clauses.

createOrClause

OrClause createOrClause(Clause first,
                        Clause second)
Creator wrapper method for OrClause objects. The methods also allow a chunk of creation logic for the OrClause 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).
second - the right child clause of the operation clause we are about to create (or find).
Returns:
returns a OrOrClauseImplnstance matching the term, left and right child clauses.

createXorClause

XorClause createXorClause(Clause first,
                          Clause second,
                          XorClause.Hint hint)
Creator wrapper method for XorClause objects. The methods also allow a chunk of creation logic for the XorClause 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).
second - the right child clause of the operation clause we are about to create (or find).
Returns:
returns a OrOrClauseImplnstance matching the term, left and right child clauses.

createAndNotClause

AndNotClause createAndNotClause(Clause first)
Creator wrapper method for AndNotClause objects. The methods also allow a chunk of creation logic for the AndNotClause 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).
Returns:
returns a AnAndNotClauseImplnstance matching the term, left and right child clauses.

createNotClause

NotClause createNotClause(Clause first)
Creator wrapper method for NotClause objects. The methods also allow a chunk of creation logic for the NotClause 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).
Returns:
returns a NNotClauseImplinstance matching the term, left and right child clauses.

createWordClause

WordClause createWordClause(String term,
                            String field)
Creator wrapper method for WordClause objects. The methods also allow a chunk of creation logic for the WordClause 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.
Returns:
returns a WoWordClauseImplnstance matching the term, left and right child clauses.

createPhraseClause

PhraseClause createPhraseClause(String term,
                                String field)
Creator wrapper method for PhraseClause objects. The methods also allow a chunk of creation logic for the PhraseClause 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.
Returns:
returns a PhPhraseClauseImplnstance matching the term, left and right child clauses.

createIntegerClause

IntegerClause createIntegerClause(String term,
                                  String field)
Creator wrapper method for IntegerClause objects. The methods also allow a chunk of creation logic for the IntegerClause 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.
Returns:
returns a InIntegerClauseImplnstance matching the term, left and right child clauses.

createPhoneNumberClause

PhoneNumberClause createPhoneNumberClause(String term,
                                          String field)
Creator wrapper method for PhoneNumberClause objects. The methods also allow a chunk of creation logic for the PhoneNumberClause 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.
Returns:
returns a PhPhoneNumberClauseImplnstance matching the term, left and right child clauses.

createNumberGroupClause

NumberGroupClause createNumberGroupClause(String term,
                                          String field)
Creator wrapper method for NumberGroupClause objects. The methods also allow a chunk of creation logic for the NumberGroupClause 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.
Returns:
returns a OrOrganisationNumberClauseImplnstance matching the term, left and right child clauses.

createUrlClause

UrlClause createUrlClause(String term,
                          String field)
Creator wrapper method for UrlClause objects. The methods also allow a chunk of creation logic for the UrlClause 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.
Returns:
returns a UrlClause matching the term, left and right child clauses.

createEmailClause

EmailClause createEmailClause(String term,
                              String field)
Creator wrapper method for EmailClause objects. The methods also allow a chunk of creation logic for the EmailClause 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.
Returns:
returns a EmailClause matching the term, left and right child clauses.


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