org.rometools.feed.module.opensearch
Interface OpenSearchResponse

All Known Subinterfaces:
OpenSearchModule
All Known Implementing Classes:
OpenSearchModuleImpl

public interface OpenSearchResponse

Provides access to A9 Open Search information.

Author:
Michael W. Nassif (enrouteinc@gmail.com)

Method Summary
 void addQuery(OSQuery query)
          Adds a query to the module.
 int getItemsPerPage()
          # itemsPerPage – the maximum number of items that can appear in one page of results
 com.sun.syndication.feed.atom.Link getLink()
          # link – a reference back to the OpenSearch Description file * Attributes: This is a clone of the link element in Atom, including href, hreflang, rel, and type attributes
 List getQueries()
          Query – in an OpenSearch Response, can be used both to echo back the original query and to suggest new searches.
 int getStartIndex()
          # startIndex – the index of the first item returned in the result
 int getTotalResults()
          # totalResults – the maximum number of results available for these search terms * Restrictions: An integer greater than or equal to 0
 void setItemsPerPage(int itemsPerPage)
          # itemsPerPage – the maximum number of items that can appear in one page of results
 void setLink(com.sun.syndication.feed.atom.Link link)
          # link – a reference back to the OpenSearch Description file * Attributes: This is a clone of the link element in Atom, including href, hreflang, rel, and type attributes
 void setQueries(List query)
          Query – in an OpenSearch Response, can be used both to echo back the original query and to suggest new searches.
 void setStartIndex(int startIndex)
          # startIndex – the index of the first item returned in the result
 void setTotalResults(int totalResults)
          # totalResults – the maximum number of results available for these search terms * Restrictions: An integer greater than or equal to 0
 

Method Detail

setTotalResults

void setTotalResults(int totalResults)
# totalResults – the maximum number of results available for these search terms * Restrictions: An integer greater than or equal to 0. * Default: The number of items that were returned in this set of results. * Requirements: May appear zero or one time.

Parameters:
totalResults - A positive integer value.

getTotalResults

int getTotalResults()
# totalResults – the maximum number of results available for these search terms * Restrictions: An integer greater than or equal to 0. * Default: The number of items that were returned in this set of results. * Requirements: May appear zero or one time.

Returns:
a positive integer value.

setStartIndex

void setStartIndex(int startIndex)
# startIndex – the index of the first item returned in the result. * Restrictions: An integer greater than or equal to 1. * Note: The first result is 1. * Default: 1 * Requirements: May appear zero or one time.

Parameters:
startIndex - int value >= 1.

getStartIndex

int getStartIndex()
# startIndex – the index of the first item returned in the result. * Restrictions: An integer greater than or equal to 1. * Note: The first result is 1. * Default: 1 * Requirements: May appear zero or one time.

Returns:
int value >= 1.

setItemsPerPage

void setItemsPerPage(int itemsPerPage)
# itemsPerPage – the maximum number of items that can appear in one page of results. * Restrictions: An integer greater than or equal to 1. * Default: The number of items that were returned in this set of results. * Requirements: May appear zero or one time.

Parameters:
itemsPerPage - int value >= 1.

getItemsPerPage

int getItemsPerPage()
# itemsPerPage – the maximum number of items that can appear in one page of results. * Restrictions: An integer greater than or equal to 1. * Default: The number of items that were returned in this set of results. * Requirements: May appear zero or one time.

Returns:
int value >= 1

setLink

void setLink(com.sun.syndication.feed.atom.Link link)
# link – a reference back to the OpenSearch Description file * Attributes: This is a clone of the link element in Atom, including href, hreflang, rel, and type attributes. * Restrictions: The rel attribute must equal search. * Note: New in version 1.1. * Requirements: May appear zero or one time.

Parameters:
link - link to the open search spec.

getLink

com.sun.syndication.feed.atom.Link getLink()
# link – a reference back to the OpenSearch Description file * Attributes: This is a clone of the link element in Atom, including href, hreflang, rel, and type attributes. * Restrictions: The rel attribute must equal search. * Note: New in version 1.1. * Requirements: May appear zero or one time.

Returns:
link to the opensearch spec.

setQueries

void setQueries(List query)
Query – in an OpenSearch Response, can be used both to echo back the original query and to suggest new searches. Please see the OpenSearch Query specification for more information.

getQueries

List getQueries()
Query – in an OpenSearch Response, can be used both to echo back the original query and to suggest new searches. Please see the OpenSearch Query specification for more information.

addQuery

void addQuery(OSQuery query)
Adds a query to the module.

Parameters:
query - OSQuery object to add.


Copyright © 2013 ROME Project. All Rights Reserved.