|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.raritantechnologies.searchApp.queryFilters.BooleanQueryParser
Converts a query field with multiple values into a language or source-specific boolean search (any|all).
Example: if a input field Keywords has the following value:
<QueryParser class="com.raritantechnologies.searchApp.queryFilters.BooleanQueryParser"
booleanOperator="AND|OR(default)"
startPhrase="("
endPhrase=")"
defaultDelimiter="," >
<!-- Optional set of Source tags: use if more than one 'language' needs to be supported -->
<Sources>
<!-- one or more Source elements: -->
<Source name="[ 'default' or name of source language ]"
andOperator="[ operator for AND operation ]"
orOperator="[ operator for OR operation ]"
startPhraseChar="""
endPhraseChar=""" />
<!-- etc. . . -->
</Sources>
<Fields>
<!-- one or more Field elements: to combine input fields, use the same output field name -->
<!-- specifiy a delimiter IF it is different from the default delimiter. -->
<Field ID="[ fieldID ]" delimiter="," outputField="[ output field name ]" />
<!-- etc. . . -->
</Fields>
</SourceType>
| Constructor Summary | |
BooleanQueryParser()
|
|
| Method Summary | |
java.lang.String |
createQuery(OrderedMap params,
java.lang.String language,
ILoginInfo userInfo)
|
java.util.List |
getErrors()
Returns the errors that occurred during the translate() step. |
void |
initialize(org.w3c.dom.Element elem)
Initializes the object from an XML tag or element. |
OrderedMap |
parse(OrderedMap params,
ILoginInfo userInfo)
|
OrderedMap |
parse(OrderedMap params,
java.lang.String language,
ILoginInfo userInfo)
Translate using the input parameters if this is how the query is passed. |
void |
setLanguage(java.lang.String language)
|
void |
setSessionID(java.lang.String sessionID)
Allows QueryParser object to access the sessionData. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public BooleanQueryParser()
| Method Detail |
public OrderedMap parse(OrderedMap params,
java.lang.String language,
ILoginInfo userInfo)
throws QueryParseException,
UnsupportedLanguageException
IQueryParser
parse in interface IQueryParserparams - An ordered map containing the query parameterslanguage - String representing the target language (e.g. VQL)
QueryParseException
UnsupportedLanguageException
public java.lang.String createQuery(OrderedMap params,
java.lang.String language,
ILoginInfo userInfo)
throws QueryParseException,
UnsupportedLanguageException
createQuery in interface IQueryParserQueryParseException
UnsupportedLanguageException
public OrderedMap parse(OrderedMap params,
ILoginInfo userInfo)
parse in interface IQueryParserpublic void setLanguage(java.lang.String language)
setLanguage in interface IQueryParserpublic java.util.List getErrors()
IQueryParser
getErrors in interface IQueryParserpublic void setSessionID(java.lang.String sessionID)
IQueryParser
setSessionID in interface IQueryParserpublic void initialize(org.w3c.dom.Element elem)
IConfigurable
initialize in interface IQueryParser
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||