Package com.rometools.modules.opensearch
Interface OpenSearchResponse
-
- All Known Subinterfaces:
OpenSearchModule
- All Known Implementing Classes:
OpenSearchModuleImpl
public interface OpenSearchResponseProvides access to A9 Open Search information.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddQuery(OSQuery query)Adds a query to the module.intgetItemsPerPage()# itemsPerPage – the maximum number of items that can appear in one page of resultsLinkgetLink()# 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.List<OSQuery>getQueries()Query– in an OpenSearch Response, can be used both to echo back the original query and to suggest new searches.intgetStartIndex()# startIndex – the index of the first item returned in the resultintgetTotalResults()# 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.voidsetItemsPerPage(int itemsPerPage)# itemsPerPage – the maximum number of items that can appear in one page of resultsvoidsetLink(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.voidsetQueries(List<OSQuery> query)Query– in an OpenSearch Response, can be used both to echo back the original query and to suggest new searches.voidsetStartIndex(int startIndex)# startIndex – the index of the first item returned in the resultvoidsetTotalResults(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.
-
-
-
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(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
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<OSQuery> 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.- Note: New in version 1.1.
- Requirements: May appear zero or more times. Note that the “Q” is capitalized.
- Parameters:
query- List of OSQuery objects.
-
getQueries
List<OSQuery> 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.- Note: New in version 1.1.
- Requirements: May appear zero or more times. Note that the “Q” is capitalized.
- Returns:
- A list of OSQuery objects.
-
addQuery
void addQuery(OSQuery query)
Adds a query to the module.- Parameters:
query- OSQuery object to add.
-
-