org.rometools.feed.module.opensearch.impl
Class OpenSearchModuleImpl

java.lang.Object
  extended by com.sun.syndication.feed.module.ModuleImpl
      extended by org.rometools.feed.module.opensearch.impl.OpenSearchModuleImpl
All Implemented Interfaces:
com.sun.syndication.feed.CopyFrom, com.sun.syndication.feed.module.Module, Serializable, Cloneable, OpenSearchModule, OpenSearchResponse

public class OpenSearchModuleImpl
extends com.sun.syndication.feed.module.ModuleImpl
implements OpenSearchModule, Serializable

Author:
Michael W. Nassif (enrouteinc@gmail.com) OpenSearch Module implementation
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.rometools.feed.module.opensearch.OpenSearchModule
URI
 
Constructor Summary
OpenSearchModuleImpl()
           
 
Method Summary
 void addQuery(OSQuery query)
          Adds a query to the module.
 void copyFrom(com.sun.syndication.feed.CopyFrom obj)
           
 Class getInterface()
           
 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 queries)
          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
 
Methods inherited from class com.sun.syndication.feed.module.ModuleImpl
clone, equals, getUri, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.sun.syndication.feed.module.Module
clone, getUri
 

Constructor Detail

OpenSearchModuleImpl

public OpenSearchModuleImpl()
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:
getItemsPerPage in interface OpenSearchResponse
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:
setItemsPerPage in interface OpenSearchResponse
Parameters:
itemsPerPage - The itemsPerPage to set.

getLink

public com.sun.syndication.feed.atom.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:
getLink in interface OpenSearchResponse
Returns:
Returns the link.

setLink

public void setLink(com.sun.syndication.feed.atom.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:
setLink in interface OpenSearchResponse
Parameters:
link - The link to set.

getQueries

public List getQueries()
Description copied from interface: OpenSearchResponse
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.

setQueries

public void setQueries(List queries)
Description copied from interface: OpenSearchResponse
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

public void addQuery(OSQuery query)
Description copied from interface: OpenSearchResponse
Adds a query to the module.

Specified by:
addQuery in interface OpenSearchResponse
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:
getStartIndex in interface OpenSearchResponse
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:
setStartIndex in interface OpenSearchResponse
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:
getTotalResults in interface OpenSearchResponse
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:
setTotalResults in interface OpenSearchResponse
Parameters:
totalResults - The totalResults to set.

copyFrom

public void copyFrom(com.sun.syndication.feed.CopyFrom obj)
Specified by:
copyFrom in interface com.sun.syndication.feed.CopyFrom

getInterface

public Class getInterface()
Specified by:
getInterface in interface com.sun.syndication.feed.CopyFrom


Copyright © 2013 ROME Project. All Rights Reserved.