From 8ded48b4694233f917ef4640fd0ea8362571e34f Mon Sep 17 00:00:00 2001 From: Patrick Gotthard Date: Sun, 17 Nov 2013 16:03:41 +0100 Subject: [PATCH] Refactored some code --- .../com/sun/syndication/feed/CopyFrom.java | 9 +- .../com/sun/syndication/feed/WireFeed.java | 37 +-- .../sun/syndication/feed/atom/Category.java | 7 +- .../sun/syndication/feed/atom/Content.java | 7 +- .../com/sun/syndication/feed/atom/Entry.java | 55 ++-- .../com/sun/syndication/feed/atom/Feed.java | 46 ++- .../sun/syndication/feed/atom/Generator.java | 7 +- .../com/sun/syndication/feed/atom/Link.java | 7 +- .../com/sun/syndication/feed/atom/Person.java | 14 +- .../feed/impl/BeanIntrospector.java | 29 +- .../syndication/feed/impl/CloneableBean.java | 16 +- .../feed/impl/ConfigurableClassLoader.java | 10 +- .../sun/syndication/feed/impl/EqualsBean.java | 18 +- .../sun/syndication/feed/impl/ObjectBean.java | 21 +- .../syndication/feed/impl/ToStringBean.java | 4 +- .../sun/syndication/feed/module/DCModule.java | 254 +++++++-------- .../syndication/feed/module/DCModuleImpl.java | 266 ++++++++-------- .../syndication/feed/module/DCSubject.java | 9 +- .../feed/module/DCSubjectImpl.java | 13 +- .../syndication/feed/module/Extendable.java | 7 +- .../sun/syndication/feed/module/Module.java | 7 +- .../syndication/feed/module/ModuleImpl.java | 11 +- .../sun/syndication/feed/module/SyModule.java | 16 +- .../syndication/feed/module/SyModuleImpl.java | 13 +- .../sun/syndication/feed/rss/Category.java | 7 +- .../com/sun/syndication/feed/rss/Channel.java | 48 ++- .../com/sun/syndication/feed/rss/Cloud.java | 10 +- .../com/sun/syndication/feed/rss/Content.java | 7 +- .../sun/syndication/feed/rss/Description.java | 7 +- .../sun/syndication/feed/rss/Enclosure.java | 7 +- .../com/sun/syndication/feed/rss/Guid.java | 7 +- .../com/sun/syndication/feed/rss/Image.java | 7 +- .../com/sun/syndication/feed/rss/Item.java | 35 +-- .../com/sun/syndication/feed/rss/Source.java | 7 +- .../sun/syndication/feed/rss/TextInput.java | 10 +- .../sun/syndication/feed/synd/Converter.java | 17 +- .../syndication/feed/synd/SyndCategory.java | 3 +- .../feed/synd/SyndCategoryImpl.java | 44 ++- .../syndication/feed/synd/SyndContent.java | 9 +- .../feed/synd/SyndContentImpl.java | 13 +- .../feed/synd/SyndEnclosureImpl.java | 7 +- .../sun/syndication/feed/synd/SyndEntry.java | 101 +++--- .../syndication/feed/synd/SyndEntryImpl.java | 94 +++--- .../sun/syndication/feed/synd/SyndFeed.java | 211 ++++++------- .../syndication/feed/synd/SyndFeedImpl.java | 221 ++++++------- .../sun/syndication/feed/synd/SyndImage.java | 3 +- .../syndication/feed/synd/SyndImageImpl.java | 7 +- .../sun/syndication/feed/synd/SyndLink.java | 7 +- .../syndication/feed/synd/SyndLinkImpl.java | 7 +- .../sun/syndication/feed/synd/SyndPerson.java | 6 +- .../syndication/feed/synd/SyndPersonImpl.java | 18 +- .../synd/impl/ConverterForRSS091Userland.java | 2 +- .../feed/synd/impl/ConverterForRSS094.java | 4 +- .../feed/synd/impl/Converters.java | 4 +- .../feed/synd/impl/URINormalizer.java | 4 +- .../io/DelegatingModuleGenerator.java | 10 +- .../io/DelegatingModuleParser.java | 9 +- .../com/sun/syndication/io/FeedException.java | 4 +- .../sun/syndication/io/ModuleGenerator.java | 11 +- .../com/sun/syndication/io/ModuleParser.java | 6 +- .../syndication/io/ParsingFeedException.java | 12 +- .../com/sun/syndication/io/SAXBuilder.java | 5 +- .../com/sun/syndication/io/SyndFeedInput.java | 56 ++-- .../sun/syndication/io/SyndFeedOutput.java | 136 ++++---- .../sun/syndication/io/WireFeedGenerator.java | 4 +- .../com/sun/syndication/io/WireFeedInput.java | 25 +- .../sun/syndication/io/WireFeedOutput.java | 87 ++++-- .../sun/syndication/io/WireFeedParser.java | 18 +- .../com/sun/syndication/io/XmlReader.java | 295 ++++++++---------- .../syndication/io/XmlReaderException.java | 37 +-- .../sun/syndication/io/impl/Atom10Parser.java | 15 +- .../com/sun/syndication/io/impl/Base64.java | 11 +- .../io/impl/BaseWireFeedGenerator.java | 16 +- .../io/impl/DCModuleGenerator.java | 8 +- .../sun/syndication/io/impl/DateParser.java | 59 ++-- .../syndication/io/impl/FeedGenerators.java | 8 +- .../sun/syndication/io/impl/FeedParsers.java | 12 +- .../sun/syndication/io/impl/NumberParser.java | 34 +- .../syndication/io/impl/PluginManager.java | 10 +- .../syndication/io/impl/PropertiesLoader.java | 24 +- .../syndication/io/impl/RSS090Generator.java | 4 +- .../sun/syndication/io/impl/RSS090Parser.java | 62 ++-- .../io/impl/RSS091UserlandParser.java | 19 +- .../sun/syndication/io/impl/RSS092Parser.java | 6 +- .../sun/syndication/io/impl/RSS10Parser.java | 19 +- .../syndication/io/impl/RSS20wNSParser.java | 16 +- .../io/impl/SyModuleGenerator.java | 11 +- .../syndication/unittest/SyndFeedTest.java | 101 +++--- .../syndication/unittest/TestDublinCore.java | 2 +- .../TestSyndFeedAtom03DCSyModules.java | 9 - .../TestSyndFeedRSS10DCSyModules.java | 9 - .../unittest/TestSyndFeedRSS20.java | 3 +- .../unittest/issues/Issue131Test.java | 3 +- .../unittest/issues/Issue134Test.java | 3 +- .../unittest/issues/Issue137Test.java | 39 +-- .../unittest/issues/Issue158Test.java | 3 +- .../unittest/issues/Issue161Test.java | 3 +- .../unittest/issues/Issue162Test.java | 9 +- .../unittest/issues/Issue88Test.java | 5 +- 99 files changed, 1357 insertions(+), 1698 deletions(-) diff --git a/src/main/java/com/sun/syndication/feed/CopyFrom.java b/src/main/java/com/sun/syndication/feed/CopyFrom.java index db126de..177424f 100644 --- a/src/main/java/com/sun/syndication/feed/CopyFrom.java +++ b/src/main/java/com/sun/syndication/feed/CopyFrom.java @@ -25,8 +25,8 @@ public interface CopyFrom { /** * Returns the interface the copyFrom works on. *

- * This is useful when dealing with properties that may have multiple - * implementations. For example, Module. + * This is useful when dealing with properties that may have multiple implementations. For + * example, Module. *

* * @return the interface the copyFrom works on. @@ -38,9 +38,8 @@ public interface CopyFrom { *

* Any existing properties in this bean are lost. *

- * This method is useful for moving from one implementation of a bean - * interface to another. For example from the default SyndFeed bean - * implementation to a Hibernate ready implementation. + * This method is useful for moving from one implementation of a bean interface to another. For + * example from the default SyndFeed bean implementation to a Hibernate ready implementation. *

* * @param obj the instance to copy properties from. diff --git a/src/main/java/com/sun/syndication/feed/WireFeed.java b/src/main/java/com/sun/syndication/feed/WireFeed.java index 01f4fc5..e2f719a 100644 --- a/src/main/java/com/sun/syndication/feed/WireFeed.java +++ b/src/main/java/com/sun/syndication/feed/WireFeed.java @@ -31,12 +31,12 @@ import com.sun.syndication.feed.module.impl.ModuleUtils; /** * Parent class of the RSS (Channel) and Atom (Feed) feed beans. *

- * NOTE: We don't like this class at this package level but the alternative - * would have been a proliferation of packages (one more level to hold atom and - * rss package with this class just in that package). + * NOTE: We don't like this class at this package level but the alternative would have been a + * proliferation of packages (one more level to hold atom and rss package with this class just in + * that package). *

- * The format of the 'type' property must be [FEEDNAME]_[FEEDVERSION] with the - * FEEDNAME in lower case, for example: rss_0.9, rss_0.93, atom_0.3 + * The format of the 'type' property must be [FEEDNAME]_[FEEDVERSION] with the FEEDNAME in lower + * case, for example: rss_0.9, rss_0.93, atom_0.3 *

* * @author Alejandro Abdelnur @@ -77,8 +77,7 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable { *

* * @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 @@ -87,8 +86,8 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable { } /** - * 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. @@ -139,8 +138,7 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable { } /** - * Sets the feedType of a the feed. Do not use, for bean cloning - * purposes only. + * Sets the feedType of a the feed. Do not use, for bean cloning purposes only. *

* * @param feedType the feedType of the feed. @@ -162,8 +160,8 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable { /** * Returns the charset encoding of a the feed. *

- * This property is not set by feed parsers. But it is used by feed - * generators to set the encoding in the XML prolog. + * This property is not set by feed parsers. But it is used by feed generators to set the + * encoding in the XML prolog. *

* * @return the charset encoding of the feed. @@ -176,8 +174,8 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable { /** * Sets the charset encoding of a the feed. *

- * This property is not set by feed parsers. But it is used by feed - * generators to set the encoding in the XML prolog. + * This property is not set by feed parsers. But it is used by feed generators to set the + * encoding in the XML prolog. *

* * @param encoding the charset encoding of the feed. @@ -191,8 +189,7 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable { * Returns the channel modules. *

* - * @return a list of ModuleImpl elements with the channel modules, an empty - * list if none. + * @return a list of ModuleImpl elements with the channel modules, an empty list if none. * */ @Override @@ -207,8 +204,8 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable { * Sets the channel modules. *

* - * @param modules the list of ModuleImpl elements with the channel modules - * to set, an empty list or null if none. + * @param modules the list of ModuleImpl elements with the channel modules to set, an empty list + * or null if none. * */ @Override @@ -269,7 +266,7 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable { * @since 2.0.0 * @param styleSheet URL or {@code null} */ - public void setStyleSheet(String styleSheet) { + public void setStyleSheet(final String styleSheet) { this.styleSheet = styleSheet; } } diff --git a/src/main/java/com/sun/syndication/feed/atom/Category.java b/src/main/java/com/sun/syndication/feed/atom/Category.java index 6c230a7..60eb936 100644 --- a/src/main/java/com/sun/syndication/feed/atom/Category.java +++ b/src/main/java/com/sun/syndication/feed/atom/Category.java @@ -50,8 +50,7 @@ public class Category implements Cloneable, Serializable { *

* * @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 @@ -60,8 +59,8 @@ public class Category 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/com/sun/syndication/feed/atom/Content.java b/src/main/java/com/sun/syndication/feed/atom/Content.java index 03dd259..3662fc8 100644 --- a/src/main/java/com/sun/syndication/feed/atom/Content.java +++ b/src/main/java/com/sun/syndication/feed/atom/Content.java @@ -78,8 +78,7 @@ public class Content implements Cloneable, Serializable { *

* * @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 @@ -88,8 +87,8 @@ public class Content 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/com/sun/syndication/feed/atom/Entry.java b/src/main/java/com/sun/syndication/feed/atom/Entry.java index 378f362..e3dc30f 100644 --- a/src/main/java/com/sun/syndication/feed/atom/Entry.java +++ b/src/main/java/com/sun/syndication/feed/atom/Entry.java @@ -70,8 +70,8 @@ public class Entry implements Cloneable, Serializable, Extendable { * Sets the entry alternate links. *

* - * @param alternateLinks the list of Link elements with the entry alternate - * links to set, an empty list or null if none. + * @param alternateLinks the list of Link elements with the entry alternate links to set, an + * empty list or null if none. */ public void setAlternateLinks(final List alternateLinks) { this.alternateLinks = alternateLinks; @@ -81,8 +81,7 @@ public class Entry implements Cloneable, Serializable, Extendable { * Returns the entry alternate links. *

* - * @return a list of Link elements with the entry alternate links, an empty - * list if none. + * @return a list of Link elements with the entry alternate links, an empty list if none. */ public List getAlternateLinks() { if (alternateLinks == null) { @@ -145,8 +144,8 @@ public class Entry implements Cloneable, Serializable, Extendable { * Sets the entry contents. *

* - * @param contents the list of Content elements with the entry contents to - * set, an empty list or null if none. + * @param contents the list of Content elements with the entry contents to set, an empty list or + * null if none. */ public void setContents(final List contents) { this.contents = contents; @@ -156,8 +155,7 @@ public class Entry implements Cloneable, Serializable, Extendable { * Returns the entry contents. *

* - * @return a list of Content elements with the entry contents, an empty list - * if none. + * @return a list of Content elements with the entry contents, an empty list if none. */ public List getContents() { if (contents == null) { @@ -170,8 +168,8 @@ public class Entry implements Cloneable, Serializable, Extendable { * Sets the entry contributors. *

* - * @param contributors the list of Person elements with the entry - * contributors to set, an empty list or null if none. + * @param contributors the list of Person elements with the entry contributors to set, an empty + * list or null if none. * */ public void setContributors(final List contributors) { @@ -182,8 +180,7 @@ public class Entry implements Cloneable, Serializable, Extendable { * Returns the entry contributors. *

* - * @return a list of Person elements with the entry contributors, an empty - * list if none. + * @return a list of Person elements with the entry contributors, an empty list if none. * */ public List getContributors() { @@ -265,8 +262,7 @@ public class Entry implements Cloneable, Serializable, Extendable { } /** - * Sets the entry issued date (Atom 0.3, maps to - * {@link #setPublished(java.util.Date)}). + * Sets the entry issued date (Atom 0.3, maps to {@link #setPublished(java.util.Date)}). *

* * @param issued the entry issued date, null if none. @@ -280,8 +276,7 @@ public class Entry implements Cloneable, Serializable, Extendable { } /** - * Returns the entry issued date (Atom 0.3, maps to {@link #getPublished()} - * ). + * Returns the entry issued date (Atom 0.3, maps to {@link #getPublished()} ). *

* * @return the entry issued date, null if none. @@ -315,8 +310,7 @@ public class Entry implements Cloneable, Serializable, Extendable { } /** - * Sets the entry modified date (Atom 0.3, maps to - * {@link #setUpdated(java.util.Date)}). + * Sets the entry modified date (Atom 0.3, maps to {@link #setUpdated(java.util.Date)}). *

* * @param modified the entry modified date, null if none. @@ -330,8 +324,7 @@ public class Entry implements Cloneable, Serializable, Extendable { } /** - * Returns the entry modified date (Atom 0.3, maps to {@link #getUpdated()} - * ). + * Returns the entry modified date (Atom 0.3, maps to {@link #getUpdated()} ). *

* * @return the entry modified date, null if none. @@ -360,8 +353,8 @@ public class Entry implements Cloneable, Serializable, Extendable { * Sets the entry modules. *

* - * @param modules the list of ModuleImpl elements with the entry modules to - * set, an empty list or null if none. + * @param modules the list of ModuleImpl elements with the entry modules to set, an empty list + * or null if none. * */ @Override @@ -373,8 +366,7 @@ public class Entry implements Cloneable, Serializable, Extendable { * Returns the entry modules. *

* - * @return a list of ModuleImpl elements with the entry modules, an emtpy - * list if none. + * @return a list of ModuleImpl elements with the entry modules, an emtpy list if none. * */ @Override @@ -389,8 +381,8 @@ public class Entry implements Cloneable, Serializable, Extendable { * Sets the entry non-alternate links. *

* - * @param otherLinks the list Link elements with the entry non-alternate - * links to set, an empty list or null if none. + * @param otherLinks the list Link elements with the entry non-alternate links to set, an empty + * list or null if none. */ public void setOtherLinks(final List otherLinks) { this.otherLinks = otherLinks; @@ -400,8 +392,8 @@ public class Entry implements Cloneable, Serializable, Extendable { * Returns the entry non-alternate links. *

* - * @return the list of Link elements with the entry non-alternate links to - * set, an empty list if none. + * @return the list of Link elements with the entry non-alternate links to set, an empty list if + * none. */ public List getOtherLinks() { if (otherLinks == null) { @@ -613,8 +605,7 @@ public class Entry implements Cloneable, Serializable, Extendable { *

* * @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 @@ -623,8 +614,8 @@ public class Entry implements Cloneable, Serializable, Extendable { } /** - * 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/com/sun/syndication/feed/atom/Feed.java b/src/main/java/com/sun/syndication/feed/atom/Feed.java index ccb8792..cac4b2c 100644 --- a/src/main/java/com/sun/syndication/feed/atom/Feed.java +++ b/src/main/java/com/sun/syndication/feed/atom/Feed.java @@ -65,8 +65,7 @@ public class Feed extends WireFeed { } /** - * Feed Constructor. All properties, except the type, are set to - * null. + * Feed Constructor. All properties, except the type, are set to null. *

* * @param type the type of the Atom feed. @@ -152,8 +151,7 @@ public class Feed extends WireFeed { * Returns the feed alternate links. *

* - * @return a list of Link elements with the feed alternate links, an empty - * list if none. + * @return a list of Link elements with the feed alternate links, an empty list if none. */ public List getAlternateLinks() { if (alternateLinks == null) { @@ -166,8 +164,8 @@ public class Feed extends WireFeed { * Sets the feed alternate links. *

* - * @param alternateLinks the list of Link elements with the feed alternate - * links to set, an empty list or null if none. + * @param alternateLinks the list of Link elements with the feed alternate links to set, an + * empty list or null if none. */ public void setAlternateLinks(final List alternateLinks) { this.alternateLinks = alternateLinks; @@ -177,8 +175,8 @@ public class Feed extends WireFeed { * Returns the feed other links (non-alternate ones). *

* - * @return a list of Link elements with the feed other links (non-alternate - * ones), an empty list if none. + * @return a list of Link elements with the feed other links (non-alternate ones), an empty list + * if none. */ public List getOtherLinks() { if (otherLinks == null) { @@ -191,9 +189,8 @@ public class Feed extends WireFeed { * Sets the feed other links (non-alternate ones). *

* - * @param otherLinks the list of Link elements with the feed other links - * (non-alternate ones) to set, an empty list or null if - * none. + * @param otherLinks the list of Link elements with the feed other links (non-alternate ones) to + * set, an empty list or null if none. */ public void setOtherLinks(final List otherLinks) { this.otherLinks = otherLinks; @@ -228,8 +225,7 @@ public class Feed extends WireFeed { * Returns the feed contributors. *

* - * @return a list of Person elements with the feed contributors, an empty - * list if none. + * @return a list of Person elements with the feed contributors, an empty list if none. * */ public List getContributors() { @@ -243,8 +239,8 @@ public class Feed extends WireFeed { * Sets the feed contributors. *

* - * @param contributors the list of Person elements with the feed - * contributors to set, an empty list or null if none. + * @param contributors the list of Person elements with the feed contributors to set, an empty + * list or null if none. * */ public void setContributors(final List contributors) { @@ -327,8 +323,7 @@ public class Feed extends WireFeed { } /** - * Sets the feed copyright (Atom 0.3, maps to - * {@link #setRights(java.lang.String)}). + * Sets the feed copyright (Atom 0.3, maps to {@link #setRights(java.lang.String)}). *

* * @param copyright the feed copyright to set, null if none. @@ -368,8 +363,7 @@ public class Feed extends WireFeed { } /** - * Sets the feed modified date (Atom 0.3, maps to - * {@link #setUpdated(java.util.Date)}). + * Sets the feed modified date (Atom 0.3, maps to {@link #setUpdated(java.util.Date)}). *

* * @param modified the feed modified date to set, null if none. @@ -382,8 +376,7 @@ public class Feed extends WireFeed { * Returns the feed entries. *

* - * @return a list of Entry elements with the feed entries, an empty list if - * none. + * @return a list of Entry elements with the feed entries, an empty list if none. * */ public List getEntries() { @@ -397,8 +390,8 @@ public class Feed extends WireFeed { * Sets the feed entries. *

* - * @param entries the list of Entry elements with the feed entries to set, - * an empty list or null if none. + * @param entries the list of Entry elements with the feed entries to set, an empty list or + * null if none. * */ public void setEntries(final List entries) { @@ -409,8 +402,7 @@ public class Feed extends WireFeed { * Returns the feed modules. *

* - * @return a list of ModuleImpl elements with the feed modules, an empty - * list if none. + * @return a list of ModuleImpl elements with the feed modules, an empty list if none. * */ @Override @@ -425,8 +417,8 @@ public class Feed extends WireFeed { * Sets the feed moduless. *

* - * @param modules the list of ModuleImpl elements with the feed moduless to - * set, an empty list or null if none. + * @param modules the list of ModuleImpl elements with the feed moduless to set, an empty list + * or null if none. * */ @Override diff --git a/src/main/java/com/sun/syndication/feed/atom/Generator.java b/src/main/java/com/sun/syndication/feed/atom/Generator.java index 928709f..e83ad01 100644 --- a/src/main/java/com/sun/syndication/feed/atom/Generator.java +++ b/src/main/java/com/sun/syndication/feed/atom/Generator.java @@ -48,8 +48,7 @@ public class Generator implements Cloneable, Serializable { *

* * @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 @@ -58,8 +57,8 @@ public class Generator 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/com/sun/syndication/feed/atom/Link.java b/src/main/java/com/sun/syndication/feed/atom/Link.java index 7ad5e67..6afd330 100644 --- a/src/main/java/com/sun/syndication/feed/atom/Link.java +++ b/src/main/java/com/sun/syndication/feed/atom/Link.java @@ -54,8 +54,7 @@ public class Link implements Cloneable, Serializable { *

* * @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 @@ -64,8 +63,8 @@ public class Link 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/com/sun/syndication/feed/atom/Person.java b/src/main/java/com/sun/syndication/feed/atom/Person.java index 4d01986..1968747 100644 --- a/src/main/java/com/sun/syndication/feed/atom/Person.java +++ b/src/main/java/com/sun/syndication/feed/atom/Person.java @@ -59,8 +59,7 @@ public class Person implements SyndPerson, Cloneable, Serializable, Extendable { *

* * @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 @@ -69,8 +68,8 @@ public class Person implements SyndPerson, Cloneable, Serializable, Extendable { } /** - * 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. @@ -216,8 +215,7 @@ public class Person implements SyndPerson, Cloneable, Serializable, Extendable { * Returns the entry modules. *

* - * @return a list of ModuleImpl elements with the entry modules, an emtpy - * list if none. + * @return a list of ModuleImpl elements with the entry modules, an emtpy list if none. * */ @Override @@ -232,8 +230,8 @@ public class Person implements SyndPerson, Cloneable, Serializable, Extendable { * Sets the entry modules. *

* - * @param modules the list of ModuleImpl elements with the entry modules to - * set, an empty list or null if none. + * @param modules the list of ModuleImpl elements with the entry modules to set, an empty list + * or null if none. * */ @Override diff --git a/src/main/java/com/sun/syndication/feed/impl/BeanIntrospector.java b/src/main/java/com/sun/syndication/feed/impl/BeanIntrospector.java index 3279e49..b6e54ec 100644 --- a/src/main/java/com/sun/syndication/feed/impl/BeanIntrospector.java +++ b/src/main/java/com/sun/syndication/feed/impl/BeanIntrospector.java @@ -45,11 +45,14 @@ public class BeanIntrospector { private static final String BOOLEAN_GETTER = "is"; /** - * Extract all {@link PropertyDescriptor}s for properties with getters and setters for the given class. + * Extract all {@link PropertyDescriptor}s for properties with getters and setters for the given + * class. * * @param clazz The class to extract the desired {@link PropertyDescriptor}s from - * @return All {@link PropertyDescriptor} for properties with getters and setters for the given class. - * @throws IntrospectionException When the extraction of the desired {@link PropertyDescriptor}s failed + * @return All {@link PropertyDescriptor} for properties with getters and setters for the given + * class. + * @throws IntrospectionException When the extraction of the desired {@link PropertyDescriptor}s + * failed */ private static synchronized PropertyDescriptor[] getPropertyDescriptors(final Class clazz) throws IntrospectionException { PropertyDescriptor[] descriptors = introspected.get(clazz); @@ -61,11 +64,14 @@ public class BeanIntrospector { } /** - * Extract all {@link PropertyDescriptor}s for properties with a getter that does not come from {@link Object} and does not accept parameters. + * Extract all {@link PropertyDescriptor}s for properties with a getter that does not come from + * {@link Object} and does not accept parameters. * * @param clazz The class to extract the desired {@link PropertyDescriptor}s from - * @return All {@link PropertyDescriptor}s for properties with a getter that does not come from {@link Object} and does not accept parameters. - * @throws IntrospectionException When the extraction of the desired {@link PropertyDescriptor}s failed + * @return All {@link PropertyDescriptor}s for properties with a getter that does not come from + * {@link Object} and does not accept parameters. + * @throws IntrospectionException When the extraction of the desired {@link PropertyDescriptor}s + * failed */ public static List getPropertyDescriptorsWithGetters(final Class clazz) throws IntrospectionException { @@ -97,13 +103,14 @@ public class BeanIntrospector { } /** - * Extract all {@link PropertyDescriptor}s for properties with a getter (that does not come from {@link Object} and does not accept parameters) and a - * setter. + * Extract all {@link PropertyDescriptor}s for properties with a getter (that does not come from + * {@link Object} and does not accept parameters) and a setter. * * @param clazz The class to extract the desired {@link PropertyDescriptor}s from - * @return All {@link PropertyDescriptor}s for properties with a getter (that does not come from {@link Object} and does not accept parameters) and a - * setter. - * @throws IntrospectionException When the extraction of the desired {@link PropertyDescriptor}s failed + * @return All {@link PropertyDescriptor}s for properties with a getter (that does not come from + * {@link Object} and does not accept parameters) and a setter. + * @throws IntrospectionException When the extraction of the desired {@link PropertyDescriptor}s + * failed */ public static List getPropertyDescriptorsWithGettersAndSetters(final Class clazz) throws IntrospectionException { diff --git a/src/main/java/com/sun/syndication/feed/impl/CloneableBean.java b/src/main/java/com/sun/syndication/feed/impl/CloneableBean.java index 9ac59ba..7c247c1 100644 --- a/src/main/java/com/sun/syndication/feed/impl/CloneableBean.java +++ b/src/main/java/com/sun/syndication/feed/impl/CloneableBean.java @@ -36,8 +36,8 @@ import org.slf4j.LoggerFactory; /** * Provides deep Bean clonning support. *

- * It works on all read/write properties, recursively. It support all primitive types, Strings, Collections, Cloneable objects and multi-dimensional arrays of - * any of them. + * It works on all read/write properties, recursively. It support all primitive types, Strings, + * Collections, Cloneable objects and multi-dimensional arrays of any of them. *

* * @author Alejandro Abdelnur @@ -109,9 +109,11 @@ public class CloneableBean implements Serializable, Cloneable { /** * Creates a CloneableBean to be used in a delegation pattern. *

- * The property names in the ignoreProperties Set will not be copied into the cloned instance. This is useful for cases where the Bean has convenience - * properties (properties that are actually references to other properties or properties of properties). For example SyndFeed and SyndEntry beans have - * convenience properties, publishedDate, author, copyright and categories all of them mapped to properties in the DC Module. + * The property names in the ignoreProperties Set will not be copied into the cloned instance. + * This is useful for cases where the Bean has convenience properties (properties that are + * actually references to other properties or properties of properties). For example SyndFeed + * and SyndEntry beans have convenience properties, publishedDate, author, copyright and + * categories all of them mapped to properties in the DC Module. *

* * @param obj object bean to clone. @@ -130,8 +132,8 @@ public class CloneableBean implements Serializable, Cloneable { /** * Makes a deep bean clone of the object. *

- * To be used by classes extending CloneableBean. Although it works also for classes using CloneableBean in a delegation pattern, for correctness those - * classes should use the + * To be used by classes extending CloneableBean. Although it works also for classes using + * CloneableBean in a delegation pattern, for correctness those classes should use the * * @see #beanClone() beanClone method. *

diff --git a/src/main/java/com/sun/syndication/feed/impl/ConfigurableClassLoader.java b/src/main/java/com/sun/syndication/feed/impl/ConfigurableClassLoader.java index aa77570..854f676 100644 --- a/src/main/java/com/sun/syndication/feed/impl/ConfigurableClassLoader.java +++ b/src/main/java/com/sun/syndication/feed/impl/ConfigurableClassLoader.java @@ -1,9 +1,10 @@ package com.sun.syndication.feed.impl; /** - * This class addresses some ClassLoader problems in OSGi environments. If you have ClassLoader problems, simply override the default ClassLoader by calling the - * {@link #setClassLoader(ClassLoader)} method before calling any ROME code. Unfortunately I don't know whether this works because I have absolutely no - * experience with OSGi. + * This class addresses some ClassLoader problems in OSGi environments. If you have ClassLoader + * problems, simply override the default ClassLoader by calling the + * {@link #setClassLoader(ClassLoader)} method before calling any ROME code. Unfortunately I don't + * know whether this works because I have absolutely no experience with OSGi. * * @author Patrick Gotthard * @@ -17,7 +18,8 @@ public enum ConfigurableClassLoader { /** * Get the configured ClassLoader. Returns * - * @return The configured ClassLoader. Returns the ClassLoader of this enum when the ClassLoader was not overridden. + * @return The configured ClassLoader. Returns the ClassLoader of this enum when the ClassLoader + * was not overridden. */ public ClassLoader getClassLoader() { if (classLoader == null) { diff --git a/src/main/java/com/sun/syndication/feed/impl/EqualsBean.java b/src/main/java/com/sun/syndication/feed/impl/EqualsBean.java index 0b6a077..0ae0557 100644 --- a/src/main/java/com/sun/syndication/feed/impl/EqualsBean.java +++ b/src/main/java/com/sun/syndication/feed/impl/EqualsBean.java @@ -25,8 +25,8 @@ import java.util.List; /** * Provides deep Bean equals() and hashCode() functionality for Java Beans. *

- * It works on all read/write properties, recursively. It support all primitive types, Strings, Collections, bean-like objects and multi-dimensional arrays of - * any of them. + * It works on all read/write properties, recursively. It support all primitive types, Strings, + * Collections, bean-like objects and multi-dimensional arrays of any of them. *

* The hashcode is calculated by getting the hashcode of the Bean String representation. *

@@ -95,10 +95,11 @@ public class EqualsBean implements Serializable { } /** - * Indicates whether some other object is "equal to" this object as defined by the Object equals() method. + * Indicates whether some other object is "equal to" this object as defined by the Object + * equals() method. *

- * To be used by classes extending EqualsBean. Although it works also for classes using EqualsBean in a delegation pattern, for correctness those classes - * should use the + * To be used by classes extending EqualsBean. Although it works also for classes using + * EqualsBean in a delegation pattern, for correctness those classes should use the * * @see #beanEquals(Object) beanEquals method. *

@@ -112,7 +113,8 @@ public class EqualsBean implements Serializable { } /** - * Indicates whether some other object is "equal to" the object passed in the constructor, as defined by the Object equals() method. + * Indicates whether some other object is "equal to" the object passed in the constructor, as + * defined by the Object equals() method. *

* To be used by classes using EqualsBean in a delegation pattern, * @@ -170,8 +172,8 @@ public class EqualsBean implements Serializable { *

* The hashcode is calculated by getting the hashcode of the Bean String representation. *

- * To be used by classes extending EqualsBean. Although it works also for classes using EqualsBean in a delegation pattern, for correctness those classes - * should use the + * To be used by classes extending EqualsBean. Although it works also for classes using + * EqualsBean in a delegation pattern, for correctness those classes should use the * * @see #beanHashCode() beanHashCode method. *

diff --git a/src/main/java/com/sun/syndication/feed/impl/ObjectBean.java b/src/main/java/com/sun/syndication/feed/impl/ObjectBean.java index bfb4c43..46ffe9e 100644 --- a/src/main/java/com/sun/syndication/feed/impl/ObjectBean.java +++ b/src/main/java/com/sun/syndication/feed/impl/ObjectBean.java @@ -20,7 +20,8 @@ import java.io.Serializable; import java.util.Set; /** - * Convenience class providing clone(), toString(), equals() and hashCode() functionality for Java Beans. + * Convenience class providing clone(), toString(), equals() and hashCode() functionality for Java + * Beans. *

* It works on all read/write properties, recursively. *

@@ -28,9 +29,10 @@ import java.util.Set; *

*

ObjectBean programming conventions

*

- * All ObjectBean subclasses having properties that return collections they should never return null if the property has been set to null or if a - * collection has not been set. They should create and return an empty collection, this empty collection instance should also be set to the corresponding - * property. + * All ObjectBean subclasses having properties that return collections they should never return null + * if the property has been set to null or if a collection has not been set. They should + * create and return an empty collection, this empty collection instance should also be set to the + * corresponding property. *

* All ObjectBean subclasses properties should be live references. *

@@ -60,9 +62,11 @@ public class ObjectBean implements Serializable, Cloneable { /** * Constructor. *

- * The property names in the ignoreProperties Set will not be copied into the cloned instance. This is useful for cases where the Bean has convenience - * properties (properties that are actually references to other properties or properties of properties). For example SyndFeed and SyndEntry beans have - * convenience properties, publishedDate, author, copyright and categories all of them mapped to properties in the DC Module. + * The property names in the ignoreProperties Set will not be copied into the cloned instance. + * This is useful for cases where the Bean has convenience properties (properties that are + * actually references to other properties or properties of properties). For example SyndFeed + * and SyndEntry beans have convenience properties, publishedDate, author, copyright and + * categories all of them mapped to properties in the DC Module. *

* * @param beanClass the class/interface to be used for property scanning. @@ -89,7 +93,8 @@ public class ObjectBean implements Serializable, Cloneable { } /** - * 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/com/sun/syndication/feed/impl/ToStringBean.java b/src/main/java/com/sun/syndication/feed/impl/ToStringBean.java index b48193d..bdb6c0f 100644 --- a/src/main/java/com/sun/syndication/feed/impl/ToStringBean.java +++ b/src/main/java/com/sun/syndication/feed/impl/ToStringBean.java @@ -33,8 +33,8 @@ import org.slf4j.LoggerFactory; /** * Provides deep Bean toString support. *

- * It works on all read/write properties, recursively. It support all primitive types, Strings, Collections, ToString objects and multi-dimensional arrays of - * any of them. + * It works on all read/write properties, recursively. It support all primitive types, Strings, + * Collections, ToString objects and multi-dimensional arrays of any of them. *

* * @author Alejandro Abdelnur diff --git a/src/main/java/com/sun/syndication/feed/module/DCModule.java b/src/main/java/com/sun/syndication/feed/module/DCModule.java index 89b305b..8f15ec4 100644 --- a/src/main/java/com/sun/syndication/feed/module/DCModule.java +++ b/src/main/java/com/sun/syndication/feed/module/DCModule.java @@ -23,8 +23,7 @@ import java.util.List; * Dublin Core Module. *

* - * @see Dublin Core - * module. + * @see Dublin Core module. * @author Alejandro Abdelnur * */ @@ -40,8 +39,7 @@ public interface DCModule extends Module { * Returns the DublinCore module titles. *

* - * @return a list of Strings representing the DublinCore module title, an - * empty list if none. + * @return a list of Strings representing the DublinCore module title, an empty list if none. * */ List getTitles(); @@ -50,15 +48,15 @@ public interface DCModule extends Module { * Sets the DublinCore module titles. *

* - * @param titles the list of String representing the DublinCore module - * titles to set, an empty list or null if none. + * @param titles the list of String representing the DublinCore module titles to set, an empty + * list or null if none. * */ void setTitles(List titles); /** - * Gets the DublinCore module title. Convenience method that can be used to - * obtain the first item, null if none. + * Gets the DublinCore module title. Convenience method that can be used to obtain the first + * item, null if none. *

* * @return the first DublinCore module title, null if none. @@ -66,8 +64,8 @@ public interface DCModule extends Module { String getTitle(); /** - * Sets the DublinCore module title. Convenience method that can be used - * when there is only one title to set. + * Sets the DublinCore module title. Convenience method that can be used when there is only one + * title to set. *

* * @param title the DublinCore module title to set, null if none. @@ -79,8 +77,7 @@ public interface DCModule extends Module { * Returns the DublinCore module creator. *

* - * @return a list of Strings representing the DublinCore module creator, an - * empty list if none. + * @return a list of Strings representing the DublinCore module creator, an empty list if none. * */ List getCreators(); @@ -89,15 +86,15 @@ public interface DCModule extends Module { * Sets the DublinCore module creators. *

* - * @param creators the list of String representing the DublinCore module - * creators to set, an empty list or null if none. + * @param creators the list of String representing the DublinCore module creators to set, an + * empty list or null if none. * */ void setCreators(List creators); /** - * Gets the DublinCore module creator. Convenience method that can be used - * to obtain the first item, null if none. + * Gets the DublinCore module creator. Convenience method that can be used to obtain the first + * item, null if none. *

* * @return the first DublinCore module creator, null if none. @@ -105,8 +102,8 @@ public interface DCModule extends Module { String getCreator(); /** - * Sets the DublinCore module creator. Convenience method that can be used - * when there is only one creator to set. + * Sets the DublinCore module creator. Convenience method that can be used when there is only + * one creator to set. *

* * @param creator the DublinCore module creator to set, null if none. @@ -118,8 +115,8 @@ public interface DCModule extends Module { * Returns the DublinCore module subjects. *

* - * @return a list of DCSubject elements with the DublinCore module subjects, - * an empty list if none. + * @return a list of DCSubject elements with the DublinCore module subjects, an empty list if + * none. * */ List getSubjects(); @@ -128,15 +125,15 @@ public interface DCModule extends Module { * Sets the DublinCore module subjects. *

* - * @param subjects the list of DCSubject elements with the DublinCore module - * subjects to set, an empty list or null if none. + * @param subjects the list of DCSubject elements with the DublinCore module subjects to set, an + * empty list or null if none. * */ void setSubjects(List subjects); /** - * Gets the DublinCore module subject. Convenience method that can be used - * to obtain the first item, null if none. + * Gets the DublinCore module subject. Convenience method that can be used to obtain the first + * item, null if none. *

* * @return the first DublinCore module subject, null if none. @@ -144,8 +141,8 @@ public interface DCModule extends Module { DCSubject getSubject(); /** - * Sets the DCSubject element. Convenience method that can be used when - * there is only one subject to set. + * Sets the DCSubject element. Convenience method that can be used when there is only one + * subject to set. *

* * @param subject the DublinCore module subject to set, null if none. @@ -157,8 +154,8 @@ public interface DCModule extends Module { * Returns the DublinCore module description. *

* - * @return a list of Strings representing the DublinCore module description, - * an empty list if none. + * @return a list of Strings representing the DublinCore module description, an empty list if + * none. * */ List getDescriptions(); @@ -167,15 +164,15 @@ public interface DCModule extends Module { * Sets the DublinCore module descriptions. *

* - * @param descriptions the list of String representing the DublinCore module - * descriptions to set, an empty list or null if none. + * @param descriptions the list of String representing the DublinCore module descriptions to + * set, an empty list or null if none. * */ void setDescriptions(List descriptions); /** - * Gets the DublinCore module description. Convenience method that can be - * used to obtain the first item, null if none. + * Gets the DublinCore module description. Convenience method that can be used to obtain the + * first item, null if none. *

* * @return the first DublinCore module description, null if none. @@ -183,12 +180,11 @@ public interface DCModule extends Module { String getDescription(); /** - * Sets the DublinCore module description. Convenience method that can be - * used when there is only one description to set. + * Sets the DublinCore module description. Convenience method that can be used when there is + * only one description to set. *

* - * @param description the DublinCore module description to set, null - * if none. + * @param description the DublinCore module description to set, null if none. * */ void setDescription(String description); @@ -197,8 +193,8 @@ public interface DCModule extends Module { * Returns the DublinCore module publisher. *

* - * @return a list of Strings representing the DublinCore module publisher, - * an empty list if none. + * @return a list of Strings representing the DublinCore module publisher, an empty list if + * none. * */ List getPublishers(); @@ -207,15 +203,15 @@ public interface DCModule extends Module { * Sets the DublinCore module publishers. *

* - * @param publishers the list of String representing the DublinCore module - * publishers to set, an empty list or null if none. + * @param publishers the list of String representing the DublinCore module publishers to set, an + * empty list or null if none. * */ void setPublishers(List publishers); /** - * Gets the DublinCore module publisher. Convenience method that can be used - * to obtain the first item, null if none. + * Gets the DublinCore module publisher. Convenience method that can be used to obtain the first + * item, null if none. *

* * @return the first DublinCore module publisher, null if none. @@ -223,12 +219,11 @@ public interface DCModule extends Module { String getPublisher(); /** - * Sets the DublinCore module publisher. Convenience method that can be used - * when there is only one publisher to set. + * Sets the DublinCore module publisher. Convenience method that can be used when there is only + * one publisher to set. *

* - * @param publisher the DublinCore module publisher to set, null if - * none. + * @param publisher the DublinCore module publisher to set, null if none. * */ void setPublisher(String publisher); @@ -237,8 +232,8 @@ public interface DCModule extends Module { * Returns the DublinCore module contributor. *

* - * @return a list of Strings representing the DublinCore module contributor, - * an empty list if none. + * @return a list of Strings representing the DublinCore module contributor, an empty list if + * none. * */ List getContributors(); @@ -247,15 +242,15 @@ public interface DCModule extends Module { * Sets the DublinCore module contributors. *

* - * @param contributors the list of String representing the DublinCore module - * contributors to set, an empty list or null if none. + * @param contributors the list of String representing the DublinCore module contributors to + * set, an empty list or null if none. * */ void setContributors(List contributors); /** - * Gets the DublinCore module contributor. Convenience method that can be - * used to obtain the first item, null if none. + * Gets the DublinCore module contributor. Convenience method that can be used to obtain the + * first item, null if none. *

* * @return the first DublinCore module contributor, null if none. @@ -263,12 +258,11 @@ public interface DCModule extends Module { String getContributor(); /** - * Sets the DublinCore module contributor. Convenience method that can be - * used when there is only one contributor to set. + * Sets the DublinCore module contributor. Convenience method that can be used when there is + * only one contributor to set. *

* - * @param contributor the DublinCore module contributor to set, null - * if none. + * @param contributor the DublinCore module contributor to set, null if none. * */ void setContributor(String contributor); @@ -277,8 +271,7 @@ public interface DCModule extends Module { * Returns the DublinCore module date. *

* - * @return a list of Strings representing the DublinCore module date, an - * empty list if none. + * @return a list of Strings representing the DublinCore module date, an empty list if none. * */ List getDates(); @@ -287,15 +280,15 @@ public interface DCModule extends Module { * Sets the DublinCore module dates. *

* - * @param dates the list of Date representing the DublinCore module dates to - * set, an empty list or null if none. + * @param dates the list of Date representing the DublinCore module dates to set, an empty list + * or null if none. * */ void setDates(List dates); /** - * Gets the DublinCore module date. Convenience method that can be used to - * obtain the first item, null if none. + * Gets the DublinCore module date. Convenience method that can be used to obtain the first + * item, null if none. *

* * @return the first DublinCore module date, null if none. @@ -303,8 +296,8 @@ public interface DCModule extends Module { Date getDate(); /** - * Sets the DublinCore module date. Convenience method that can be used when - * there is only one date to set. + * Sets the DublinCore module date. Convenience method that can be used when there is only one + * date to set. *

* * @param date the DublinCore module date to set, null if none. @@ -316,8 +309,7 @@ public interface DCModule extends Module { * Returns the DublinCore module type. *

* - * @return a list of Strings representing the DublinCore module type, an - * empty list if none. + * @return a list of Strings representing the DublinCore module type, an empty list if none. * */ List getTypes(); @@ -326,15 +318,15 @@ public interface DCModule extends Module { * Sets the DublinCore module types. *

* - * @param types the list of String representing the DublinCore module types - * to set, an empty list or null if none. + * @param types the list of String representing the DublinCore module types to set, an empty + * list or null if none. * */ void setTypes(List types); /** - * Gets the DublinCore module type. Convenience method that can be used to - * obtain the first item, null if none. + * Gets the DublinCore module type. Convenience method that can be used to obtain the first + * item, null if none. *

* * @return the first DublinCore module type, null if none. @@ -342,8 +334,8 @@ public interface DCModule extends Module { String getType(); /** - * Sets the DublinCore module type. Convenience method that can be used when - * there is only one type to set. + * Sets the DublinCore module type. Convenience method that can be used when there is only one + * type to set. *

* * @param type the DublinCore module type to set, null if none. @@ -355,8 +347,7 @@ public interface DCModule extends Module { * Returns the DublinCore module format. *

* - * @return a list of Strings representing the DublinCore module format, an - * empty list if none. + * @return a list of Strings representing the DublinCore module format, an empty list if none. * */ List getFormats(); @@ -365,15 +356,15 @@ public interface DCModule extends Module { * Sets the DublinCore module formats. *

* - * @param formats the list of String representing the DublinCore module - * formats to set, an empty list or null if none. + * @param formats the list of String representing the DublinCore module formats to set, an empty + * list or null if none. * */ void setFormats(List formats); /** - * Gets the DublinCore module format. Convenience method that can be used to - * obtain the first item, null if none. + * Gets the DublinCore module format. Convenience method that can be used to obtain the first + * item, null if none. *

* * @return the first DublinCore module format, null if none. @@ -381,8 +372,8 @@ public interface DCModule extends Module { String getFormat(); /** - * Sets the DublinCore module format. Convenience method that can be used - * when there is only one format to set. + * Sets the DublinCore module format. Convenience method that can be used when there is only one + * format to set. *

* * @param format the DublinCore module format to set, null if none. @@ -394,8 +385,8 @@ public interface DCModule extends Module { * Returns the DublinCore module identifier. *

* - * @return a list of Strings representing the DublinCore module identifier, - * an empty list if none. + * @return a list of Strings representing the DublinCore module identifier, an empty list if + * none. * */ List getIdentifiers(); @@ -404,15 +395,15 @@ public interface DCModule extends Module { * Sets the DublinCore module identifiers. *

* - * @param identifiers the list of String representing the DublinCore module - * identifiers to set, an empty list or null if none. + * @param identifiers the list of String representing the DublinCore module identifiers to set, + * an empty list or null if none. * */ void setIdentifiers(List identifiers); /** - * Gets the DublinCore module identifier. Convenience method that can be - * used to obtain the first item, null if none. + * Gets the DublinCore module identifier. Convenience method that can be used to obtain the + * first item, null if none. *

* * @return the first DublinCore module identifier, null if none. @@ -420,12 +411,11 @@ public interface DCModule extends Module { String getIdentifier(); /** - * Sets the DublinCore module identifier. Convenience method that can be - * used when there is only one identifier to set. + * Sets the DublinCore module identifier. Convenience method that can be used when there is only + * one identifier to set. *

* - * @param identifier the DublinCore module identifier to set, null if - * none. + * @param identifier the DublinCore module identifier to set, null if none. * */ void setIdentifier(String identifier); @@ -434,8 +424,7 @@ public interface DCModule extends Module { * Returns the DublinCore module source. *

* - * @return a list of Strings representing the DublinCore module source, an - * empty list if none. + * @return a list of Strings representing the DublinCore module source, an empty list if none. * */ List getSources(); @@ -444,15 +433,15 @@ public interface DCModule extends Module { * Sets the DublinCore module sources. *

* - * @param sources the list of String representing the DublinCore module - * sources to set, an empty list or null if none. + * @param sources the list of String representing the DublinCore module sources to set, an empty + * list or null if none. * */ void setSources(List sources); /** - * Gets the DublinCore module subject. Convenience method that can be used - * to obtain the first item, null if none. + * Gets the DublinCore module subject. Convenience method that can be used to obtain the first + * item, null if none. *

* * @return the first DublinCore module creator, null if none. @@ -460,8 +449,8 @@ public interface DCModule extends Module { String getSource(); /** - * Sets the DublinCore module source. Convenience method that can be used - * when there is only one source to set. + * Sets the DublinCore module source. Convenience method that can be used when there is only one + * source to set. *

* * @param source the DublinCore module source to set, null if none. @@ -473,8 +462,7 @@ public interface DCModule extends Module { * Returns the DublinCore module language. *

* - * @return a list of Strings representing the DublinCore module language, an - * empty list if none. + * @return a list of Strings representing the DublinCore module language, an empty list if none. * */ List getLanguages(); @@ -483,15 +471,15 @@ public interface DCModule extends Module { * Sets the DublinCore module languages. *

* - * @param languages the list of String representing the DublinCore module - * languages to set, an empty list or null if none. + * @param languages the list of String representing the DublinCore module languages to set, an + * empty list or null if none. * */ void setLanguages(List languages); /** - * Gets the DublinCore module language. Convenience method that can be used - * to obtain the first item, null if none. + * Gets the DublinCore module language. Convenience method that can be used to obtain the first + * item, null if none. *

* * @return the first DublinCore module language, null if none. @@ -499,12 +487,11 @@ public interface DCModule extends Module { String getLanguage(); /** - * Sets the DublinCore module language. Convenience method that can be used - * when there is only one language to set. + * Sets the DublinCore module language. Convenience method that can be used when there is only + * one language to set. *

* - * @param language the DublinCore module language to set, null if - * none. + * @param language the DublinCore module language to set, null if none. * */ void setLanguage(String language); @@ -513,8 +500,7 @@ public interface DCModule extends Module { * Returns the DublinCore module relation. *

* - * @return a list of Strings representing the DublinCore module relation, an - * empty list if none. + * @return a list of Strings representing the DublinCore module relation, an empty list if none. * */ List getRelations(); @@ -523,15 +509,15 @@ public interface DCModule extends Module { * Sets the DublinCore module relations. *

* - * @param relations the list of String representing the DublinCore module - * relations to set, an empty list or null if none. + * @param relations the list of String representing the DublinCore module relations to set, an + * empty list or null if none. * */ void setRelations(List relations); /** - * Gets the DublinCore module relation. Convenience method that can be used - * to obtain the first item, null if none. + * Gets the DublinCore module relation. Convenience method that can be used to obtain the first + * item, null if none. *

* * @return the first DublinCore module relation, null if none. @@ -539,12 +525,11 @@ public interface DCModule extends Module { String getRelation(); /** - * Sets the DublinCore module relation. Convenience method that can be used - * when there is only one relation to set. + * Sets the DublinCore module relation. Convenience method that can be used when there is only + * one relation to set. *

* - * @param relation the DublinCore module relation to set, null if - * none. + * @param relation the DublinCore module relation to set, null if none. * */ void setRelation(String relation); @@ -553,8 +538,7 @@ public interface DCModule extends Module { * Returns the DublinCore module coverage. *

* - * @return a list of Strings representing the DublinCore module coverage, an - * empty list if none. + * @return a list of Strings representing the DublinCore module coverage, an empty list if none. * */ List getCoverages(); @@ -563,15 +547,15 @@ public interface DCModule extends Module { * Sets the DublinCore module coverages. *

* - * @param coverages the list of String representing the DublinCore module - * coverages to set, an empty list or null if none. + * @param coverages the list of String representing the DublinCore module coverages to set, an + * empty list or null if none. * */ void setCoverages(List coverages); /** - * Gets the DublinCore module coverage. Convenience method that can be used - * to obtain the first item, null if none. + * Gets the DublinCore module coverage. Convenience method that can be used to obtain the first + * item, null if none. *

* * @return the first DublinCore module coverage, null if none. @@ -579,12 +563,11 @@ public interface DCModule extends Module { String getCoverage(); /** - * Sets the DublinCore module coverage. Convenience method that can be used - * when there is only one coverage to set. + * Sets the DublinCore module coverage. Convenience method that can be used when there is only + * one coverage to set. *

* - * @param coverage the DublinCore module coverage to set, null if - * none. + * @param coverage the DublinCore module coverage to set, null if none. * */ void setCoverage(String coverage); @@ -593,8 +576,7 @@ public interface DCModule extends Module { * Returns the DublinCore module rights. *

* - * @return a list of Strings representing the DublinCore module rights, an - * empty list if none. + * @return a list of Strings representing the DublinCore module rights, an empty list if none. * */ List getRightsList(); @@ -603,15 +585,15 @@ public interface DCModule extends Module { * Sets the DublinCore module rightss. *

* - * @param rights the list of String representing the DublinCore module - * rights to set, an empty list or null if none. + * @param rights the list of String representing the DublinCore module rights to set, an empty + * list or null if none. * */ void setRightsList(List rights); /** - * Gets the DublinCore module right. Convenience method that can be used to - * obtain the first item, null if none. + * Gets the DublinCore module right. Convenience method that can be used to obtain the first + * item, null if none. *

* * @return the first DublinCore module right, null if none. @@ -619,8 +601,8 @@ public interface DCModule extends Module { String getRights(); /** - * Sets the DublinCore module rights. Convenience method that can be used - * when there is only one rights to set. + * Sets the DublinCore module rights. Convenience method that can be used when there is only one + * rights to set. *

* * @param rights the DublinCore module rights to set, null if none. diff --git a/src/main/java/com/sun/syndication/feed/module/DCModuleImpl.java b/src/main/java/com/sun/syndication/feed/module/DCModuleImpl.java index d88cfa9..6cb1966 100644 --- a/src/main/java/com/sun/syndication/feed/module/DCModuleImpl.java +++ b/src/main/java/com/sun/syndication/feed/module/DCModuleImpl.java @@ -33,8 +33,7 @@ import com.sun.syndication.feed.impl.ObjectBean; * Dublin Core ModuleImpl, default implementation. *

* - * @see Dublin Core - * module. + * @see Dublin Core module. * @author Alejandro Abdelnur * */ @@ -65,9 +64,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { /** * Unmodifiable Set containing the convenience properties of this class. *

- * Convenience properties are mapped to Modules, for cloning the convenience - * properties can be ignored as the will be copied as part of the module - * cloning. + * Convenience properties are mapped to Modules, for cloning the convenience properties can be + * ignored as the will be copied as part of the module cloning. */ public static final Set CONVENIENCE_PROPERTIES = Collections.unmodifiableSet(IGNORE_PROPERTIES); @@ -103,8 +101,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { * Returns the DublinCore module titles. *

* - * @return a list of Strings representing the DublinCore module title, an - * empty list if none. + * @return a list of Strings representing the DublinCore module title, an empty list if none. * */ @Override @@ -119,8 +116,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { * Sets the DublinCore module titles. *

* - * @param titles the list of String representing the DublinCore module - * titles to set, an empty list or null if none. + * @param titles the list of String representing the DublinCore module titles to set, an empty + * list or null if none. * */ @Override @@ -129,8 +126,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { } /** - * Gets the DublinCore module title. Convenience method that can be used to - * obtain the first item, null if none. + * Gets the DublinCore module title. Convenience method that can be used to obtain the first + * item, null if none. *

* * @return the first DublinCore module title, null if none. @@ -145,8 +142,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { } /** - * Sets the DublinCore module title. Convenience method that can be used - * when there is only one title to set. + * Sets the DublinCore module title. Convenience method that can be used when there is only one + * title to set. *

* * @param title the DublinCore module title to set, null if none. @@ -162,8 +159,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { * Returns the DublinCore module creator. *

* - * @return a list of Strings representing the DublinCore module creator, an - * empty list if none. + * @return a list of Strings representing the DublinCore module creator, an empty list if none. * */ @Override @@ -178,8 +174,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { * Sets the DublinCore module creators. *

* - * @param creators the list of String representing the DublinCore module - * creators to set, an empty list or null if none. + * @param creators the list of String representing the DublinCore module creators to set, an + * empty list or null if none. * */ @Override @@ -188,8 +184,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { } /** - * Gets the DublinCore module title. Convenience method that can be used to - * obtain the first item, null if none. + * Gets the DublinCore module title. Convenience method that can be used to obtain the first + * item, null if none. *

* * @return the first DublinCore module title, null if none. @@ -204,8 +200,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { } /** - * Sets the DublinCore module creator. Convenience method that can be used - * when there is only one creator to set. + * Sets the DublinCore module creator. Convenience method that can be used when there is only + * one creator to set. *

* * @param creator the DublinCore module creator to set, null if none. @@ -221,8 +217,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { * Returns the DublinCore module subjects. *

* - * @return a list of DCSubject elements with the DublinCore module subjects, - * an empty list if none. + * @return a list of DCSubject elements with the DublinCore module subjects, an empty list if + * none. * */ @Override @@ -237,8 +233,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { * Sets the DublinCore module subjects. *

* - * @param subjects the list of DCSubject elements with the DublinCore module - * subjects to set, an empty list or null if none. + * @param subjects the list of DCSubject elements with the DublinCore module subjects to set, an + * empty list or null if none. * */ @Override @@ -247,8 +243,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { } /** - * Gets the DublinCore module subject. Convenience method that can be used - * to obtain the first item, null if none. + * Gets the DublinCore module subject. Convenience method that can be used to obtain the first + * item, null if none. *

* * @return the first DublinCore module subject, null if none. @@ -263,8 +259,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { } /** - * Sets the DCSubject element. Convenience method that can be used when - * there is only one subject to set. + * Sets the DCSubject element. Convenience method that can be used when there is only one + * subject to set. *

* * @param subject the DublinCore module subject to set, null if none. @@ -280,8 +276,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { * Returns the DublinCore module description. *

* - * @return a list of Strings representing the DublinCore module description, - * an empty list if none. + * @return a list of Strings representing the DublinCore module description, an empty list if + * none. * */ @Override @@ -296,8 +292,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { * Sets the DublinCore module descriptions. *

* - * @param descriptions the list of String representing the DublinCore module - * descriptions to set, an empty list or null if none. + * @param descriptions the list of String representing the DublinCore module descriptions to + * set, an empty list or null if none. * */ @Override @@ -306,8 +302,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { } /** - * Gets the DublinCore module description. Convenience method that can be - * used to obtain the first item, null if none. + * Gets the DublinCore module description. Convenience method that can be used to obtain the + * first item, null if none. *

* * @return the first DublinCore module description, null if none. @@ -322,12 +318,11 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { } /** - * Sets the DublinCore module description. Convenience method that can be - * used when there is only one description to set. + * Sets the DublinCore module description. Convenience method that can be used when there is + * only one description to set. *

* - * @param description the DublinCore module description to set, null - * if none. + * @param description the DublinCore module description to set, null if none. * */ @Override @@ -340,8 +335,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { * Returns the DublinCore module publisher. *

* - * @return a list of Strings representing the DublinCore module publisher, - * an empty list if none. + * @return a list of Strings representing the DublinCore module publisher, an empty list if + * none. * */ @Override @@ -356,8 +351,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { * Sets the DublinCore module publishers. *

* - * @param publishers the list of String representing the DublinCore module - * publishers to set, an empty list or null if none. + * @param publishers the list of String representing the DublinCore module publishers to set, an + * empty list or null if none. * */ @Override @@ -366,8 +361,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { } /** - * Gets the DublinCore module title. Convenience method that can be used to - * obtain the first item, null if none. + * Gets the DublinCore module title. Convenience method that can be used to obtain the first + * item, null if none. *

* * @return the first DublinCore module title, null if none. @@ -382,12 +377,11 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { } /** - * Sets the DublinCore module publisher. Convenience method that can be used - * when there is only one publisher to set. + * Sets the DublinCore module publisher. Convenience method that can be used when there is only + * one publisher to set. *

* - * @param publisher the DublinCore module publisher to set, null if - * none. + * @param publisher the DublinCore module publisher to set, null if none. * */ @Override @@ -400,8 +394,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { * Returns the DublinCore module contributor. *

* - * @return a list of Strings representing the DublinCore module contributor, - * an empty list if none. + * @return a list of Strings representing the DublinCore module contributor, an empty list if + * none. * */ @Override @@ -416,8 +410,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { * Sets the DublinCore module contributors. *

* - * @param contributors the list of String representing the DublinCore module - * contributors to set, an empty list or null if none. + * @param contributors the list of String representing the DublinCore module contributors to + * set, an empty list or null if none. * */ @Override @@ -426,8 +420,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { } /** - * Gets the DublinCore module contributor. Convenience method that can be - * used to obtain the first item, null if none. + * Gets the DublinCore module contributor. Convenience method that can be used to obtain the + * first item, null if none. *

* * @return the first DublinCore module contributor, null if none. @@ -442,12 +436,11 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { } /** - * Sets the DublinCore module contributor. Convenience method that can be - * used when there is only one contributor to set. + * Sets the DublinCore module contributor. Convenience method that can be used when there is + * only one contributor to set. *

* - * @param contributor the DublinCore module contributor to set, null - * if none. + * @param contributor the DublinCore module contributor to set, null if none. * */ @Override @@ -460,8 +453,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { * Returns the DublinCore module date. *

* - * @return a list of Strings representing the DublinCore module date, an - * empty list if none. + * @return a list of Strings representing the DublinCore module date, an empty list if none. * */ @Override @@ -476,8 +468,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { * Sets the DublinCore module dates. *

* - * @param dates the list of Date representing the DublinCore module dates to - * set, an empty list or null if none. + * @param dates the list of Date representing the DublinCore module dates to set, an empty list + * or null if none. * */ @Override @@ -486,8 +478,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { } /** - * Gets the DublinCore module date. Convenience method that can be used to - * obtain the first item, null if none. + * Gets the DublinCore module date. Convenience method that can be used to obtain the first + * item, null if none. *

* * @return the first DublinCore module date, null if none. @@ -502,8 +494,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { } /** - * Sets the DublinCore module date. Convenience method that can be used when - * there is only one date to set. + * Sets the DublinCore module date. Convenience method that can be used when there is only one + * date to set. *

* * @param date the DublinCore module date to set, null if none. @@ -519,8 +511,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { * Returns the DublinCore module type. *

* - * @return a list of Strings representing the DublinCore module type, an - * empty list if none. + * @return a list of Strings representing the DublinCore module type, an empty list if none. * */ @Override @@ -535,8 +526,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { * Sets the DublinCore module types. *

* - * @param types the list of String representing the DublinCore module types - * to set, an empty list or null if none. + * @param types the list of String representing the DublinCore module types to set, an empty + * list or null if none. * */ @Override @@ -545,8 +536,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { } /** - * Gets the DublinCore module type. Convenience method that can be used to - * obtain the first item, null if none. + * Gets the DublinCore module type. Convenience method that can be used to obtain the first + * item, null if none. *

* * @return the first DublinCore module type, null if none. @@ -561,8 +552,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { } /** - * Sets the DublinCore module type. Convenience method that can be used when - * there is only one type to set. + * Sets the DublinCore module type. Convenience method that can be used when there is only one + * type to set. *

* * @param type the DublinCore module type to set, null if none. @@ -578,8 +569,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { * Returns the DublinCore module format. *

* - * @return a list of Strings representing the DublinCore module format, an - * empty list if none. + * @return a list of Strings representing the DublinCore module format, an empty list if none. * */ @Override @@ -594,8 +584,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { * Sets the DublinCore module formats. *

* - * @param formats the list of String representing the DublinCore module - * formats to set, an empty list or null if none. + * @param formats the list of String representing the DublinCore module formats to set, an empty + * list or null if none. * */ @Override @@ -604,8 +594,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { } /** - * Gets the DublinCore module format. Convenience method that can be used to - * obtain the first item, null if none. + * Gets the DublinCore module format. Convenience method that can be used to obtain the first + * item, null if none. *

* * @return the first DublinCore module format, null if none. @@ -620,8 +610,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { } /** - * Sets the DublinCore module format. Convenience method that can be used - * when there is only one format to set. + * Sets the DublinCore module format. Convenience method that can be used when there is only one + * format to set. *

* * @param format the DublinCore module format to set, null if none. @@ -637,8 +627,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { * Returns the DublinCore module identifier. *

* - * @return a list of Strings representing the DublinCore module identifier, - * an empty list if none. + * @return a list of Strings representing the DublinCore module identifier, an empty list if + * none. * */ @Override @@ -653,8 +643,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { * Sets the DublinCore module identifiers. *

* - * @param identifiers the list of String representing the DublinCore module - * identifiers to set, an empty list or null if none. + * @param identifiers the list of String representing the DublinCore module identifiers to set, + * an empty list or null if none. * */ @Override @@ -663,8 +653,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { } /** - * Gets the DublinCore module identifier. Convenience method that can be - * used to obtain the first item, null if none. + * Gets the DublinCore module identifier. Convenience method that can be used to obtain the + * first item, null if none. *

* * @return the first DublinCore module identifier, null if none. @@ -679,12 +669,11 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { } /** - * Sets the DublinCore module identifier. Convenience method that can be - * used when there is only one identifier to set. + * Sets the DublinCore module identifier. Convenience method that can be used when there is only + * one identifier to set. *

* - * @param identifier the DublinCore module identifier to set, null if - * none. + * @param identifier the DublinCore module identifier to set, null if none. * */ @Override @@ -697,8 +686,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { * Returns the DublinCore module source. *

* - * @return a list of Strings representing the DublinCore module source, an - * empty list if none. + * @return a list of Strings representing the DublinCore module source, an empty list if none. * */ @Override @@ -713,8 +701,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { * Sets the DublinCore module sources. *

* - * @param sources the list of String representing the DublinCore module - * sources to set, an empty list or null if none. + * @param sources the list of String representing the DublinCore module sources to set, an empty + * list or null if none. * */ @Override @@ -723,8 +711,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { } /** - * Gets the DublinCore module source. Convenience method that can be used to - * obtain the first item, null if none. + * Gets the DublinCore module source. Convenience method that can be used to obtain the first + * item, null if none. *

* * @return the first DublinCore module source, null if none. @@ -739,8 +727,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { } /** - * Sets the DublinCore module source. Convenience method that can be used - * when there is only one source to set. + * Sets the DublinCore module source. Convenience method that can be used when there is only one + * source to set. *

* * @param source the DublinCore module source to set, null if none. @@ -756,8 +744,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { * Returns the DublinCore module language. *

* - * @return a list of Strings representing the DublinCore module language, an - * empty list if none. + * @return a list of Strings representing the DublinCore module language, an empty list if none. * */ @Override @@ -772,8 +759,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { * Sets the DublinCore module languages. *

* - * @param languages the list of String representing the DublinCore module - * languages to set, an empty list or null if none. + * @param languages the list of String representing the DublinCore module languages to set, an + * empty list or null if none. * */ @Override @@ -782,8 +769,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { } /** - * Gets the DublinCore module language. Convenience method that can be used - * to obtain the first item, null if none. + * Gets the DublinCore module language. Convenience method that can be used to obtain the first + * item, null if none. *

* * @return the first DublinCore module langauge, null if none. @@ -798,12 +785,11 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { } /** - * Sets the DublinCore module language. Convenience method that can be used - * when there is only one language to set. + * Sets the DublinCore module language. Convenience method that can be used when there is only + * one language to set. *

* - * @param language the DublinCore module language to set, null if - * none. + * @param language the DublinCore module language to set, null if none. * */ @Override @@ -816,8 +802,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { * Returns the DublinCore module relation. *

* - * @return a list of Strings representing the DublinCore module relation, an - * empty list if none. + * @return a list of Strings representing the DublinCore module relation, an empty list if none. * */ @Override @@ -832,8 +817,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { * Sets the DublinCore module relations. *

* - * @param relations the list of String representing the DublinCore module - * relations to set, an empty list or null if none. + * @param relations the list of String representing the DublinCore module relations to set, an + * empty list or null if none. * */ @Override @@ -842,8 +827,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { } /** - * Gets the DublinCore module relation. Convenience method that can be used - * to obtain the first item, null if none. + * Gets the DublinCore module relation. Convenience method that can be used to obtain the first + * item, null if none. *

* * @return the first DublinCore module relation, null if none. @@ -858,12 +843,11 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { } /** - * Sets the DublinCore module relation. Convenience method that can be used - * when there is only one relation to set. + * Sets the DublinCore module relation. Convenience method that can be used when there is only + * one relation to set. *

* - * @param relation the DublinCore module relation to set, null if - * none. + * @param relation the DublinCore module relation to set, null if none. * */ @Override @@ -876,8 +860,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { * Returns the DublinCore module coverage. *

* - * @return a list of Strings representing the DublinCore module coverage, an - * empty list if none. + * @return a list of Strings representing the DublinCore module coverage, an empty list if none. * */ @Override @@ -892,8 +875,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { * Sets the DublinCore module coverages. *

* - * @param coverages the list of String representing the DublinCore module - * coverages to set, an empty list or null if none. + * @param coverages the list of String representing the DublinCore module coverages to set, an + * empty list or null if none. * */ @Override @@ -902,8 +885,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { } /** - * Gets the DublinCore module coverage. Convenience method that can be used - * to obtain the first item, null if none. + * Gets the DublinCore module coverage. Convenience method that can be used to obtain the first + * item, null if none. *

* * @return the first DublinCore module coverage, null if none. @@ -918,12 +901,11 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { } /** - * Sets the DublinCore module coverage. Convenience method that can be used - * when there is only one coverage to set. + * Sets the DublinCore module coverage. Convenience method that can be used when there is only + * one coverage to set. *

* - * @param coverage the DublinCore module coverage to set, null if - * none. + * @param coverage the DublinCore module coverage to set, null if none. * */ @Override @@ -936,8 +918,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { * Returns the DublinCore module rights. *

* - * @return a list of Strings representing the DublinCore module rights, an - * empty list if none. + * @return a list of Strings representing the DublinCore module rights, an empty list if none. * */ @Override @@ -952,8 +933,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { * Sets the DublinCore module rights. *

* - * @param rights the list of String representing the DublinCore module - * rights to set, an empty list or null if none. + * @param rights the list of String representing the DublinCore module rights to set, an empty + * list or null if none. * */ @Override @@ -962,8 +943,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { } /** - * Gets the DublinCore module rights. Convenience method that can be used to - * obtain the first item, null if none. + * Gets the DublinCore module rights. Convenience method that can be used to obtain the first + * item, null if none. *

* * @return the first DublinCore module rights, null if none. @@ -978,8 +959,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { } /** - * Sets the DublinCore module rights. Convenience method that can be used - * when there is only one rights to set. + * Sets the DublinCore module rights. Convenience method that can be used when there is only one + * rights to set. *

* * @param rights the DublinCore module rights to set, null if none. @@ -996,8 +977,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { *

* * @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 @@ -1006,8 +986,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { } /** - * 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/com/sun/syndication/feed/module/DCSubject.java b/src/main/java/com/sun/syndication/feed/module/DCSubject.java index a0646ea..bd9154b 100644 --- a/src/main/java/com/sun/syndication/feed/module/DCSubject.java +++ b/src/main/java/com/sun/syndication/feed/module/DCSubject.java @@ -22,8 +22,7 @@ import com.sun.syndication.feed.CopyFrom; * Subject of the Dublin Core ModuleImpl. *

* - * @see Dublin Core - * module. + * @see Dublin Core module. * @author Alejandro Abdelnur * */ @@ -41,8 +40,7 @@ public interface DCSubject extends Cloneable, CopyFrom { * Sets the DublinCore subject taxonomy URI. *

* - * @param taxonomyUri the DublinCore subject taxonomy URI to set, - * null if none. + * @param taxonomyUri the DublinCore subject taxonomy URI to set, null if none. * */ void setTaxonomyUri(String taxonomyUri); @@ -70,8 +68,7 @@ public interface DCSubject extends Cloneable, CopyFrom { *

* * @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. * */ public Object clone() throws CloneNotSupportedException; diff --git a/src/main/java/com/sun/syndication/feed/module/DCSubjectImpl.java b/src/main/java/com/sun/syndication/feed/module/DCSubjectImpl.java index 352d165..31af102 100644 --- a/src/main/java/com/sun/syndication/feed/module/DCSubjectImpl.java +++ b/src/main/java/com/sun/syndication/feed/module/DCSubjectImpl.java @@ -29,8 +29,7 @@ import com.sun.syndication.feed.impl.ObjectBean; * Subject of the Dublin Core ModuleImpl, default implementation. *

* - * @see Dublin Core - * module. + * @see Dublin Core module. * @author Alejandro Abdelnur * */ @@ -54,8 +53,7 @@ public class DCSubjectImpl implements Cloneable, Serializable, DCSubject { *

* * @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 @@ -64,8 +62,8 @@ public class DCSubjectImpl implements Cloneable, Serializable, DCSubject { } /** - * 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. @@ -122,8 +120,7 @@ public class DCSubjectImpl implements Cloneable, Serializable, DCSubject { * Sets the DublinCore subject taxonomy URI. *

* - * @param taxonomyUri the DublinCore subject taxonomy URI to set, - * null if none. + * @param taxonomyUri the DublinCore subject taxonomy URI to set, null if none. * */ @Override diff --git a/src/main/java/com/sun/syndication/feed/module/Extendable.java b/src/main/java/com/sun/syndication/feed/module/Extendable.java index f63668c..97265c3 100644 --- a/src/main/java/com/sun/syndication/feed/module/Extendable.java +++ b/src/main/java/com/sun/syndication/feed/module/Extendable.java @@ -39,8 +39,7 @@ public interface Extendable { * Returns the entry modules. *

* - * @return a list of ModuleImpl elements with the entry modules, an empty - * list if none. + * @return a list of ModuleImpl elements with the entry modules, an empty list if none. * */ List getModules(); @@ -49,8 +48,8 @@ public interface Extendable { * Sets the entry modules. *

* - * @param modules the list of ModuleImpl elements with the entry modules to - * set, an empty list or null if none. + * @param modules the list of ModuleImpl elements with the entry modules to set, an empty list + * or null if none. * */ void setModules(List modules); diff --git a/src/main/java/com/sun/syndication/feed/module/Module.java b/src/main/java/com/sun/syndication/feed/module/Module.java index 58f89bd..f822d39 100644 --- a/src/main/java/com/sun/syndication/feed/module/Module.java +++ b/src/main/java/com/sun/syndication/feed/module/Module.java @@ -21,8 +21,8 @@ import java.io.Serializable; import com.sun.syndication.feed.CopyFrom; /** - * Base class for modules describing Metadata of feeds. Examples of such modules - * are the Dublin Core and Syndication modules. + * Base class for modules describing Metadata of feeds. Examples of such modules are the Dublin Core + * and Syndication modules. *

* * @author Alejandro Abdelnur @@ -44,8 +44,7 @@ public interface Module extends Cloneable, CopyFrom, Serializable { *

* * @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. * */ public Object clone() throws CloneNotSupportedException; diff --git a/src/main/java/com/sun/syndication/feed/module/ModuleImpl.java b/src/main/java/com/sun/syndication/feed/module/ModuleImpl.java index 5749f9e..a669807 100644 --- a/src/main/java/com/sun/syndication/feed/module/ModuleImpl.java +++ b/src/main/java/com/sun/syndication/feed/module/ModuleImpl.java @@ -21,8 +21,8 @@ import java.io.Serializable; import com.sun.syndication.feed.impl.ObjectBean; /** - * Base class for modules describing Metadata of feeds, default implementations. - * Examples of such modules are the Dublin Core and Syndication modules. + * Base class for modules describing Metadata of feeds, default implementations. Examples of such + * modules are the Dublin Core and Syndication modules. *

* * @author Alejandro Abdelnur @@ -50,8 +50,7 @@ public abstract class ModuleImpl implements Cloneable, Serializable, Module { *

* * @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 @@ -60,8 +59,8 @@ public abstract class ModuleImpl implements Cloneable, Serializable, Module { } /** - * 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/com/sun/syndication/feed/module/SyModule.java b/src/main/java/com/sun/syndication/feed/module/SyModule.java index c2ee14b..a89bd31 100644 --- a/src/main/java/com/sun/syndication/feed/module/SyModule.java +++ b/src/main/java/com/sun/syndication/feed/module/SyModule.java @@ -22,17 +22,14 @@ import java.util.Date; * Syndication ModuleImpl. *

* - * @see Syndication - * module. + * @see Syndication module. * @author Alejandro Abdelnur * */ public interface SyModule extends Module { /** - * URI of the Syndication ModuleImpl - * (http://purl.org/rss/1.0/modules/syndication/). + * URI of the Syndication ModuleImpl (http://purl.org/rss/1.0/modules/syndication/). * */ static final String URI = "http://purl.org/rss/1.0/modules/syndication/"; @@ -56,8 +53,7 @@ public interface SyModule extends Module { * Sets the Syndication module update period. *

* - * @param updatePeriod the Syndication module update period to set, - * null if none. + * @param updatePeriod the Syndication module update period to set, null if none. * */ void setUpdatePeriod(String updatePeriod); @@ -75,8 +71,7 @@ public interface SyModule extends Module { * Sets the Syndication module update frequency. *

* - * @param updateFrequency the Syndication module update frequency to set, - * null if none. + * @param updateFrequency the Syndication module update frequency to set, null if none. * */ void setUpdateFrequency(int updateFrequency); @@ -94,8 +89,7 @@ public interface SyModule extends Module { * Sets the Syndication module update base date. *

* - * @param updateBase the Syndication module update base date to set, - * null if none. + * @param updateBase the Syndication module update base date to set, null if none. * */ void setUpdateBase(Date updateBase); diff --git a/src/main/java/com/sun/syndication/feed/module/SyModuleImpl.java b/src/main/java/com/sun/syndication/feed/module/SyModuleImpl.java index 30c5a4a..d1d588d 100644 --- a/src/main/java/com/sun/syndication/feed/module/SyModuleImpl.java +++ b/src/main/java/com/sun/syndication/feed/module/SyModuleImpl.java @@ -30,9 +30,7 @@ import com.sun.syndication.feed.impl.CopyFromHelper; * Syndication ModuleImpl, default implementation. *

* - * @see Syndication - * module. + * @see Syndication module. * @author Alejandro Abdelnur * */ @@ -77,8 +75,7 @@ public class SyModuleImpl extends ModuleImpl implements SyModule { * Sets the Syndication module update period. *

* - * @param updatePeriod the Syndication module update period to set, - * null if none. + * @param updatePeriod the Syndication module update period to set, null if none. * */ @Override @@ -105,8 +102,7 @@ public class SyModuleImpl extends ModuleImpl implements SyModule { * Sets the Syndication module update frequency. *

* - * @param updateFrequency the Syndication module update frequency to set, - * null if none. + * @param updateFrequency the Syndication module update frequency to set, null if none. * */ @Override @@ -130,8 +126,7 @@ public class SyModuleImpl extends ModuleImpl implements SyModule { * Sets the Syndication module update base date. *

* - * @param updateBase the Syndication module update base date to set, - * null if none. + * @param updateBase the Syndication module update base date to set, null if none. * */ @Override diff --git a/src/main/java/com/sun/syndication/feed/rss/Category.java b/src/main/java/com/sun/syndication/feed/rss/Category.java index c4001c0..4d60e53 100644 --- a/src/main/java/com/sun/syndication/feed/rss/Category.java +++ b/src/main/java/com/sun/syndication/feed/rss/Category.java @@ -48,8 +48,7 @@ public class Category implements Cloneable, Serializable { *

* * @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 @@ -58,8 +57,8 @@ public class Category 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/com/sun/syndication/feed/rss/Channel.java b/src/main/java/com/sun/syndication/feed/rss/Channel.java index f2aedbb..c03f358 100644 --- a/src/main/java/com/sun/syndication/feed/rss/Channel.java +++ b/src/main/java/com/sun/syndication/feed/rss/Channel.java @@ -31,8 +31,8 @@ import com.sun.syndication.feed.module.impl.ModuleUtils; /** * Bean for RSS feeds. *

- * It handles all RSS versions (0.9, 0.91, 0.92, 0.93, 0.94, 1.0 and 2.0) - * without losing information. + * It handles all RSS versions (0.9, 0.91, 0.92, 0.93, 0.94, 1.0 and 2.0) without losing + * information. *

* * @author Alejandro Abdelnur @@ -93,8 +93,7 @@ public class Channel extends WireFeed { } /** - * Channel Constructor. All properties, except the type, are set to - * null. + * Channel Constructor. All properties, except the type, are set to null. *

* * @param type the type of the RSS feed. @@ -216,8 +215,7 @@ public class Channel extends WireFeed { * Returns the channel items. *

* - * @return a list of Item elements with the channel items, an empty list if - * none. + * @return a list of Item elements with the channel items, an empty list if none. * */ public List getItems() { @@ -231,8 +229,8 @@ public class Channel extends WireFeed { * Sets the channel items. *

* - * @param items the list of Item elements with the channel items to set, an - * empty list or null if none. + * @param items the list of Item elements with the channel items to set, an empty list or + * null if none. * */ public void setItems(final List items) { @@ -376,8 +374,7 @@ public class Channel extends WireFeed { * Sets the channel last build date. *

* - * @param lastBuildDate the channel last build date to set, null if - * none. + * @param lastBuildDate the channel last build date to set, null if none. * */ public void setLastBuildDate(final Date lastBuildDate) { @@ -425,8 +422,7 @@ public class Channel extends WireFeed { * Sets the channel managing editor. *

* - * @param managingEditor the channel managing editor to set, null if - * none. + * @param managingEditor the channel managing editor to set, null if none. * */ public void setManagingEditor(final String managingEditor) { @@ -459,8 +455,7 @@ public class Channel extends WireFeed { * Returns the channel skip hours. *

* - * @return a list of Integer elements with the channel skip hours, an empty - * list if none. + * @return a list of Integer elements with the channel skip hours, an empty list if none. * */ public List getSkipHours() { @@ -475,8 +470,8 @@ public class Channel extends WireFeed { * Sets the channel skip hours. *

* - * @param skipHours the list of Integer elements with the channel skip hours - * to set, an empty list or null if none. + * @param skipHours the list of Integer elements with the channel skip hours to set, an empty + * list or null if none. * */ public void setSkipHours(final List skipHours) { @@ -500,8 +495,7 @@ public class Channel extends WireFeed { * Returns the channel skip days. *

* - * @return a list of Day elements with the channel skip days, an empty list - * if none. + * @return a list of Day elements with the channel skip days, an empty list if none. * */ public List getSkipDays() { @@ -516,8 +510,8 @@ public class Channel extends WireFeed { * Sets the channel skip days. *

* - * @param skipDays the list of Day elements with the channel skip days to - * set, an empty list or null if none. + * @param skipDays the list of Day elements with the channel skip days to set, an empty list or + * null if none. * */ public void setSkipDays(final List skipDays) { @@ -564,8 +558,7 @@ public class Channel extends WireFeed { * Returns the channel categories. *

* - * @return a list of Category elements with the channel categories, an empty - * list if none. + * @return a list of Category elements with the channel categories, an empty list if none. * */ public List getCategories() { @@ -579,8 +572,8 @@ public class Channel extends WireFeed { * Sets the channel categories. *

* - * @param categories the list of Category elements with the channel - * categories to set, an empty list or null if none. + * @param categories the list of Category elements with the channel categories to set, an empty + * list or null if none. * */ public void setCategories(final List categories) { @@ -635,8 +628,7 @@ public class Channel extends WireFeed { * Returns the channel modules. *

* - * @return a list of ModuleImpl elements with the channel modules, an empty - * list if none. + * @return a list of ModuleImpl elements with the channel modules, an empty list if none. * */ @Override @@ -651,8 +643,8 @@ public class Channel extends WireFeed { * Sets the channel modules. *

* - * @param modules the list of ModuleImpl elements with the channel modules - * to set, an empty list or null if none. + * @param modules the list of ModuleImpl elements with the channel modules to set, an empty list + * or null if none. * */ @Override diff --git a/src/main/java/com/sun/syndication/feed/rss/Cloud.java b/src/main/java/com/sun/syndication/feed/rss/Cloud.java index ebaa52e..6c7c92d 100644 --- a/src/main/java/com/sun/syndication/feed/rss/Cloud.java +++ b/src/main/java/com/sun/syndication/feed/rss/Cloud.java @@ -51,8 +51,7 @@ public class Cloud implements Cloneable, Serializable { *

* * @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 @@ -61,8 +60,8 @@ public class Cloud 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. @@ -181,8 +180,7 @@ public class Cloud implements Cloneable, Serializable { * Sets the cloud register procedure. *

* - * @param registerProcedure the cloud register procedure to set, null - * if none. + * @param registerProcedure the cloud register procedure to set, null if none. * */ public void setRegisterProcedure(final String registerProcedure) { diff --git a/src/main/java/com/sun/syndication/feed/rss/Content.java b/src/main/java/com/sun/syndication/feed/rss/Content.java index db40376..139dcf8 100644 --- a/src/main/java/com/sun/syndication/feed/rss/Content.java +++ b/src/main/java/com/sun/syndication/feed/rss/Content.java @@ -94,8 +94,7 @@ public class Content implements Cloneable, Serializable { *

* * @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 @@ -104,8 +103,8 @@ public class Content 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/com/sun/syndication/feed/rss/Description.java b/src/main/java/com/sun/syndication/feed/rss/Description.java index ffc3f73..41870cd 100644 --- a/src/main/java/com/sun/syndication/feed/rss/Description.java +++ b/src/main/java/com/sun/syndication/feed/rss/Description.java @@ -48,8 +48,7 @@ public class Description implements Cloneable, Serializable { *

* * @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 @@ -58,8 +57,8 @@ public class Description 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/com/sun/syndication/feed/rss/Enclosure.java b/src/main/java/com/sun/syndication/feed/rss/Enclosure.java index 4b9d7d3..757228d 100644 --- a/src/main/java/com/sun/syndication/feed/rss/Enclosure.java +++ b/src/main/java/com/sun/syndication/feed/rss/Enclosure.java @@ -49,8 +49,7 @@ public class Enclosure implements Cloneable, Serializable { *

* * @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 @@ -59,8 +58,8 @@ public class Enclosure 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/com/sun/syndication/feed/rss/Guid.java b/src/main/java/com/sun/syndication/feed/rss/Guid.java index 8190279..2d6ac0e 100644 --- a/src/main/java/com/sun/syndication/feed/rss/Guid.java +++ b/src/main/java/com/sun/syndication/feed/rss/Guid.java @@ -48,8 +48,7 @@ public class Guid implements Cloneable, Serializable { *

* * @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 @@ -58,8 +57,8 @@ public class Guid 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/com/sun/syndication/feed/rss/Image.java b/src/main/java/com/sun/syndication/feed/rss/Image.java index db9333c..9235cda 100644 --- a/src/main/java/com/sun/syndication/feed/rss/Image.java +++ b/src/main/java/com/sun/syndication/feed/rss/Image.java @@ -51,8 +51,7 @@ public class Image implements Cloneable, Serializable { *

* * @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 @@ -61,8 +60,8 @@ public class Image 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/com/sun/syndication/feed/rss/Item.java b/src/main/java/com/sun/syndication/feed/rss/Item.java index bbca90f..abe5c33 100644 --- a/src/main/java/com/sun/syndication/feed/rss/Item.java +++ b/src/main/java/com/sun/syndication/feed/rss/Item.java @@ -34,8 +34,8 @@ import com.sun.syndication.feed.module.impl.ModuleUtils; *

* It handles all RSS versions without loosing information. *

- * For RSS1.0 it supports Dublin Core and Syndication modules. Note that those - * modules currently support simple syntax format only. + * For RSS1.0 it supports Dublin Core and Syndication modules. Note that those modules currently + * support simple syntax format only. *

* * @author Alejandro Abdelnur @@ -74,8 +74,7 @@ public class Item implements Cloneable, Serializable, Extendable { *

* * @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 @@ -84,8 +83,8 @@ public class Item implements Cloneable, Serializable, Extendable { } /** - * 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. @@ -266,8 +265,7 @@ public class Item implements Cloneable, Serializable, Extendable { * Returns the item enclosures. *

* - * @return a list of Enclosure elements with the item enclosures, an empty - * list if none. + * @return a list of Enclosure elements with the item enclosures, an empty list if none. * */ public List getEnclosures() { @@ -281,8 +279,8 @@ public class Item implements Cloneable, Serializable, Extendable { * Sets the item enclosures. *

* - * @param enclosures the list of Enclosure elements with the item enclosures - * to set, an empty list or null if none. + * @param enclosures the list of Enclosure elements with the item enclosures to set, an empty + * list or null if none. * */ public void setEnclosures(final List enclosures) { @@ -293,8 +291,7 @@ public class Item implements Cloneable, Serializable, Extendable { * Returns the item categories. *

* - * @return a list of Category elements with the item categories, an empty - * list if none. + * @return a list of Category elements with the item categories, an empty list if none. * */ public List getCategories() { @@ -308,8 +305,8 @@ public class Item implements Cloneable, Serializable, Extendable { * Sets the item categories. *

* - * @param categories the list of Categories elements with the item - * categories to set, an empty list or null if none. + * @param categories the list of Categories elements with the item categories to set, an empty + * list or null if none. * */ public void setCategories(final List categories) { @@ -386,8 +383,7 @@ public class Item implements Cloneable, Serializable, Extendable { * Returns the item modules. *

* - * @return a list of ModuleImpl elements with the item modules, an empty - * list if none. + * @return a list of ModuleImpl elements with the item modules, an empty list if none. * */ @Override @@ -402,8 +398,8 @@ public class Item implements Cloneable, Serializable, Extendable { * Sets the item modules. *

* - * @param modules the list of ModuleImpl elements with the item modules to - * set, an empty list or null if none. + * @param modules the list of ModuleImpl elements with the item modules to set, an empty list or + * null if none. * */ @Override @@ -472,8 +468,7 @@ public class Item implements Cloneable, Serializable, Extendable { * Sets the item expiration date. *

* - * @param expirationDate the item expiration date to set, null if - * none. + * @param expirationDate the item expiration date to set, null if none. * */ public void setExpirationDate(final Date expirationDate) { diff --git a/src/main/java/com/sun/syndication/feed/rss/Source.java b/src/main/java/com/sun/syndication/feed/rss/Source.java index 8eccf02..c7442f2 100644 --- a/src/main/java/com/sun/syndication/feed/rss/Source.java +++ b/src/main/java/com/sun/syndication/feed/rss/Source.java @@ -48,8 +48,7 @@ public class Source implements Cloneable, Serializable { *

* * @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 @@ -58,8 +57,8 @@ public class Source 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/com/sun/syndication/feed/rss/TextInput.java b/src/main/java/com/sun/syndication/feed/rss/TextInput.java index 29882a0..3239d2d 100644 --- a/src/main/java/com/sun/syndication/feed/rss/TextInput.java +++ b/src/main/java/com/sun/syndication/feed/rss/TextInput.java @@ -50,8 +50,7 @@ public class TextInput implements Cloneable, Serializable { *

* * @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 @@ -60,8 +59,8 @@ public class TextInput 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. @@ -139,8 +138,7 @@ public class TextInput implements Cloneable, Serializable { * Sets the text input description. *

* - * @param description the text input description to set, null if - * none. + * @param description the text input description to set, null if none. * */ public void setDescription(final String description) { diff --git a/src/main/java/com/sun/syndication/feed/synd/Converter.java b/src/main/java/com/sun/syndication/feed/synd/Converter.java index 962e793..2c9a221 100644 --- a/src/main/java/com/sun/syndication/feed/synd/Converter.java +++ b/src/main/java/com/sun/syndication/feed/synd/Converter.java @@ -19,11 +19,10 @@ package com.sun.syndication.feed.synd; import com.sun.syndication.feed.WireFeed; /** - * Interface that defines the functionality to convert a SyndFeedImpl to a real - * feed (RSS or Atom) and vice versa. + * Interface that defines the functionality to convert a SyndFeedImpl to a real feed (RSS or Atom) + * and vice versa. *

- * Each implementation knows how to deal with a specific type (version) of a - * real feed. + * Each implementation knows how to deal with a specific type (version) of a real feed. *

* Implementations must be thread safe. *

@@ -47,22 +46,20 @@ public interface Converter { public String getType(); /** - * Makes a deep copy/conversion of the values of a real feed into a - * SyndFeedImpl. + * Makes a deep copy/conversion of the values of a real feed into a SyndFeedImpl. *

* It assumes the given SyndFeedImpl has no properties set. *

* * @param feed real feed to copy/convert. - * @param syndFeed the SyndFeedImpl that will contain the copied/converted - * values of the real feed. + * @param syndFeed the SyndFeedImpl that will contain the copied/converted values of the real + * feed. * */ public void copyInto(WireFeed feed, SyndFeed syndFeed); /** - * Creates real feed with a deep copy/conversion of the values of a - * SyndFeedImpl. + * Creates real feed with a deep copy/conversion of the values of a SyndFeedImpl. *

* * @param syndFeed SyndFeedImpl to copy/convert value from. diff --git a/src/main/java/com/sun/syndication/feed/synd/SyndCategory.java b/src/main/java/com/sun/syndication/feed/synd/SyndCategory.java index be70bb5..9a7b23e 100644 --- a/src/main/java/com/sun/syndication/feed/synd/SyndCategory.java +++ b/src/main/java/com/sun/syndication/feed/synd/SyndCategory.java @@ -68,8 +68,7 @@ public interface SyndCategory extends Cloneable, CopyFrom { *

* * @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. * */ public Object clone() throws CloneNotSupportedException; diff --git a/src/main/java/com/sun/syndication/feed/synd/SyndCategoryImpl.java b/src/main/java/com/sun/syndication/feed/synd/SyndCategoryImpl.java index c7f9f85..07a1cd2 100644 --- a/src/main/java/com/sun/syndication/feed/synd/SyndCategoryImpl.java +++ b/src/main/java/com/sun/syndication/feed/synd/SyndCategoryImpl.java @@ -44,8 +44,8 @@ public class SyndCategoryImpl implements Serializable, SyndCategory { private final DCSubject subject; /** - * For implementations extending SyndContentImpl to be able to use the - * ObjectBean functionality with extended interfaces. + * For implementations extending SyndContentImpl to be able to use the ObjectBean functionality + * with extended interfaces. *

* * @param subject the DC subject to wrap. @@ -60,8 +60,7 @@ public class SyndCategoryImpl implements Serializable, SyndCategory { *

* * @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 @@ -70,8 +69,8 @@ public class SyndCategoryImpl implements Serializable, SyndCategory { } /** - * 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. @@ -203,18 +202,17 @@ public class SyndCategoryImpl implements Serializable, SyndCategory { } /** - * List implementation for SyndCategoryImpl elements. To be directly used by the - * SyndFeedImpl and SyndEntryImpl classes only. + * List implementation for SyndCategoryImpl elements. To be directly used by the SyndFeedImpl and + * SyndEntryImpl classes only. *

- * It acts as a facade on top of the DCSubjectImpl elements of the underlying - * list and remains in synch with it. It is possible to work on either list, the - * categories one or the subjects one and they remain in synch. + * It acts as a facade on top of the DCSubjectImpl elements of the underlying list and remains in + * synch with it. It is possible to work on either list, the categories one or the subjects one and + * they remain in synch. *

- * This is necessary because the SyndFeedImpl categories are just a convenience - * to access the DublinCore subjects. + * This is necessary because the SyndFeedImpl categories are just a convenience to access the + * DublinCore subjects. *

- * All this mess to avoid making DCSubjectImpl implement SyndCategory (which it - * would be odd). + * All this mess to avoid making DCSubjectImpl implement SyndCategory (which it would be odd). *

* * @author Alejandro Abdelnur @@ -272,8 +270,7 @@ class SyndCategoryListFacade extends AbstractList { * * @param index position to set the category. * @param obj the SyndCategoryImpl object to set. - * @return the SyndCategoryImpl object that is being replaced, null - * if none. + * @return the SyndCategoryImpl object that is being replaced, null if none. * */ @Override @@ -318,8 +315,7 @@ class SyndCategoryListFacade extends AbstractList { *

* * @param index position to remove the category from. - * @return the SyndCategoryImpl being removed from position index, - * null if none. + * @return the SyndCategoryImpl being removed from position index, null if none. * */ @Override @@ -333,14 +329,12 @@ class SyndCategoryListFacade extends AbstractList { } /** - * Returns a list with the DCSubject elements of the SyndCategoryImpl list - * facade. To be used by the SyndFeedImpl class only. + * Returns a list with the DCSubject elements of the SyndCategoryImpl list facade. To be used by + * the SyndFeedImpl class only. *

* - * @param cList the list with SyndCategoryImpl elements to convert to - * subject list. - * @return a list with DCSubject elements corresponding to the categories in - * the given list. + * @param cList the list with SyndCategoryImpl elements to convert to subject list. + * @return a list with DCSubject elements corresponding to the categories in the given list. * */ public static List convertElementsSyndCategoryToSubject(final List cList) { diff --git a/src/main/java/com/sun/syndication/feed/synd/SyndContent.java b/src/main/java/com/sun/syndication/feed/synd/SyndContent.java index 14efe3f..8b9b97b 100644 --- a/src/main/java/com/sun/syndication/feed/synd/SyndContent.java +++ b/src/main/java/com/sun/syndication/feed/synd/SyndContent.java @@ -29,8 +29,7 @@ public interface SyndContent extends Cloneable, CopyFrom { /** * Returns the content type. *

- * When used for the description of an entry, if null 'text/plain' - * must be assumed. + * When used for the description of an entry, if null 'text/plain' must be assumed. *

* * @return the content type, null if none. @@ -41,8 +40,7 @@ public interface SyndContent extends Cloneable, CopyFrom { /** * Sets the content type. *

- * When used for the description of an entry, if null 'text/plain' - * must be assumed. + * When used for the description of an entry, if null 'text/plain' must be assumed. *

* * @param type the content type to set, null if none. @@ -89,8 +87,7 @@ public interface SyndContent extends Cloneable, CopyFrom { *

* * @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. * */ public Object clone() throws CloneNotSupportedException; diff --git a/src/main/java/com/sun/syndication/feed/synd/SyndContentImpl.java b/src/main/java/com/sun/syndication/feed/synd/SyndContentImpl.java index 1d9a532..d1be4cf 100644 --- a/src/main/java/com/sun/syndication/feed/synd/SyndContentImpl.java +++ b/src/main/java/com/sun/syndication/feed/synd/SyndContentImpl.java @@ -53,8 +53,7 @@ public class SyndContentImpl implements Serializable, SyndContent { *

* * @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 @@ -63,8 +62,8 @@ public class SyndContentImpl implements Serializable, SyndContent { } /** - * 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. @@ -105,8 +104,7 @@ public class SyndContentImpl implements Serializable, SyndContent { /** * Returns the content type. *

- * When used for the description of an entry, if null 'text/plain' - * must be assumed. + * When used for the description of an entry, if null 'text/plain' must be assumed. *

* * @return the content type, null if none. @@ -120,8 +118,7 @@ public class SyndContentImpl implements Serializable, SyndContent { /** * Sets the content type. *

- * When used for the description of an entry, if null 'text/plain' - * must be assumed. + * When used for the description of an entry, if null 'text/plain' must be assumed. *

* * @param type the content type to set, null if none. diff --git a/src/main/java/com/sun/syndication/feed/synd/SyndEnclosureImpl.java b/src/main/java/com/sun/syndication/feed/synd/SyndEnclosureImpl.java index f3781b7..3834f9b 100644 --- a/src/main/java/com/sun/syndication/feed/synd/SyndEnclosureImpl.java +++ b/src/main/java/com/sun/syndication/feed/synd/SyndEnclosureImpl.java @@ -33,8 +33,7 @@ public class SyndEnclosureImpl implements Serializable, SyndEnclosure { *

* * @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 @@ -43,8 +42,8 @@ public class SyndEnclosureImpl implements Serializable, SyndEnclosure { } /** - * 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/com/sun/syndication/feed/synd/SyndEntry.java b/src/main/java/com/sun/syndication/feed/synd/SyndEntry.java index 30de185..05e3cfd 100644 --- a/src/main/java/com/sun/syndication/feed/synd/SyndEntry.java +++ b/src/main/java/com/sun/syndication/feed/synd/SyndEntry.java @@ -37,11 +37,10 @@ public interface SyndEntry extends Cloneable, CopyFrom, Extendable { /** * Returns the entry URI. *

- * How the entry URI maps to a concrete feed type (RSS or Atom) depends on - * the concrete feed type. This is explained in detail in Rome - * documentation, Feed and - * entry URI mapping. + * How the entry URI maps to a concrete feed type (RSS or Atom) depends on the concrete feed + * type. This is explained in detail in Rome documentation, Feed and entry URI + * mapping. *

* The returned URI is a normalized URI as specified in RFC 2396bis. *

@@ -54,11 +53,10 @@ public interface SyndEntry extends Cloneable, CopyFrom, Extendable { /** * Sets the entry URI. *

- * How the entry URI maps to a concrete feed type (RSS or Atom) depends on - * the concrete feed type. This is explained in detail in Rome - * documentation, Feed and - * entry URI mapping. + * How the entry URI maps to a concrete feed type (RSS or Atom) depends on the concrete feed + * type. This is explained in detail in Rome documentation, Feed and entry URI + * mapping. *

* * @param uri the entry URI to set, null if none. @@ -160,8 +158,7 @@ public interface SyndEntry extends Cloneable, CopyFrom, Extendable { * Returns the entry contents. *

* - * @return a list of SyndContentImpl elements with the entry contents, an - * empty list if none. + * @return a list of SyndContentImpl elements with the entry contents, an empty list if none. * */ List getContents(); @@ -170,8 +167,8 @@ public interface SyndEntry extends Cloneable, CopyFrom, Extendable { * Sets the entry contents. *

* - * @param contents the list of SyndContentImpl elements with the entry - * contents to set, an empty list or null if none. + * @param contents the list of SyndContentImpl elements with the entry contents to set, an empty + * list or null if none. * */ void setContents(List contents); @@ -180,8 +177,7 @@ public interface SyndEntry extends Cloneable, CopyFrom, Extendable { * Returns the entry enclosures. *

* - * @return a list of SyndEnclosure elements with the entry enclosures, an - * empty list if none. + * @return a list of SyndEnclosure elements with the entry enclosures, an empty list if none. * */ public List getEnclosures(); @@ -190,8 +186,8 @@ public interface SyndEntry extends Cloneable, CopyFrom, Extendable { * Sets the entry enclosures. *

* - * @param enclosures the list of SyndEnclosure elements with the entry - * enclosures to set, an empty list or null if none. + * @param enclosures the list of SyndEnclosure elements with the entry enclosures to set, an + * empty list or null if none. * */ public void setEnclosures(List enclosures); @@ -199,8 +195,7 @@ public interface SyndEntry extends Cloneable, CopyFrom, Extendable { /** * Returns the entry published date. *

- * This method is a convenience method, it maps to the Dublin Core module - * date. + * This method is a convenience method, it maps to the Dublin Core module date. *

* * @return the entry published date, null if none. @@ -211,12 +206,10 @@ public interface SyndEntry extends Cloneable, CopyFrom, Extendable { /** * Sets the entry published date. *

- * This method is a convenience method, it maps to the Dublin Core module - * date. + * This method is a convenience method, it maps to the Dublin Core module date. *

* - * @param publishedDate the entry published date to set, null if - * none. + * @param publishedDate the entry published date to set, null if none. * */ void setPublishedDate(Date publishedDate); @@ -242,9 +235,8 @@ public interface SyndEntry extends Cloneable, CopyFrom, Extendable { /** * Returns the entry authors. *

- * For Atom feeds, this returns the authors as a list of SyndPerson objects, - * for RSS feeds this method is a convenience method, it maps to the Dublin - * Core module creator. + * For Atom feeds, this returns the authors as a list of SyndPerson objects, for RSS feeds this + * method is a convenience method, it maps to the Dublin Core module creator. *

* * @return the feed author, null if none. @@ -255,9 +247,8 @@ public interface SyndEntry extends Cloneable, CopyFrom, Extendable { /** * Sets the entry author. *

- * For Atom feeds, this sets the authors as a list of SyndPerson objects, - * for RSS feeds this method is a convenience method, it maps to the Dublin - * Core module creator. + * For Atom feeds, this sets the authors as a list of SyndPerson objects, for RSS feeds this + * method is a convenience method, it maps to the Dublin Core module creator. *

* * @param authors the feed author to set, null if none. @@ -268,9 +259,8 @@ public interface SyndEntry extends Cloneable, CopyFrom, Extendable { /** * Returns the name of the first entry author in the collection of authors. *

- * For Atom feeds, this returns the authors as a list of SyndPerson objects, - * for RSS feeds this method is a convenience method, it maps to the Dublin - * Core module creator. + * For Atom feeds, this returns the authors as a list of SyndPerson objects, for RSS feeds this + * method is a convenience method, it maps to the Dublin Core module creator. *

* * @return the feed author, null if none. @@ -281,9 +271,8 @@ public interface SyndEntry extends Cloneable, CopyFrom, Extendable { /** * Sets the entry author. *

- * For Atom feeds, this sets the feed author's name, for RSS feeds this - * method is a convenience method, it maps to the Dublin Core module - * creator. + * For Atom feeds, this sets the feed author's name, for RSS feeds this method is a convenience + * method, it maps to the Dublin Core module creator. *

* * @param author the feed author to set, null if none. @@ -293,8 +282,7 @@ public interface SyndEntry extends Cloneable, CopyFrom, Extendable { /** * Returns the feed author. *

- * For Atom feeds, this returns the contributors as a list of SyndPerson - * objects + * For Atom feeds, this returns the contributors as a list of SyndPerson objects *

* * @return the feed author, null if none. @@ -316,12 +304,10 @@ public interface SyndEntry extends Cloneable, CopyFrom, Extendable { /** * Returns the entry categories. *

- * This method is a convenience method, it maps to the Dublin Core module - * subjects. + * This method is a convenience method, it maps to the Dublin Core module subjects. *

* - * @return a list of SyndCategoryImpl elements with the entry categories, an - * empty list if none. + * @return a list of SyndCategoryImpl elements with the entry categories, an empty list if none. * */ List getCategories(); @@ -329,12 +315,11 @@ public interface SyndEntry extends Cloneable, CopyFrom, Extendable { /** * Sets the entry categories. *

- * This method is a convenience method, it maps to the Dublin Core module - * subjects. + * This method is a convenience method, it maps to the Dublin Core module subjects. *

* - * @param categories the list of SyndCategoryImpl elements with the entry - * categories to set, an empty list or null if none. + * @param categories the list of SyndCategoryImpl elements with the entry categories to set, an + * empty list or null if none. * */ void setCategories(List categories); @@ -360,12 +345,11 @@ public interface SyndEntry extends Cloneable, CopyFrom, Extendable { void setSource(SyndFeed source); /** - * Return the original item this SyndEntry is generated from. The type of - * the object returned depends on the original type of the feed. Atom - * 0.3/1.0 will return com.sun.syndication.feed.atom.Entry, while RSS will - * return com.sun.syndication.feed.rss.Item.java. If this entry was not - * generated from a WireFeed, or the SyndFeed was not set to preserve the - * WireFeed then it will return null + * Return the original item this SyndEntry is generated from. The type of the object returned + * depends on the original type of the feed. Atom 0.3/1.0 will return + * com.sun.syndication.feed.atom.Entry, while RSS will return + * com.sun.syndication.feed.rss.Item.java. If this entry was not generated from a WireFeed, or + * the SyndFeed was not set to preserve the WireFeed then it will return null * * @return the WireFeed Item or Entry this Entry is generated from, or null */ @@ -385,8 +369,7 @@ public interface SyndEntry extends Cloneable, CopyFrom, Extendable { * Returns the entry modules. *

* - * @return a list of ModuleImpl elements with the entry modules, an empty - * list if none. + * @return a list of ModuleImpl elements with the entry modules, an empty list if none. * */ @Override @@ -396,8 +379,8 @@ public interface SyndEntry extends Cloneable, CopyFrom, Extendable { * Sets the entry modules. *

* - * @param modules the list of ModuleImpl elements with the entry modules to - * set, an empty list or null if none. + * @param modules the list of ModuleImpl elements with the entry modules to set, an empty list + * or null if none. * */ @Override @@ -443,15 +426,13 @@ public interface SyndEntry extends Cloneable, CopyFrom, Extendable { *

* * @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. * */ public Object clone() throws CloneNotSupportedException; /** - * Returns the first instance of a SyndLink with the specified relation, or - * null + * Returns the first instance of a SyndLink with the specified relation, or null * */ public SyndLink findRelatedLink(String relation); diff --git a/src/main/java/com/sun/syndication/feed/synd/SyndEntryImpl.java b/src/main/java/com/sun/syndication/feed/synd/SyndEntryImpl.java index 61ab525..6980992 100644 --- a/src/main/java/com/sun/syndication/feed/synd/SyndEntryImpl.java +++ b/src/main/java/com/sun/syndication/feed/synd/SyndEntryImpl.java @@ -74,9 +74,8 @@ public class SyndEntryImpl implements Serializable, SyndEntry { /** * Unmodifiable Set containing the convenience properties of this class. *

- * Convenience properties are mapped to Modules, for cloning the convenience - * properties can be ignored as the will be copied as part of the module - * cloning. + * Convenience properties are mapped to Modules, for cloning the convenience properties can be + * ignored as the will be copied as part of the module cloning. */ public static final Set CONVENIENCE_PROPERTIES = Collections.unmodifiableSet(IGNORE_PROPERTIES); @@ -86,14 +85,13 @@ public class SyndEntryImpl implements Serializable, SyndEntry { } /** - * For implementations extending SyndEntryImpl to be able to use the - * ObjectBean functionality with extended interfaces. + * For implementations extending SyndEntryImpl to be able to use the ObjectBean functionality + * with extended interfaces. *

* * @param beanClass - * @param convenienceProperties set containing the convenience properties of - * the SyndEntryImpl (the are ignored during cloning, check - * CloneableBean for details). + * @param convenienceProperties set containing the convenience properties of the SyndEntryImpl + * (the are ignored during cloning, check CloneableBean for details). * */ protected SyndEntryImpl(final Class beanClass, final Set convenienceProperties) { @@ -114,8 +112,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry { *

* * @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 @@ -124,8 +121,8 @@ public class SyndEntryImpl implements Serializable, SyndEntry { } /** - * 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. @@ -181,11 +178,10 @@ public class SyndEntryImpl implements Serializable, SyndEntry { /** * Returns the entry URI. *

- * How the entry URI maps to a concrete feed type (RSS or Atom) depends on - * the concrete feed type. This is explained in detail in Rome - * documentation, Feed and - * entry URI mapping. + * How the entry URI maps to a concrete feed type (RSS or Atom) depends on the concrete feed + * type. This is explained in detail in Rome documentation, Feed and entry URI + * mapping. *

* The returned URI is a normalized URI as specified in RFC 2396bis. *

@@ -201,11 +197,10 @@ public class SyndEntryImpl implements Serializable, SyndEntry { /** * Sets the entry URI. *

- * How the entry URI maps to a concrete feed type (RSS or Atom) depends on - * the concrete feed type. This is explained in detail in Rome - * documentation, Feed and - * entry URI mapping. + * How the entry URI maps to a concrete feed type (RSS or Atom) depends on the concrete feed + * type. This is explained in detail in Rome documentation, Feed and entry URI + * mapping. *

* * @param uri the entry URI to set, null if none. @@ -322,8 +317,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry { * Returns the entry contents. *

* - * @return a list of SyndContentImpl elements with the entry contents, an - * empty list if none. + * @return a list of SyndContentImpl elements with the entry contents, an empty list if none. * */ @Override @@ -338,8 +332,8 @@ public class SyndEntryImpl implements Serializable, SyndEntry { * Sets the entry contents. *

* - * @param contents the list of SyndContentImpl elements with the entry - * contents to set, an empty list or null if none. + * @param contents the list of SyndContentImpl elements with the entry contents to set, an empty + * list or null if none. * */ @Override @@ -351,8 +345,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry { * Returns the entry enclosures. *

* - * @return a list of SyndEnclosure elements with the entry enclosures, an - * empty list if none. + * @return a list of SyndEnclosure elements with the entry enclosures, an empty list if none. * */ @Override @@ -367,8 +360,8 @@ public class SyndEntryImpl implements Serializable, SyndEntry { * Sets the entry enclosures. *

* - * @param enclosures the list of SyndEnclosure elements with the entry - * enclosures to set, an empty list or null if none. + * @param enclosures the list of SyndEnclosure elements with the entry enclosures to set, an + * empty list or null if none. * */ @Override @@ -379,8 +372,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry { /** * Returns the entry published date. *

- * This method is a convenience method, it maps to the Dublin Core module - * date. + * This method is a convenience method, it maps to the Dublin Core module date. *

* * @return the entry published date, null if none. @@ -394,12 +386,10 @@ public class SyndEntryImpl implements Serializable, SyndEntry { /** * Sets the entry published date. *

- * This method is a convenience method, it maps to the Dublin Core module - * date. + * This method is a convenience method, it maps to the Dublin Core module date. *

* - * @param publishedDate the entry published date to set, null if - * none. + * @param publishedDate the entry published date to set, null if none. * */ @Override @@ -411,8 +401,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry { * Returns the entry categories. *

* - * @return a list of SyndCategoryImpl elements with the entry categories, an - * empty list if none. + * @return a list of SyndCategoryImpl elements with the entry categories, an empty list if none. * */ @Override @@ -423,12 +412,11 @@ public class SyndEntryImpl implements Serializable, SyndEntry { /** * Sets the entry categories. *

- * This method is a convenience method, it maps to the Dublin Core module - * subjects. + * This method is a convenience method, it maps to the Dublin Core module subjects. *

* - * @param categories the list of SyndCategoryImpl elements with the entry - * categories to set, an empty list or null if none. + * @param categories the list of SyndCategoryImpl elements with the entry categories to set, an + * empty list or null if none. * */ @Override @@ -440,8 +428,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry { * Returns the entry modules. *

* - * @return a list of ModuleImpl elements with the entry modules, an empty - * list if none. + * @return a list of ModuleImpl elements with the entry modules, an empty list if none. * */ @Override @@ -459,8 +446,8 @@ public class SyndEntryImpl implements Serializable, SyndEntry { * Sets the entry modules. *

* - * @param modules the list of ModuleImpl elements with the entry modules to - * set, an empty list or null if none. + * @param modules the list of ModuleImpl elements with the entry modules to set, an empty list + * or null if none. * */ @Override @@ -595,8 +582,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry { /** * Returns the entry author. *

- * This method is a convenience method, it maps to the Dublin Core module - * creator. + * This method is a convenience method, it maps to the Dublin Core module creator. *

* * @return the entry author, null if none. @@ -623,8 +609,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry { /** * Sets the entry author. *

- * This method is a convenience method, it maps to the Dublin Core module - * creator. + * This method is a convenience method, it maps to the Dublin Core module creator. *

* * @param author the entry author to set, null if none. @@ -669,8 +654,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry { * Returns foreign markup found at channel level. *

* - * @return list of JDOM nodes containing channel-level foreign markup, an - * empty list if none. + * @return list of JDOM nodes containing channel-level foreign markup, an empty list if none. * */ @Override @@ -685,8 +669,8 @@ public class SyndEntryImpl implements Serializable, SyndEntry { * Sets foreign markup found at channel level. *

* - * @param foreignMarkup list of JDOM nodes containing channel-level foreign - * markup, an empty list if none. + * @param foreignMarkup list of JDOM nodes containing channel-level foreign markup, an empty + * list if none. * */ @Override @@ -706,7 +690,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry { * {@inheritDoc} */ @Override - public void setComments(String comments) { + public void setComments(final String comments) { this.comments = comments; } diff --git a/src/main/java/com/sun/syndication/feed/synd/SyndFeed.java b/src/main/java/com/sun/syndication/feed/synd/SyndFeed.java index a353082..16f722b 100644 --- a/src/main/java/com/sun/syndication/feed/synd/SyndFeed.java +++ b/src/main/java/com/sun/syndication/feed/synd/SyndFeed.java @@ -29,8 +29,7 @@ import com.sun.syndication.feed.module.Module; /** * Bean interface for all types of feeds. *

- * It handles all RSS versions and Atom 0.3, it normalizes all info, it may lose - * information. + * It handles all RSS versions and Atom 0.3, it normalizes all info, it may lose information. *

* * @author Alejandro Abdelnur @@ -39,8 +38,7 @@ import com.sun.syndication.feed.module.Module; public interface SyndFeed extends Cloneable, CopyFrom, Extendable { /** - * Returns the real feed types the SyndFeedImpl supports when converting - * from and to. + * Returns the real feed types the SyndFeedImpl supports when converting from and to. *

* * @return the real feed type supported. @@ -50,8 +48,7 @@ public interface SyndFeed extends Cloneable, CopyFrom, Extendable { /** * Creates a real feed containing the information of the SyndFeedImpl. *

- * The feed type of the created WireFeed is taken from the SyndFeedImpl - * feedType property. + * The feed type of the created WireFeed is taken from the SyndFeedImpl feedType property. *

* * @return the real feed. @@ -70,9 +67,8 @@ public interface SyndFeed extends Cloneable, CopyFrom, Extendable { WireFeed createWireFeed(String feedType); /** - * Returns the WireFeed this SyndFeed was created from. Will return null if - * the original feed is not stored or if this SyndFeed was not created from - * a WireFeed + * Returns the WireFeed this SyndFeed was created from. Will return null if the original feed is + * not stored or if this SyndFeed was not created from a WireFeed * * @return The WireFeed this was created from, or null * @@ -86,8 +82,7 @@ public interface SyndFeed extends Cloneable, CopyFrom, Extendable { boolean isPreservingWireFeed(); /** - * Returns the wire feed type the feed had/will-have when converted from/to - * a WireFeed. + * Returns the wire feed type the feed had/will-have when converted from/to a WireFeed. *

* * @return the feed type, null if none. @@ -105,8 +100,7 @@ public interface SyndFeed extends Cloneable, CopyFrom, Extendable { void setFeedType(String feedType); /** - * Returns the charset encoding of a the feed. This is not set by Rome - * parsers. + * Returns the charset encoding of a the feed. This is not set by Rome parsers. *

* * @return the charset encoding of the feed. @@ -126,25 +120,22 @@ public interface SyndFeed extends Cloneable, CopyFrom, Extendable { /** * Returns the feed URI. *

- * How the feed URI maps to a concrete feed type (RSS or Atom) depends on - * the concrete feed type. This is explained in detail in Rome - * documentation, Feed and - * entry URI mapping. + * How the feed URI maps to a concrete feed type (RSS or Atom) depends on the concrete feed + * type. This is explained in detail in Rome documentation, Feed and entry URI + * mapping. *

* The returned URI is a normalized URI as specified in RFC 2396bis. *

- * Note: The URI is the unique identifier, in the RSS 2.0/atom case this is - * the GUID, for RSS 1.0 this is the URI attribute of the item. The Link is - * the URL that the item is accessible under, the URI is the permanent - * identifier which the aggregator should use to reference this item. Often - * the URI will use some standardized identifier scheme such as DOI's so - * that items can be identified even if they appear in multiple feeds with - * different "links" (they might be on different hosting platforms but be - * the same item). Also, though rare, there could be multiple items with the - * same link but a different URI and associated metadata which need to be - * treated as distinct entities. In the RSS 1.0 case the URI must be a valid - * RDF URI reference. + * Note: The URI is the unique identifier, in the RSS 2.0/atom case this is the GUID, for RSS + * 1.0 this is the URI attribute of the item. The Link is the URL that the item is accessible + * under, the URI is the permanent identifier which the aggregator should use to reference this + * item. Often the URI will use some standardized identifier scheme such as DOI's so that items + * can be identified even if they appear in multiple feeds with different "links" (they might be + * on different hosting platforms but be the same item). Also, though rare, there could be + * multiple items with the same link but a different URI and associated metadata which need to + * be treated as distinct entities. In the RSS 1.0 case the URI must be a valid RDF URI + * reference. *

* * @return the feed URI, null if none. @@ -155,23 +146,20 @@ public interface SyndFeed extends Cloneable, CopyFrom, Extendable { /** * Sets the feed URI. *

- * How the feed URI maps to a concrete feed type (RSS or Atom) depends on - * the concrete feed type. This is explained in detail in Rome - * documentation, Feed and - * entry URI mapping. + * How the feed URI maps to a concrete feed type (RSS or Atom) depends on the concrete feed + * type. This is explained in detail in Rome documentation, Feed and entry URI + * mapping. *

- * Note: The URI is the unique identifier, in the RSS 2.0/atom case this is - * the GUID, for RSS 1.0 this is the URI attribute of the item. The Link is - * the URL that the item is accessible under, the URI is the permanent - * identifier which the aggregator should use to reference this item. Often - * the URI will use some standardized identifier scheme such as DOI's so - * that items can be identified even if they appear in multiple feeds with - * different "links" (they might be on different hosting platforms but be - * the same item). Also, though rare, there could be multiple items with the - * same link but a different URI and associated metadata which need to be - * treated as distinct entities. In the RSS 1.0 case the URI must be a valid - * RDF URI reference. + * Note: The URI is the unique identifier, in the RSS 2.0/atom case this is the GUID, for RSS + * 1.0 this is the URI attribute of the item. The Link is the URL that the item is accessible + * under, the URI is the permanent identifier which the aggregator should use to reference this + * item. Often the URI will use some standardized identifier scheme such as DOI's so that items + * can be identified even if they appear in multiple feeds with different "links" (they might be + * on different hosting platforms but be the same item). Also, though rare, there could be + * multiple items with the same link but a different URI and associated metadata which need to + * be treated as distinct entities. In the RSS 1.0 case the URI must be a valid RDF URI + * reference. *

* * @param uri the feed URI to set, null if none. @@ -218,17 +206,15 @@ public interface SyndFeed extends Cloneable, CopyFrom, Extendable { /** * Returns the feed link. *

- * Note: The URI is the unique identifier, in the RSS 2.0/atom case this is - * the GUID, for RSS 1.0 this is the URI attribute of the item. The Link is - * the URL that the item is accessible under, the URI is the permanent - * identifier which the aggregator should use to reference this item. Often - * the URI will use some standardized identifier scheme such as DOI's so - * that items can be identified even if they appear in multiple feeds with - * different "links" (they might be on different hosting platforms but be - * the same item). Also, though rare, there could be multiple items with the - * same link but a different URI and associated metadata which need to be - * treated as distinct entities. In the RSS 1.0 case the URI must be a valid - * RDF URI reference. + * Note: The URI is the unique identifier, in the RSS 2.0/atom case this is the GUID, for RSS + * 1.0 this is the URI attribute of the item. The Link is the URL that the item is accessible + * under, the URI is the permanent identifier which the aggregator should use to reference this + * item. Often the URI will use some standardized identifier scheme such as DOI's so that items + * can be identified even if they appear in multiple feeds with different "links" (they might be + * on different hosting platforms but be the same item). Also, though rare, there could be + * multiple items with the same link but a different URI and associated metadata which need to + * be treated as distinct entities. In the RSS 1.0 case the URI must be a valid RDF URI + * reference. *

* * @return the feed link, null if none. @@ -239,17 +225,15 @@ public interface SyndFeed extends Cloneable, CopyFrom, Extendable { /** * Sets the feed link. *

- * Note: The URI is the unique identifier, in the RSS 2.0/atom case this is - * the GUID, for RSS 1.0 this is the URI attribute of the item. The Link is - * the URL that the item is accessible under, the URI is the permanent - * identifier which the aggregator should use to reference this item. Often - * the URI will use some standardized identifier scheme such as DOI's so - * that items can be identified even if they appear in multiple feeds with - * different "links" (they might be on different hosting platforms but be - * the same item). Also, though rare, there could be multiple items with the - * same link but a different URI and associated metadata which need to be - * treated as distinct entities. In the RSS 1.0 case the URI must be a valid - * RDF URI reference. + * Note: The URI is the unique identifier, in the RSS 2.0/atom case this is the GUID, for RSS + * 1.0 this is the URI attribute of the item. The Link is the URL that the item is accessible + * under, the URI is the permanent identifier which the aggregator should use to reference this + * item. Often the URI will use some standardized identifier scheme such as DOI's so that items + * can be identified even if they appear in multiple feeds with different "links" (they might be + * on different hosting platforms but be the same item). Also, though rare, there could be + * multiple items with the same link but a different URI and associated metadata which need to + * be treated as distinct entities. In the RSS 1.0 case the URI must be a valid RDF URI + * reference. *

* * @param link the feed link to set, null if none. @@ -314,8 +298,7 @@ public interface SyndFeed extends Cloneable, CopyFrom, Extendable { /** * Returns the feed published date. *

- * This method is a convenience method, it maps to the Dublin Core module - * date. + * This method is a convenience method, it maps to the Dublin Core module date. *

* * @return the feed published date, null if none. @@ -326,8 +309,7 @@ public interface SyndFeed extends Cloneable, CopyFrom, Extendable { /** * Sets the feed published date. *

- * This method is a convenience method, it maps to the Dublin Core module - * date. + * This method is a convenience method, it maps to the Dublin Core module date. *

* * @param publishedDate the feed published date to set, null if none. @@ -338,9 +320,8 @@ public interface SyndFeed extends Cloneable, CopyFrom, Extendable { /** * Returns the feed authors. *

- * For Atom feeds, this returns the authors as a list of SyndPerson objects, - * for RSS feeds this method is a convenience method, it maps to the Dublin - * Core module creator. + * For Atom feeds, this returns the authors as a list of SyndPerson objects, for RSS feeds this + * method is a convenience method, it maps to the Dublin Core module creator. *

* * @return the feed authors, null if none. @@ -351,9 +332,8 @@ public interface SyndFeed extends Cloneable, CopyFrom, Extendable { /** * Sets the feed authors. *

- * For Atom feeds, this sets the authors as a list of SyndPerson objects, - * for RSS feeds this method is a convenience method, it maps to the Dublin - * Core module creator. + * For Atom feeds, this sets the authors as a list of SyndPerson objects, for RSS feeds this + * method is a convenience method, it maps to the Dublin Core module creator. *

* * @param authors the feed authors to set, null if none. @@ -364,9 +344,8 @@ public interface SyndFeed extends Cloneable, CopyFrom, Extendable { /** * Returns the name of the first feed author in the collection of authors. *

- * For Atom feeds, this returns the authors as a list of SyndPerson objects, - * for RSS feeds this method is a convenience method, it maps to the Dublin - * Core module creator. + * For Atom feeds, this returns the authors as a list of SyndPerson objects, for RSS feeds this + * method is a convenience method, it maps to the Dublin Core module creator. *

* * @return the feed author, null if none. @@ -377,9 +356,8 @@ public interface SyndFeed extends Cloneable, CopyFrom, Extendable { /** * Sets the feed author. *

- * For Atom feeds, this sets the feed author's name, for RSS feeds this - * method is a convenience method, it maps to the Dublin Core module - * creator. + * For Atom feeds, this sets the feed author's name, for RSS feeds this method is a convenience + * method, it maps to the Dublin Core module creator. *

* * @param author the feed author to set, null if none. @@ -390,8 +368,7 @@ public interface SyndFeed extends Cloneable, CopyFrom, Extendable { /** * Returns the feed author. *

- * For Atom feeds, this returns the contributors as a list of SyndPerson - * objects + * For Atom feeds, this returns the contributors as a list of SyndPerson objects *

* * @return the feed author, null if none. @@ -413,8 +390,7 @@ public interface SyndFeed extends Cloneable, CopyFrom, Extendable { /** * Returns the feed copyright. *

- * This method is a convenience method, it maps to the Dublin Core module - * rights. + * This method is a convenience method, it maps to the Dublin Core module rights. *

* * @return the feed copyright, null if none. @@ -425,8 +401,7 @@ public interface SyndFeed extends Cloneable, CopyFrom, Extendable { /** * Sets the feed copyright. *

- * This method is a convenience method, it maps to the Dublin Core module - * rights. + * This method is a convenience method, it maps to the Dublin Core module rights. *

* * @param copyright the feed copyright to set, null if none. @@ -455,12 +430,10 @@ public interface SyndFeed extends Cloneable, CopyFrom, Extendable { /** * Returns the feed categories. *

- * This method is a convenience method, it maps to the Dublin Core module - * subjects. + * This method is a convenience method, it maps to the Dublin Core module subjects. *

* - * @return a list of SyndCategoryImpl elements with the feed categories, an - * empty list if none. + * @return a list of SyndCategoryImpl elements with the feed categories, an empty list if none. * */ List getCategories(); @@ -468,12 +441,11 @@ public interface SyndFeed extends Cloneable, CopyFrom, Extendable { /** * Sets the feed categories. *

- * This method is a convenience method, it maps to the Dublin Core module - * subjects. + * This method is a convenience method, it maps to the Dublin Core module subjects. *

* - * @param categories the list of SyndCategoryImpl elements with the feed - * categories to set, an empty list or null if none. + * @param categories the list of SyndCategoryImpl elements with the feed categories to set, an + * empty list or null if none. * */ void setCategories(List categories); @@ -482,8 +454,7 @@ public interface SyndFeed extends Cloneable, CopyFrom, Extendable { * Returns the feed entries. *

* - * @return a list of SyndEntry elements with the feed entries, an empty list - * if none. + * @return a list of SyndEntry elements with the feed entries, an empty list if none. * */ List getEntries(); @@ -492,8 +463,8 @@ public interface SyndFeed extends Cloneable, CopyFrom, Extendable { * Sets the feed entries. *

* - * @param entries the list of SyndEntryImpl elements with the feed entries - * to set, an empty list or null if none. + * @param entries the list of SyndEntryImpl elements with the feed entries to set, an empty list + * or null if none. * */ void setEntries(List entries); @@ -501,8 +472,7 @@ public interface SyndFeed extends Cloneable, CopyFrom, Extendable { /** * Returns the feed language. *

- * This method is a convenience method, it maps to the Dublin Core module - * language. + * This method is a convenience method, it maps to the Dublin Core module language. *

* * @return the feed language, null if none. @@ -513,8 +483,7 @@ public interface SyndFeed extends Cloneable, CopyFrom, Extendable { /** * Sets the feed language. *

- * This method is a convenience method, it maps to the Dublin Core module - * language. + * This method is a convenience method, it maps to the Dublin Core module language. *

* * @param language the feed language to set, null if none. @@ -536,8 +505,7 @@ public interface SyndFeed extends Cloneable, CopyFrom, Extendable { * Returns the feed modules. *

* - * @return a list of ModuleImpl elements with the feed modules, an empty - * list if none. + * @return a list of ModuleImpl elements with the feed modules, an empty list if none. * */ @Override @@ -547,8 +515,8 @@ public interface SyndFeed extends Cloneable, CopyFrom, Extendable { * Sets the feed modules. *

* - * @param modules the list of ModuleImpl elements with the feed modules to - * set, an empty list or null if none. + * @param modules the list of ModuleImpl elements with the feed modules to set, an empty list or + * null if none. * */ @Override @@ -573,8 +541,7 @@ public interface SyndFeed extends Cloneable, CopyFrom, Extendable { public void setForeignMarkup(List foreignMarkup); /** - * This tag should contain a URL that references a description of the - * channel. + * This tag should contain a URL that references a description of the channel. * * @since 2.0.0 * @return channel description URL or {@code null} @@ -582,8 +549,7 @@ public interface SyndFeed extends Cloneable, CopyFrom, Extendable { String getDocs(); /** - * This tag should contain a URL that references a description of the - * channel. + * This tag should contain a URL that references a description of the channel. * * @since 2.0.0 * @param channel description URL @@ -607,8 +573,8 @@ public interface SyndFeed extends Cloneable, CopyFrom, Extendable { public void setGenerator(String generator); /** - * The email address of the managing editor of the site, the person to - * contact for editorial inquiries. + * The email address of the managing editor of the site, the person to contact for editorial + * inquiries. * * @since 2.0.0 * @return email address of the managing editor or {@code null} @@ -616,8 +582,8 @@ public interface SyndFeed extends Cloneable, CopyFrom, Extendable { String getManagingEditor(); /** - * The email address of the managing editor of the site, the person to - * contact for editorial inquiries. + * The email address of the managing editor of the site, the person to contact for editorial + * inquiries. * * @since 2.0.0 * @param managingEditor email address of the managing editor @@ -625,8 +591,8 @@ public interface SyndFeed extends Cloneable, CopyFrom, Extendable { public void setManagingEditor(String managingEditor); /** - * The email address of the webmaster for the site, the person to contact if - * there are technical problems with the channel. + * The email address of the webmaster for the site, the person to contact if there are technical + * problems with the channel. * * @since 2.0.0 * @return email address of the webmaster or {@code null} @@ -634,8 +600,8 @@ public interface SyndFeed extends Cloneable, CopyFrom, Extendable { String getWebMaster(); /** - * The email address of the webmaster for the site, the person to contact if - * there are technical problems with the channel. + * The email address of the webmaster for the site, the person to contact if there are technical + * problems with the channel. * * @since 2.0.0 * @param webMaster email address of the webmaster @@ -663,8 +629,7 @@ public interface SyndFeed extends Cloneable, CopyFrom, Extendable { *

* * @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. * */ public Object clone() throws CloneNotSupportedException; diff --git a/src/main/java/com/sun/syndication/feed/synd/SyndFeedImpl.java b/src/main/java/com/sun/syndication/feed/synd/SyndFeedImpl.java index 869a7e1..b0cff2e 100644 --- a/src/main/java/com/sun/syndication/feed/synd/SyndFeedImpl.java +++ b/src/main/java/com/sun/syndication/feed/synd/SyndFeedImpl.java @@ -44,8 +44,8 @@ import com.sun.syndication.feed.synd.impl.URINormalizer; /** * Bean for all types of feeds. *

- * It handles all RSS versions, Atom 0.3 and Atom 1.0, it normalizes all info, - * it may lose information. + * It handles all RSS versions, Atom 0.3 and Atom 1.0, it normalizes all info, it may lose + * information. *

* * @author Alejandro Abdelnur @@ -85,9 +85,8 @@ public class SyndFeedImpl implements Serializable, SyndFeed { /** * Unmodifiable Set containing the convenience properties of this class. *

- * Convenience properties are mapped to Modules, for cloning the convenience - * properties can be ignored as the will be copied as part of the module - * cloning. + * Convenience properties are mapped to Modules, for cloning the convenience properties can be + * ignored as the will be copied as part of the module cloning. */ public static final Set CONVENIENCE_PROPERTIES = Collections.unmodifiableSet(IGNORE_PROPERTIES); @@ -101,8 +100,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { } /** - * Returns the real feed types the SyndFeedImpl supports when converting - * from and to. + * Returns the real feed types the SyndFeedImpl supports when converting from and to. *

* * @return the real feed type supported. @@ -113,14 +111,13 @@ public class SyndFeedImpl implements Serializable, SyndFeed { } /** - * For implementations extending SyndFeedImpl to be able to use the - * ObjectBean functionality with extended interfaces. + * For implementations extending SyndFeedImpl to be able to use the ObjectBean functionality + * with extended interfaces. *

* * @param beanClass - * @param convenienceProperties set containing the convenience properties of - * the SyndEntryImpl (the are ignored during cloning, check - * CloneableBean for details). + * @param convenienceProperties set containing the convenience properties of the SyndEntryImpl + * (the are ignored during cloning, check CloneableBean for details). * */ protected SyndFeedImpl(final Class beanClass, final Set convenienceProperties) { @@ -137,12 +134,11 @@ public class SyndFeedImpl implements Serializable, SyndFeed { } /** - * Creates a SyndFeedImpl and populates all its properties out of the given - * RSS Channel or Atom Feed properties. + * Creates a SyndFeedImpl and populates all its properties out of the given RSS Channel or Atom + * Feed properties. *

* - * @param feed the RSS Channel or the Atom Feed to populate the properties - * from. + * @param feed the RSS Channel or the Atom Feed to populate the properties from. * */ public SyndFeedImpl(final WireFeed feed) { @@ -150,9 +146,9 @@ public class SyndFeedImpl implements Serializable, SyndFeed { } /** - * Creates a SyndFeedImpl and populates all its properties out of the given - * RSS Channel or Atom Feed properties, while optionally preserving the - * WireFeed for access via the orignalWireFeed() method. + * Creates a SyndFeedImpl and populates all its properties out of the given RSS Channel or Atom + * Feed properties, while optionally preserving the WireFeed for access via the + * orignalWireFeed() method. * * @param feed * @param preserveWireFeed @@ -181,8 +177,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { *

* * @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 @@ -191,8 +186,8 @@ public class SyndFeedImpl implements Serializable, SyndFeed { } /** - * 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. @@ -241,8 +236,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { /** * Creates a real feed containing the information of the SyndFeedImpl. *

- * The feed type of the created WireFeed is taken from the SyndFeedImpl - * feedType property. + * The feed type of the created WireFeed is taken from the SyndFeedImpl feedType property. *

* * @return the real feed. @@ -274,13 +268,11 @@ public class SyndFeedImpl implements Serializable, SyndFeed { } /** - * Returns the WireFeed this SyndFeed was created from. Will return null if - * the original feed is not stored or if this SyndFeed was not created from - * a WireFeed.
- * Note: The wire feed returned here will NOT contain any modifications done - * on this SyndFeed since it was created. That is in contrast to the - * createWireFeed method, which will reflect the current state of the - * SyndFeed + * Returns the WireFeed this SyndFeed was created from. Will return null if the original feed is + * not stored or if this SyndFeed was not created from a WireFeed.
+ * Note: The wire feed returned here will NOT contain any modifications done on this SyndFeed + * since it was created. That is in contrast to the createWireFeed method, which will reflect + * the current state of the SyndFeed * * @return The WireFeed this was created from, or null * @@ -291,8 +283,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { } /** - * Returns the wire feed type the feed had/will-have when coverted from/to a - * WireFeed. + * Returns the wire feed type the feed had/will-have when coverted from/to a WireFeed. *

* * @return the feed type, null if none. @@ -316,8 +307,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { } /** - * Returns the charset encoding of a the feed. This is not set by Rome - * parsers. + * Returns the charset encoding of a the feed. This is not set by Rome parsers. *

* * @return the charset encoding of the feed. @@ -343,25 +333,22 @@ public class SyndFeedImpl implements Serializable, SyndFeed { /** * Returns the feed URI. *

- * How the feed URI maps to a concrete feed type (RSS or Atom) depends on - * the concrete feed type. This is explained in detail in Rome - * documentation, Feed and - * entry URI mapping. + * How the feed URI maps to a concrete feed type (RSS or Atom) depends on the concrete feed + * type. This is explained in detail in Rome documentation, Feed and entry URI + * mapping. *

* The returned URI is a normalized URI as specified in RFC 2396bis. *

- * Note: The URI is the unique identifier, in the RSS 2.0/atom case this is - * the GUID, for RSS 1.0 this is the URI attribute of the item. The Link is - * the URL that the item is accessible under, the URI is the permanent - * identifier which the aggregator should use to reference this item. Often - * the URI will use some standardized identifier scheme such as DOI's so - * that items can be identified even if they appear in multiple feeds with - * different "links" (they might be on different hosting platforms but be - * the same item). Also, though rare, there could be multiple items with the - * same link but a different URI and associated metadata which need to be - * treated as distinct entities. In the RSS 1.0 case the URI must be a valid - * RDF URI reference. + * Note: The URI is the unique identifier, in the RSS 2.0/atom case this is the GUID, for RSS + * 1.0 this is the URI attribute of the item. The Link is the URL that the item is accessible + * under, the URI is the permanent identifier which the aggregator should use to reference this + * item. Often the URI will use some standardized identifier scheme such as DOI's so that items + * can be identified even if they appear in multiple feeds with different "links" (they might be + * on different hosting platforms but be the same item). Also, though rare, there could be + * multiple items with the same link but a different URI and associated metadata which need to + * be treated as distinct entities. In the RSS 1.0 case the URI must be a valid RDF URI + * reference. *

* * @return the feed URI, null if none. @@ -375,23 +362,20 @@ public class SyndFeedImpl implements Serializable, SyndFeed { /** * Sets the feed URI. *

- * How the feed URI maps to a concrete feed type (RSS or Atom) depends on - * the concrete feed type. This is explained in detail in Rome - * documentation, Feed and - * entry URI mapping. + * How the feed URI maps to a concrete feed type (RSS or Atom) depends on the concrete feed + * type. This is explained in detail in Rome documentation, Feed and entry URI + * mapping. *

- * Note: The URI is the unique identifier, in the RSS 2.0/atom case this is - * the GUID, for RSS 1.0 this is the URI attribute of the item. The Link is - * the URL that the item is accessible under, the URI is the permanent - * identifier which the aggregator should use to reference this item. Often - * the URI will use some standardized identifier scheme such as DOI's so - * that items can be identified even if they appear in multiple feeds with - * different "links" (they might be on different hosting platforms but be - * the same item). Also, though rare, there could be multiple items with the - * same link but a different URI and associated metadata which need to be - * treated as distinct entities. In the RSS 1.0 case the URI must be a valid - * RDF URI reference. + * Note: The URI is the unique identifier, in the RSS 2.0/atom case this is the GUID, for RSS + * 1.0 this is the URI attribute of the item. The Link is the URL that the item is accessible + * under, the URI is the permanent identifier which the aggregator should use to reference this + * item. Often the URI will use some standardized identifier scheme such as DOI's so that items + * can be identified even if they appear in multiple feeds with different "links" (they might be + * on different hosting platforms but be the same item). Also, though rare, there could be + * multiple items with the same link but a different URI and associated metadata which need to + * be treated as distinct entities. In the RSS 1.0 case the URI must be a valid RDF URI + * reference. *

* * @param uri the feed URI to set, null if none. @@ -459,17 +443,15 @@ public class SyndFeedImpl implements Serializable, SyndFeed { /** * Returns the feed link. *

- * Note: The URI is the unique identifier, in the RSS 2.0/atom case this is - * the GUID, for RSS 1.0 this is the URI attribute of the item. The Link is - * the URL that the item is accessible under, the URI is the permanent - * identifier which the aggregator should use to reference this item. Often - * the URI will use some standardized identifier scheme such as DOI's so - * that items can be identified even if they appear in multiple feeds with - * different "links" (they might be on different hosting platforms but be - * the same item). Also, though rare, there could be multiple items with the - * same link but a different URI and associated metadata which need to be - * treated as distinct entities. In the RSS 1.0 case the URI must be a valid - * RDF URI reference. + * Note: The URI is the unique identifier, in the RSS 2.0/atom case this is the GUID, for RSS + * 1.0 this is the URI attribute of the item. The Link is the URL that the item is accessible + * under, the URI is the permanent identifier which the aggregator should use to reference this + * item. Often the URI will use some standardized identifier scheme such as DOI's so that items + * can be identified even if they appear in multiple feeds with different "links" (they might be + * on different hosting platforms but be the same item). Also, though rare, there could be + * multiple items with the same link but a different URI and associated metadata which need to + * be treated as distinct entities. In the RSS 1.0 case the URI must be a valid RDF URI + * reference. *

* * @return the feed link, null if none. @@ -483,17 +465,15 @@ public class SyndFeedImpl implements Serializable, SyndFeed { /** * Sets the feed link. *

- * Note: The URI is the unique identifier, in the RSS 2.0/atom case this is - * the GUID, for RSS 1.0 this is the URI attribute of the item. The Link is - * the URL that the item is accessible under, the URI is the permanent - * identifier which the aggregator should use to reference this item. Often - * the URI will use some standardized identifier scheme such as DOI's so - * that items can be identified even if they appear in multiple feeds with - * different "links" (they might be on different hosting platforms but be - * the same item). Also, though rare, there could be multiple items with the - * same link but a different URI and associated metadata which need to be - * treated as distinct entities. In the RSS 1.0 case the URI must be a valid - * RDF URI reference. + * Note: The URI is the unique identifier, in the RSS 2.0/atom case this is the GUID, for RSS + * 1.0 this is the URI attribute of the item. The Link is the URL that the item is accessible + * under, the URI is the permanent identifier which the aggregator should use to reference this + * item. Often the URI will use some standardized identifier scheme such as DOI's so that items + * can be identified even if they appear in multiple feeds with different "links" (they might be + * on different hosting platforms but be the same item). Also, though rare, there could be + * multiple items with the same link but a different URI and associated metadata which need to + * be treated as distinct entities. In the RSS 1.0 case the URI must be a valid RDF URI + * reference. *

* * @param link the feed link to set, null if none. @@ -561,8 +541,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { /** * Returns the feed published date. *

- * This method is a convenience method, it maps to the Dublin Core module - * date. + * This method is a convenience method, it maps to the Dublin Core module date. *

* * @return the feed published date, null if none. @@ -576,8 +555,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { /** * Sets the feed published date. *

- * This method is a convenience method, it maps to the Dublin Core module - * date. + * This method is a convenience method, it maps to the Dublin Core module date. *

* * @param publishedDate the feed published date to set, null if none. @@ -591,8 +569,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { /** * Returns the feed copyright. *

- * This method is a convenience method, it maps to the Dublin Core module - * rights. + * This method is a convenience method, it maps to the Dublin Core module rights. *

* * @return the feed copyright, null if none. @@ -606,8 +583,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { /** * Sets the feed copyright. *

- * This method is a convenience method, it maps to the Dublin Core module - * rights. + * This method is a convenience method, it maps to the Dublin Core module rights. *

* * @param copyright the feed copyright to set, null if none. @@ -645,12 +621,10 @@ public class SyndFeedImpl implements Serializable, SyndFeed { /** * Returns the feed categories. *

- * This method is a convenience method, it maps to the Dublin Core module - * subjects. + * This method is a convenience method, it maps to the Dublin Core module subjects. *

* - * @return a list of SyndCategoryImpl elements with the feed categories, an - * empty list if none. + * @return a list of SyndCategoryImpl elements with the feed categories, an empty list if none. * */ @Override @@ -661,12 +635,11 @@ public class SyndFeedImpl implements Serializable, SyndFeed { /** * Sets the feed categories. *

- * This method is a convenience method, it maps to the Dublin Core module - * subjects. + * This method is a convenience method, it maps to the Dublin Core module subjects. *

* - * @param categories the list of SyndCategoryImpl elements with the feed - * categories to set, an empty list or null if none. + * @param categories the list of SyndCategoryImpl elements with the feed categories to set, an + * empty list or null if none. * */ @Override @@ -678,8 +651,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { * Returns the feed entries. *

* - * @return a list of SyndEntryImpl elements with the feed entries, an empty - * list if none. + * @return a list of SyndEntryImpl elements with the feed entries, an empty list if none. * */ @Override @@ -694,8 +666,8 @@ public class SyndFeedImpl implements Serializable, SyndFeed { * Sets the feed entries. *

* - * @param entries the list of SyndEntryImpl elements with the feed entries - * to set, an empty list or null if none. + * @param entries the list of SyndEntryImpl elements with the feed entries to set, an empty list + * or null if none. * */ @Override @@ -706,8 +678,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { /** * Returns the feed language. *

- * This method is a convenience method, it maps to the Dublin Core module - * language. + * This method is a convenience method, it maps to the Dublin Core module language. *

* * @return the feed language, null if none. @@ -721,8 +692,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { /** * Sets the feed language. *

- * This method is a convenience method, it maps to the Dublin Core module - * language. + * This method is a convenience method, it maps to the Dublin Core module language. *

* * @param language the feed language to set, null if none. @@ -737,8 +707,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { * Returns the feed modules. *

* - * @return a list of ModuleImpl elements with the feed modules, an empty - * list if none. + * @return a list of ModuleImpl elements with the feed modules, an empty list if none. * */ @Override @@ -756,8 +725,8 @@ public class SyndFeedImpl implements Serializable, SyndFeed { * Sets the feed modules. *

* - * @param modules the list of ModuleImpl elements with the feed modules to - * set, an empty list or null if none. + * @param modules the list of ModuleImpl elements with the feed modules to set, an empty list or + * null if none. * */ @Override @@ -865,8 +834,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { /** * Returns the feed author. *

- * This method is a convenience method, it maps to the Dublin Core module - * creator. + * This method is a convenience method, it maps to the Dublin Core module creator. *

* * @return the feed author, null if none. @@ -880,8 +848,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { /** * Sets the feed author. *

- * This method is a convenience method, it maps to the Dublin Core module - * creator. + * This method is a convenience method, it maps to the Dublin Core module creator. *

* * @param author the feed author to set, null if none. @@ -949,7 +916,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { * {@inheritDoc} */ @Override - public void setDocs(String docs) { + public void setDocs(final String docs) { this.docs = docs; } @@ -965,7 +932,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { * {@inheritDoc} */ @Override - public void setGenerator(String generator) { + public void setGenerator(final String generator) { this.generator = generator; } @@ -981,7 +948,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { * {@inheritDoc} */ @Override - public void setManagingEditor(String managingEditor) { + public void setManagingEditor(final String managingEditor) { this.managingEditor = managingEditor; } @@ -997,7 +964,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { * {@inheritDoc} */ @Override - public void setWebMaster(String webMaster) { + public void setWebMaster(final String webMaster) { this.webMaster = webMaster; } @@ -1013,7 +980,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { * {@inheritDoc} */ @Override - public void setStyleSheet(String styleSheet) { + public void setStyleSheet(final String styleSheet) { this.styleSheet = styleSheet; } } diff --git a/src/main/java/com/sun/syndication/feed/synd/SyndImage.java b/src/main/java/com/sun/syndication/feed/synd/SyndImage.java index 9de2511..38c2932 100644 --- a/src/main/java/com/sun/syndication/feed/synd/SyndImage.java +++ b/src/main/java/com/sun/syndication/feed/synd/SyndImage.java @@ -104,8 +104,7 @@ public interface SyndImage extends Cloneable, CopyFrom { *

* * @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. * */ public Object clone() throws CloneNotSupportedException; diff --git a/src/main/java/com/sun/syndication/feed/synd/SyndImageImpl.java b/src/main/java/com/sun/syndication/feed/synd/SyndImageImpl.java index 46862b5..9f823ce 100644 --- a/src/main/java/com/sun/syndication/feed/synd/SyndImageImpl.java +++ b/src/main/java/com/sun/syndication/feed/synd/SyndImageImpl.java @@ -54,8 +54,7 @@ public class SyndImageImpl implements Serializable, SyndImage { *

* * @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 @@ -64,8 +63,8 @@ public class SyndImageImpl implements Serializable, SyndImage { } /** - * 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/com/sun/syndication/feed/synd/SyndLink.java b/src/main/java/com/sun/syndication/feed/synd/SyndLink.java index 2925c41..d4ac3a5 100644 --- a/src/main/java/com/sun/syndication/feed/synd/SyndLink.java +++ b/src/main/java/com/sun/syndication/feed/synd/SyndLink.java @@ -28,15 +28,14 @@ public interface SyndLink { *

* * @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. * */ public abstract Object clone() throws CloneNotSupportedException; /** - * 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/com/sun/syndication/feed/synd/SyndLinkImpl.java b/src/main/java/com/sun/syndication/feed/synd/SyndLinkImpl.java index 17cebc0..2908fb7 100644 --- a/src/main/java/com/sun/syndication/feed/synd/SyndLinkImpl.java +++ b/src/main/java/com/sun/syndication/feed/synd/SyndLinkImpl.java @@ -54,8 +54,7 @@ public class SyndLinkImpl implements Cloneable, Serializable, SyndLink { *

* * @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 @@ -64,8 +63,8 @@ public class SyndLinkImpl implements Cloneable, Serializable, SyndLink { } /** - * 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/com/sun/syndication/feed/synd/SyndPerson.java b/src/main/java/com/sun/syndication/feed/synd/SyndPerson.java index 349a0a6..3f3ee75 100644 --- a/src/main/java/com/sun/syndication/feed/synd/SyndPerson.java +++ b/src/main/java/com/sun/syndication/feed/synd/SyndPerson.java @@ -20,8 +20,7 @@ package com.sun.syndication.feed.synd; import com.sun.syndication.feed.module.Extendable; /** - * Bean interface for authors and contributors of SyndFeedImpl feeds and - * entries. + * Bean interface for authors and contributors of SyndFeedImpl feeds and entries. *

* * @author Dave Johnson @@ -64,8 +63,7 @@ public interface SyndPerson extends Cloneable, Extendable { *

* * @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. * */ public Object clone() throws CloneNotSupportedException; diff --git a/src/main/java/com/sun/syndication/feed/synd/SyndPersonImpl.java b/src/main/java/com/sun/syndication/feed/synd/SyndPersonImpl.java index f825742..7882d23 100644 --- a/src/main/java/com/sun/syndication/feed/synd/SyndPersonImpl.java +++ b/src/main/java/com/sun/syndication/feed/synd/SyndPersonImpl.java @@ -41,8 +41,8 @@ public class SyndPersonImpl implements Serializable, SyndPerson { private List modules; /** - * For implementations extending SyndContentImpl to be able to use the - * ObjectBean functionality with extended interfaces. + * For implementations extending SyndContentImpl to be able to use the ObjectBean functionality + * with extended interfaces. */ public SyndPersonImpl() { objBean = new ObjectBean(SyndPerson.class, this); @@ -53,8 +53,7 @@ public class SyndPersonImpl implements Serializable, SyndPerson { *

* * @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 @@ -63,8 +62,8 @@ public class SyndPersonImpl implements Serializable, SyndPerson { } /** - * 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. @@ -181,8 +180,7 @@ public class SyndPersonImpl implements Serializable, SyndPerson { * Returns the person modules. *

* - * @return a list of ModuleImpl elements with the person modules, an empty - * list if none. + * @return a list of ModuleImpl elements with the person modules, an empty list if none. */ @Override public List getModules() { @@ -196,8 +194,8 @@ public class SyndPersonImpl implements Serializable, SyndPerson { * Sets the person modules. *

* - * @param modules the list of ModuleImpl elements with the person modules to - * set, an empty list or null if none. + * @param modules the list of ModuleImpl elements with the person modules to set, an empty list + * or null if none. * */ @Override diff --git a/src/main/java/com/sun/syndication/feed/synd/impl/ConverterForRSS091Userland.java b/src/main/java/com/sun/syndication/feed/synd/impl/ConverterForRSS091Userland.java index 4ffa9fe..eb34178 100644 --- a/src/main/java/com/sun/syndication/feed/synd/impl/ConverterForRSS091Userland.java +++ b/src/main/java/com/sun/syndication/feed/synd/impl/ConverterForRSS091Userland.java @@ -73,7 +73,7 @@ public class ConverterForRSS091Userland extends ConverterForRSS090 { if (!creators.contains(author)) { final Set s = new LinkedHashSet(); // using a set to - // remove + // remove // duplicates s.addAll(creators); // DC creators s.add(author); // feed native author diff --git a/src/main/java/com/sun/syndication/feed/synd/impl/ConverterForRSS094.java b/src/main/java/com/sun/syndication/feed/synd/impl/ConverterForRSS094.java index 9495e57..75a6172 100644 --- a/src/main/java/com/sun/syndication/feed/synd/impl/ConverterForRSS094.java +++ b/src/main/java/com/sun/syndication/feed/synd/impl/ConverterForRSS094.java @@ -53,7 +53,7 @@ public class ConverterForRSS094 extends ConverterForRSS093 { final List cats = channel.getCategories(); // c if (cats.size() > 0) { final Set s = new LinkedHashSet(); // using a - // set to + // set to // remove // duplicates s.addAll(createSyndCategories(cats)); // feed native categories @@ -74,7 +74,7 @@ public class ConverterForRSS094 extends ConverterForRSS093 { final List creators = ((DCModule) syndEntry.getModule(DCModule.URI)).getCreators(); if (!creators.contains(author)) { final Set s = new LinkedHashSet(); // using a set to - // remove + // remove // duplicates s.addAll(creators); // DC creators s.add(author); // feed native author diff --git a/src/main/java/com/sun/syndication/feed/synd/impl/Converters.java b/src/main/java/com/sun/syndication/feed/synd/impl/Converters.java index ec84f05..487d374 100644 --- a/src/main/java/com/sun/syndication/feed/synd/impl/Converters.java +++ b/src/main/java/com/sun/syndication/feed/synd/impl/Converters.java @@ -22,8 +22,8 @@ import com.sun.syndication.feed.synd.Converter; import com.sun.syndication.io.impl.PluginManager; /** - * Created by IntelliJ IDEA. User: tucu Date: May 21, 2004 Time: 5:26:04 PM To - * change this template use Options | File Templates. + * Created by IntelliJ IDEA. User: tucu Date: May 21, 2004 Time: 5:26:04 PM To change this template + * use Options | File Templates. */ public class Converters extends PluginManager { diff --git a/src/main/java/com/sun/syndication/feed/synd/impl/URINormalizer.java b/src/main/java/com/sun/syndication/feed/synd/impl/URINormalizer.java index 7cde59e..bc7a5e7 100644 --- a/src/main/java/com/sun/syndication/feed/synd/impl/URINormalizer.java +++ b/src/main/java/com/sun/syndication/feed/synd/impl/URINormalizer.java @@ -13,8 +13,8 @@ public class URINormalizer { *

* * @param uri to normalize. - * @return the normalized value of the given URI, or null if the - * given URI was null. + * @return the normalized value of the given URI, or null if the given URI was + * null. */ public static String normalize(final String uri) { String normalizedUri = null; diff --git a/src/main/java/com/sun/syndication/io/DelegatingModuleGenerator.java b/src/main/java/com/sun/syndication/io/DelegatingModuleGenerator.java index 26a840c..ad0d04a 100644 --- a/src/main/java/com/sun/syndication/io/DelegatingModuleGenerator.java +++ b/src/main/java/com/sun/syndication/io/DelegatingModuleGenerator.java @@ -1,15 +1,13 @@ package com.sun.syndication.io; /** - * Adds the ability to give a direct wire feed generator reference to plugin - * modules that need to call back to their wire feed to complete generation of - * their particular namespace. Examples of such parsers include the - * SSE091Generator. + * Adds the ability to give a direct wire feed generator reference to plugin modules that need to + * call back to their wire feed to complete generation of their particular namespace. Examples of + * such parsers include the SSE091Generator. */ public interface DelegatingModuleGenerator extends ModuleGenerator { /** - * Provides a parent wirefeed reference to this ModuleParser, or - * "plugin-in". + * Provides a parent wirefeed reference to this ModuleParser, or "plugin-in". * * @param feedGenerator the parent wirefeed generator for this plugin. */ diff --git a/src/main/java/com/sun/syndication/io/DelegatingModuleParser.java b/src/main/java/com/sun/syndication/io/DelegatingModuleParser.java index f917c82..f9945ca 100644 --- a/src/main/java/com/sun/syndication/io/DelegatingModuleParser.java +++ b/src/main/java/com/sun/syndication/io/DelegatingModuleParser.java @@ -1,14 +1,13 @@ package com.sun.syndication.io; /** - * Adds the ability to give a direct wire feed reference to plugin modules that - * need to call back to their wire feed to complete parsing of their particular - * namespace. Examples of such parsers include the SSE091Parser. + * Adds the ability to give a direct wire feed reference to plugin modules that need to call back to + * their wire feed to complete parsing of their particular namespace. Examples of such parsers + * include the SSE091Parser. */ public interface DelegatingModuleParser extends ModuleParser { /** - * Provides a parent wirefeed reference to this ModuleParser, or - * "plugin-in". + * Provides a parent wirefeed reference to this ModuleParser, or "plugin-in". * * @param feedParser the parent wirefeed parser for this plugin. */ diff --git a/src/main/java/com/sun/syndication/io/FeedException.java b/src/main/java/com/sun/syndication/io/FeedException.java index 0a4ee97..af3be4a 100644 --- a/src/main/java/com/sun/syndication/io/FeedException.java +++ b/src/main/java/com/sun/syndication/io/FeedException.java @@ -17,8 +17,8 @@ package com.sun.syndication.io; /** - * Exception thrown by WireFeedInput, WireFeedOutput, WireFeedParser and - * WireFeedGenerator instances if they can not parse or generate a feed. + * Exception thrown by WireFeedInput, WireFeedOutput, WireFeedParser and WireFeedGenerator instances + * if they can not parse or generate a feed. *

* * @author Alejandro Abdelnur diff --git a/src/main/java/com/sun/syndication/io/ModuleGenerator.java b/src/main/java/com/sun/syndication/io/ModuleGenerator.java index 7b92363..cdc478d 100644 --- a/src/main/java/com/sun/syndication/io/ModuleGenerator.java +++ b/src/main/java/com/sun/syndication/io/ModuleGenerator.java @@ -46,16 +46,13 @@ public interface ModuleGenerator { public String getNamespaceUri(); /** - * Returns a set with all the URIs (JDOM Namespace elements) this module - * generator uses. + * Returns a set with all the URIs (JDOM Namespace elements) this module generator uses. *

- * It is used by the the feed generators to add their namespace definition - * in the root element of the generated document (forward-missing of Java - * 5.0 Generics). + * It is used by the the feed generators to add their namespace definition in the root element + * of the generated document (forward-missing of Java 5.0 Generics). *

* - * @return a set with all the URIs (JDOM Namespace elements) this module - * generator uses. + * @return a set with all the URIs (JDOM Namespace elements) this module generator uses. */ public Set getNamespaces(); diff --git a/src/main/java/com/sun/syndication/io/ModuleParser.java b/src/main/java/com/sun/syndication/io/ModuleParser.java index 4ea7dca..e41399e 100644 --- a/src/main/java/com/sun/syndication/io/ModuleParser.java +++ b/src/main/java/com/sun/syndication/io/ModuleParser.java @@ -48,10 +48,8 @@ public interface ModuleParser { * Parses the XML node (JDOM element) extracting module information. *

* - * @param element the XML node (JDOM element) to extract module information - * from. - * @return a module instance, null if the element did not have module - * information. + * @param element the XML node (JDOM element) to extract module information from. + * @return a module instance, null if the element did not have module information. * */ public Module parse(Element element, Locale locale); diff --git a/src/main/java/com/sun/syndication/io/ParsingFeedException.java b/src/main/java/com/sun/syndication/io/ParsingFeedException.java index ea8c189..841c40c 100644 --- a/src/main/java/com/sun/syndication/io/ParsingFeedException.java +++ b/src/main/java/com/sun/syndication/io/ParsingFeedException.java @@ -53,14 +53,12 @@ public class ParsingFeedException extends FeedException { } /** - * Returns the line number of the end of the text where the parse error - * occurred. + * Returns the line number of the end of the text where the parse error occurred. *

* The first line in the document is line 1. *

* - * @return an integer representing the line number, or -1 if the information - * is not available. + * @return an integer representing the line number, or -1 if the information is not available. */ public int getLineNumber() { if (getCause() instanceof JDOMParseException) { @@ -71,14 +69,12 @@ public class ParsingFeedException extends FeedException { } /** - * Returns the column number of the end of the text where the parse error - * occurred. + * Returns the column number of the end of the text where the parse error occurred. *

* The first column in a line is position 1. *

* - * @return an integer representing the column number, or -1 if the - * information is not available. + * @return an integer representing the column number, or -1 if the information is not available. */ public int getColumnNumber() { if (getCause() instanceof JDOMParseException) { diff --git a/src/main/java/com/sun/syndication/io/SAXBuilder.java b/src/main/java/com/sun/syndication/io/SAXBuilder.java index 7582c1a..04be9bf 100644 --- a/src/main/java/com/sun/syndication/io/SAXBuilder.java +++ b/src/main/java/com/sun/syndication/io/SAXBuilder.java @@ -17,14 +17,15 @@ import org.xml.sax.XMLReader; * */ public class SAXBuilder extends org.jdom2.input.SAXBuilder { + public SAXBuilder(final XMLReaderJDOMFactory factory) { super(factory); } /** * - * @deprecated use SAXBuilder(XMLReaderJDOMFactory) with either - * XMLReaders.DTDVALIDATING or XMLReaders.NONVALIDATING + * @deprecated use SAXBuilder(XMLReaderJDOMFactory) with either XMLReaders.DTDVALIDATING or + * XMLReaders.NONVALIDATING * @param validate */ @Deprecated diff --git a/src/main/java/com/sun/syndication/io/SyndFeedInput.java b/src/main/java/com/sun/syndication/io/SyndFeedInput.java index 18e1bc3..dab1890 100644 --- a/src/main/java/com/sun/syndication/io/SyndFeedInput.java +++ b/src/main/java/com/sun/syndication/io/SyndFeedInput.java @@ -29,8 +29,8 @@ import com.sun.syndication.feed.synd.SyndFeed; import com.sun.syndication.feed.synd.SyndFeedImpl; /** - * Parses an XML document (File, InputStream, Reader, W3C SAX InputSource, W3C - * DOM Document or JDom DOcument) into an SyndFeedImpl. + * Parses an XML document (File, InputStream, Reader, W3C SAX InputSource, W3C DOM Document or JDom + * DOcument) into an SyndFeedImpl. *

* It delegates to a WireFeedInput to handle all feed types. *

@@ -55,8 +55,8 @@ public class SyndFeedInput { * Creates a SyndFeedInput instance. *

* - * @param validate indicates if the input should be validated. NOT - * IMPLEMENTED YET (validation does not happen) + * @param validate indicates if the input should be validated. NOT IMPLEMENTED YET (validation + * does not happen) * */ public SyndFeedInput(final boolean validate, final Locale locale) { @@ -66,14 +66,11 @@ public class SyndFeedInput { /** * Enables XML healing in the WiredFeedInput instance. *

- * Healing trims leading chars from the stream (empty spaces and comments) - * until the XML prolog. + * Healing trims leading chars from the stream (empty spaces and comments) until the XML prolog. *

- * Healing resolves HTML entities (from literal to code number) in the - * reader. + * Healing resolves HTML entities (from literal to code number) in the reader. *

- * The healing is done only with the build(File) and build(Reader) - * signatures. + * The healing is done only with the build(File) and build(Reader) signatures. *

* By default is TRUE. *

@@ -86,17 +83,13 @@ public class SyndFeedInput { } /** - * Indicates if the WiredFeedInput instance will XML heal (if necessary) the - * character stream. + * Indicates if the WiredFeedInput instance will XML heal (if necessary) the character stream. *

- * Healing trims leading chars from the stream (empty spaces and comments) - * until the XML prolog. + * Healing trims leading chars from the stream (empty spaces and comments) until the XML prolog. *

- * Healing resolves HTML entities (from literal to code number) in the - * reader. + * Healing resolves HTML entities (from literal to code number) in the reader. *

- * The healing is done only with the build(File) and build(Reader) - * signatures. + * The healing is done only with the build(File) and build(Reader) signatures. *

* By default is TRUE. *

@@ -116,8 +109,8 @@ public class SyndFeedInput { * @return the SyndFeedImpl read from the file. * @throws FileNotFoundException thrown if the file could not be found. * @throws IOException thrown if there is problem reading the file. - * @throws IllegalArgumentException thrown if feed type could not be - * understood by any of the underlying parsers. + * @throws IllegalArgumentException thrown if feed type could not be understood by any of the + * underlying parsers. * @throws FeedException if the feed could not be parsed * */ @@ -131,8 +124,8 @@ public class SyndFeedInput { * * @param reader Reader to read to create the SyndFeedImpl. * @return the SyndFeedImpl read from the Reader. - * @throws IllegalArgumentException thrown if feed type could not be - * understood by any of the underlying parsers. + * @throws IllegalArgumentException thrown if feed type could not be understood by any of the + * underlying parsers. * @throws FeedException if the feed could not be parsed * */ @@ -146,8 +139,8 @@ public class SyndFeedInput { * * @param is W3C SAX InputSource to read to create the SyndFeedImpl. * @return the SyndFeedImpl read from the W3C SAX InputSource. - * @throws IllegalArgumentException thrown if feed type could not be - * understood by any of the underlying parsers. + * @throws IllegalArgumentException thrown if feed type could not be understood by any of the + * underlying parsers. * @throws FeedException if the feed could not be parsed * */ @@ -161,8 +154,8 @@ public class SyndFeedInput { * * @param document W3C DOM document to read to create the SyndFeedImpl. * @return the SyndFeedImpl read from the W3C DOM document. - * @throws IllegalArgumentException thrown if feed type could not be - * understood by any of the underlying parsers. + * @throws IllegalArgumentException thrown if feed type could not be understood by any of the + * underlying parsers. * @throws FeedException if the feed could not be parsed * */ @@ -176,8 +169,8 @@ public class SyndFeedInput { * * @param document JDOM document to read to create the SyndFeedImpl. * @return the SyndFeedImpl read from the JDOM document. - * @throws IllegalArgumentException thrown if feed type could not be - * understood by any of the underlying parsers. + * @throws IllegalArgumentException thrown if feed type could not be understood by any of the + * underlying parsers. * @throws FeedException if the feed could not be parsed * */ @@ -187,8 +180,7 @@ public class SyndFeedInput { /** * - * @return true if the WireFeed is made available in the SyndFeed. False by - * default. + * @return true if the WireFeed is made available in the SyndFeed. False by default. */ public boolean isPreserveWireFeed() { return preserveWireFeed; @@ -196,8 +188,8 @@ public class SyndFeedInput { /** * - * @param preserveWireFeed set to true to make the WireFeed is made - * available in the SyndFeed. False by default. + * @param preserveWireFeed set to true to make the WireFeed is made available in the SyndFeed. + * False by default. */ public void setPreserveWireFeed(final boolean preserveWireFeed) { this.preserveWireFeed = preserveWireFeed; diff --git a/src/main/java/com/sun/syndication/io/SyndFeedOutput.java b/src/main/java/com/sun/syndication/io/SyndFeedOutput.java index 01d715e..ccce3b6 100644 --- a/src/main/java/com/sun/syndication/io/SyndFeedOutput.java +++ b/src/main/java/com/sun/syndication/io/SyndFeedOutput.java @@ -25,8 +25,8 @@ import org.jdom2.Document; import com.sun.syndication.feed.synd.SyndFeed; /** - * Generates an XML document (String, File, OutputStream, Writer, W3C DOM - * document or JDOM document) out of an SyndFeedImpl.. + * Generates an XML document (String, File, OutputStream, Writer, W3C DOM document or JDOM document) + * out of an SyndFeedImpl.. *

* It delegates to a WireFeedOutput to generate all feed types. *

@@ -49,18 +49,15 @@ public class SyndFeedOutput { /** * Creates a String with the XML representation for the given SyndFeedImpl. *

- * If the feed encoding is not NULL, it will be used in the XML prolog - * encoding attribute. It is the responsibility of the developer to ensure - * that if the String is written to a character stream the stream charset is - * the same as the feed encoding property. + * If the feed encoding is not NULL, it will be used in the XML prolog encoding attribute. It is + * the responsibility of the developer to ensure that if the String is written to a character + * stream the stream charset is the same as the feed encoding property. *

* - * @param feed Abstract feed to create XML representation from. The type of - * the SyndFeedImpl must match the type given to the FeedOuptut - * constructor. + * @param feed Abstract feed to create XML representation from. The type of the SyndFeedImpl + * must match the type given to the FeedOuptut constructor. * @return a String with the XML representation for the given SyndFeedImpl. - * @throws FeedException thrown if the XML representation for the feed could - * not be created. + * @throws FeedException thrown if the XML representation for the feed could not be created. * */ public String outputString(final SyndFeed feed) throws FeedException { @@ -70,19 +67,16 @@ public class SyndFeedOutput { /** * Creates a String with the XML representation for the given SyndFeedImpl. *

- * If the feed encoding is not NULL, it will be used in the XML prolog - * encoding attribute. It is the responsibility of the developer to ensure - * that if the String is written to a character stream the stream charset is - * the same as the feed encoding property. + * If the feed encoding is not NULL, it will be used in the XML prolog encoding attribute. It is + * the responsibility of the developer to ensure that if the String is written to a character + * stream the stream charset is the same as the feed encoding property. *

* - * @param feed Abstract feed to create XML representation from. The type of - * the SyndFeedImpl must match the type given to the FeedOuptut - * constructor. + * @param feed Abstract feed to create XML representation from. The type of the SyndFeedImpl + * must match the type given to the FeedOuptut constructor. * @param prettyPrint pretty-print XML (true) oder collapsed * @return a String with the XML representation for the given SyndFeedImpl. - * @throws FeedException thrown if the XML representation for the feed could - * not be created. + * @throws FeedException thrown if the XML representation for the feed could not be created. * */ public String outputString(final SyndFeed feed, final boolean prettyPrint) throws FeedException { @@ -90,23 +84,19 @@ public class SyndFeedOutput { } /** - * Creates a File containing with the XML representation for the given - * SyndFeedImpl. + * Creates a File containing with the XML representation for the given SyndFeedImpl. *

- * If the feed encoding is not NULL, it will be used in the XML prolog - * encoding attribute. The platform default charset encoding is used to - * write the feed to the file. It is the responsibility of the developer to - * ensure the feed encoding is set to the platform charset encoding. + * If the feed encoding is not NULL, it will be used in the XML prolog encoding attribute. The + * platform default charset encoding is used to write the feed to the file. It is the + * responsibility of the developer to ensure the feed encoding is set to the platform charset + * encoding. *

* - * @param feed Abstract feed to create XML representation from. The type of - * the SyndFeedImpl must match the type given to the FeedOuptut - * constructor. - * @param file the file where to write the XML representation for the given - * SyndFeedImpl. + * @param feed Abstract feed to create XML representation from. The type of the SyndFeedImpl + * must match the type given to the FeedOuptut constructor. + * @param file the file where to write the XML representation for the given SyndFeedImpl. * @throws IOException thrown if there was some problem writing to the File. - * @throws FeedException thrown if the XML representation for the feed could - * not be created. + * @throws FeedException thrown if the XML representation for the feed could not be created. * */ public void output(final SyndFeed feed, final File file) throws IOException, FeedException { @@ -114,24 +104,20 @@ public class SyndFeedOutput { } /** - * Creates a File containing with the XML representation for the given - * SyndFeedImpl. + * Creates a File containing with the XML representation for the given SyndFeedImpl. *

- * If the feed encoding is not NULL, it will be used in the XML prolog - * encoding attribute. The platform default charset encoding is used to - * write the feed to the file. It is the responsibility of the developer to - * ensure the feed encoding is set to the platform charset encoding. + * If the feed encoding is not NULL, it will be used in the XML prolog encoding attribute. The + * platform default charset encoding is used to write the feed to the file. It is the + * responsibility of the developer to ensure the feed encoding is set to the platform charset + * encoding. *

* - * @param feed Abstract feed to create XML representation from. The type of - * the SyndFeedImpl must match the type given to the FeedOuptut - * constructor. + * @param feed Abstract feed to create XML representation from. The type of the SyndFeedImpl + * must match the type given to the FeedOuptut constructor. * @param prettyPrint pretty-print XML (true) oder collapsed - * @param file the file where to write the XML representation for the given - * SyndFeedImpl. + * @param file the file where to write the XML representation for the given SyndFeedImpl. * @throws IOException thrown if there was some problem writing to the File. - * @throws FeedException thrown if the XML representation for the feed could - * not be created. + * @throws FeedException thrown if the XML representation for the feed could not be created. * */ public void output(final SyndFeed feed, final File file, final boolean prettyPrint) throws IOException, FeedException { @@ -141,21 +127,16 @@ public class SyndFeedOutput { /** * Writes to an Writer the XML representation for the given SyndFeedImpl. *

- * If the feed encoding is not NULL, it will be used in the XML prolog - * encoding attribute. It is the responsibility of the developer to ensure - * that if the String is written to a character stream the stream charset is - * the same as the feed encoding property. + * If the feed encoding is not NULL, it will be used in the XML prolog encoding attribute. It is + * the responsibility of the developer to ensure that if the String is written to a character + * stream the stream charset is the same as the feed encoding property. *

* - * @param feed Abstract feed to create XML representation from. The type of - * the SyndFeedImpl must match the type given to the FeedOuptut - * constructor. - * @param writer Writer to write the XML representation for the given - * SyndFeedImpl. - * @throws IOException thrown if there was some problem writing to the - * Writer. - * @throws FeedException thrown if the XML representation for the feed could - * not be created. + * @param feed Abstract feed to create XML representation from. The type of the SyndFeedImpl + * must match the type given to the FeedOuptut constructor. + * @param writer Writer to write the XML representation for the given SyndFeedImpl. + * @throws IOException thrown if there was some problem writing to the Writer. + * @throws FeedException thrown if the XML representation for the feed could not be created. * */ public void output(final SyndFeed feed, final Writer writer) throws IOException, FeedException { @@ -165,22 +146,17 @@ public class SyndFeedOutput { /** * Writes to an Writer the XML representation for the given SyndFeedImpl. *

- * If the feed encoding is not NULL, it will be used in the XML prolog - * encoding attribute. It is the responsibility of the developer to ensure - * that if the String is written to a character stream the stream charset is - * the same as the feed encoding property. + * If the feed encoding is not NULL, it will be used in the XML prolog encoding attribute. It is + * the responsibility of the developer to ensure that if the String is written to a character + * stream the stream charset is the same as the feed encoding property. *

* - * @param feed Abstract feed to create XML representation from. The type of - * the SyndFeedImpl must match the type given to the FeedOuptut - * constructor. + * @param feed Abstract feed to create XML representation from. The type of the SyndFeedImpl + * must match the type given to the FeedOuptut constructor. * @param prettyPrint pretty-print XML (true) oder collapsed - * @param writer Writer to write the XML representation for the given - * SyndFeedImpl. - * @throws IOException thrown if there was some problem writing to the - * Writer. - * @throws FeedException thrown if the XML representation for the feed could - * not be created. + * @param writer Writer to write the XML representation for the given SyndFeedImpl. + * @throws IOException thrown if there was some problem writing to the Writer. + * @throws FeedException thrown if the XML representation for the feed could not be created. * */ public void output(final SyndFeed feed, final Writer writer, final boolean prettyPrint) throws IOException, FeedException { @@ -193,12 +169,10 @@ public class SyndFeedOutput { * This method does not use the feed encoding property. *

* - * @param feed Abstract feed to create W3C DOM document from. The type of - * the SyndFeedImpl must match the type given to the FeedOuptut - * constructor. + * @param feed Abstract feed to create W3C DOM document from. The type of the SyndFeedImpl must + * match the type given to the FeedOuptut constructor. * @return the W3C DOM document for the given SyndFeedImpl. - * @throws FeedException thrown if the W3C DOM document for the feed could - * not be created. + * @throws FeedException thrown if the W3C DOM document for the feed could not be created. * */ public org.w3c.dom.Document outputW3CDom(final SyndFeed feed) throws FeedException { @@ -211,12 +185,10 @@ public class SyndFeedOutput { * This method does not use the feed encoding property. *

* - * @param feed Abstract feed to create JDOM document from. The type of the - * SyndFeedImpl must match the type given to the FeedOuptut - * constructor. + * @param feed Abstract feed to create JDOM document from. The type of the SyndFeedImpl must + * match the type given to the FeedOuptut constructor. * @return the JDOM document for the given SyndFeedImpl. - * @throws FeedException thrown if the JDOM document for the feed could not - * be created. + * @throws FeedException thrown if the JDOM document for the feed could not be created. * */ public Document outputJDom(final SyndFeed feed) throws FeedException { diff --git a/src/main/java/com/sun/syndication/io/WireFeedGenerator.java b/src/main/java/com/sun/syndication/io/WireFeedGenerator.java index 2fc66cb..e367032 100644 --- a/src/main/java/com/sun/syndication/io/WireFeedGenerator.java +++ b/src/main/java/com/sun/syndication/io/WireFeedGenerator.java @@ -50,8 +50,8 @@ public interface WireFeedGenerator { * * @param feed the feed bean to generate the XML document from. * @return the generated XML document (JDOM). - * @throws IllegalArgumentException thrown if the type of the given feed - * bean does not match with the type of the WireFeedGenerator. + * @throws IllegalArgumentException thrown if the type of the given feed bean does not match + * with the type of the WireFeedGenerator. * @throws FeedException thrown if the XML Document could not be created. * */ diff --git a/src/main/java/com/sun/syndication/io/WireFeedInput.java b/src/main/java/com/sun/syndication/io/WireFeedInput.java index 281e549..138c671 100644 --- a/src/main/java/com/sun/syndication/io/WireFeedInput.java +++ b/src/main/java/com/sun/syndication/io/WireFeedInput.java @@ -44,10 +44,11 @@ import com.sun.syndication.io.impl.FeedParsers; import com.sun.syndication.io.impl.XmlFixerReader; /** - * Parses an XML document (File, InputStream, Reader, W3C SAX InputSource, W3C DOM Document or JDom DOcument) into an WireFeed (RSS/Atom). + * Parses an XML document (File, InputStream, Reader, W3C SAX InputSource, W3C DOM Document or JDom + * DOcument) into an WireFeed (RSS/Atom). *

- * It accepts all flavors of RSS (0.90, 0.91, 0.92, 0.93, 0.94, 1.0 and 2.0) and Atom 0.3 feeds. Parsers are plugable (they must implement the WireFeedParser - * interface). + * It accepts all flavors of RSS (0.90, 0.91, 0.92, 0.93, 0.94, 1.0 and 2.0) and Atom 0.3 feeds. + * Parsers are plugable (they must implement the WireFeedParser interface). *

* The WireFeedInput useds liberal parsers. *

@@ -115,7 +116,8 @@ public class WireFeedInput { * Creates a WireFeedInput instance. *

* - * @param validate indicates if the input should be validated. NOT IMPLEMENTED YET (validation does not happen) + * @param validate indicates if the input should be validated. NOT IMPLEMENTED YET (validation + * does not happen) * */ public WireFeedInput(final boolean validate, final Locale locale) { @@ -172,7 +174,8 @@ public class WireFeedInput { * @return the WireFeed read from the file. * @throws FileNotFoundException thrown if the file could not be found. * @throws IOException thrown if there is problem reading the file. - * @throws IllegalArgumentException thrown if feed type could not be understood by any of the underlying parsers. + * @throws IllegalArgumentException thrown if feed type could not be understood by any of the + * underlying parsers. * @throws FeedException if the feed could not be parsed * */ @@ -195,7 +198,8 @@ public class WireFeedInput { * * @param reader Reader to read to create the WireFeed. * @return the WireFeed read from the Reader. - * @throws IllegalArgumentException thrown if feed type could not be understood by any of the underlying parsers. + * @throws IllegalArgumentException thrown if feed type could not be understood by any of the + * underlying parsers. * @throws FeedException if the feed could not be parsed * */ @@ -224,7 +228,8 @@ public class WireFeedInput { * * @param is W3C SAX InputSource to read to create the WireFeed. * @return the WireFeed read from the W3C SAX InputSource. - * @throws IllegalArgumentException thrown if feed type could not be understood by any of the underlying parsers. + * @throws IllegalArgumentException thrown if feed type could not be understood by any of the + * underlying parsers. * @throws FeedException if the feed could not be parsed * */ @@ -250,7 +255,8 @@ public class WireFeedInput { * * @param document W3C DOM document to read to create the WireFeed. * @return the WireFeed read from the W3C DOM document. - * @throws IllegalArgumentException thrown if feed type could not be understood by any of the underlying parsers. + * @throws IllegalArgumentException thrown if feed type could not be understood by any of the + * underlying parsers. * @throws FeedException if the feed could not be parsed * */ @@ -274,7 +280,8 @@ public class WireFeedInput { * * @param document JDOM document to read to create the WireFeed. * @return the WireFeed read from the JDOM document. - * @throws IllegalArgumentException thrown if feed type could not be understood by any of the underlying parsers. + * @throws IllegalArgumentException thrown if feed type could not be understood by any of the + * underlying parsers. * @throws FeedException if the feed could not be parsed * */ diff --git a/src/main/java/com/sun/syndication/io/WireFeedOutput.java b/src/main/java/com/sun/syndication/io/WireFeedOutput.java index 398806f..16d9ee6 100644 --- a/src/main/java/com/sun/syndication/io/WireFeedOutput.java +++ b/src/main/java/com/sun/syndication/io/WireFeedOutput.java @@ -35,10 +35,11 @@ import com.sun.syndication.feed.impl.ConfigurableClassLoader; import com.sun.syndication.io.impl.FeedGenerators; /** - * Generates an XML document (String, File, OutputStream, Writer, W3C DOM document or JDOM document) out of an WireFeed (RSS/Atom). + * Generates an XML document (String, File, OutputStream, Writer, W3C DOM document or JDOM document) + * out of an WireFeed (RSS/Atom). *

- * It generates all flavors of RSS (0.90, 0.91, 0.92, 0.93, 0.94, 1.0 and 2.0) and Atom 0.3 feeds. Generators are plugable (they must implement the ModuleParser - * interface). + * It generates all flavors of RSS (0.90, 0.91, 0.92, 0.93, 0.94, 1.0 and 2.0) and Atom 0.3 feeds. + * Generators are plugable (they must implement the ModuleParser interface). *

* * @author Alejandro Abdelnur @@ -83,15 +84,18 @@ public class WireFeedOutput { /** * Creates a String with the XML representation for the given WireFeed. *

- * If the feed encoding is not NULL, it will be used in the XML prolog encoding attribute. It is the responsibility of the developer to ensure that if the - * String is written to a character stream the stream charset is the same as the feed encoding property. + * If the feed encoding is not NULL, it will be used in the XML prolog encoding attribute. It is + * the responsibility of the developer to ensure that if the String is written to a character + * stream the stream charset is the same as the feed encoding property. *

* NOTE: This method delages to the 'Document WireFeedOutput#outputJDom(WireFeed)'. *

* - * @param feed Abstract feed to create XML representation from. The type of the WireFeed must match the type given to the FeedOuptut constructor. + * @param feed Abstract feed to create XML representation from. The type of the WireFeed must + * match the type given to the FeedOuptut constructor. * @return a String with the XML representation for the given WireFeed. - * @throws IllegalArgumentException thrown if the feed type of the WireFeedOutput and WireFeed don't match. + * @throws IllegalArgumentException thrown if the feed type of the WireFeedOutput and WireFeed + * don't match. * @throws FeedException thrown if the XML representation for the feed could not be created. * */ @@ -102,16 +106,19 @@ public class WireFeedOutput { /** * Creates a String with the XML representation for the given WireFeed. *

- * If the feed encoding is not NULL, it will be used in the XML prolog encoding attribute. It is the responsibility of the developer to ensure that if the - * String is written to a character stream the stream charset is the same as the feed encoding property. + * If the feed encoding is not NULL, it will be used in the XML prolog encoding attribute. It is + * the responsibility of the developer to ensure that if the String is written to a character + * stream the stream charset is the same as the feed encoding property. *

* NOTE: This method delages to the 'Document WireFeedOutput#outputJDom(WireFeed)'. *

* - * @param feed Abstract feed to create XML representation from. The type of the WireFeed must match the type given to the FeedOuptut constructor. + * @param feed Abstract feed to create XML representation from. The type of the WireFeed must + * match the type given to the FeedOuptut constructor. * @param prettyPrint pretty-print XML (true) oder collapsed * @return a String with the XML representation for the given WireFeed. - * @throws IllegalArgumentException thrown if the feed type of the WireFeedOutput and WireFeed don't match. + * @throws IllegalArgumentException thrown if the feed type of the WireFeedOutput and WireFeed + * don't match. * @throws FeedException thrown if the XML representation for the feed could not be created. * */ @@ -134,15 +141,19 @@ public class WireFeedOutput { /** * Creates a File containing with the XML representation for the given WireFeed. *

- * If the feed encoding is not NULL, it will be used in the XML prolog encoding attribute. The platform default charset encoding is used to write the feed - * to the file. It is the responsibility of the developer to ensure the feed encoding is set to the platform charset encoding. + * If the feed encoding is not NULL, it will be used in the XML prolog encoding attribute. The + * platform default charset encoding is used to write the feed to the file. It is the + * responsibility of the developer to ensure the feed encoding is set to the platform charset + * encoding. *

* NOTE: This method delages to the 'Document WireFeedOutput#outputJDom(WireFeed)'. *

* - * @param feed Abstract feed to create XML representation from. The type of the WireFeed must match the type given to the FeedOuptut constructor. + * @param feed Abstract feed to create XML representation from. The type of the WireFeed must + * match the type given to the FeedOuptut constructor. * @param file the file where to write the XML representation for the given WireFeed. - * @throws IllegalArgumentException thrown if the feed type of the WireFeedOutput and WireFeed don't match. + * @throws IllegalArgumentException thrown if the feed type of the WireFeedOutput and WireFeed + * don't match. * @throws IOException thrown if there was some problem writing to the File. * @throws FeedException thrown if the XML representation for the feed could not be created. * @@ -154,16 +165,20 @@ public class WireFeedOutput { /** * Creates a File containing with the XML representation for the given WireFeed. *

- * If the feed encoding is not NULL, it will be used in the XML prolog encoding attribute. The platform default charset encoding is used to write the feed - * to the file. It is the responsibility of the developer to ensure the feed encoding is set to the platform charset encoding. + * If the feed encoding is not NULL, it will be used in the XML prolog encoding attribute. The + * platform default charset encoding is used to write the feed to the file. It is the + * responsibility of the developer to ensure the feed encoding is set to the platform charset + * encoding. *

* NOTE: This method delages to the 'Document WireFeedOutput#outputJDom(WireFeed)'. *

* - * @param feed Abstract feed to create XML representation from. The type of the WireFeed must match the type given to the FeedOuptut constructor. + * @param feed Abstract feed to create XML representation from. The type of the WireFeed must + * match the type given to the FeedOuptut constructor. * @param file the file where to write the XML representation for the given WireFeed. * @param prettyPrint pretty-print XML (true) oder collapsed - * @throws IllegalArgumentException thrown if the feed type of the WireFeedOutput and WireFeed don't match. + * @throws IllegalArgumentException thrown if the feed type of the WireFeedOutput and WireFeed + * don't match. * @throws IOException thrown if there was some problem writing to the File. * @throws FeedException thrown if the XML representation for the feed could not be created. * @@ -177,15 +192,18 @@ public class WireFeedOutput { /** * Writes to an Writer the XML representation for the given WireFeed. *

- * If the feed encoding is not NULL, it will be used in the XML prolog encoding attribute. It is the responsibility of the developer to ensure the Writer - * instance is using the same charset encoding. + * If the feed encoding is not NULL, it will be used in the XML prolog encoding attribute. It is + * the responsibility of the developer to ensure the Writer instance is using the same charset + * encoding. *

* NOTE: This method delages to the 'Document WireFeedOutput#outputJDom(WireFeed)'. *

* - * @param feed Abstract feed to create XML representation from. The type of the WireFeed must match the type given to the FeedOuptut constructor. + * @param feed Abstract feed to create XML representation from. The type of the WireFeed must + * match the type given to the FeedOuptut constructor. * @param writer Writer to write the XML representation for the given WireFeed. - * @throws IllegalArgumentException thrown if the feed type of the WireFeedOutput and WireFeed don't match. + * @throws IllegalArgumentException thrown if the feed type of the WireFeedOutput and WireFeed + * don't match. * @throws IOException thrown if there was some problem writing to the Writer. * @throws FeedException thrown if the XML representation for the feed could not be created. * @@ -197,16 +215,19 @@ public class WireFeedOutput { /** * Writes to an Writer the XML representation for the given WireFeed. *

- * If the feed encoding is not NULL, it will be used in the XML prolog encoding attribute. It is the responsibility of the developer to ensure the Writer - * instance is using the same charset encoding. + * If the feed encoding is not NULL, it will be used in the XML prolog encoding attribute. It is + * the responsibility of the developer to ensure the Writer instance is using the same charset + * encoding. *

* NOTE: This method delages to the 'Document WireFeedOutput#outputJDom(WireFeed)'. *

* - * @param feed Abstract feed to create XML representation from. The type of the WireFeed must match the type given to the FeedOuptut constructor. + * @param feed Abstract feed to create XML representation from. The type of the WireFeed must + * match the type given to the FeedOuptut constructor. * @param writer Writer to write the XML representation for the given WireFeed. * @param prettyPrint pretty-print XML (true) oder collapsed - * @throws IllegalArgumentException thrown if the feed type of the WireFeedOutput and WireFeed don't match. + * @throws IllegalArgumentException thrown if the feed type of the WireFeedOutput and WireFeed + * don't match. * @throws IOException thrown if there was some problem writing to the Writer. * @throws FeedException thrown if the XML representation for the feed could not be created. * @@ -235,9 +256,11 @@ public class WireFeedOutput { * NOTE: This method delages to the 'Document WireFeedOutput#outputJDom(WireFeed)'. *

* - * @param feed Abstract feed to create W3C DOM document from. The type of the WireFeed must match the type given to the FeedOuptut constructor. + * @param feed Abstract feed to create W3C DOM document from. The type of the WireFeed must + * match the type given to the FeedOuptut constructor. * @return the W3C DOM document for the given WireFeed. - * @throws IllegalArgumentException thrown if the feed type of the WireFeedOutput and WireFeed don't match. + * @throws IllegalArgumentException thrown if the feed type of the WireFeedOutput and WireFeed + * don't match. * @throws FeedException thrown if the W3C DOM document for the feed could not be created. * */ @@ -259,9 +282,11 @@ public class WireFeedOutput { * NOTE: All other output methods delegate to this method. *

* - * @param feed Abstract feed to create JDOM document from. The type of the WireFeed must match the type given to the FeedOuptut constructor. + * @param feed Abstract feed to create JDOM document from. The type of the WireFeed must match + * the type given to the FeedOuptut constructor. * @return the JDOM document for the given WireFeed. - * @throws IllegalArgumentException thrown if the feed type of the WireFeedOutput and WireFeed don't match. + * @throws IllegalArgumentException thrown if the feed type of the WireFeedOutput and WireFeed + * don't match. * @throws FeedException thrown if the JDOM document for the feed could not be created. * */ diff --git a/src/main/java/com/sun/syndication/io/WireFeedParser.java b/src/main/java/com/sun/syndication/io/WireFeedParser.java index 9aab14d..a350844 100644 --- a/src/main/java/com/sun/syndication/io/WireFeedParser.java +++ b/src/main/java/com/sun/syndication/io/WireFeedParser.java @@ -49,14 +49,11 @@ public interface WireFeedParser { /** * Inspects an XML Document (JDOM) to check if it can parse it. *

- * It checks if the given document if the type of feeds the parser - * understands. + * It checks if the given document if the type of feeds the parser understands. *

* - * @param document XML Document (JDOM) to check if it can be parsed by this - * parser. - * @return true if the parser know how to parser this feed, - * false otherwise. + * @param document XML Document (JDOM) to check if it can be parsed by this parser. + * @return true if the parser know how to parser this feed, false otherwise. * */ public boolean isMyType(Document document); @@ -66,13 +63,10 @@ public interface WireFeedParser { *

* * @param document XML document (JDOM) to parse. - * @param validate indicates if the feed should be strictly validated (NOT - * YET IMPLEMENTED). + * @param validate indicates if the feed should be strictly validated (NOT YET IMPLEMENTED). * @return the resulting feed bean. - * @throws IllegalArgumentException thrown if the parser cannot handle the - * given feed type. - * @throws FeedException thrown if a feed bean cannot be created out of the - * XML document (JDOM). + * @throws IllegalArgumentException thrown if the parser cannot handle the given feed type. + * @throws FeedException thrown if a feed bean cannot be created out of the XML document (JDOM). * */ public WireFeed parse(Document document, boolean validate, final Locale locale) throws IllegalArgumentException, FeedException; diff --git a/src/main/java/com/sun/syndication/io/XmlReader.java b/src/main/java/com/sun/syndication/io/XmlReader.java index bb33f94..814bc82 100644 --- a/src/main/java/com/sun/syndication/io/XmlReader.java +++ b/src/main/java/com/sun/syndication/io/XmlReader.java @@ -34,82 +34,64 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; /** - * Character stream that handles (or at least attemtps to) all the necessary - * Voodo to figure out the charset encoding of the XML document within the - * stream. + * Character stream that handles (or at least attemtps to) all the necessary Voodo to figure out the + * charset encoding of the XML document within the stream. *

- * IMPORTANT: This class is not related in any way to the org.xml.sax.XMLReader. - * This one IS a character stream. + * IMPORTANT: This class is not related in any way to the org.xml.sax.XMLReader. This one IS a + * character stream. *

- * All this has to be done without consuming characters from the stream, if not - * the XML parser will not recognized the document as a valid XML. This is not - * 100% true, but it's close enough (UTF-8 BOM is not handled by all parsers - * right now, XmlReader handles it and things work in all parsers). + * All this has to be done without consuming characters from the stream, if not the XML parser will + * not recognized the document as a valid XML. This is not 100% true, but it's close enough (UTF-8 + * BOM is not handled by all parsers right now, XmlReader handles it and things work in all + * parsers). *

- * The XmlReader class handles the charset encoding of XML documents in Files, - * raw streams and HTTP streams by offering a wide set of constructors. + * The XmlReader class handles the charset encoding of XML documents in Files, raw streams and HTTP + * streams by offering a wide set of constructors. *

- * By default the charset encoding detection is lenient, the constructor with - * the lenient flag can be used for an script (following HTTP MIME and XML - * specifications). All this is nicely explained by Mark Pilgrim in his blog, - * Determining the character encoding of a feed. + * By default the charset encoding detection is lenient, the constructor with the lenient flag can + * be used for an script (following HTTP MIME and XML specifications). All this is nicely explained + * by Mark Pilgrim in his blog, Determining the character + * encoding of a feed. *

* * @author Alejandro Abdelnur * */ public class XmlReader extends Reader { - private static final int BUFFER_SIZE = 4096; - private static final String UTF_8 = "UTF-8"; + private static final int BUFFER_SIZE = 4096; private static final String US_ASCII = "US-ASCII"; + private static final String UTF_8 = "UTF-8"; private static final String UTF_16BE = "UTF-16BE"; private static final String UTF_16LE = "UTF-16LE"; private static final String UTF_16 = "UTF-16"; + private static final Pattern CHARSET_PATTERN = Pattern.compile("charset=([.[^; ]]*)"); + private static final Pattern ENCODING_PATTERN = Pattern.compile("<\\?xml.*encoding[\\s]*=[\\s]*((?:\".[^\"]*\")|(?:'.[^']*'))", Pattern.MULTILINE); + private static final MessageFormat RAW_EX_1 = new MessageFormat("Invalid encoding, BOM [{0}] XML guess [{1}] XML prolog [{2}] encoding mismatch"); + private static final MessageFormat RAW_EX_2 = new MessageFormat("Invalid encoding, BOM [{0}] XML guess [{1}] XML prolog [{2}] unknown BOM"); + private static final MessageFormat HTTP_EX_1 = new MessageFormat( + "Invalid encoding, CT-MIME [{0}] CT-Enc [{1}] BOM [{2}] XML guess [{3}] XML prolog [{4}], BOM must be NULL"); + private static final MessageFormat HTTP_EX_2 = new MessageFormat( + "Invalid encoding, CT-MIME [{0}] CT-Enc [{1}] BOM [{2}] XML guess [{3}] XML prolog [{4}], encoding mismatch"); + private static final MessageFormat HTTP_EX_3 = new MessageFormat( + "Invalid encoding, CT-MIME [{0}] CT-Enc [{1}] BOM [{2}] XML guess [{3}] XML prolog [{4}], Invalid MIME"); private static String staticDefaultEncoding = null; - private Reader reader; - private String encoding; private final String defaultEncoding; - /** - * Sets the default encoding to use if none is set in HTTP content-type, XML - * prolog and the rules based on content-type are not adequate. - *

- * If it is set to NULL the content-type based rules are used. - *

- * By default it is NULL. - *

- * - * @param encoding charset encoding to default to. - */ - public static void setDefaultEncoding(final String encoding) { - staticDefaultEncoding = encoding; - } - - /** - * Returns the default encoding to use if none is set in HTTP content-type, - * XML prolog and the rules based on content-type are not adequate. - *

- * If it is NULL the content-type based rules are used. - *

- * - * @return the default encoding to use. - */ - public static String getDefaultEncoding() { - return staticDefaultEncoding; - } + private Reader reader; + private String encoding; /** * Creates a Reader for a File. *

- * It looks for the UTF-8 BOM first, if none sniffs the XML prolog charset, - * if this is also missing defaults to UTF-8. + * It looks for the UTF-8 BOM first, if none sniffs the XML prolog charset, if this is also + * missing defaults to UTF-8. *

- * It does a lenient charset encoding detection, check the constructor with - * the lenient parameter for details. + * It does a lenient charset encoding detection, check the constructor with the lenient + * parameter for details. *

* * @param file File to create a Reader from. @@ -125,8 +107,8 @@ public class XmlReader extends Reader { *

* It follows the same logic used for files. *

- * It does a lenient charset encoding detection, check the constructor with - * the lenient parameter for details. + * It does a lenient charset encoding detection, check the constructor with the lenient + * parameter for details. *

* * @param is InputStream to create a Reader from. @@ -138,16 +120,16 @@ public class XmlReader extends Reader { } /** - * Creates a Reader for a raw InputStream and uses the provided default - * encoding if none is determined. + * Creates a Reader for a raw InputStream and uses the provided default encoding if none is + * determined. *

* It follows the same logic used for files. *

- * If lenient detection is indicated and the detection above fails as per - * specifications it then attempts the following: + * If lenient detection is indicated and the detection above fails as per specifications it then + * attempts the following: *

- * If the content type was 'text/html' it replaces it with 'text/xml' and - * tries the detection again. + * If the content type was 'text/html' it replaces it with 'text/xml' and tries the detection + * again. *

* Else if the XML prolog had a charset encoding that encoding is used. *

@@ -159,12 +141,11 @@ public class XmlReader extends Reader { *

* * @param is InputStream to create a Reader from. - * @param lenient indicates if the charset encoding detection should be - * relaxed. + * @param lenient indicates if the charset encoding detection should be relaxed. * @param defaultEncoding default encoding to use if one cannot be detected. * @throws IOException thrown if there is a problem reading the stream. - * @throws XmlReaderException thrown if the charset encoding could not be - * determined according to the specs. + * @throws XmlReaderException thrown if the charset encoding could not be determined according + * to the specs. * */ public XmlReader(final InputStream is, final boolean lenient, final String defaultEncoding) throws IOException, XmlReaderException { @@ -189,11 +170,11 @@ public class XmlReader extends Reader { *

* It follows the same logic used for files. *

- * If lenient detection is indicated and the detection above fails as per - * specifications it then attempts the following: + * If lenient detection is indicated and the detection above fails as per specifications it then + * attempts the following: *

- * If the content type was 'text/html' it replaces it with 'text/xml' and - * tries the detection again. + * If the content type was 'text/html' it replaces it with 'text/xml' and tries the detection + * again. *

* Else if the XML prolog had a charset encoding that encoding is used. *

@@ -205,11 +186,10 @@ public class XmlReader extends Reader { *

* * @param is InputStream to create a Reader from. - * @param lenient indicates if the charset encoding detection should be - * relaxed. + * @param lenient indicates if the charset encoding detection should be relaxed. * @throws IOException thrown if there is a problem reading the stream. - * @throws XmlReaderException thrown if the charset encoding could not be - * determined according to the specs. + * @throws XmlReaderException thrown if the charset encoding could not be determined according + * to the specs. * */ public XmlReader(final InputStream is, final boolean lenient) throws IOException, XmlReaderException { @@ -219,20 +199,18 @@ public class XmlReader extends Reader { /** * Creates a Reader using the InputStream of a URL. *

- * If the URL is not of type HTTP and there is not 'content-type' header in - * the fetched data it uses the same logic used for Files. + * If the URL is not of type HTTP and there is not 'content-type' header in the fetched data it + * uses the same logic used for Files. *

- * If the URL is a HTTP Url or there is a 'content-type' header in the - * fetched data it uses the same logic used for an InputStream with - * content-type. + * If the URL is a HTTP Url or there is a 'content-type' header in the fetched data it uses the + * same logic used for an InputStream with content-type. *

- * It does a lenient charset encoding detection, check the constructor with - * the lenient parameter for details. + * It does a lenient charset encoding detection, check the constructor with the lenient + * parameter for details. *

* * @param url URL to create a Reader from. - * @throws IOException thrown if there is a problem reading the stream of - * the URL. + * @throws IOException thrown if there is a problem reading the stream of the URL. * */ public XmlReader(final URL url) throws IOException { @@ -242,21 +220,18 @@ public class XmlReader extends Reader { /** * Creates a Reader using the InputStream of a URLConnection. *

- * If the URLConnection is not of type HttpURLConnection and there is not - * 'content-type' header in the fetched data it uses the same logic used for - * files. + * If the URLConnection is not of type HttpURLConnection and there is not 'content-type' header + * in the fetched data it uses the same logic used for files. *

- * If the URLConnection is a HTTP Url or there is a 'content-type' header in - * the fetched data it uses the same logic used for an InputStream with - * content-type. + * If the URLConnection is a HTTP Url or there is a 'content-type' header in the fetched data it + * uses the same logic used for an InputStream with content-type. *

- * It does a lenient charset encoding detection, check the constructor with - * the lenient parameter for details. + * It does a lenient charset encoding detection, check the constructor with the lenient + * parameter for details. *

* * @param conn URLConnection to create a Reader from. - * @throws IOException thrown if there is a problem reading the stream of - * the URLConnection. + * @throws IOException thrown if there is a problem reading the stream of the URLConnection. * */ public XmlReader(final URLConnection conn) throws IOException { @@ -284,21 +259,18 @@ public class XmlReader extends Reader { } /** - * Creates a Reader using an InputStream and the associated content-type - * header. + * Creates a Reader using an InputStream and the associated content-type header. *

- * First it checks if the stream has BOM. If there is not BOM checks the - * content-type encoding. If there is not content-type encoding checks the - * XML prolog encoding. If there is not XML prolog encoding uses the default - * encoding mandated by the content-type MIME type. + * First it checks if the stream has BOM. If there is not BOM checks the content-type encoding. + * If there is not content-type encoding checks the XML prolog encoding. If there is not XML + * prolog encoding uses the default encoding mandated by the content-type MIME type. *

- * It does a lenient charset encoding detection, check the constructor with - * the lenient parameter for details. + * It does a lenient charset encoding detection, check the constructor with the lenient + * parameter for details. *

* * @param is InputStream to create the reader from. - * @param httpContentType content-type header to use for the resolution of - * the charset encoding. + * @param httpContentType content-type header to use for the resolution of the charset encoding. * @throws IOException thrown if there is a problem reading the file. * */ @@ -307,19 +279,17 @@ public class XmlReader extends Reader { } /** - * Creates a Reader using an InputStream and the associated content-type - * header. + * Creates a Reader using an InputStream and the associated content-type header. *

- * First it checks if the stream has BOM. If there is not BOM checks the - * content-type encoding. If there is not content-type encoding checks the - * XML prolog encoding. If there is not XML prolog encoding uses the default - * encoding mandated by the content-type MIME type. + * First it checks if the stream has BOM. If there is not BOM checks the content-type encoding. + * If there is not content-type encoding checks the XML prolog encoding. If there is not XML + * prolog encoding uses the default encoding mandated by the content-type MIME type. *

- * If lenient detection is indicated and the detection above fails as per - * specifications it then attempts the following: + * If lenient detection is indicated and the detection above fails as per specifications it then + * attempts the following: *

- * If the content type was 'text/html' it replaces it with 'text/xml' and - * tries the detection again. + * If the content type was 'text/html' it replaces it with 'text/xml' and tries the detection + * again. *

* Else if the XML prolog had a charset encoding that encoding is used. *

@@ -331,14 +301,12 @@ public class XmlReader extends Reader { *

* * @param is InputStream to create the reader from. - * @param httpContentType content-type header to use for the resolution of - * the charset encoding. - * @param lenient indicates if the charset encoding detection should be - * relaxed. + * @param httpContentType content-type header to use for the resolution of the charset encoding. + * @param lenient indicates if the charset encoding detection should be relaxed. * @param defaultEncoding default encoding to use if one cannot be detected. * @throws IOException thrown if there is a problem reading the file. - * @throws XmlReaderException thrown if the charset encoding could not be - * determined according to the specs. + * @throws XmlReaderException thrown if the charset encoding could not be determined according + * to the specs. * */ public XmlReader(final InputStream is, final String httpContentType, final boolean lenient, final String defaultEncoding) throws IOException, @@ -360,19 +328,17 @@ public class XmlReader extends Reader { } /** - * Creates a Reader using an InputStream and the associated content-type - * header. + * Creates a Reader using an InputStream and the associated content-type header. *

- * First it checks if the stream has BOM. If there is not BOM checks the - * content-type encoding. If there is not content-type encoding checks the - * XML prolog encoding. If there is not XML prolog encoding uses the default - * encoding mandated by the content-type MIME type. + * First it checks if the stream has BOM. If there is not BOM checks the content-type encoding. + * If there is not content-type encoding checks the XML prolog encoding. If there is not XML + * prolog encoding uses the default encoding mandated by the content-type MIME type. *

- * If lenient detection is indicated and the detection above fails as per - * specifications it then attempts the following: + * If lenient detection is indicated and the detection above fails as per specifications it then + * attempts the following: *

- * If the content type was 'text/html' it replaces it with 'text/xml' and - * tries the detection again. + * If the content type was 'text/html' it replaces it with 'text/xml' and tries the detection + * again. *

* Else if the XML prolog had a charset encoding that encoding is used. *

@@ -384,19 +350,56 @@ public class XmlReader extends Reader { *

* * @param is InputStream to create the reader from. - * @param httpContentType content-type header to use for the resolution of - * the charset encoding. - * @param lenient indicates if the charset encoding detection should be - * relaxed. + * @param httpContentType content-type header to use for the resolution of the charset encoding. + * @param lenient indicates if the charset encoding detection should be relaxed. * @throws IOException thrown if there is a problem reading the file. - * @throws XmlReaderException thrown if the charset encoding could not be - * determined according to the specs. + * @throws XmlReaderException thrown if the charset encoding could not be determined according + * to the specs. * */ public XmlReader(final InputStream is, final String httpContentType, final boolean lenient) throws IOException, XmlReaderException { this(is, httpContentType, lenient, null); } + /** + * Returns the default encoding to use if none is set in HTTP content-type, XML prolog and the + * rules based on content-type are not adequate. + *

+ * If it is NULL the content-type based rules are used. + *

+ * + * @return the default encoding to use. + */ + public static String getDefaultEncoding() { + return staticDefaultEncoding; + } + + /** + * Sets the default encoding to use if none is set in HTTP content-type, XML prolog and the + * rules based on content-type are not adequate. + *

+ * If it is set to NULL the content-type based rules are used. + *

+ * By default it is NULL. + *

+ * + * @param encoding charset encoding to default to. + */ + public static void setDefaultEncoding(final String encoding) { + staticDefaultEncoding = encoding; + } + + /** + * Returns the charset encoding of the XmlReader. + *

+ * + * @return charset encoding. + * + */ + public String getEncoding() { + return encoding; + } + private void doLenientDetection(String httpContentType, XmlReaderException ex) throws IOException { if (httpContentType != null) { if (httpContentType.startsWith("text/html")) { @@ -426,17 +429,6 @@ public class XmlReader extends Reader { } } - /** - * Returns the charset encoding of the XmlReader. - *

- * - * @return charset encoding. - * - */ - public String getEncoding() { - return encoding; - } - @Override public int read(final char[] buf, final int offset, final int len) throws IOException { return reader.read(buf, offset, len); @@ -571,8 +563,6 @@ public class XmlReader extends Reader { return mime; } - private static final Pattern CHARSET_PATTERN = Pattern.compile("charset=([.[^; ]]*)"); - // returns charset parameter value, NULL if not present, NULL if // httpContentType is NULL private static String getContentTypeEncoding(final String httpContentType) { @@ -646,8 +636,6 @@ public class XmlReader extends Reader { return encoding; } - private static final Pattern ENCODING_PATTERN = Pattern.compile("<\\?xml.*encoding[\\s]*=[\\s]*((?:\".[^\"]*\")|(?:'.[^']*'))", Pattern.MULTILINE); - // returns the encoding declared in the , NULL if none private static String getXmlProlog(final BufferedInputStream is, final String guessedEnc) throws IOException { String encoding = null; @@ -704,17 +692,4 @@ public class XmlReader extends Reader { return mime != null && (mime.equals("text/xml") || mime.equals("text/xml-external-parsed-entity") || mime.startsWith("text/") && mime.endsWith("+xml")); } - private static final MessageFormat RAW_EX_1 = new MessageFormat("Invalid encoding, BOM [{0}] XML guess [{1}] XML prolog [{2}] encoding mismatch"); - - private static final MessageFormat RAW_EX_2 = new MessageFormat("Invalid encoding, BOM [{0}] XML guess [{1}] XML prolog [{2}] unknown BOM"); - - private static final MessageFormat HTTP_EX_1 = new MessageFormat( - "Invalid encoding, CT-MIME [{0}] CT-Enc [{1}] BOM [{2}] XML guess [{3}] XML prolog [{4}], BOM must be NULL"); - - private static final MessageFormat HTTP_EX_2 = new MessageFormat( - "Invalid encoding, CT-MIME [{0}] CT-Enc [{1}] BOM [{2}] XML guess [{3}] XML prolog [{4}], encoding mismatch"); - - private static final MessageFormat HTTP_EX_3 = new MessageFormat( - "Invalid encoding, CT-MIME [{0}] CT-Enc [{1}] BOM [{2}] XML guess [{3}] XML prolog [{4}], Invalid MIME"); - } diff --git a/src/main/java/com/sun/syndication/io/XmlReaderException.java b/src/main/java/com/sun/syndication/io/XmlReaderException.java index e9b37df..0289834 100644 --- a/src/main/java/com/sun/syndication/io/XmlReaderException.java +++ b/src/main/java/com/sun/syndication/io/XmlReaderException.java @@ -4,14 +4,12 @@ import java.io.IOException; import java.io.InputStream; /** - * The XmlReaderException is thrown by the XmlReader constructors if the charset - * encoding can not be determined according to the XML 1.0 specification and RFC - * 3023. + * The XmlReaderException is thrown by the XmlReader constructors if the charset encoding can not be + * determined according to the XML 1.0 specification and RFC 3023. *

- * The exception returns the unconsumed InputStream to allow the application to - * do an alternate processing with the stream. Note that the original - * InputStream given to the XmlReader cannot be used as that one has been - * already read. + * The exception returns the unconsumed InputStream to allow the application to do an alternate + * processing with the stream. Note that the original InputStream given to the XmlReader cannot be + * used as that one has been already read. *

* * @author Alejandro Abdelnur @@ -27,8 +25,7 @@ public class XmlReaderException extends IOException { private final InputStream is; /** - * Creates an exception instance if the charset encoding could not be - * determined. + * Creates an exception instance if the charset encoding could not be determined. *

* Instances of this exception are thrown by the XmlReader. *

@@ -45,8 +42,7 @@ public class XmlReaderException extends IOException { } /** - * Creates an exception instance if the charset encoding could not be - * determined. + * Creates an exception instance if the charset encoding could not be determined. *

* Instances of this exception are thrown by the XmlReader. *

@@ -105,12 +101,11 @@ public class XmlReaderException extends IOException { } /** - * Returns the MIME type in the content-type used to attempt determining the - * encoding. + * Returns the MIME type in the content-type used to attempt determining the encoding. *

* - * @return the MIME type in the content-type, null if there was not - * content-type or the encoding detection did not involve HTTP. + * @return the MIME type in the content-type, null if there was not content-type or the encoding + * detection did not involve HTTP. * */ public String getContentTypeMime() { @@ -118,13 +113,11 @@ public class XmlReaderException extends IOException { } /** - * Returns the encoding in the content-type used to attempt determining the - * encoding. + * Returns the encoding in the content-type used to attempt determining the encoding. *

* - * @return the encoding in the content-type, null if there was not - * content-type, no encoding in it or the encoding detection did not - * involve HTTP. + * @return the encoding in the content-type, null if there was not content-type, no encoding in + * it or the encoding detection did not involve HTTP. * */ public String getContentTypeEncoding() { @@ -132,8 +125,8 @@ public class XmlReaderException extends IOException { } /** - * Returns the unconsumed InputStream to allow the application to do an - * alternate encoding detection on the InputStream. + * Returns the unconsumed InputStream to allow the application to do an alternate encoding + * detection on the InputStream. *

* * @return the unconsumed InputStream. diff --git a/src/main/java/com/sun/syndication/io/impl/Atom10Parser.java b/src/main/java/com/sun/syndication/io/impl/Atom10Parser.java index 8312cde..150b9c9 100644 --- a/src/main/java/com/sun/syndication/io/impl/Atom10Parser.java +++ b/src/main/java/com/sun/syndication/io/impl/Atom10Parser.java @@ -501,8 +501,8 @@ public class Atom10Parser extends BaseWireFeedParser { } /** - * Resolve URI via base URL and parent element. Resolve URI based - * considering xml:base and baseURI. + * Resolve URI via base URL and parent element. Resolve URI based considering xml:base and + * baseURI. * * @param baseURI Base URI used to fetch the XML document * @param parent Parent element from which to consider xml:base @@ -587,8 +587,8 @@ public class Atom10Parser extends BaseWireFeedParser { } /** - * Return URL string of Atom link element under parent element. Link with no - * rel attribute is considered to be rel="alternate" + * Return URL string of Atom link element under parent element. Link with no rel attribute is + * considered to be rel="alternate" * * @param parent Consider only children of this parent element * @param rel Consider only links with this relationship @@ -611,8 +611,8 @@ public class Atom10Parser extends BaseWireFeedParser { } /** - * Form URI by combining base with append portion and giving special - * consideration to append portions that begin with ".." + * Form URI by combining base with append portion and giving special consideration to append + * portions that begin with ".." * * @param base Base of URI, may end with trailing slash * @param append String to append, may begin with slash or ".." @@ -660,7 +660,8 @@ public class Atom10Parser extends BaseWireFeedParser { /** * Parse entry from reader. */ - public static Entry parseEntry(final Reader rd, final String baseURI, final Locale locale) throws JDOMException, IOException, IllegalArgumentException, FeedException { + public static Entry parseEntry(final Reader rd, final String baseURI, final Locale locale) throws JDOMException, IOException, IllegalArgumentException, + FeedException { // Parse entry into JDOM tree final SAXBuilder builder = new SAXBuilder(); final Document entryDoc = builder.build(rd); diff --git a/src/main/java/com/sun/syndication/io/impl/Base64.java b/src/main/java/com/sun/syndication/io/impl/Base64.java index 76b8e8a..1cde4c4 100644 --- a/src/main/java/com/sun/syndication/io/impl/Base64.java +++ b/src/main/java/com/sun/syndication/io/impl/Base64.java @@ -27,8 +27,7 @@ package com.sun.syndication.io.impl; public class Base64 { /** - * Encodes a String into a base 64 String. The resulting encoding is chunked - * at 76 bytes. + * Encodes a String into a base 64 String. The resulting encoding is chunked at 76 bytes. *

* * @param s String to encode. @@ -48,8 +47,8 @@ public class Base64 { * * @param s String to decode. * @return encoded string. - * @throws java.lang.IllegalArgumentException thrown if the given byte array - * was not valid com.sun.syndication.io.impl.Base64 encoding. + * @throws java.lang.IllegalArgumentException thrown if the given byte array was not valid + * com.sun.syndication.io.impl.Base64 encoding. * */ public static String decode(String s) throws IllegalArgumentException { @@ -146,8 +145,8 @@ public class Base64 { * * @param eData byte array to decode. * @return decoded byte array. - * @throws java.lang.IllegalArgumentException thrown if the given byte array - * was not valid com.sun.syndication.io.impl.Base64 encoding. + * @throws java.lang.IllegalArgumentException thrown if the given byte array was not valid + * com.sun.syndication.io.impl.Base64 encoding. * */ public static byte[] decode(final byte[] eData) { diff --git a/src/main/java/com/sun/syndication/io/impl/BaseWireFeedGenerator.java b/src/main/java/com/sun/syndication/io/impl/BaseWireFeedGenerator.java index 4b9231b..f9eea70 100644 --- a/src/main/java/com/sun/syndication/io/impl/BaseWireFeedGenerator.java +++ b/src/main/java/com/sun/syndication/io/impl/BaseWireFeedGenerator.java @@ -99,16 +99,14 @@ public abstract class BaseWireFeedGenerator implements WireFeedGenerator { } /** - * Purging unused declarations is less optimal, performance-wise, than never - * adding them in the first place. So, we should still ask the ROME guys to - * fix their code (not adding dozens of unnecessary module declarations). - * Having said that: purging them here, before XML generation, is more - * efficient than parsing and re-molding the XML after ROME generates it. + * Purging unused declarations is less optimal, performance-wise, than never adding them in the + * first place. So, we should still ask the ROME guys to fix their code (not adding dozens of + * unnecessary module declarations). Having said that: purging them here, before XML generation, + * is more efficient than parsing and re-molding the XML after ROME generates it. *

- * Note that the calling app could still add declarations/modules to the - * Feed tree after this. Which is fine. But those modules are then - * responsible for crawling to the root of the tree, at generate() time, to - * make sure their namespace declarations are present. + * Note that the calling app could still add declarations/modules to the Feed tree after this. + * Which is fine. But those modules are then responsible for crawling to the root of the tree, + * at generate() time, to make sure their namespace declarations are present. */ protected static void purgeUnusedNamespaceDeclarations(final Element root) { final Set usedPrefixes = new HashSet(); diff --git a/src/main/java/com/sun/syndication/io/impl/DCModuleGenerator.java b/src/main/java/com/sun/syndication/io/impl/DCModuleGenerator.java index 8e21f7a..2000364 100644 --- a/src/main/java/com/sun/syndication/io/impl/DCModuleGenerator.java +++ b/src/main/java/com/sun/syndication/io/impl/DCModuleGenerator.java @@ -78,12 +78,10 @@ public class DCModuleGenerator implements ModuleGenerator { } /** - * Returns a set with all the URIs (JDOM Namespace elements) this module - * generator uses. + * Returns a set with all the URIs (JDOM Namespace elements) this module generator uses. *

- * It is used by the the feed generators to add their namespace definition - * in the root element of the generated document (forward-missing of Java - * 5.0 Generics). + * It is used by the the feed generators to add their namespace definition in the root element + * of the generated document (forward-missing of Java 5.0 Generics). *

* * @return a set with all the URIs this module generator uses. diff --git a/src/main/java/com/sun/syndication/io/impl/DateParser.java b/src/main/java/com/sun/syndication/io/impl/DateParser.java index 5e1b45f..4e2e294 100644 --- a/src/main/java/com/sun/syndication/io/impl/DateParser.java +++ b/src/main/java/com/sun/syndication/io/impl/DateParser.java @@ -24,12 +24,12 @@ import java.util.Locale; import java.util.TimeZone; /** - * A helper class that parses Dates out of Strings with date time in RFC822 and - * W3CDateTime formats plus the variants Atom (0.3) and RSS (0.9, 0.91, 0.92, - * 0.93, 0.94, 1.0 and 2.0) specificators added to those formats. + * A helper class that parses Dates out of Strings with date time in RFC822 and W3CDateTime formats + * plus the variants Atom (0.3) and RSS (0.9, 0.91, 0.92, 0.93, 0.94, 1.0 and 2.0) specificators + * added to those formats. *

- * It uses the JDK java.text.SimpleDateFormat class attemtping the parse using a - * mask for each one of the possible formats. + * It uses the JDK java.text.SimpleDateFormat class attemtping the parse using a mask for each one + * of the possible formats. *

* * @author Alejandro Abdelnur @@ -71,9 +71,9 @@ public class DateParser { "yyyy'T'HH:mmz", "yyyy-MM-dd't'HH:mmz", "yyyy-MM-dd'T'HH:mm'Z'", "yyyy-MM-dd't'HH:mm'z'", "yyyy-MM-dd", "yyyy-MM", "yyyy" }; /** - * The masks used to validate and parse the input to this Atom date. These - * are a lot more forgiving than what the Atom spec allows. The forms that - * are invalid according to the spec are indicated. + * The masks used to validate and parse the input to this Atom date. These are a lot more + * forgiving than what the Atom spec allows. The forms that are invalid according to the spec + * are indicated. */ @SuppressWarnings("unused") private static final String[] masks = { "yyyy-MM-dd'T'HH:mm:ss.SSSz", "yyyy-MM-dd't'HH:mm:ss.SSSz", // invalid @@ -100,9 +100,8 @@ public class DateParser { * * @param masks array of masks to use for parsing the string * @param sDate string to parse for a date. - * @return the Date represented by the given string using one of the given - * masks. It returns null if it was not possible to parse the - * the string with any of the masks. + * @return the Date represented by the given string using one of the given masks. It returns + * null if it was not possible to parse the the string with any of the masks. * */ private static Date parseUsingMask(final String[] masks, String sDate, final Locale locale) { @@ -144,14 +143,12 @@ public class DateParser { *

  • "dd MMM yy HH:mm z"
  • * *

    - * Refer to the java.text.SimpleDateFormat javadocs for details on the - * format of each element. + * Refer to the java.text.SimpleDateFormat javadocs for details on the format of each element. *

    * * @param sDate string to parse for a date. - * @return the Date represented by the given RFC822 string. It returns - * null if it was not possible to parse the given string into - * a Date. + * @return the Date represented by the given RFC822 string. It returns null if it was not + * possible to parse the given string into a Date. * */ public static Date parseRFC822(String sDate, final Locale locale) { @@ -176,14 +173,12 @@ public class DateParser { *

  • "yyyy"
  • * *

    - * Refer to the java.text.SimpleDateFormat javadocs for details on the - * format of each element. + * Refer to the java.text.SimpleDateFormat javadocs for details on the format of each element. *

    * * @param sDate string to parse for a date. - * @return the Date represented by the given W3C date-time string. It - * returns null if it was not possible to parse the given - * string into a Date. + * @return the Date represented by the given W3C date-time string. It returns null if it + * was not possible to parse the given string into a Date. * */ public static Date parseW3CDateTime(String sDate, final Locale locale) { @@ -215,14 +210,12 @@ public class DateParser { } /** - * Parses a Date out of a String with a date in W3C date-time format or in a - * RFC822 format. + * Parses a Date out of a String with a date in W3C date-time format or in a RFC822 format. *

    * * @param sDate string to parse for a date. - * @return the Date represented by the given W3C date-time string. It - * returns null if it was not possible to parse the given - * string into a Date. + * @return the Date represented by the given W3C date-time string. It returns null if it + * was not possible to parse the given string into a Date. * * */ public static Date parseDate(final String sDate, final Locale locale) { @@ -239,13 +232,12 @@ public class DateParser { /** * create a RFC822 representation of a date. *

    - * Refer to the java.text.SimpleDateFormat javadocs for details on the - * format of each element. + * Refer to the java.text.SimpleDateFormat javadocs for details on the format of each element. *

    * * @param date Date to parse - * @return the RFC822 represented by the given Date It returns null - * if it was not possible to parse the date. + * @return the RFC822 represented by the given Date It returns null if it was not + * possible to parse the date. * */ public static String formatRFC822(final Date date, final Locale locale) { @@ -257,13 +249,12 @@ public class DateParser { /** * create a W3C Date Time representation of a date. *

    - * Refer to the java.text.SimpleDateFormat javadocs for details on the - * format of each element. + * Refer to the java.text.SimpleDateFormat javadocs for details on the format of each element. *

    * * @param date Date to parse - * @return the W3C Date Time represented by the given Date It returns - * null if it was not possible to parse the date. + * @return the W3C Date Time represented by the given Date It returns null if it was not + * possible to parse the date. * */ public static String formatW3CDateTime(final Date date, final Locale locale) { diff --git a/src/main/java/com/sun/syndication/io/impl/FeedGenerators.java b/src/main/java/com/sun/syndication/io/impl/FeedGenerators.java index 09cb59f..9385878 100644 --- a/src/main/java/com/sun/syndication/io/impl/FeedGenerators.java +++ b/src/main/java/com/sun/syndication/io/impl/FeedGenerators.java @@ -23,14 +23,12 @@ import com.sun.syndication.io.WireFeedGenerator; /** * Generates an XML document (JDOM Document) out of a Feed. *

    - * It can generate all flavors of RSS (0.90, 0.91, 0.92, 0.93, 0.94, 1.0 and - * 2.0) and Atom 0.3 feed. + * It can generate all flavors of RSS (0.90, 0.91, 0.92, 0.93, 0.94, 1.0 and 2.0) and Atom 0.3 feed. *

    * WireFeedGenerator instances are thread safe. *

    - * Generators for a specific type must extend this class and register in the - * generator list. (Right now registration is hardcoded in the WireFeedGenerator - * constructor). + * Generators for a specific type must extend this class and register in the generator list. (Right + * now registration is hardcoded in the WireFeedGenerator constructor). *

    * * @author Alejandro Abdelnur diff --git a/src/main/java/com/sun/syndication/io/impl/FeedParsers.java b/src/main/java/com/sun/syndication/io/impl/FeedParsers.java index e925bad..8190070 100644 --- a/src/main/java/com/sun/syndication/io/impl/FeedParsers.java +++ b/src/main/java/com/sun/syndication/io/impl/FeedParsers.java @@ -25,16 +25,14 @@ import com.sun.syndication.io.WireFeedParser; /** * Parses an XML document (JDOM Document) into a Feed. *

    - * It accepts all flavors of RSS (0.90, 0.91, 0.92, 0.93, 0.94, 1.0 and 2.0) and - * Atom 0.3 feeds. + * It accepts all flavors of RSS (0.90, 0.91, 0.92, 0.93, 0.94, 1.0 and 2.0) and Atom 0.3 feeds. *

    * The WireFeedParser is a liberal parser. *

    * WireFeedParser instances are thread safe. *

    - * Parsers for a specific type must extend this class and register in the parser - * list. (Right now registration is hardcoded in the WireFeedParser - * constructor). + * Parsers for a specific type must extend this class and register in the parser list. (Right now + * registration is hardcoded in the WireFeedParser constructor). *

    * * @author Alejandro Abdelnur @@ -66,8 +64,8 @@ public class FeedParsers extends PluginManager { *

    * * @param document document feed to find the parser for. - * @return the parser for the given document or null if there is no - * parser for that document. + * @return the parser for the given document or null if there is no parser for that + * document. * */ public WireFeedParser getParserFor(final Document document) { diff --git a/src/main/java/com/sun/syndication/io/impl/NumberParser.java b/src/main/java/com/sun/syndication/io/impl/NumberParser.java index 234a82d..d3516be 100644 --- a/src/main/java/com/sun/syndication/io/impl/NumberParser.java +++ b/src/main/java/com/sun/syndication/io/impl/NumberParser.java @@ -4,15 +4,12 @@ package com.sun.syndication.io.impl; * A helper class that parses Numbers out of Strings in a lenient manner. * *

    - * No method will throw any sort of Exception when parsing a string. All methods - * accept any Java String or null as legal input, if the input is non null, - * whitespace will be trimmed first, and then parsing will be attempted. - *

    - *

    - * :TODO: Add Integer, Float, and Double methods as needed. + * No method will throw any sort of Exception when parsing a string. All methods accept any Java + * String or null as legal input, if the input is non null, whitespace will be trimmed first, and + * then parsing will be attempted. *

    */ -public class NumberParser { +public final class NumberParser { /** * Private constructor to avoid NumberParser instances creation. @@ -24,8 +21,8 @@ public class NumberParser { * Parses a Long out of a string. * * @param str string to parse for a Long. - * @return the Long represented by the given string, It returns null - * if it was not possible to parse the the string. + * @return the Long represented by the given string, It returns null if it was not + * possible to parse the the string. */ public static Long parseLong(final String str) { if (null != str) { @@ -39,12 +36,11 @@ public class NumberParser { } /** - * Parse an Integer from a String. If the String is not an integer - * null is returned and no exception is thrown. + * Parse an Integer from a String. If the String is not an integer null is returned and + * no exception is thrown. * * @param str the String to parse - * @return The Integer represented by the String, or null if it could not be - * parsed. + * @return The Integer represented by the String, or null if it could not be parsed. */ public static Integer parseInt(final String str) { if (null != str) { @@ -58,12 +54,11 @@ public class NumberParser { } /** - * Parse a Float from a String without exceptions. If the String is not a - * Float then null is returned + * Parse a Float from a String without exceptions. If the String is not a Float then null is + * returned * * @param str the String to parse - * @return The Float represented by the String, or null if it could not be - * parsed. + * @return The Float represented by the String, or null if it could not be parsed. */ public static Float parseFloat(final String str) { if (null != str) { @@ -96,13 +91,12 @@ public class NumberParser { * Parses a long out of a string. * * @param str string to parse for a long. - * @param def default value to return if it is not possible to parse the the - * string. + * @param def default value to return if it is not possible to parse the the string. * @return the long represented by the given string, or the default. */ public static long parseLong(final String str, final long def) { final Long ret = parseLong(str); - if (null == ret) { + if (ret == null) { return def; } else { return ret.longValue(); diff --git a/src/main/java/com/sun/syndication/io/impl/PluginManager.java b/src/main/java/com/sun/syndication/io/impl/PluginManager.java index 3f9e9e6..40eda74 100644 --- a/src/main/java/com/sun/syndication/io/impl/PluginManager.java +++ b/src/main/java/com/sun/syndication/io/impl/PluginManager.java @@ -127,13 +127,15 @@ public abstract class PluginManager { } /** - * Loads and returns the classes defined in the properties files. If the system property "rome.pluginmanager.useloadclass" is set to true then - * classLoader.loadClass will be used to load classes (instead of Class.forName). This is designed to improve OSGi compatibility. Further information can be - * found in https://rome.dev.java.net/issues/show_bug.cgi?id=118 + * Loads and returns the classes defined in the properties files. If the system property + * "rome.pluginmanager.useloadclass" is set to true then classLoader.loadClass will be used to + * load classes (instead of Class.forName). This is designed to improve OSGi compatibility. + * Further information can be found in https://rome.dev.java.net/issues/show_bug.cgi?id=118 *

    * * @return array containing the classes defined in the properties files. - * @throws java.lang.ClassNotFoundException thrown if one of the classes defined in the properties file cannot be loaded and hard failure is ON. + * @throws java.lang.ClassNotFoundException thrown if one of the classes defined in the + * properties file cannot be loaded and hard failure is ON. * */ @SuppressWarnings("unchecked") diff --git a/src/main/java/com/sun/syndication/io/impl/PropertiesLoader.java b/src/main/java/com/sun/syndication/io/impl/PropertiesLoader.java index d1572ed..f2bad72 100644 --- a/src/main/java/com/sun/syndication/io/impl/PropertiesLoader.java +++ b/src/main/java/com/sun/syndication/io/impl/PropertiesLoader.java @@ -14,13 +14,16 @@ import java.util.WeakHashMap; import com.sun.syndication.feed.impl.ConfigurableClassLoader; /** - * Properties loader that aggregates a master properties file and several extra properties files, all from the current classpath. + * Properties loader that aggregates a master properties file and several extra properties files, + * all from the current classpath. *

    - * The master properties file has to be in a distinct location than the extra properties files. First the master properties file is loaded, then all the extra - * properties files in their order of appearance in the classpath. + * The master properties file has to be in a distinct location than the extra properties files. + * First the master properties file is loaded, then all the extra properties files in their order of + * appearance in the classpath. *

    - * Current use cases (plugin manager for parsers/converters/generators for feeds and modules and date formats) assume properties are list of tokens, that why - * the only method to get property values is the getTokenizedProperty(). + * Current use cases (plugin manager for parsers/converters/generators for feeds and modules and + * date formats) assume properties are list of tokens, that why the only method to get property + * values is the getTokenizedProperty(). *

    * * @author Alejandro Abdelnur @@ -103,12 +106,13 @@ public class PropertiesLoader { } /** - * Returns an array of tokenized values stored under a property key in all properties files. If the master file has this property its tokens will be the - * first ones in the array. + * Returns an array of tokenized values stored under a property key in all properties files. If + * the master file has this property its tokens will be the first ones in the array. *

    * * @param key property key to retrieve values - * @param separator String with all separator characters to tokenize from the values in all properties files. + * @param separator String with all separator characters to tokenize from the values in all + * properties files. * @return all the tokens for the given property key from all the properties files. * */ @@ -130,8 +134,8 @@ public class PropertiesLoader { } /** - * Returns an array of values stored under a property key in all properties files. If the master file has this property it will be the first ones in the - * array. + * Returns an array of values stored under a property key in all properties files. If the master + * file has this property it will be the first ones in the array. *

    * * @param key property key to retrieve values diff --git a/src/main/java/com/sun/syndication/io/impl/RSS090Generator.java b/src/main/java/com/sun/syndication/io/impl/RSS090Generator.java index ce49ad1..4d234b0 100644 --- a/src/main/java/com/sun/syndication/io/impl/RSS090Generator.java +++ b/src/main/java/com/sun/syndication/io/impl/RSS090Generator.java @@ -104,8 +104,8 @@ public class RSS090Generator extends BaseWireFeedGenerator { } /** - * Populates the given channel with parsed data from the ROME element that - * holds the channel data. + * Populates the given channel with parsed data from the ROME element that holds the channel + * data. * * @param channel the channel into which parsed data will be added. * @param eChannel the XML element that holds the data for the channel. diff --git a/src/main/java/com/sun/syndication/io/impl/RSS090Parser.java b/src/main/java/com/sun/syndication/io/impl/RSS090Parser.java index d081bf8..1c74a13 100644 --- a/src/main/java/com/sun/syndication/io/impl/RSS090Parser.java +++ b/src/main/java/com/sun/syndication/io/impl/RSS090Parser.java @@ -97,8 +97,8 @@ public class RSS090Parser extends BaseWireFeedParser { } /** - * Returns the namespace used by RSS elements in document of the RSS version - * the parser supports. + * Returns the namespace used by RSS elements in document of the RSS version the parser + * supports. *

    * This implementation returns the EMTPY namespace. *

    @@ -110,8 +110,8 @@ public class RSS090Parser extends BaseWireFeedParser { } /** - * Returns the namespace used by RDF elements in document of the RSS version - * the parser supports. + * Returns the namespace used by RDF elements in document of the RSS version the parser + * supports. *

    * This implementation returns the EMTPY namespace. *

    @@ -137,11 +137,10 @@ public class RSS090Parser extends BaseWireFeedParser { /** * Parses the root element of an RSS document into a Channel bean. *

    - * It reads title, link and description and delegates to parseImage, - * parseItems and parseTextInput. This delegation always passes the root - * element of the RSS document as different RSS version may have this - * information in different parts of the XML tree (no assumptions made - * thanks to the specs variaty) + * It reads title, link and description and delegates to parseImage, parseItems and + * parseTextInput. This delegation always passes the root element of the RSS document as + * different RSS version may have this information in different parts of the XML tree (no + * assumptions made thanks to the specs variaty) *

    * * @param rssRoot the root element of the RSS document to parse. @@ -194,9 +193,9 @@ public class RSS090Parser extends BaseWireFeedParser { } /** - * This method exists because RSS0.90 and RSS1.0 have the 'item' elements - * under the root elemment. And RSS0.91, RSS0.02, RSS0.93, RSS0.94 and - * RSS2.0 have the item elements under the 'channel' element. + * This method exists because RSS0.90 and RSS1.0 have the 'item' elements under the root + * elemment. And RSS0.91, RSS0.02, RSS0.93, RSS0.94 and RSS2.0 have the item elements under the + * 'channel' element. *

    */ protected List getItems(final Element rssRoot) { @@ -204,9 +203,9 @@ public class RSS090Parser extends BaseWireFeedParser { } /** - * This method exists because RSS0.90 and RSS1.0 have the 'image' element - * under the root elemment. And RSS0.91, RSS0.02, RSS0.93, RSS0.94 and - * RSS2.0 have it under the 'channel' element. + * This method exists because RSS0.90 and RSS1.0 have the 'image' element under the root + * elemment. And RSS0.91, RSS0.02, RSS0.93, RSS0.94 and RSS2.0 have it under the 'channel' + * element. *

    */ protected Element getImage(final Element rssRoot) { @@ -214,9 +213,9 @@ public class RSS090Parser extends BaseWireFeedParser { } /** - * This method exists because RSS0.90 and RSS1.0 have the 'textinput' - * element under the root elemment. And RSS0.91, RSS0.02, RSS0.93, RSS0.94 - * and RSS2.0 have it under the 'channel' element. + * This method exists because RSS0.90 and RSS1.0 have the 'textinput' element under the root + * elemment. And RSS0.91, RSS0.02, RSS0.93, RSS0.94 and RSS2.0 have it under the 'channel' + * element. *

    */ protected Element getTextInput(final Element rssRoot) { @@ -229,8 +228,7 @@ public class RSS090Parser extends BaseWireFeedParser { * It reads title and url out of the 'image' element. *

    * - * @param rssRoot the root element of the RSS document to parse for image - * information. + * @param rssRoot the root element of the RSS document to parse for image information. * @return the parsed image bean. */ protected Image parseImage(final Element rssRoot) { @@ -256,16 +254,14 @@ public class RSS090Parser extends BaseWireFeedParser { } /** - * Parses the root element of an RSS document looking for all items - * information. + * Parses the root element of an RSS document looking for all items information. *

    - * It iterates through the item elements list, obtained from the getItems() - * method, and invoke parseItem() for each item element. The resulting - * RSSItem of each item element is stored in a list. + * It iterates through the item elements list, obtained from the getItems() method, and invoke + * parseItem() for each item element. The resulting RSSItem of each item element is stored in a + * list. *

    * - * @param rssRoot the root element of the RSS document to parse for all - * items information. + * @param rssRoot the root element of the RSS document to parse for all items information. * @return a list with all the parsed RSSItem beans. */ protected List parseItems(final Element rssRoot, final Locale locale) { @@ -285,8 +281,7 @@ public class RSS090Parser extends BaseWireFeedParser { * It reads title and link out of the 'item' element. *

    * - * @param rssRoot the root element of the RSS document in case it's needed - * for context. + * @param rssRoot the root element of the RSS document in case it's needed for context. * @param eItem the item element to parse. * @return the parsed RSSItem bean. */ @@ -324,15 +319,12 @@ public class RSS090Parser extends BaseWireFeedParser { } /** - * Parses the root element of an RSS document looking for text-input - * information. + * Parses the root element of an RSS document looking for text-input information. *

    - * It reads title, description, name and link out of the 'textinput' or - * 'textInput' element. + * It reads title, description, name and link out of the 'textinput' or 'textInput' element. *

    * - * @param rssRoot the root element of the RSS document to parse for - * text-input information. + * @param rssRoot the root element of the RSS document to parse for text-input information. * @return the parsed RSSTextInput bean. */ protected TextInput parseTextInput(final Element rssRoot) { diff --git a/src/main/java/com/sun/syndication/io/impl/RSS091UserlandParser.java b/src/main/java/com/sun/syndication/io/impl/RSS091UserlandParser.java index 04a1614..bafe211 100644 --- a/src/main/java/com/sun/syndication/io/impl/RSS091UserlandParser.java +++ b/src/main/java/com/sun/syndication/io/impl/RSS091UserlandParser.java @@ -79,8 +79,8 @@ public class RSS091UserlandParser extends RSS090Parser { /** * Parses the root element of an RSS document into a Channel bean. *

    - * It first invokes super.parseChannel and then parses and injects the - * following properties if present: language, pubDate, rating and copyright. + * It first invokes super.parseChannel and then parses and injects the following properties if + * present: language, pubDate, rating and copyright. *

    * * @param rssRoot the root element of the RSS document to parse. @@ -155,13 +155,11 @@ public class RSS091UserlandParser extends RSS090Parser { /** * Parses the root element of an RSS document looking for image information. *

    - * It first invokes super.parseImage and then parses and injects the - * following properties if present: url, link, width, height and - * description. + * It first invokes super.parseImage and then parses and injects the following properties if + * present: url, link, width, height and description. *

    * - * @param rssRoot the root element of the RSS document to parse for image - * information. + * @param rssRoot the root element of the RSS document to parse for image information. * @return the parsed RSSImage bean. */ @Override @@ -242,12 +240,11 @@ public class RSS091UserlandParser extends RSS090Parser { /** * Parses an item element of an RSS document looking for item information. *

    - * It first invokes super.parseItem and then parses and injects the - * description property if present. + * It first invokes super.parseItem and then parses and injects the description property if + * present. *

    * - * @param rssRoot the root element of the RSS document in case it's needed - * for context. + * @param rssRoot the root element of the RSS document in case it's needed for context. * @param eItem the item element to parse. * @return the parsed RSSItem bean. */ diff --git a/src/main/java/com/sun/syndication/io/impl/RSS092Parser.java b/src/main/java/com/sun/syndication/io/impl/RSS092Parser.java index 2b78e5e..b3c6044 100644 --- a/src/main/java/com/sun/syndication/io/impl/RSS092Parser.java +++ b/src/main/java/com/sun/syndication/io/impl/RSS092Parser.java @@ -38,8 +38,8 @@ import com.sun.syndication.feed.rss.Source; /** */ public class RSS092Parser extends RSS091UserlandParser { - - private static final Logger LOG = LoggerFactory.getLogger(RSS092Parser.class); + + private static final Logger LOG = LoggerFactory.getLogger(RSS092Parser.class); public RSS092Parser() { this("rss_0.92"); @@ -183,7 +183,7 @@ public class RSS092Parser extends RSS091UserlandParser { sb.append(c.getValue()); break; case EntityRef: - LOG.debug("Entity: {}", c.getValue()); + LOG.debug("Entity: {}", c.getValue()); sb.append(c.getValue()); break; case Element: diff --git a/src/main/java/com/sun/syndication/io/impl/RSS10Parser.java b/src/main/java/com/sun/syndication/io/impl/RSS10Parser.java index 26dd82d..cef3172 100644 --- a/src/main/java/com/sun/syndication/io/impl/RSS10Parser.java +++ b/src/main/java/com/sun/syndication/io/impl/RSS10Parser.java @@ -44,15 +44,13 @@ public class RSS10Parser extends RSS090Parser { } /** - * Indicates if a JDom document is an RSS instance that can be parsed with - * the parser. + * Indicates if a JDom document is an RSS instance that can be parsed with the parser. *

    - * It checks for RDF ("http://www.w3.org/1999/02/22-rdf-syntax-ns#") - * namespace being defined in the root element and for the RSS 1.0 - * ("http://purl.org/rss/1.0/") namespace in the channel element. + * It checks for RDF ("http://www.w3.org/1999/02/22-rdf-syntax-ns#") namespace being defined in + * the root element and for the RSS 1.0 ("http://purl.org/rss/1.0/") namespace in the channel + * element. * - * @param document document to check if it can be parsed with this parser - * implementation. + * @param document document to check if it can be parsed with this parser implementation. * @return true if the document is RSS1., false otherwise. */ @Override @@ -88,12 +86,11 @@ public class RSS10Parser extends RSS090Parser { /** * Parses an item element of an RSS document looking for item information. *

    - * It first invokes super.parseItem and then parses and injects the - * description property if present. + * It first invokes super.parseItem and then parses and injects the description property if + * present. *

    * - * @param rssRoot the root element of the RSS document in case it's needed - * for context. + * @param rssRoot the root element of the RSS document in case it's needed for context. * @param eItem the item element to parse. * @return the parsed RSSItem bean. */ diff --git a/src/main/java/com/sun/syndication/io/impl/RSS20wNSParser.java b/src/main/java/com/sun/syndication/io/impl/RSS20wNSParser.java index 1a09f34..98578c3 100644 --- a/src/main/java/com/sun/syndication/io/impl/RSS20wNSParser.java +++ b/src/main/java/com/sun/syndication/io/impl/RSS20wNSParser.java @@ -27,14 +27,12 @@ import com.sun.syndication.feed.WireFeed; /** * To address issue with certain feeds (brought up by Charles Miller): * - * "During the debacle that was the rollout of RSS2.0, this namespace was tried, - * and even appeared in Dave Winer's Scripting News feed for a while. It was - * then withdrawn, but the wonderful thing about standards is the moment you - * roll one out, even if it's marked as unfinished and subject to change, - * someone will end up stuck with it forever." + * "During the debacle that was the rollout of RSS2.0, this namespace was tried, and even appeared + * in Dave Winer's Scripting News feed for a while. It was then withdrawn, but the wonderful thing + * about standards is the moment you roll one out, even if it's marked as unfinished and subject to + * change, someone will end up stuck with it forever." * - * Note that there is not counter part on the generator, we only generate the - * final RSS2 + * Note that there is not counter part on the generator, we only generate the final RSS2 * */ public class RSS20wNSParser extends RSS20Parser { @@ -65,8 +63,8 @@ public class RSS20wNSParser extends RSS20Parser { } /** - * After we parse the feed we put "rss_2.0" in it (so converters and - * generators work) this parser is a phantom. + * After we parse the feed we put "rss_2.0" in it (so converters and generators work) this + * parser is a phantom. * */ @Override diff --git a/src/main/java/com/sun/syndication/io/impl/SyModuleGenerator.java b/src/main/java/com/sun/syndication/io/impl/SyModuleGenerator.java index 287cfcf..c0c32fd 100644 --- a/src/main/java/com/sun/syndication/io/impl/SyModuleGenerator.java +++ b/src/main/java/com/sun/syndication/io/impl/SyModuleGenerator.java @@ -55,16 +55,13 @@ public class SyModuleGenerator implements ModuleGenerator { } /** - * Returns a set with all the URIs (JDOM Namespace elements) this module - * generator uses. + * Returns a set with all the URIs (JDOM Namespace elements) this module generator uses. *

    - * It is used by the the feed generators to add their namespace definition - * in the root element of the generated document (forward-missing of Java - * 5.0 Generics). + * It is used by the the feed generators to add their namespace definition in the root element + * of the generated document (forward-missing of Java 5.0 Generics). *

    * - * @return a set with all the URIs (JDOM Namespace elements) this module - * generator uses. + * @return a set with all the URIs (JDOM Namespace elements) this module generator uses. */ @Override public Set getNamespaces() { diff --git a/src/test/java/com/sun/syndication/unittest/SyndFeedTest.java b/src/test/java/com/sun/syndication/unittest/SyndFeedTest.java index 18b5a91..ff3494f 100644 --- a/src/test/java/com/sun/syndication/unittest/SyndFeedTest.java +++ b/src/test/java/com/sun/syndication/unittest/SyndFeedTest.java @@ -1,9 +1,3 @@ -/* - * Created on Jun 22, 2004 - * - * TODO To change the template for this generated file go to - * Window - Preferences - Java - Code Generation - Code and Comments - */ package com.sun.syndication.unittest; import java.util.Date; @@ -16,7 +10,6 @@ import com.sun.syndication.io.impl.DateParser; /** * @author pat - * */ public abstract class SyndFeedTest extends FeedTest { private String prefix = null; @@ -68,12 +61,11 @@ public abstract class SyndFeedTest extends FeedTest { /* * public void testCategories() throws Exception { List catlist = - * getCachedSyndFeed().getCategories(); //don't understand why this one - * fails assertEquals(2, catlist.size()); SyndCategory cat = - * (SyndCategory)catlist.get(0); assertEquals("channel.category[0]", - * cat.getName()); assertEquals("channel.category[0]^domain", - * cat.getTaxonomyUri()); cat = (SyndCategory)catlist.get(1); - * assertEquals("channel.category[1]", cat.getName()); + * getCachedSyndFeed().getCategories(); //don't understand why this one fails assertEquals(2, + * catlist.size()); SyndCategory cat = (SyndCategory)catlist.get(0); + * assertEquals("channel.category[0]", cat.getName()); + * assertEquals("channel.category[0]^domain", cat.getTaxonomyUri()); cat = + * (SyndCategory)catlist.get(1); assertEquals("channel.category[1]", cat.getName()); * assertEquals("channel.category[1]^domain", cat.getTaxonomyUri()); } */ @@ -140,20 +132,17 @@ public abstract class SyndFeedTest extends FeedTest { /* * public void testEntryCategories() throws Exception { SyndEntry e = - * (SyndEntry)getCachedSyndFeed().getEntries().get(0); List catlist = - * e.getCategories(); //don't understand why this one fails assertEquals(2, - * catlist.size()); SyndCategory cat = (SyndCategory)catlist.get(0); - * assertEquals("channel.item[0].category[0]", cat.getName()); - * assertEquals("channel.item[0].category[0]^domain", cat.getTaxonomyUri()); - * cat = (SyndCategory)catlist.get(1); - * assertEquals("channel.item[0].category[1]", cat.getName()); - * assertEquals("channel.item[0].category[1]^domain", cat.getTaxonomyUri()); - * //DO 2nd set of items } + * (SyndEntry)getCachedSyndFeed().getEntries().get(0); List catlist = e.getCategories(); //don't + * understand why this one fails assertEquals(2, catlist.size()); SyndCategory cat = + * (SyndCategory)catlist.get(0); assertEquals("channel.item[0].category[0]", cat.getName()); + * assertEquals("channel.item[0].category[0]^domain", cat.getTaxonomyUri()); cat = + * (SyndCategory)catlist.get(1); assertEquals("channel.item[0].category[1]", cat.getName()); + * assertEquals("channel.item[0].category[1]^domain", cat.getTaxonomyUri()); //DO 2nd set of + * items } */ /* - * public void testEntryAuthor() throws Exception { - * assertEqualsStr("channel.item[0].author", + * public void testEntryAuthor() throws Exception { assertEqualsStr("channel.item[0].author", * getEntryAuthor(getCachedSyndFeed().getEntries().get(0))); * assertEqualsStr("channel.item[1].author", * getEntryAuthor(getCachedSyndFeed().getEntries().get(1))); } @@ -166,51 +155,41 @@ public abstract class SyndFeedTest extends FeedTest { /* * //things you cannot get from SyndEntryImpl // item[0].source // - * // item0.category0 item0.category1 Thu, 08 Jul - * 1999 08:00:00 GMT Thu, 08 Jul 1999 09:00:00 - * GMT item0.author - * http://localhost:8080/item0/comments http://localhost:8080/item0/guid //TODO: I - * still have the elements to test + * url="http://localhost:8080/item0/source.url">item[0].source // // + * + * item0.category0 item0.category1 Thu, 08 Jul 1999 08:00:00 + * GMT Thu, 08 Jul 1999 09:00:00 GMT + * item0.author http://localhost:8080/item0/comments http://localhost:8080/item0/guid //TODO: I still have the elements + * to test */ /* - * public void test() { assertEqualsStr(feed, ""); } public void test() { - * assertEqualsStr(feed, ""); } + * public void test() { assertEqualsStr(feed, ""); } public void test() { assertEqualsStr(feed, + * ""); } */ // Things that you cannot get form a SyndFeedImpl today // these need to be put in a RSS 2.0 module // or is a roundtrip to wirefeed the right way to do this? /* - * Search Search this - * site: q - * http://example.org/mt/mt-search.cgi image - * height and width //Copyright 2004, Mark Pilgrim - * public void test() { assertEqualsStr(getCachedSyndFeed()., ""); } - * //Sample Toolkit public void test() { - * assertEqualsStr(feed, ""); } // + * Search Search this site: q + * http://example.org/mt/mt-search.cgi image height and width + * //Copyright 2004, Mark Pilgrim public void test() { + * assertEqualsStr(getCachedSyndFeed()., ""); } //Sample Toolkit public + * void test() { assertEqualsStr(feed, ""); } // * editor@example.org public void test() { - * assertEqualsStr(feed, ""); } // - * webmaster@example.org public void test() { - * assertEqualsStr(feed, ""); } - * http://blogs.law.harvard.edu/tech/rss 60 (PICS-1.1 - * �http://www.classify.org/safesurf/� l r (SS~~000 1)) - * 0 1 2 3 - * 4 5 6 7 - * 8 9.5 10 11 - * 12 13 14 15 - * 16 17 18 19 - * 20 21 22 23 - * Monday Tuesday - * Wednesday Thursday Friday - * Saturday Sunday + * assertEqualsStr(feed, ""); } // webmaster@example.org public void + * test() { assertEqualsStr(feed, ""); } http://blogs.law.harvard.edu/tech/rss + * 60 (PICS-1.1 �http://www.classify.org/safesurf/� l r + * (SS~~000 1)) 0 1 2 3 + * 4 5 6 7 8 9.5 + * 10 11 12 13 14 + * 15 16 17 18 19 + * 20 21 22 23 + * Monday Tuesday Wednesday Thursday + * Friday Saturday Sunday */ /* diff --git a/src/test/java/com/sun/syndication/unittest/TestDublinCore.java b/src/test/java/com/sun/syndication/unittest/TestDublinCore.java index 0510219..df180cc 100644 --- a/src/test/java/com/sun/syndication/unittest/TestDublinCore.java +++ b/src/test/java/com/sun/syndication/unittest/TestDublinCore.java @@ -20,7 +20,7 @@ public class TestDublinCore extends FeedTest { public void testDublinCoreDateIsPreferredWhenAvailableRatherThanRss20PubDate() throws Exception { final SyndFeed feed = this.getCachedSyndFeed(); - final SyndEntry entry = (SyndEntry) feed.getEntries().get(0); + final SyndEntry entry = feed.getEntries().get(0); final DCModule dc = (DCModule) entry.getModule(DCModule.URI); final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'", Locale.ENGLISH); sdf.setTimeZone(TimeZone.getTimeZone("UTC")); diff --git a/src/test/java/com/sun/syndication/unittest/TestSyndFeedAtom03DCSyModules.java b/src/test/java/com/sun/syndication/unittest/TestSyndFeedAtom03DCSyModules.java index de995fa..5dbfcc7 100644 --- a/src/test/java/com/sun/syndication/unittest/TestSyndFeedAtom03DCSyModules.java +++ b/src/test/java/com/sun/syndication/unittest/TestSyndFeedAtom03DCSyModules.java @@ -1,9 +1,3 @@ -/* - * Created on Jun 25, 2004 - * - * TODO To change the template for this generated file go to - * Window - Preferences - Java - Code Generation - Code and Comments - */ package com.sun.syndication.unittest; import java.util.Date; @@ -17,9 +11,6 @@ import com.sun.syndication.io.impl.DateParser; /** * @author pat - * - * TODO To change the template for this generated type comment go to - * Window - Preferences - Java - Code Generation - Code and Comments */ public class TestSyndFeedAtom03DCSyModules extends TestSyndFeedAtom03 { diff --git a/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS10DCSyModules.java b/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS10DCSyModules.java index 165e68a..0cf4550 100644 --- a/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS10DCSyModules.java +++ b/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS10DCSyModules.java @@ -1,9 +1,3 @@ -/* - * Created on Jun 25, 2004 - * - * TODO To change the template for this generated file go to - * Window - Preferences - Java - Code Generation - Code and Comments - */ package com.sun.syndication.unittest; import java.util.Date; @@ -17,9 +11,6 @@ import com.sun.syndication.io.impl.DateParser; /** * @author pat - * - * TODO To change the template for this generated type comment go to - * Window - Preferences - Java - Code Generation - Code and Comments */ public class TestSyndFeedRSS10DCSyModules extends TestSyndFeedRSS10 { diff --git a/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS20.java b/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS20.java index e1220c1..22c7570 100644 --- a/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS20.java +++ b/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS20.java @@ -38,8 +38,7 @@ public class TestSyndFeedRSS20 extends TestSyndFeedRSS094 { } /** - * Test we can get to RSS attributes which aren't exposed in the SyndEntry - * object + * Test we can get to RSS attributes which aren't exposed in the SyndEntry object * * @throws Exception */ diff --git a/src/test/java/com/sun/syndication/unittest/issues/Issue131Test.java b/src/test/java/com/sun/syndication/unittest/issues/Issue131Test.java index 2e3adda..0e78b1a 100644 --- a/src/test/java/com/sun/syndication/unittest/issues/Issue131Test.java +++ b/src/test/java/com/sun/syndication/unittest/issues/Issue131Test.java @@ -11,8 +11,9 @@ import com.sun.syndication.unittest.FeedTest; /** * Test for #131: SyndFeedImpl copyFrom method does not copy Entry Categories. + * * @author Martin Kurz - * + * */ public class Issue131Test extends FeedTest { diff --git a/src/test/java/com/sun/syndication/unittest/issues/Issue134Test.java b/src/test/java/com/sun/syndication/unittest/issues/Issue134Test.java index 86d3201..724fbe6 100644 --- a/src/test/java/com/sun/syndication/unittest/issues/Issue134Test.java +++ b/src/test/java/com/sun/syndication/unittest/issues/Issue134Test.java @@ -5,8 +5,9 @@ import com.sun.syndication.unittest.FeedTest; /** * Test for #134: Incorrect handling of CDATA sections. + * * @author Martin Kurz - * + * */ public class Issue134Test extends FeedTest { diff --git a/src/test/java/com/sun/syndication/unittest/issues/Issue137Test.java b/src/test/java/com/sun/syndication/unittest/issues/Issue137Test.java index 6e5fd35..00df9b4 100644 --- a/src/test/java/com/sun/syndication/unittest/issues/Issue137Test.java +++ b/src/test/java/com/sun/syndication/unittest/issues/Issue137Test.java @@ -5,8 +5,9 @@ import com.sun.syndication.unittest.FeedTest; /** * Test for #137: RSS item description is not complete. + * * @author Martin Kurz - * + * */ public class Issue137Test extends FeedTest { @@ -16,24 +17,24 @@ public class Issue137Test extends FeedTest { public void testDescription() throws Exception { final SyndFeed feed = this.getCachedSyndFeed(); - assertEquals("\"Teacher

    MOE will be building 11 new primary\n"+ - " schools and upgrading another 28 existing schools from November 2009. This is the first phase of\n"+ - " MOE's plans to enhance primary school infrastructure to facilitate the transition of all primary schools\n"+ - " to a single-session model to support a higher quality primary education.

    ", feed.getEntries().get(0).getDescription().getValue()); - assertEquals("\"Minister

    At the Work Plan Seminar 2009, Minister for Education\n"+ - " Dr Ng Eng Hen talked\n"+ - " about the importance of language & communication skills and growing a world-class education service\n"+ - ". He spoke of strengthening the teaching track and of a teacher-driven culture of professional excellence.", feed.getEntries().get(1).getDescription().getValue()); - assertEquals("\"Students\n

    A total of 275 schools will receive 580 Special and Level\n"+ - " Two Awards this year under the MOE Masterplan of Awards. These awards will be presented at the 2009\n"+ - " MOE Work Plan Seminar on 17 Sep 09 by the Minister for Education, Dr Ng Eng Hen.

    ", feed.getEntries().get(2).getDescription().getValue()); + assertEquals("\"Teacher

    MOE will be building 11 new primary\n" + + " schools and upgrading another 28 existing schools from November 2009. This is the first phase of\n" + + " MOE's plans to enhance primary school infrastructure to facilitate the transition of all primary schools\n" + + " to a single-session model to support a higher quality primary education.

    ", feed.getEntries().get(0).getDescription().getValue()); + assertEquals("\"Minister

    At the Work Plan Seminar 2009, Minister for Education\n" + + " Dr Ng Eng Hen talked\n" + + " about the importance of language & communication skills and growing a world-class education service\n" + + ". He spoke of strengthening the teaching track and of a teacher-driven culture of professional excellence.", feed.getEntries().get(1) + .getDescription().getValue()); + assertEquals("\"Students\n

    A total of 275 schools will receive 580 Special and Level\n" + + " Two Awards this year under the MOE Masterplan of Awards. These awards will be presented at the 2009\n" + + " MOE Work Plan Seminar on 17 Sep 09 by the Minister for Education, Dr Ng Eng Hen.

    ", feed.getEntries().get(2).getDescription().getValue()); } } diff --git a/src/test/java/com/sun/syndication/unittest/issues/Issue158Test.java b/src/test/java/com/sun/syndication/unittest/issues/Issue158Test.java index 72bf2a1..4399bc9 100644 --- a/src/test/java/com/sun/syndication/unittest/issues/Issue158Test.java +++ b/src/test/java/com/sun/syndication/unittest/issues/Issue158Test.java @@ -4,8 +4,9 @@ import com.sun.syndication.unittest.FeedTest; /** * Test for #161: No source element in RSS 2.0 items. + * * @author Martin Kurz - * + * */ public class Issue158Test extends FeedTest { diff --git a/src/test/java/com/sun/syndication/unittest/issues/Issue161Test.java b/src/test/java/com/sun/syndication/unittest/issues/Issue161Test.java index b64cd4c..53d69ab 100644 --- a/src/test/java/com/sun/syndication/unittest/issues/Issue161Test.java +++ b/src/test/java/com/sun/syndication/unittest/issues/Issue161Test.java @@ -7,8 +7,9 @@ import com.sun.syndication.unittest.TestSyndFeedRSS20; /** * Test for #161: No source element in RSS 2.0 items. + * * @author Martin Kurz - * + * */ public class Issue161Test extends TestSyndFeedRSS20 { diff --git a/src/test/java/com/sun/syndication/unittest/issues/Issue162Test.java b/src/test/java/com/sun/syndication/unittest/issues/Issue162Test.java index 9909ea0..27f4fed 100644 --- a/src/test/java/com/sun/syndication/unittest/issues/Issue162Test.java +++ b/src/test/java/com/sun/syndication/unittest/issues/Issue162Test.java @@ -10,8 +10,9 @@ import com.sun.syndication.unittest.TestSyndFeedRSS20; /** * Test for #161: No source element in RSS 2.0 items. + * * @author Martin Kurz - * + * */ public class Issue162Test extends TestSyndFeedRSS20 { @@ -20,7 +21,7 @@ public class Issue162Test extends TestSyndFeedRSS20 { } public void testWireFeed() throws Exception { - final Channel channel = ((Channel) this.getCachedWireFeed()); + final Channel channel = (Channel) getCachedWireFeed(); assertProperty(channel.getDocs(), "channel.docs"); assertProperty(channel.getGenerator(), "channel.generator"); assertProperty(channel.getManagingEditor(), "channel.managingEditor"); @@ -28,14 +29,14 @@ public class Issue162Test extends TestSyndFeedRSS20 { } public void testWireFeedItems() throws Exception { - final int count = ((Channel) this.getCachedWireFeed()).getItems().size(); + final int count = ((Channel) getCachedWireFeed()).getItems().size(); for (int i = 0; i < count; i++) { testItem(i); } } protected void testWireFeedItem(final int i) throws Exception { - final List items = ((Channel) this.getCachedWireFeed()).getItems(); + final List items = ((Channel) getCachedWireFeed()).getItems(); final Item entry = items.get(i); assertProperty(entry.getComments(), "channel.item[" + i + "].comments"); } diff --git a/src/test/java/com/sun/syndication/unittest/issues/Issue88Test.java b/src/test/java/com/sun/syndication/unittest/issues/Issue88Test.java index d896567..faf06fe 100644 --- a/src/test/java/com/sun/syndication/unittest/issues/Issue88Test.java +++ b/src/test/java/com/sun/syndication/unittest/issues/Issue88Test.java @@ -4,8 +4,9 @@ import com.sun.syndication.unittest.FeedTest; /** * Test for #134: Incorrect handling of CDATA sections. + * * @author Martin Kurz - * + * */ public class Issue88Test extends FeedTest { @@ -15,7 +16,7 @@ public class Issue88Test extends FeedTest { public void testStyleSheet() throws Exception { assertEquals("stylesheet in syndfeed missing", "http://test.example/test.xslt", this.getCachedSyndFeed().getStyleSheet()); - assertEquals("stylesheet in wirefeed missing", "http://test.example/test.xslt", this.getCachedWireFeed().getStyleSheet()); + assertEquals("stylesheet in wirefeed missing", "http://test.example/test.xslt", getCachedWireFeed().getStyleSheet()); } }