Class OpenSearchModuleImpl
- java.lang.Object
-
- com.rometools.rome.feed.module.ModuleImpl
-
- com.rometools.modules.opensearch.impl.OpenSearchModuleImpl
-
- All Implemented Interfaces:
OpenSearchModule,OpenSearchResponse,CopyFrom,Module,Serializable,Cloneable
public class OpenSearchModuleImpl extends ModuleImpl implements OpenSearchModule, Serializable
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface com.rometools.modules.opensearch.OpenSearchModule
URI
-
-
Constructor Summary
Constructors Constructor Description OpenSearchModuleImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddQuery(OSQuery query)Adds a query to the module.voidcopyFrom(CopyFrom obj)Class<OpenSearchModule>getInterface()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> queries)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.-
Methods inherited from class com.rometools.rome.feed.module.ModuleImpl
clone, equals, getUri, hashCode, toString
-
-
-
-
Method Detail
-
getItemsPerPage
public int getItemsPerPage()
Description copied from interface:OpenSearchResponse# 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.- Specified by:
getItemsPerPagein interfaceOpenSearchResponse- Returns:
- Returns the itemsPerPage.
-
setItemsPerPage
public void setItemsPerPage(int itemsPerPage)
Description copied from interface:OpenSearchResponse# 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.- Specified by:
setItemsPerPagein interfaceOpenSearchResponse- Parameters:
itemsPerPage- The itemsPerPage to set.
-
getLink
public Link getLink()
Description copied from interface:OpenSearchResponse# 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.- Specified by:
getLinkin interfaceOpenSearchResponse- Returns:
- Returns the link.
-
setLink
public void setLink(Link link)
Description copied from interface:OpenSearchResponse# 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.- Specified by:
setLinkin interfaceOpenSearchResponse- Parameters:
link- The link to set.
-
getQueries
public List<OSQuery> getQueries()
Description copied from interface:OpenSearchResponseQuery– 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.
- Specified by:
getQueriesin interfaceOpenSearchResponse- Returns:
- Returns the queries.
-
setQueries
public void setQueries(List<OSQuery> queries)
Description copied from interface:OpenSearchResponseQuery– 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.
- Specified by:
setQueriesin interfaceOpenSearchResponse- Parameters:
queries- The queries to set.
-
addQuery
public void addQuery(OSQuery query)
Description copied from interface:OpenSearchResponseAdds a query to the module.- Specified by:
addQueryin interfaceOpenSearchResponse- Parameters:
query- OSQuery object to add.
-
getStartIndex
public int getStartIndex()
Description copied from interface:OpenSearchResponse# 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.- Specified by:
getStartIndexin interfaceOpenSearchResponse- Returns:
- Returns the startIndex.
-
setStartIndex
public void setStartIndex(int startIndex)
Description copied from interface:OpenSearchResponse# 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.- Specified by:
setStartIndexin interfaceOpenSearchResponse- Parameters:
startIndex- The startIndex to set.
-
getTotalResults
public int getTotalResults()
Description copied from interface:OpenSearchResponse# 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.- Specified by:
getTotalResultsin interfaceOpenSearchResponse- Returns:
- Returns the totalResults.
-
setTotalResults
public void setTotalResults(int totalResults)
Description copied from interface:OpenSearchResponse# 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.- Specified by:
setTotalResultsin interfaceOpenSearchResponse- Parameters:
totalResults- The totalResults to set.
-
getInterface
public Class<OpenSearchModule> getInterface()
- Specified by:
getInterfacein interfaceCopyFrom
-
-