diff --git a/src/main/java/org/rometools/feed/module/opensearch/OpenSearchResponse.java b/src/main/java/org/rometools/feed/module/opensearch/OpenSearchResponse.java
index d6d1fce..7a95b05 100644
--- a/src/main/java/org/rometools/feed/module/opensearch/OpenSearchResponse.java
+++ b/src/main/java/org/rometools/feed/module/opensearch/OpenSearchResponse.java
@@ -29,20 +29,24 @@ import com.sun.syndication.feed.atom.Link;
public interface OpenSearchResponse {
/**
- * # totalResults – the maximum number of results available for these search terms
+ * # 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.
+ * * 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.
*
* @param totalResults A positive integer value.
*/
public void setTotalResults(int totalResults);
/**
- * # totalResults – the maximum number of results available for these search terms
+ * # 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.
+ * * 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.
*
* @return a positive integer value.
*/
@@ -51,7 +55,8 @@ public 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.
+ * * Restrictions: An integer greater than or equal to 1. * Note: The first
+ * result is 1. * Default: 1 * Requirements: May appear zero or one time.
*
* @param startIndex int value >= 1.
*/
@@ -60,27 +65,32 @@ public 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.
+ * * Restrictions: An integer greater than or equal to 1. * Note: The first
+ * result is 1. * Default: 1 * Requirements: May appear zero or one time.
*
* @return int value >= 1.
*/
public int getStartIndex();
/**
- * # itemsPerPage – the maximum number of items that can appear in one page of results.
+ * # 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.
+ * * 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.
*
* @param itemsPerPage int value >= 1.
*/
public void setItemsPerPage(int itemsPerPage);
/**
- * # itemsPerPage – the maximum number of items that can appear in one page of results.
+ * # 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.
+ * * 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.
*
* @return int value >= 1
*/
@@ -89,8 +99,10 @@ public 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.
+ * * 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.
*
* @param link link to the open search spec.
*/
@@ -99,8 +111,10 @@ public 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.
+ * * 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.
*
* @return link to the opensearch spec.
*/
@@ -108,26 +122,30 @@ public interface OpenSearchResponse {
// list of OSResponseQuery interfaces
/**
- * Query
– in an OpenSearch Response, can be used both to echo back the original query and to suggest new searches. Please see the 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.
*
Query
– in an OpenSearch Response, can be used both to echo back the original query and to suggest new searches. Please see the 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.
* * * @return a clone of the object. - * @throws CloneNotSupportedException thrown if an element of the object cannot be cloned. + * @throws CloneNotSupportedException thrown if an element of the object + * cannot be cloned. * */ @Override @@ -56,7 +59,8 @@ public class OSQuery implements Cloneable, Serializable { } /** - * Indicates whether some other object is "equal to" this one as defined by the Object equals() method. + * Indicates whether some other object is "equal to" this one as defined by + * the Object equals() method. *
*
* @param other he reference object with which to compare.
diff --git a/src/main/java/org/rometools/feed/module/opensearch/impl/OpenSearchModuleGenerator.java b/src/main/java/org/rometools/feed/module/opensearch/impl/OpenSearchModuleGenerator.java
index b1742b5..110c4be 100644
--- a/src/main/java/org/rometools/feed/module/opensearch/impl/OpenSearchModuleGenerator.java
+++ b/src/main/java/org/rometools/feed/module/opensearch/impl/OpenSearchModuleGenerator.java
@@ -17,7 +17,6 @@ package org.rometools.feed.module.opensearch.impl;
import java.util.Collections;
import java.util.HashSet;
-import java.util.Iterator;
import java.util.List;
import java.util.Set;
@@ -33,37 +32,44 @@ import com.sun.syndication.feed.module.Module;
import com.sun.syndication.io.ModuleGenerator;
/**
- * @author Michael W. Nassif (enrouteinc@gmail.com) OpenSearch implementation of ModuleGenerator
+ * @author Michael W. Nassif (enrouteinc@gmail.com) OpenSearch implementation of
+ * ModuleGenerator
*/
public class OpenSearchModuleGenerator implements ModuleGenerator {
private static final Namespace OS_NS = Namespace.getNamespace("opensearch", OpenSearchModule.URI);
+ @Override
public String getNamespaceUri() {
return OpenSearchModule.URI;
}
- private static final Set NAMESPACES;
+ private static final Set