public class QueryParameterAccessor extends ParameterAccessor
null, i.e. parameters are expected at root level. See description of
Search API at http://wiki.eclipse.org/SMILA/Documentation/Search_blackboard, _config, _parametersAttribute, _recordId, DEFAULT_PARAMETERS_ATTRIBUTE| Constructor and Description |
|---|
QueryParameterAccessor(Blackboard blackboard,
AnyMap configuration,
java.lang.String queryRecordId)
create accessor for given blackboard and request record.
|
QueryParameterAccessor(Blackboard blackboard,
java.lang.String queryRecordId)
create accessor for given blackboard and request record.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.LinkedHashMap<java.lang.String,QueryConstants.SortOrder> |
getCachedSortByConfig() |
java.util.List<AnyMap> |
getFacetByConfig() |
AnyMap |
getFilter(java.lang.String attributeName) |
java.util.Iterator<java.lang.String> |
getFilterAttributeNames() |
java.util.List<AnyMap> |
getFilterConfig() |
java.util.LinkedHashMap<java.lang.String,AnyMap> |
getFilters()
The returned map is cached internally and also built when calling any of the other Filter methods.
|
AnyMap |
getGroupbyConfig() |
java.util.List<AnyMap> |
getGroupByConfig() |
AnySeq |
getHighlightConfig() |
java.lang.String |
getIndexName()
get the value of indexName parameter.
|
java.lang.String |
getLanguage()
get the value of language parameter.
|
int |
getMaxCount()
get the value of result size parameter.
|
int |
getOffset()
get the value of result offset parameter.
|
java.lang.String |
getQuery()
access to predefined parameters as supported in the search API.
|
java.util.List<Value> |
getQueryAttributeValues(java.lang.String name)
Performance: this will iterate thru the entries in the query Map each time!
|
java.lang.String |
getQueryRequired()
access to predefined parameters as supported in the search API.
|
Any |
getRankingConfig() |
java.util.List<java.lang.String> |
getResultAttributes()
Get the values (names of attributes) of resultAttributes parameter.
|
java.util.Iterator<java.lang.String> |
getSortByAttributeNames()
get iterator on names of attributes that have an order-by parameter set.
|
java.util.List<AnyMap> |
getSortByConfig() |
QueryConstants.SortOrder |
getSortOrder(java.lang.String attributeName)
get sort order for an attribute.
|
double |
getThreshold()
get the value of threshold parameter.
|
boolean |
hasFilters() |
boolean |
hasGroupbyConfig() |
boolean |
hasHighlightConfig() |
boolean |
hasQueryAttribute(java.lang.String name) |
boolean |
hasQueryAttributes() |
ParameterAccessor |
setCurrentRecord(java.lang.String queryRecordId)
set the ID of the record to read parameters from.
|
ParameterAccessor |
setPipeletConfiguration(AnyMap config)
set the configuration of the current pipelet, to read fallback values for missing parameters.
|
getBooleanParameter, getFloatParameter, getIntParameter, getParameter, getParameterAny, getParameterAttribute, getParameters, getRequiredBooleanParameter, getRequiredFloatParameter, getRequiredIntParameter, getRequiredParameter, getRequiredParameters, getSubParameter, getSubParameters, setParameterAttributepublic QueryParameterAccessor(Blackboard blackboard, java.lang.String queryRecordId)
blackboard - blackboard instance.queryRecordId - search request recordpublic QueryParameterAccessor(Blackboard blackboard, AnyMap configuration, java.lang.String queryRecordId)
blackboard - blackboard instance.configuration - pipelet configurationqueryRecordId - search request recordpublic ParameterAccessor setCurrentRecord(java.lang.String queryRecordId)
setCurrentRecord in class ParameterAccessorqueryRecordId - current record to proces.public ParameterAccessor setPipeletConfiguration(AnyMap config)
setPipeletConfiguration in class ParameterAccessorconfig - pipelet configuration.public java.lang.String getQuery()
public java.lang.String getQueryRequired()
throws MissingParameterException
MissingParameterException - if query is not set.public boolean hasQueryAttributes()
public boolean hasQueryAttribute(java.lang.String name)
name - attribute namepublic java.util.List<Value> getQueryAttributeValues(java.lang.String name)
name - query attribute namepublic int getMaxCount()
public int getOffset()
public double getThreshold()
public java.lang.String getLanguage()
public java.lang.String getIndexName()
public java.util.List<java.lang.String> getResultAttributes()
public java.util.LinkedHashMap<java.lang.String,QueryConstants.SortOrder> getCachedSortByConfig()
public java.util.Iterator<java.lang.String> getSortByAttributeNames()
public QueryConstants.SortOrder getSortOrder(java.lang.String attributeName)
attributeName - attribute namepublic java.util.LinkedHashMap<java.lang.String,AnyMap> getFilters()
public boolean hasFilters()
public java.util.Iterator<java.lang.String> getFilterAttributeNames()
public AnyMap getFilter(java.lang.String attributeName)
attributeName - filter attribute namepublic Any getRankingConfig()
public java.util.List<AnyMap> getFacetByConfig()
public boolean hasGroupbyConfig()
public AnyMap getGroupbyConfig()
AnyMap or null.public boolean hasHighlightConfig()
public AnySeq getHighlightConfig()
AnyMap or null.public java.util.List<AnyMap> getFilterConfig()
public java.util.List<AnyMap> getGroupByConfig()
public java.util.List<AnyMap> getSortByConfig()