|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.raritantechnologies.searchApp.queryFilters.SelectResultTypeQueryParser
Checks if a query parameter is in a ResultType - Term count map. (see ResultTypeTermProcessor) If so, it adds query parameters to the query map.
If a ResultType is defined either statically or from an incoming query parameter field, and a count Comparator is included, the parameter additions/deletions will only be done on that field and only if the count value matches the count comparator.
XML Configuration Template:
<QueryParser class="com.raritantechnologies.searchApp.queryFilters.SelectResultTypeQueryParser"
termMapFile="[ name of file that has ResultType Term Count statistics ]"
queryField="[ name of field in incoming query that has query term(s) ]"
tokenizeQuery="[ true|false(default) ]"
resultTypeValue="[ (optional) fixed value for result type to check ]"
resultTypeField="[ (optional) incoming query field that has resultType value to check ]" >
<!-- Used to add or remove parameters from the query map based on the selected ResultType value -->
<ResultTypeQueryMap>
<!-- One or more ResultType elements ... -->
<ResultType name="[ name of result type ]" >
<Param name="[ name of param ]" value=[" value of param or 'REMOVE' to remove the param ]" />
</ResultType>
</ResultTypeQueryMap>
<!-- Optional Comparator to determine if the counts for a term are valid for query map addition/subtraction -->
<Comparator class="[ class of com.raritantechnologies.utils.comparators.IComparator ]" >
</Comparator>
</QueryParser>
| Constructor Summary | |
SelectResultTypeQueryParser()
|
|
| 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 id)
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 SelectResultTypeQueryParser()
| 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 OrderedMap parse(OrderedMap params,
ILoginInfo userInfo)
parse in interface IQueryParserpublic void setLanguage(java.lang.String language)
setLanguage in interface IQueryParser
public java.lang.String createQuery(OrderedMap params,
java.lang.String language,
ILoginInfo userInfo)
throws QueryParseException,
UnsupportedLanguageException
createQuery in interface IQueryParserQueryParseException
UnsupportedLanguageExceptionpublic java.util.List getErrors()
IQueryParser
getErrors in interface IQueryParserpublic void setSessionID(java.lang.String id)
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 | |||||||||