org.gcube.opensearch.opensearchlibrary.urlelements
Interface URLElement

All Known Implementing Classes:
BasicURLElement, ExtendedURLElement, GeoURLElement, SRUURLElement, TimeURLElement, URLElementDecorator

public interface URLElement

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

Author:
gerasimos.farantatos

Method Summary
 int getIndexOffset()
          Returns the value of the indexOffset OpenSearch parameter contained in this URL element.
 java.lang.String getMimeType()
          Retrieves the MIME type associated with the results obtained after issuing a query using the template contained in this URL element
 int getPageOffset()
          Returns the value of the pageOffset OpenSearch parameter contained in this URL element.
 QueryBuilder getQueryBuilder()
          Constructs and returns a QueryBuilder object that can be used to construct queries based on the template contained in this query element.
 java.lang.String getRel()
          Returns the role of the resource being described in relation to the description document
 boolean isRelSupported()
          Answers whether the rel value of the URL element can be interpreted by this URL element type
 void parse()
          Processes a URL element
 

Method Detail

parse

void parse()
           throws java.lang.Exception
Processes a URL element

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

getMimeType

java.lang.String getMimeType()
                             throws java.lang.Exception
Retrieves the MIME type associated with the results obtained after issuing a query using the template contained in this URL element

Returns:
The requested MIME type
Throws:
java.lang.Exception - If the URL element is not initialized or in case of other error

getPageOffset

int getPageOffset()
                  throws java.lang.Exception
Returns the value of the pageOffset OpenSearch parameter contained in this URL element. The pageOffset defines the page number of the first set of search results

Returns:
The value of the pageOffset parameter contained in the URL element
Throws:
java.lang.Exception - If the URL element is not initialized or in case of other error

getIndexOffset

int getIndexOffset()
                   throws java.lang.Exception
Returns the value of the indexOffset OpenSearch parameter contained in this URL element. The indexOffset defines the index number of the first search result

Returns:
The value of the indexOffset parameter contained in the URL element
Throws:
java.lang.Exception - If the URL element is not initialized or in case of other error

getRel

java.lang.String getRel()
                        throws java.lang.Exception
Returns the role of the resource being described in relation to the description document

Returns:
The rel value of the URL element
Throws:
java.lang.Exception - If the URL element is not initialized or in case of other error

isRelSupported

boolean isRelSupported()
                       throws java.lang.Exception
Answers whether the rel value of the URL element can be interpreted by this URL element type

Returns:
true if the rel value is supported, false otherwise
Throws:
java.lang.Exception - If the URL element is not initialized or in case of other error

getQueryBuilder

QueryBuilder getQueryBuilder()
                             throws java.lang.Exception
Constructs and returns a QueryBuilder object that can be used to construct queries based on the template contained in this query element. The exact type of QueryBuilder returned depends on the type of the present URLElement instance

Returns:
A query builder that can be used to construct search queries
Throws:
java.lang.Exception - In case of other error during QueryBuilder construction