org.gcube.opensearch.opensearchlibrary.queryelements
Interface QueryElement

All Known Implementing Classes:
BasicQueryElement, GeoQueryElement, QueryElementDecorator, SRUQueryElement, TimeQueryElement

public interface QueryElement

Interface of the Query Element class that is used to process Query elements contained in a DescriptionDocument

Author:
gerasimos.farantatos

Method Summary
 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
 

Method Detail

parse

void parse()
           throws Exception
Processes a query element

Throws:
Exception - If the query element is not valid according to the OpenSearch specification or in case of other error

getRole

String getRole()
               throws Exception
Returns the role of the search request described in the query element

Returns:
The role of the search request
Throws:
Exception - If the query element is not initialized or in case of other error

getTitle

String getTitle()
                throws Exception
Returns a description describing the search request described in the query element

Returns:
A description of the search request
Throws:
Exception - If the query element is not initialized or in case of other error

getTotalResults

String getTotalResults()
                       throws Exception
Returns the expected number of results that will be returned if the search request contained in the query element were made

Returns:
The expected number of results
Throws:
Exception - If the query element is not initialized or in case of other error

getSearchTerms

String getSearchTerms()
                      throws Exception
Returns the value of the searchTerms OpenSearch parameter contained in the query element

Returns:
The value of the searchTerms parameter
Throws:
Exception - If the query element is not initialized or in case of other error

getCount

String getCount()
                throws Exception
Returns the value of the count OpenSearch parameter contained in the query element

Returns:
The value of the count parameter
Throws:
Exception - If the query element is not initialized or in case of other error

getStartIndex

String getStartIndex()
                     throws Exception
Returns the value of the startIndex OpenSearch parameter contained in the query element

Returns:
The value of the startIndex parameter
Throws:
Exception - If the query element is not initialized or in case of other error

getStartPage

String getStartPage()
                    throws Exception
Returns the value of the startPage OpenSearch parameter contained in the query element

Returns:
The value of the startPage parameter
Throws:
Exception - If the query element is not initialized or in case of other error

getLanguage

String getLanguage()
                   throws Exception
Returns the value of the language OpenSearch parameter contained in the query element

Returns:
The value of the language parameter
Throws:
Exception - If the query element is not initialized or in case of other error

getInputEncoding

String getInputEncoding()
                        throws Exception
Returns the value of the inputEncoding OpenSearch parameter contained in the query element

Returns:
The value of the inputEncoding parameter
Throws:
Exception - If the query element is not initialized or in case of other error

getOutputEncoding

String getOutputEncoding()
                         throws Exception
Returns the value of the outputEncoding OpenSearch parameter contained in the query element

Returns:
The value of the outputEncoding parameter
Throws:
Exception - If the query element is not initialized or in case of other error

describesExampleQuery

boolean describesExampleQuery()
                              throws Exception
Determines whethe the query element describes an example query

Returns:
true if the query element describes an example query, false otherwise
Throws:
Exception - If the query element is not initialized or in case of other error

getQueryParameters

Map<String,String> getQueryParameters()
                                      throws Exception
Returns all parameters contained in the query element along with their corresponding values

Returns:
All parameters-value pairs contained in the query element
Throws:
Exception - In case of error

isRoleSupported

boolean isRoleSupported()
                        throws Exception
Determines whether the query element supports the query role provided

Returns:
true if the query element supports the role provided, false otherwise
Throws:
Exception - If the query element is not initialized or in case of other error


Copyright © 2013. All Rights Reserved.