|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.raritantechnologies.searchApp.queryFilters.PhraseQueryParser
Combines multiple fields into phrases. Used in situations where a nested complex form element needs to be translated to a single query value.
XML Configuration Template:
<QueryParser class="com.raritantechnologies.searchApp.queryFilters.PhraseQueryParser" >
<Fields>
<Field outputID="[ name of destination field ID ]" >
<!-- one or more Field elements: to combine input fields, use the same output field name -->
<Segment inputID="[ fieldID ]" />
<Segment value=" some constant " />
<Segment inputID="[ fieldID2 ]" />
</Field>
</Fields>
</QueryParser>
| Constructor Summary | |
PhraseQueryParser()
|
|
| 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 loginInfo)
|
OrderedMap |
parse(OrderedMap params,
java.lang.String language,
ILoginInfo loginInfo)
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 PhraseQueryParser()
| Method Detail |
public OrderedMap parse(OrderedMap params,
java.lang.String language,
ILoginInfo loginInfo)
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 OrderedMap parse(OrderedMap params,
ILoginInfo loginInfo)
parse in interface IQueryParser
public java.lang.String createQuery(OrderedMap params,
java.lang.String language,
ILoginInfo userInfo)
throws QueryParseException,
UnsupportedLanguageException
createQuery in interface IQueryParserQueryParseException
UnsupportedLanguageExceptionpublic 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 | |||||||||