|
SMILA 1.0 API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.smila.processing.parameters.ParameterAccessor
org.eclipse.smila.search.api.helper.QueryParameterAccessor
public class QueryParameterAccessor
access to Query parameters as defined in the SMILA search API.
Sets the parameter attribute to null, i.e. parameters are expected at root level. See description of
Search API at http://wiki.eclipse.org/SMILA/Documentation/Search
| Field Summary |
|---|
| Fields inherited from class org.eclipse.smila.processing.parameters.ParameterAccessor |
|---|
_blackboard, _config, _parametersAttribute, _recordId, DEFAULT_PARAMETERS_ATTRIBUTE |
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
java.util.List<AnyMap> |
getFacetByConfig()
|
AnyMap |
getFilter(java.lang.String attributeName)
|
java.util.Iterator<java.lang.String> |
getFilterAttributeNames()
|
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()
|
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.LinkedHashMap<java.lang.String,QueryConstants.SortOrder> |
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. |
| Methods inherited from class org.eclipse.smila.processing.parameters.ParameterAccessor |
|---|
getBooleanParameter, getFloatParameter, getIntParameter, getParameter, getParameterAny, getParameterAttribute, getParameters, getRequiredBooleanParameter, getRequiredFloatParameter, getRequiredIntParameter, getRequiredParameter, getRequiredParameters, getSubParameter, getSubParameters, setParameterAttribute |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public QueryParameterAccessor(Blackboard blackboard,
java.lang.String queryRecordId)
blackboard - blackboard instance.queryRecordId - search request record
public QueryParameterAccessor(Blackboard blackboard,
AnyMap configuration,
java.lang.String queryRecordId)
blackboard - blackboard instance.configuration - pipelet configurationqueryRecordId - search request record| Method Detail |
|---|
public 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 name
public java.util.List<Value> getQueryAttributeValues(java.lang.String name)
name - query attribute name
public 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> getSortByConfig()
public java.util.Iterator<java.lang.String> getSortByAttributeNames()
public QueryConstants.SortOrder getSortOrder(java.lang.String attributeName)
attributeName - attribute name
public 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 name
public 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.
|
SMILA 1.0 API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||