public abstract class QueryElementDecorator extends Object implements QueryElement
| Modifier and Type | Field and Description |
|---|---|
protected QueryElement |
el |
| Constructor and Description |
|---|
QueryElementDecorator(QueryElement el) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
describesExampleQuery()
Determines whethe the query element describes an example query
|
String |
getCount()
Returns the value of the count OpenSearch parameter contained in the query element
|
String |
getInputEncoding()
Returns the value of the inputEncoding OpenSearch parameter contained in the query element
|
String |
getLanguage()
Returns the value of the language OpenSearch parameter contained in the query element
|
String |
getOutputEncoding()
Returns the value of the outputEncoding OpenSearch parameter contained in the query element
|
Map<String,String> |
getQueryParameters()
Returns all parameters contained in the query element along with their corresponding values
|
String |
getRole()
Returns the role of the search request described in the query element
|
String |
getSearchTerms()
Returns the value of the searchTerms OpenSearch parameter contained in the query element
|
String |
getStartIndex()
Returns the value of the startIndex OpenSearch parameter contained in the query element
|
String |
getStartPage()
Returns the value of the startPage OpenSearch parameter contained in the query element
|
String |
getTitle()
Returns a description describing the search request described in the query element
|
String |
getTotalResults()
Returns the expected number of results that will be returned if the search request contained
in the query element were made
|
boolean |
isRoleSupported()
Determines whether the query element supports the query role provided
|
void |
parse()
Processes a query element
|
protected QueryElement el
public QueryElementDecorator(QueryElement el)
public void parse()
throws Exception
parse in interface QueryElementException - If the query element is not valid according to the OpenSearch specification or in case of other errorQueryElement.parse()public String getRole() throws Exception
getRole in interface QueryElementException - If the query element is not initialized or in case of other errorQueryElement.getRole()public String getTitle() throws Exception
getTitle in interface QueryElementException - If the query element is not initialized or in case of other errorQueryElement.getTitle()public String getTotalResults() throws Exception
getTotalResults in interface QueryElementException - If the query element is not initialized or in case of other errorQueryElement.getTotalResults()public String getSearchTerms() throws Exception
getSearchTerms in interface QueryElementException - If the query element is not initialized or in case of other errorQueryElement.getSearchTerms()public String getCount() throws Exception
getCount in interface QueryElementException - If the query element is not initialized or in case of other errorQueryElement.getCount()public String getStartIndex() throws Exception
getStartIndex in interface QueryElementException - If the query element is not initialized or in case of other errorQueryElement.getStartIndex()public String getStartPage() throws Exception
getStartPage in interface QueryElementException - If the query element is not initialized or in case of other errorQueryElement.getStartPage()public String getLanguage() throws Exception
getLanguage in interface QueryElementException - If the query element is not initialized or in case of other errorQueryElement.getLanguage()public String getInputEncoding() throws Exception
getInputEncoding in interface QueryElementException - If the query element is not initialized or in case of other errorQueryElement.getInputEncoding()public String getOutputEncoding() throws Exception
getOutputEncoding in interface QueryElementException - If the query element is not initialized or in case of other errorQueryElement.getOutputEncoding()public boolean describesExampleQuery()
throws Exception
describesExampleQuery in interface QueryElementException - If the query element is not initialized or in case of other errorQueryElement.describesExampleQuery()public Map<String,String> getQueryParameters() throws Exception
getQueryParameters in interface QueryElementException - In case of errorQueryElement.getQueryParameters()public boolean isRoleSupported()
throws Exception
isRoleSupported in interface QueryElementException - If the query element is not initialized or in case of other errorQueryElement.isRoleSupported()Copyright © 2014. All Rights Reserved.