Refactored some code

This commit is contained in:
Patrick Gotthard 2013-11-17 16:03:41 +01:00
parent 990ca83787
commit 8ded48b469
99 changed files with 1357 additions and 1698 deletions

View file

@ -25,8 +25,8 @@ public interface CopyFrom<T> {
/**
* Returns the interface the copyFrom works on.
* <p>
* 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.
* <p>
*
* @return the interface the copyFrom works on.
@ -38,9 +38,8 @@ public interface CopyFrom<T> {
* <p>
* Any existing properties in this bean are lost.
* <p>
* 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.
* <p>
*
* @param obj the instance to copy properties from.

View file

@ -31,12 +31,12 @@ import com.sun.syndication.feed.module.impl.ModuleUtils;
/**
* Parent class of the RSS (Channel) and Atom (Feed) feed beans.
* <p>
* 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).
* <p>
* 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
* <p>
*
* @author Alejandro Abdelnur
@ -77,8 +77,7 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable {
* <p>
*
* @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.
* <p>
*
* @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. <b>Do not use</b>, for bean cloning
* purposes only.
* Sets the feedType of a the feed. <b>Do not use</b>, for bean cloning purposes only.
* <p>
*
* @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.
* <p>
* 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.
* <p>
*
* @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.
* <p>
* 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.
* <p>
*
* @param encoding the charset encoding of the feed.
@ -191,8 +189,7 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable {
* Returns the channel modules.
* <p>
*
* @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.
* <p>
*
* @param modules the list of ModuleImpl elements with the channel modules
* to set, an empty list or <b>null</b> if none.
* @param modules the list of ModuleImpl elements with the channel modules to set, an empty list
* or <b>null</b> 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;
}
}

View file

@ -50,8 +50,7 @@ public class Category implements Cloneable, Serializable {
* <p>
*
* @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.
* <p>
*
* @param other he reference object with which to compare.

View file

@ -78,8 +78,7 @@ public class Content implements Cloneable, Serializable {
* <p>
*
* @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.
* <p>
*
* @param other he reference object with which to compare.

View file

@ -70,8 +70,8 @@ public class Entry implements Cloneable, Serializable, Extendable {
* Sets the entry alternate links.
* <p>
*
* @param alternateLinks the list of Link elements with the entry alternate
* links to set, an empty list or <b>null</b> if none.
* @param alternateLinks the list of Link elements with the entry alternate links to set, an
* empty list or <b>null</b> if none.
*/
public void setAlternateLinks(final List<Link> alternateLinks) {
this.alternateLinks = alternateLinks;
@ -81,8 +81,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* Returns the entry alternate links.
* <p>
*
* @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<Link> getAlternateLinks() {
if (alternateLinks == null) {
@ -145,8 +144,8 @@ public class Entry implements Cloneable, Serializable, Extendable {
* Sets the entry contents.
* <p>
*
* @param contents the list of Content elements with the entry contents to
* set, an empty list or <b>null</b> if none.
* @param contents the list of Content elements with the entry contents to set, an empty list or
* <b>null</b> if none.
*/
public void setContents(final List<Content> contents) {
this.contents = contents;
@ -156,8 +155,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* Returns the entry contents.
* <p>
*
* @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<Content> getContents() {
if (contents == null) {
@ -170,8 +168,8 @@ public class Entry implements Cloneable, Serializable, Extendable {
* Sets the entry contributors.
* <p>
*
* @param contributors the list of Person elements with the entry
* contributors to set, an empty list or <b>null</b> if none.
* @param contributors the list of Person elements with the entry contributors to set, an empty
* list or <b>null</b> if none.
*
*/
public void setContributors(final List<SyndPerson> contributors) {
@ -182,8 +180,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* Returns the entry contributors.
* <p>
*
* @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<SyndPerson> 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)}).
* <p>
*
* @param issued the entry issued date, <b>null</b> 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()} ).
* <p>
*
* @return the entry issued date, <b>null</b> 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)}).
* <p>
*
* @param modified the entry modified date, <b>null</b> 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()} ).
* <p>
*
* @return the entry modified date, <b>null</b> if none.
@ -360,8 +353,8 @@ public class Entry implements Cloneable, Serializable, Extendable {
* Sets the entry modules.
* <p>
*
* @param modules the list of ModuleImpl elements with the entry modules to
* set, an empty list or <b>null</b> if none.
* @param modules the list of ModuleImpl elements with the entry modules to set, an empty list
* or <b>null</b> if none.
*
*/
@Override
@ -373,8 +366,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* Returns the entry modules.
* <p>
*
* @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.
* <p>
*
* @param otherLinks the list Link elements with the entry non-alternate
* links to set, an empty list or <b>null</b> if none.
* @param otherLinks the list Link elements with the entry non-alternate links to set, an empty
* list or <b>null</b> if none.
*/
public void setOtherLinks(final List<Link> otherLinks) {
this.otherLinks = otherLinks;
@ -400,8 +392,8 @@ public class Entry implements Cloneable, Serializable, Extendable {
* Returns the entry non-alternate links.
* <p>
*
* @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<Link> getOtherLinks() {
if (otherLinks == null) {
@ -613,8 +605,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* <p>
*
* @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.
* <p>
*
* @param other he reference object with which to compare.

View file

@ -65,8 +65,7 @@ public class Feed extends WireFeed {
}
/**
* Feed Constructor. All properties, except the type, are set to
* <b>null</b>.
* Feed Constructor. All properties, except the type, are set to <b>null</b>.
* <p>
*
* @param type the type of the Atom feed.
@ -152,8 +151,7 @@ public class Feed extends WireFeed {
* Returns the feed alternate links.
* <p>
*
* @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<Link> getAlternateLinks() {
if (alternateLinks == null) {
@ -166,8 +164,8 @@ public class Feed extends WireFeed {
* Sets the feed alternate links.
* <p>
*
* @param alternateLinks the list of Link elements with the feed alternate
* links to set, an empty list or <b>null</b> if none.
* @param alternateLinks the list of Link elements with the feed alternate links to set, an
* empty list or <b>null</b> if none.
*/
public void setAlternateLinks(final List<Link> alternateLinks) {
this.alternateLinks = alternateLinks;
@ -177,8 +175,8 @@ public class Feed extends WireFeed {
* Returns the feed other links (non-alternate ones).
* <p>
*
* @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<Link> getOtherLinks() {
if (otherLinks == null) {
@ -191,9 +189,8 @@ public class Feed extends WireFeed {
* Sets the feed other links (non-alternate ones).
* <p>
*
* @param otherLinks the list of Link elements with the feed other links
* (non-alternate ones) to set, an empty list or <b>null</b> if
* none.
* @param otherLinks the list of Link elements with the feed other links (non-alternate ones) to
* set, an empty list or <b>null</b> if none.
*/
public void setOtherLinks(final List<Link> otherLinks) {
this.otherLinks = otherLinks;
@ -228,8 +225,7 @@ public class Feed extends WireFeed {
* Returns the feed contributors.
* <p>
*
* @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<SyndPerson> getContributors() {
@ -243,8 +239,8 @@ public class Feed extends WireFeed {
* Sets the feed contributors.
* <p>
*
* @param contributors the list of Person elements with the feed
* contributors to set, an empty list or <b>null</b> if none.
* @param contributors the list of Person elements with the feed contributors to set, an empty
* list or <b>null</b> if none.
*
*/
public void setContributors(final List<SyndPerson> 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)}).
* <p>
*
* @param copyright the feed copyright to set, <b>null</b> 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)}).
* <p>
*
* @param modified the feed modified date to set, <b>null</b> if none.
@ -382,8 +376,7 @@ public class Feed extends WireFeed {
* Returns the feed entries.
* <p>
*
* @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<Entry> getEntries() {
@ -397,8 +390,8 @@ public class Feed extends WireFeed {
* Sets the feed entries.
* <p>
*
* @param entries the list of Entry elements with the feed entries to set,
* an empty list or <b>null</b> if none.
* @param entries the list of Entry elements with the feed entries to set, an empty list or
* <b>null</b> if none.
*
*/
public void setEntries(final List<Entry> entries) {
@ -409,8 +402,7 @@ public class Feed extends WireFeed {
* Returns the feed modules.
* <p>
*
* @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.
* <p>
*
* @param modules the list of ModuleImpl elements with the feed moduless to
* set, an empty list or <b>null</b> if none.
* @param modules the list of ModuleImpl elements with the feed moduless to set, an empty list
* or <b>null</b> if none.
*
*/
@Override

View file

@ -48,8 +48,7 @@ public class Generator implements Cloneable, Serializable {
* <p>
*
* @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.
* <p>
*
* @param other he reference object with which to compare.

View file

@ -54,8 +54,7 @@ public class Link implements Cloneable, Serializable {
* <p>
*
* @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.
* <p>
*
* @param other he reference object with which to compare.

View file

@ -59,8 +59,7 @@ public class Person implements SyndPerson, Cloneable, Serializable, Extendable {
* <p>
*
* @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.
* <p>
*
* @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.
* <p>
*
* @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.
* <p>
*
* @param modules the list of ModuleImpl elements with the entry modules to
* set, an empty list or <b>null</b> if none.
* @param modules the list of ModuleImpl elements with the entry modules to set, an empty list
* or <b>null</b> if none.
*
*/
@Override

View file

@ -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<PropertyDescriptor> 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<PropertyDescriptor> getPropertyDescriptorsWithGettersAndSetters(final Class<?> clazz) throws IntrospectionException {

View file

@ -36,8 +36,8 @@ import org.slf4j.LoggerFactory;
/**
* Provides deep <b>Bean</b> clonning support.
* <p>
* 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.
* <p>
*
* @author Alejandro Abdelnur
@ -109,9 +109,11 @@ public class CloneableBean implements Serializable, Cloneable {
/**
* Creates a CloneableBean to be used in a delegation pattern.
* <p>
* 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.
* <p>
*
* @param obj object bean to clone.
@ -130,8 +132,8 @@ public class CloneableBean implements Serializable, Cloneable {
/**
* Makes a deep bean clone of the object.
* <p>
* 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.
* <p>

View file

@ -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) {

View file

@ -25,8 +25,8 @@ import java.util.List;
/**
* Provides deep <b>Bean</b> equals() and hashCode() functionality for Java Beans.
* <p>
* 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.
* <p>
* The hashcode is calculated by getting the hashcode of the Bean String representation.
* <p>
@ -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.
* <p>
* 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.
* <p>
@ -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.
* <p>
* To be used by classes using EqualsBean in a delegation pattern,
*
@ -170,8 +172,8 @@ public class EqualsBean implements Serializable {
* <p>
* The hashcode is calculated by getting the hashcode of the Bean String representation.
* <p>
* 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.
* <p>

View file

@ -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.
* <p>
* It works on all read/write properties, recursively.
* <p>
@ -28,9 +29,10 @@ import java.util.Set;
* <p>
* <h3>ObjectBean programming conventions</h3>
* <P>
* All ObjectBean subclasses having properties that return collections they should never return null if the property has been set to <b>null</b> 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 <b>null</b> 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.
* <P>
* All ObjectBean subclasses properties should be live references.
* <p>
@ -60,9 +62,11 @@ public class ObjectBean implements Serializable, Cloneable {
/**
* Constructor.
* <p>
* 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.
* <p>
*
* @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.
* <p>
*
* @param other he reference object with which to compare.

View file

@ -33,8 +33,8 @@ import org.slf4j.LoggerFactory;
/**
* Provides deep <b>Bean</b> toString support.
* <p>
* 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.
* <p>
*
* @author Alejandro Abdelnur

View file

@ -23,8 +23,7 @@ import java.util.List;
* Dublin Core Module.
* <p>
*
* @see <a href="http://web.resource.org/rss/1.0/modules/dc/">Dublin Core
* module</a>.
* @see <a href="http://web.resource.org/rss/1.0/modules/dc/">Dublin Core module</a>.
* @author Alejandro Abdelnur
*
*/
@ -40,8 +39,7 @@ public interface DCModule extends Module {
* Returns the DublinCore module titles.
* <p>
*
* @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<String> getTitles();
@ -50,15 +48,15 @@ public interface DCModule extends Module {
* Sets the DublinCore module titles.
* <p>
*
* @param titles the list of String representing the DublinCore module
* titles to set, an empty list or <b>null</b> if none.
* @param titles the list of String representing the DublinCore module titles to set, an empty
* list or <b>null</b> if none.
*
*/
void setTitles(List<String> titles);
/**
* Gets the DublinCore module title. Convenience method that can be used to
* obtain the first item, <b>null</b> if none.
* Gets the DublinCore module title. Convenience method that can be used to obtain the first
* item, <b>null</b> if none.
* <p>
*
* @return the first DublinCore module title, <b>null</b> 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.
* <p>
*
* @param title the DublinCore module title to set, <b>null</b> if none.
@ -79,8 +77,7 @@ public interface DCModule extends Module {
* Returns the DublinCore module creator.
* <p>
*
* @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<String> getCreators();
@ -89,15 +86,15 @@ public interface DCModule extends Module {
* Sets the DublinCore module creators.
* <p>
*
* @param creators the list of String representing the DublinCore module
* creators to set, an empty list or <b>null</b> if none.
* @param creators the list of String representing the DublinCore module creators to set, an
* empty list or <b>null</b> if none.
*
*/
void setCreators(List<String> creators);
/**
* Gets the DublinCore module creator. Convenience method that can be used
* to obtain the first item, <b>null</b> if none.
* Gets the DublinCore module creator. Convenience method that can be used to obtain the first
* item, <b>null</b> if none.
* <p>
*
* @return the first DublinCore module creator, <b>null</b> 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.
* <p>
*
* @param creator the DublinCore module creator to set, <b>null</b> if none.
@ -118,8 +115,8 @@ public interface DCModule extends Module {
* Returns the DublinCore module subjects.
* <p>
*
* @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<DCSubject> getSubjects();
@ -128,15 +125,15 @@ public interface DCModule extends Module {
* Sets the DublinCore module subjects.
* <p>
*
* @param subjects the list of DCSubject elements with the DublinCore module
* subjects to set, an empty list or <b>null</b> if none.
* @param subjects the list of DCSubject elements with the DublinCore module subjects to set, an
* empty list or <b>null</b> if none.
*
*/
void setSubjects(List<DCSubject> subjects);
/**
* Gets the DublinCore module subject. Convenience method that can be used
* to obtain the first item, <b>null</b> if none.
* Gets the DublinCore module subject. Convenience method that can be used to obtain the first
* item, <b>null</b> if none.
* <p>
*
* @return the first DublinCore module subject, <b>null</b> 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.
* <p>
*
* @param subject the DublinCore module subject to set, <b>null</b> if none.
@ -157,8 +154,8 @@ public interface DCModule extends Module {
* Returns the DublinCore module description.
* <p>
*
* @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<String> getDescriptions();
@ -167,15 +164,15 @@ public interface DCModule extends Module {
* Sets the DublinCore module descriptions.
* <p>
*
* @param descriptions the list of String representing the DublinCore module
* descriptions to set, an empty list or <b>null</b> if none.
* @param descriptions the list of String representing the DublinCore module descriptions to
* set, an empty list or <b>null</b> if none.
*
*/
void setDescriptions(List<String> descriptions);
/**
* Gets the DublinCore module description. Convenience method that can be
* used to obtain the first item, <b>null</b> if none.
* Gets the DublinCore module description. Convenience method that can be used to obtain the
* first item, <b>null</b> if none.
* <p>
*
* @return the first DublinCore module description, <b>null</b> 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.
* <p>
*
* @param description the DublinCore module description to set, <b>null</b>
* if none.
* @param description the DublinCore module description to set, <b>null</b> if none.
*
*/
void setDescription(String description);
@ -197,8 +193,8 @@ public interface DCModule extends Module {
* Returns the DublinCore module publisher.
* <p>
*
* @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<String> getPublishers();
@ -207,15 +203,15 @@ public interface DCModule extends Module {
* Sets the DublinCore module publishers.
* <p>
*
* @param publishers the list of String representing the DublinCore module
* publishers to set, an empty list or <b>null</b> if none.
* @param publishers the list of String representing the DublinCore module publishers to set, an
* empty list or <b>null</b> if none.
*
*/
void setPublishers(List<String> publishers);
/**
* Gets the DublinCore module publisher. Convenience method that can be used
* to obtain the first item, <b>null</b> if none.
* Gets the DublinCore module publisher. Convenience method that can be used to obtain the first
* item, <b>null</b> if none.
* <p>
*
* @return the first DublinCore module publisher, <b>null</b> 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.
* <p>
*
* @param publisher the DublinCore module publisher to set, <b>null</b> if
* none.
* @param publisher the DublinCore module publisher to set, <b>null</b> if none.
*
*/
void setPublisher(String publisher);
@ -237,8 +232,8 @@ public interface DCModule extends Module {
* Returns the DublinCore module contributor.
* <p>
*
* @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<String> getContributors();
@ -247,15 +242,15 @@ public interface DCModule extends Module {
* Sets the DublinCore module contributors.
* <p>
*
* @param contributors the list of String representing the DublinCore module
* contributors to set, an empty list or <b>null</b> if none.
* @param contributors the list of String representing the DublinCore module contributors to
* set, an empty list or <b>null</b> if none.
*
*/
void setContributors(List<String> contributors);
/**
* Gets the DublinCore module contributor. Convenience method that can be
* used to obtain the first item, <b>null</b> if none.
* Gets the DublinCore module contributor. Convenience method that can be used to obtain the
* first item, <b>null</b> if none.
* <p>
*
* @return the first DublinCore module contributor, <b>null</b> 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.
* <p>
*
* @param contributor the DublinCore module contributor to set, <b>null</b>
* if none.
* @param contributor the DublinCore module contributor to set, <b>null</b> if none.
*
*/
void setContributor(String contributor);
@ -277,8 +271,7 @@ public interface DCModule extends Module {
* Returns the DublinCore module date.
* <p>
*
* @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<Date> getDates();
@ -287,15 +280,15 @@ public interface DCModule extends Module {
* Sets the DublinCore module dates.
* <p>
*
* @param dates the list of Date representing the DublinCore module dates to
* set, an empty list or <b>null</b> if none.
* @param dates the list of Date representing the DublinCore module dates to set, an empty list
* or <b>null</b> if none.
*
*/
void setDates(List<Date> dates);
/**
* Gets the DublinCore module date. Convenience method that can be used to
* obtain the first item, <b>null</b> if none.
* Gets the DublinCore module date. Convenience method that can be used to obtain the first
* item, <b>null</b> if none.
* <p>
*
* @return the first DublinCore module date, <b>null</b> 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.
* <p>
*
* @param date the DublinCore module date to set, <b>null</b> if none.
@ -316,8 +309,7 @@ public interface DCModule extends Module {
* Returns the DublinCore module type.
* <p>
*
* @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<String> getTypes();
@ -326,15 +318,15 @@ public interface DCModule extends Module {
* Sets the DublinCore module types.
* <p>
*
* @param types the list of String representing the DublinCore module types
* to set, an empty list or <b>null</b> if none.
* @param types the list of String representing the DublinCore module types to set, an empty
* list or <b>null</b> if none.
*
*/
void setTypes(List<String> types);
/**
* Gets the DublinCore module type. Convenience method that can be used to
* obtain the first item, <b>null</b> if none.
* Gets the DublinCore module type. Convenience method that can be used to obtain the first
* item, <b>null</b> if none.
* <p>
*
* @return the first DublinCore module type, <b>null</b> 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.
* <p>
*
* @param type the DublinCore module type to set, <b>null</b> if none.
@ -355,8 +347,7 @@ public interface DCModule extends Module {
* Returns the DublinCore module format.
* <p>
*
* @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<String> getFormats();
@ -365,15 +356,15 @@ public interface DCModule extends Module {
* Sets the DublinCore module formats.
* <p>
*
* @param formats the list of String representing the DublinCore module
* formats to set, an empty list or <b>null</b> if none.
* @param formats the list of String representing the DublinCore module formats to set, an empty
* list or <b>null</b> if none.
*
*/
void setFormats(List<String> formats);
/**
* Gets the DublinCore module format. Convenience method that can be used to
* obtain the first item, <b>null</b> if none.
* Gets the DublinCore module format. Convenience method that can be used to obtain the first
* item, <b>null</b> if none.
* <p>
*
* @return the first DublinCore module format, <b>null</b> 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.
* <p>
*
* @param format the DublinCore module format to set, <b>null</b> if none.
@ -394,8 +385,8 @@ public interface DCModule extends Module {
* Returns the DublinCore module identifier.
* <p>
*
* @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<String> getIdentifiers();
@ -404,15 +395,15 @@ public interface DCModule extends Module {
* Sets the DublinCore module identifiers.
* <p>
*
* @param identifiers the list of String representing the DublinCore module
* identifiers to set, an empty list or <b>null</b> if none.
* @param identifiers the list of String representing the DublinCore module identifiers to set,
* an empty list or <b>null</b> if none.
*
*/
void setIdentifiers(List<String> identifiers);
/**
* Gets the DublinCore module identifier. Convenience method that can be
* used to obtain the first item, <b>null</b> if none.
* Gets the DublinCore module identifier. Convenience method that can be used to obtain the
* first item, <b>null</b> if none.
* <p>
*
* @return the first DublinCore module identifier, <b>null</b> 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.
* <p>
*
* @param identifier the DublinCore module identifier to set, <b>null</b> if
* none.
* @param identifier the DublinCore module identifier to set, <b>null</b> if none.
*
*/
void setIdentifier(String identifier);
@ -434,8 +424,7 @@ public interface DCModule extends Module {
* Returns the DublinCore module source.
* <p>
*
* @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<String> getSources();
@ -444,15 +433,15 @@ public interface DCModule extends Module {
* Sets the DublinCore module sources.
* <p>
*
* @param sources the list of String representing the DublinCore module
* sources to set, an empty list or <b>null</b> if none.
* @param sources the list of String representing the DublinCore module sources to set, an empty
* list or <b>null</b> if none.
*
*/
void setSources(List<String> sources);
/**
* Gets the DublinCore module subject. Convenience method that can be used
* to obtain the first item, <b>null</b> if none.
* Gets the DublinCore module subject. Convenience method that can be used to obtain the first
* item, <b>null</b> if none.
* <p>
*
* @return the first DublinCore module creator, <b>null</b> 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.
* <p>
*
* @param source the DublinCore module source to set, <b>null</b> if none.
@ -473,8 +462,7 @@ public interface DCModule extends Module {
* Returns the DublinCore module language.
* <p>
*
* @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<String> getLanguages();
@ -483,15 +471,15 @@ public interface DCModule extends Module {
* Sets the DublinCore module languages.
* <p>
*
* @param languages the list of String representing the DublinCore module
* languages to set, an empty list or <b>null</b> if none.
* @param languages the list of String representing the DublinCore module languages to set, an
* empty list or <b>null</b> if none.
*
*/
void setLanguages(List<String> languages);
/**
* Gets the DublinCore module language. Convenience method that can be used
* to obtain the first item, <b>null</b> if none.
* Gets the DublinCore module language. Convenience method that can be used to obtain the first
* item, <b>null</b> if none.
* <p>
*
* @return the first DublinCore module language, <b>null</b> 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.
* <p>
*
* @param language the DublinCore module language to set, <b>null</b> if
* none.
* @param language the DublinCore module language to set, <b>null</b> if none.
*
*/
void setLanguage(String language);
@ -513,8 +500,7 @@ public interface DCModule extends Module {
* Returns the DublinCore module relation.
* <p>
*
* @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<String> getRelations();
@ -523,15 +509,15 @@ public interface DCModule extends Module {
* Sets the DublinCore module relations.
* <p>
*
* @param relations the list of String representing the DublinCore module
* relations to set, an empty list or <b>null</b> if none.
* @param relations the list of String representing the DublinCore module relations to set, an
* empty list or <b>null</b> if none.
*
*/
void setRelations(List<String> relations);
/**
* Gets the DublinCore module relation. Convenience method that can be used
* to obtain the first item, <b>null</b> if none.
* Gets the DublinCore module relation. Convenience method that can be used to obtain the first
* item, <b>null</b> if none.
* <p>
*
* @return the first DublinCore module relation, <b>null</b> 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.
* <p>
*
* @param relation the DublinCore module relation to set, <b>null</b> if
* none.
* @param relation the DublinCore module relation to set, <b>null</b> if none.
*
*/
void setRelation(String relation);
@ -553,8 +538,7 @@ public interface DCModule extends Module {
* Returns the DublinCore module coverage.
* <p>
*
* @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<String> getCoverages();
@ -563,15 +547,15 @@ public interface DCModule extends Module {
* Sets the DublinCore module coverages.
* <p>
*
* @param coverages the list of String representing the DublinCore module
* coverages to set, an empty list or <b>null</b> if none.
* @param coverages the list of String representing the DublinCore module coverages to set, an
* empty list or <b>null</b> if none.
*
*/
void setCoverages(List<String> coverages);
/**
* Gets the DublinCore module coverage. Convenience method that can be used
* to obtain the first item, <b>null</b> if none.
* Gets the DublinCore module coverage. Convenience method that can be used to obtain the first
* item, <b>null</b> if none.
* <p>
*
* @return the first DublinCore module coverage, <b>null</b> 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.
* <p>
*
* @param coverage the DublinCore module coverage to set, <b>null</b> if
* none.
* @param coverage the DublinCore module coverage to set, <b>null</b> if none.
*
*/
void setCoverage(String coverage);
@ -593,8 +576,7 @@ public interface DCModule extends Module {
* Returns the DublinCore module rights.
* <p>
*
* @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<String> getRightsList();
@ -603,15 +585,15 @@ public interface DCModule extends Module {
* Sets the DublinCore module rightss.
* <p>
*
* @param rights the list of String representing the DublinCore module
* rights to set, an empty list or <b>null</b> if none.
* @param rights the list of String representing the DublinCore module rights to set, an empty
* list or <b>null</b> if none.
*
*/
void setRightsList(List<String> rights);
/**
* Gets the DublinCore module right. Convenience method that can be used to
* obtain the first item, <b>null</b> if none.
* Gets the DublinCore module right. Convenience method that can be used to obtain the first
* item, <b>null</b> if none.
* <p>
*
* @return the first DublinCore module right, <b>null</b> 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.
* <p>
*
* @param rights the DublinCore module rights to set, <b>null</b> if none.

View file

@ -33,8 +33,7 @@ import com.sun.syndication.feed.impl.ObjectBean;
* Dublin Core ModuleImpl, default implementation.
* <p>
*
* @see <a href="http://web.resource.org/rss/1.0/modules/dc/">Dublin Core
* module</a>.
* @see <a href="http://web.resource.org/rss/1.0/modules/dc/">Dublin Core module</a>.
* @author Alejandro Abdelnur
*
*/
@ -65,9 +64,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
/**
* Unmodifiable Set containing the convenience properties of this class.
* <p>
* 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<String> CONVENIENCE_PROPERTIES = Collections.unmodifiableSet(IGNORE_PROPERTIES);
@ -103,8 +101,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* Returns the DublinCore module titles.
* <p>
*
* @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.
* <p>
*
* @param titles the list of String representing the DublinCore module
* titles to set, an empty list or <b>null</b> if none.
* @param titles the list of String representing the DublinCore module titles to set, an empty
* list or <b>null</b> 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, <b>null</b> if none.
* Gets the DublinCore module title. Convenience method that can be used to obtain the first
* item, <b>null</b> if none.
* <p>
*
* @return the first DublinCore module title, <b>null</b> 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.
* <p>
*
* @param title the DublinCore module title to set, <b>null</b> if none.
@ -162,8 +159,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* Returns the DublinCore module creator.
* <p>
*
* @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.
* <p>
*
* @param creators the list of String representing the DublinCore module
* creators to set, an empty list or <b>null</b> if none.
* @param creators the list of String representing the DublinCore module creators to set, an
* empty list or <b>null</b> 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, <b>null</b> if none.
* Gets the DublinCore module title. Convenience method that can be used to obtain the first
* item, <b>null</b> if none.
* <p>
*
* @return the first DublinCore module title, <b>null</b> 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.
* <p>
*
* @param creator the DublinCore module creator to set, <b>null</b> if none.
@ -221,8 +217,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* Returns the DublinCore module subjects.
* <p>
*
* @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.
* <p>
*
* @param subjects the list of DCSubject elements with the DublinCore module
* subjects to set, an empty list or <b>null</b> if none.
* @param subjects the list of DCSubject elements with the DublinCore module subjects to set, an
* empty list or <b>null</b> 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, <b>null</b> if none.
* Gets the DublinCore module subject. Convenience method that can be used to obtain the first
* item, <b>null</b> if none.
* <p>
*
* @return the first DublinCore module subject, <b>null</b> 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.
* <p>
*
* @param subject the DublinCore module subject to set, <b>null</b> if none.
@ -280,8 +276,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* Returns the DublinCore module description.
* <p>
*
* @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.
* <p>
*
* @param descriptions the list of String representing the DublinCore module
* descriptions to set, an empty list or <b>null</b> if none.
* @param descriptions the list of String representing the DublinCore module descriptions to
* set, an empty list or <b>null</b> 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, <b>null</b> if none.
* Gets the DublinCore module description. Convenience method that can be used to obtain the
* first item, <b>null</b> if none.
* <p>
*
* @return the first DublinCore module description, <b>null</b> 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.
* <p>
*
* @param description the DublinCore module description to set, <b>null</b>
* if none.
* @param description the DublinCore module description to set, <b>null</b> if none.
*
*/
@Override
@ -340,8 +335,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* Returns the DublinCore module publisher.
* <p>
*
* @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.
* <p>
*
* @param publishers the list of String representing the DublinCore module
* publishers to set, an empty list or <b>null</b> if none.
* @param publishers the list of String representing the DublinCore module publishers to set, an
* empty list or <b>null</b> 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, <b>null</b> if none.
* Gets the DublinCore module title. Convenience method that can be used to obtain the first
* item, <b>null</b> if none.
* <p>
*
* @return the first DublinCore module title, <b>null</b> 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.
* <p>
*
* @param publisher the DublinCore module publisher to set, <b>null</b> if
* none.
* @param publisher the DublinCore module publisher to set, <b>null</b> if none.
*
*/
@Override
@ -400,8 +394,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* Returns the DublinCore module contributor.
* <p>
*
* @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.
* <p>
*
* @param contributors the list of String representing the DublinCore module
* contributors to set, an empty list or <b>null</b> if none.
* @param contributors the list of String representing the DublinCore module contributors to
* set, an empty list or <b>null</b> 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, <b>null</b> if none.
* Gets the DublinCore module contributor. Convenience method that can be used to obtain the
* first item, <b>null</b> if none.
* <p>
*
* @return the first DublinCore module contributor, <b>null</b> 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.
* <p>
*
* @param contributor the DublinCore module contributor to set, <b>null</b>
* if none.
* @param contributor the DublinCore module contributor to set, <b>null</b> if none.
*
*/
@Override
@ -460,8 +453,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* Returns the DublinCore module date.
* <p>
*
* @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.
* <p>
*
* @param dates the list of Date representing the DublinCore module dates to
* set, an empty list or <b>null</b> if none.
* @param dates the list of Date representing the DublinCore module dates to set, an empty list
* or <b>null</b> 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, <b>null</b> if none.
* Gets the DublinCore module date. Convenience method that can be used to obtain the first
* item, <b>null</b> if none.
* <p>
*
* @return the first DublinCore module date, <b>null</b> 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.
* <p>
*
* @param date the DublinCore module date to set, <b>null</b> if none.
@ -519,8 +511,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* Returns the DublinCore module type.
* <p>
*
* @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.
* <p>
*
* @param types the list of String representing the DublinCore module types
* to set, an empty list or <b>null</b> if none.
* @param types the list of String representing the DublinCore module types to set, an empty
* list or <b>null</b> 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, <b>null</b> if none.
* Gets the DublinCore module type. Convenience method that can be used to obtain the first
* item, <b>null</b> if none.
* <p>
*
* @return the first DublinCore module type, <b>null</b> 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.
* <p>
*
* @param type the DublinCore module type to set, <b>null</b> if none.
@ -578,8 +569,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* Returns the DublinCore module format.
* <p>
*
* @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.
* <p>
*
* @param formats the list of String representing the DublinCore module
* formats to set, an empty list or <b>null</b> if none.
* @param formats the list of String representing the DublinCore module formats to set, an empty
* list or <b>null</b> 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, <b>null</b> if none.
* Gets the DublinCore module format. Convenience method that can be used to obtain the first
* item, <b>null</b> if none.
* <p>
*
* @return the first DublinCore module format, <b>null</b> 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.
* <p>
*
* @param format the DublinCore module format to set, <b>null</b> if none.
@ -637,8 +627,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* Returns the DublinCore module identifier.
* <p>
*
* @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.
* <p>
*
* @param identifiers the list of String representing the DublinCore module
* identifiers to set, an empty list or <b>null</b> if none.
* @param identifiers the list of String representing the DublinCore module identifiers to set,
* an empty list or <b>null</b> 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, <b>null</b> if none.
* Gets the DublinCore module identifier. Convenience method that can be used to obtain the
* first item, <b>null</b> if none.
* <p>
*
* @return the first DublinCore module identifier, <b>null</b> 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.
* <p>
*
* @param identifier the DublinCore module identifier to set, <b>null</b> if
* none.
* @param identifier the DublinCore module identifier to set, <b>null</b> if none.
*
*/
@Override
@ -697,8 +686,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* Returns the DublinCore module source.
* <p>
*
* @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.
* <p>
*
* @param sources the list of String representing the DublinCore module
* sources to set, an empty list or <b>null</b> if none.
* @param sources the list of String representing the DublinCore module sources to set, an empty
* list or <b>null</b> 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, <b>null</b> if none.
* Gets the DublinCore module source. Convenience method that can be used to obtain the first
* item, <b>null</b> if none.
* <p>
*
* @return the first DublinCore module source, <b>null</b> 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.
* <p>
*
* @param source the DublinCore module source to set, <b>null</b> if none.
@ -756,8 +744,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* Returns the DublinCore module language.
* <p>
*
* @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.
* <p>
*
* @param languages the list of String representing the DublinCore module
* languages to set, an empty list or <b>null</b> if none.
* @param languages the list of String representing the DublinCore module languages to set, an
* empty list or <b>null</b> 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, <b>null</b> if none.
* Gets the DublinCore module language. Convenience method that can be used to obtain the first
* item, <b>null</b> if none.
* <p>
*
* @return the first DublinCore module langauge, <b>null</b> 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.
* <p>
*
* @param language the DublinCore module language to set, <b>null</b> if
* none.
* @param language the DublinCore module language to set, <b>null</b> if none.
*
*/
@Override
@ -816,8 +802,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* Returns the DublinCore module relation.
* <p>
*
* @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.
* <p>
*
* @param relations the list of String representing the DublinCore module
* relations to set, an empty list or <b>null</b> if none.
* @param relations the list of String representing the DublinCore module relations to set, an
* empty list or <b>null</b> 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, <b>null</b> if none.
* Gets the DublinCore module relation. Convenience method that can be used to obtain the first
* item, <b>null</b> if none.
* <p>
*
* @return the first DublinCore module relation, <b>null</b> 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.
* <p>
*
* @param relation the DublinCore module relation to set, <b>null</b> if
* none.
* @param relation the DublinCore module relation to set, <b>null</b> if none.
*
*/
@Override
@ -876,8 +860,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* Returns the DublinCore module coverage.
* <p>
*
* @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.
* <p>
*
* @param coverages the list of String representing the DublinCore module
* coverages to set, an empty list or <b>null</b> if none.
* @param coverages the list of String representing the DublinCore module coverages to set, an
* empty list or <b>null</b> 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, <b>null</b> if none.
* Gets the DublinCore module coverage. Convenience method that can be used to obtain the first
* item, <b>null</b> if none.
* <p>
*
* @return the first DublinCore module coverage, <b>null</b> 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.
* <p>
*
* @param coverage the DublinCore module coverage to set, <b>null</b> if
* none.
* @param coverage the DublinCore module coverage to set, <b>null</b> if none.
*
*/
@Override
@ -936,8 +918,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* Returns the DublinCore module rights.
* <p>
*
* @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.
* <p>
*
* @param rights the list of String representing the DublinCore module
* rights to set, an empty list or <b>null</b> if none.
* @param rights the list of String representing the DublinCore module rights to set, an empty
* list or <b>null</b> 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, <b>null</b> if none.
* Gets the DublinCore module rights. Convenience method that can be used to obtain the first
* item, <b>null</b> if none.
* <p>
*
* @return the first DublinCore module rights, <b>null</b> 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.
* <p>
*
* @param rights the DublinCore module rights to set, <b>null</b> if none.
@ -996,8 +977,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* <p>
*
* @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.
* <p>
*
* @param other he reference object with which to compare.

View file

@ -22,8 +22,7 @@ import com.sun.syndication.feed.CopyFrom;
* Subject of the Dublin Core ModuleImpl.
* <p>
*
* @see <a href="http://web.resource.org/rss/1.0/modules/dc/">Dublin Core
* module</a>.
* @see <a href="http://web.resource.org/rss/1.0/modules/dc/">Dublin Core module</a>.
* @author Alejandro Abdelnur
*
*/
@ -41,8 +40,7 @@ public interface DCSubject extends Cloneable, CopyFrom<DCSubject> {
* Sets the DublinCore subject taxonomy URI.
* <p>
*
* @param taxonomyUri the DublinCore subject taxonomy URI to set,
* <b>null</b> if none.
* @param taxonomyUri the DublinCore subject taxonomy URI to set, <b>null</b> if none.
*
*/
void setTaxonomyUri(String taxonomyUri);
@ -70,8 +68,7 @@ public interface DCSubject extends Cloneable, CopyFrom<DCSubject> {
* <p>
*
* @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;

View file

@ -29,8 +29,7 @@ import com.sun.syndication.feed.impl.ObjectBean;
* Subject of the Dublin Core ModuleImpl, default implementation.
* <p>
*
* @see <a href="http://web.resource.org/rss/1.0/modules/dc/">Dublin Core
* module</a>.
* @see <a href="http://web.resource.org/rss/1.0/modules/dc/">Dublin Core module</a>.
* @author Alejandro Abdelnur
*
*/
@ -54,8 +53,7 @@ public class DCSubjectImpl implements Cloneable, Serializable, DCSubject {
* <p>
*
* @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.
* <p>
*
* @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.
* <p>
*
* @param taxonomyUri the DublinCore subject taxonomy URI to set,
* <b>null</b> if none.
* @param taxonomyUri the DublinCore subject taxonomy URI to set, <b>null</b> if none.
*
*/
@Override

View file

@ -39,8 +39,7 @@ public interface Extendable {
* Returns the entry modules.
* <p>
*
* @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<Module> getModules();
@ -49,8 +48,8 @@ public interface Extendable {
* Sets the entry modules.
* <p>
*
* @param modules the list of ModuleImpl elements with the entry modules to
* set, an empty list or <b>null</b> if none.
* @param modules the list of ModuleImpl elements with the entry modules to set, an empty list
* or <b>null</b> if none.
*
*/
void setModules(List<Module> modules);

View file

@ -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.
* <p>
*
* @author Alejandro Abdelnur
@ -44,8 +44,7 @@ public interface Module extends Cloneable, CopyFrom<Module>, Serializable {
* <p>
*
* @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;

View file

@ -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.
* <p>
*
* @author Alejandro Abdelnur
@ -50,8 +50,7 @@ public abstract class ModuleImpl implements Cloneable, Serializable, Module {
* <p>
*
* @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.
* <p>
*
* @param other he reference object with which to compare.

View file

@ -22,17 +22,14 @@ import java.util.Date;
* Syndication ModuleImpl.
* <p>
*
* @see <a
* href="http://web.resource.org/rss/1.0/modules/syndication/">Syndication
* module</a>.
* @see <a href="http://web.resource.org/rss/1.0/modules/syndication/">Syndication module</a>.
* @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.
* <p>
*
* @param updatePeriod the Syndication module update period to set,
* <b>null</b> if none.
* @param updatePeriod the Syndication module update period to set, <b>null</b> if none.
*
*/
void setUpdatePeriod(String updatePeriod);
@ -75,8 +71,7 @@ public interface SyModule extends Module {
* Sets the Syndication module update frequency.
* <p>
*
* @param updateFrequency the Syndication module update frequency to set,
* <b>null</b> if none.
* @param updateFrequency the Syndication module update frequency to set, <b>null</b> if none.
*
*/
void setUpdateFrequency(int updateFrequency);
@ -94,8 +89,7 @@ public interface SyModule extends Module {
* Sets the Syndication module update base date.
* <p>
*
* @param updateBase the Syndication module update base date to set,
* <b>null</b> if none.
* @param updateBase the Syndication module update base date to set, <b>null</b> if none.
*
*/
void setUpdateBase(Date updateBase);

View file

@ -30,9 +30,7 @@ import com.sun.syndication.feed.impl.CopyFromHelper;
* Syndication ModuleImpl, default implementation.
* <p>
*
* @see <a
* href="http://web.resource.org/rss/1.0/modules/syndication/">Syndication
* module</a>.
* @see <a href="http://web.resource.org/rss/1.0/modules/syndication/">Syndication module</a>.
* @author Alejandro Abdelnur
*
*/
@ -77,8 +75,7 @@ public class SyModuleImpl extends ModuleImpl implements SyModule {
* Sets the Syndication module update period.
* <p>
*
* @param updatePeriod the Syndication module update period to set,
* <b>null</b> if none.
* @param updatePeriod the Syndication module update period to set, <b>null</b> if none.
*
*/
@Override
@ -105,8 +102,7 @@ public class SyModuleImpl extends ModuleImpl implements SyModule {
* Sets the Syndication module update frequency.
* <p>
*
* @param updateFrequency the Syndication module update frequency to set,
* <b>null</b> if none.
* @param updateFrequency the Syndication module update frequency to set, <b>null</b> if none.
*
*/
@Override
@ -130,8 +126,7 @@ public class SyModuleImpl extends ModuleImpl implements SyModule {
* Sets the Syndication module update base date.
* <p>
*
* @param updateBase the Syndication module update base date to set,
* <b>null</b> if none.
* @param updateBase the Syndication module update base date to set, <b>null</b> if none.
*
*/
@Override

View file

@ -48,8 +48,7 @@ public class Category implements Cloneable, Serializable {
* <p>
*
* @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.
* <p>
*
* @param other he reference object with which to compare.

View file

@ -31,8 +31,8 @@ import com.sun.syndication.feed.module.impl.ModuleUtils;
/**
* Bean for RSS feeds.
* <p>
* 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.
* <p>
*
* @author Alejandro Abdelnur
@ -93,8 +93,7 @@ public class Channel extends WireFeed {
}
/**
* Channel Constructor. All properties, except the type, are set to
* <b>null</b>.
* Channel Constructor. All properties, except the type, are set to <b>null</b>.
* <p>
*
* @param type the type of the RSS feed.
@ -216,8 +215,7 @@ public class Channel extends WireFeed {
* Returns the channel items.
* <p>
*
* @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<Item> getItems() {
@ -231,8 +229,8 @@ public class Channel extends WireFeed {
* Sets the channel items.
* <p>
*
* @param items the list of Item elements with the channel items to set, an
* empty list or <b>null</b> if none.
* @param items the list of Item elements with the channel items to set, an empty list or
* <b>null</b> if none.
*
*/
public void setItems(final List<Item> items) {
@ -376,8 +374,7 @@ public class Channel extends WireFeed {
* Sets the channel last build date.
* <p>
*
* @param lastBuildDate the channel last build date to set, <b>null</b> if
* none.
* @param lastBuildDate the channel last build date to set, <b>null</b> if none.
*
*/
public void setLastBuildDate(final Date lastBuildDate) {
@ -425,8 +422,7 @@ public class Channel extends WireFeed {
* Sets the channel managing editor.
* <p>
*
* @param managingEditor the channel managing editor to set, <b>null</b> if
* none.
* @param managingEditor the channel managing editor to set, <b>null</b> if none.
*
*/
public void setManagingEditor(final String managingEditor) {
@ -459,8 +455,7 @@ public class Channel extends WireFeed {
* Returns the channel skip hours.
* <p>
*
* @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<Integer> getSkipHours() {
@ -475,8 +470,8 @@ public class Channel extends WireFeed {
* Sets the channel skip hours.
* <p>
*
* @param skipHours the list of Integer elements with the channel skip hours
* to set, an empty list or <b>null</b> if none.
* @param skipHours the list of Integer elements with the channel skip hours to set, an empty
* list or <b>null</b> if none.
*
*/
public void setSkipHours(final List<Integer> skipHours) {
@ -500,8 +495,7 @@ public class Channel extends WireFeed {
* Returns the channel skip days.
* <p>
*
* @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<String> getSkipDays() {
@ -516,8 +510,8 @@ public class Channel extends WireFeed {
* Sets the channel skip days.
* <p>
*
* @param skipDays the list of Day elements with the channel skip days to
* set, an empty list or <b>null</b> if none.
* @param skipDays the list of Day elements with the channel skip days to set, an empty list or
* <b>null</b> if none.
*
*/
public void setSkipDays(final List<String> skipDays) {
@ -564,8 +558,7 @@ public class Channel extends WireFeed {
* Returns the channel categories.
* <p>
*
* @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<Category> getCategories() {
@ -579,8 +572,8 @@ public class Channel extends WireFeed {
* Sets the channel categories.
* <p>
*
* @param categories the list of Category elements with the channel
* categories to set, an empty list or <b>null</b> if none.
* @param categories the list of Category elements with the channel categories to set, an empty
* list or <b>null</b> if none.
*
*/
public void setCategories(final List<Category> categories) {
@ -635,8 +628,7 @@ public class Channel extends WireFeed {
* Returns the channel modules.
* <p>
*
* @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.
* <p>
*
* @param modules the list of ModuleImpl elements with the channel modules
* to set, an empty list or <b>null</b> if none.
* @param modules the list of ModuleImpl elements with the channel modules to set, an empty list
* or <b>null</b> if none.
*
*/
@Override

View file

@ -51,8 +51,7 @@ public class Cloud implements Cloneable, Serializable {
* <p>
*
* @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.
* <p>
*
* @param other he reference object with which to compare.
@ -181,8 +180,7 @@ public class Cloud implements Cloneable, Serializable {
* Sets the cloud register procedure.
* <p>
*
* @param registerProcedure the cloud register procedure to set, <b>null</b>
* if none.
* @param registerProcedure the cloud register procedure to set, <b>null</b> if none.
*
*/
public void setRegisterProcedure(final String registerProcedure) {

View file

@ -94,8 +94,7 @@ public class Content implements Cloneable, Serializable {
* <p>
*
* @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.
* <p>
*
* @param other he reference object with which to compare.

View file

@ -48,8 +48,7 @@ public class Description implements Cloneable, Serializable {
* <p>
*
* @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.
* <p>
*
* @param other he reference object with which to compare.

View file

@ -49,8 +49,7 @@ public class Enclosure implements Cloneable, Serializable {
* <p>
*
* @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.
* <p>
*
* @param other he reference object with which to compare.

View file

@ -48,8 +48,7 @@ public class Guid implements Cloneable, Serializable {
* <p>
*
* @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.
* <p>
*
* @param other he reference object with which to compare.

View file

@ -51,8 +51,7 @@ public class Image implements Cloneable, Serializable {
* <p>
*
* @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.
* <p>
*
* @param other he reference object with which to compare.

View file

@ -34,8 +34,8 @@ import com.sun.syndication.feed.module.impl.ModuleUtils;
* <p>
* It handles all RSS versions without loosing information.
* <p>
* 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.
* <p>
*
* @author Alejandro Abdelnur
@ -74,8 +74,7 @@ public class Item implements Cloneable, Serializable, Extendable {
* <p>
*
* @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.
* <p>
*
* @param other he reference object with which to compare.
@ -266,8 +265,7 @@ public class Item implements Cloneable, Serializable, Extendable {
* Returns the item enclosures.
* <p>
*
* @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<Enclosure> getEnclosures() {
@ -281,8 +279,8 @@ public class Item implements Cloneable, Serializable, Extendable {
* Sets the item enclosures.
* <p>
*
* @param enclosures the list of Enclosure elements with the item enclosures
* to set, an empty list or <b>null</b> if none.
* @param enclosures the list of Enclosure elements with the item enclosures to set, an empty
* list or <b>null</b> if none.
*
*/
public void setEnclosures(final List<Enclosure> enclosures) {
@ -293,8 +291,7 @@ public class Item implements Cloneable, Serializable, Extendable {
* Returns the item categories.
* <p>
*
* @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<Category> getCategories() {
@ -308,8 +305,8 @@ public class Item implements Cloneable, Serializable, Extendable {
* Sets the item categories.
* <p>
*
* @param categories the list of Categories elements with the item
* categories to set, an empty list or <b>null</b> if none.
* @param categories the list of Categories elements with the item categories to set, an empty
* list or <b>null</b> if none.
*
*/
public void setCategories(final List<Category> categories) {
@ -386,8 +383,7 @@ public class Item implements Cloneable, Serializable, Extendable {
* Returns the item modules.
* <p>
*
* @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.
* <p>
*
* @param modules the list of ModuleImpl elements with the item modules to
* set, an empty list or <b>null</b> if none.
* @param modules the list of ModuleImpl elements with the item modules to set, an empty list or
* <b>null</b> if none.
*
*/
@Override
@ -472,8 +468,7 @@ public class Item implements Cloneable, Serializable, Extendable {
* Sets the item expiration date.
* <p>
*
* @param expirationDate the item expiration date to set, <b>null</b> if
* none.
* @param expirationDate the item expiration date to set, <b>null</b> if none.
*
*/
public void setExpirationDate(final Date expirationDate) {

View file

@ -48,8 +48,7 @@ public class Source implements Cloneable, Serializable {
* <p>
*
* @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.
* <p>
*
* @param other he reference object with which to compare.

View file

@ -50,8 +50,7 @@ public class TextInput implements Cloneable, Serializable {
* <p>
*
* @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.
* <p>
*
* @param other he reference object with which to compare.
@ -139,8 +138,7 @@ public class TextInput implements Cloneable, Serializable {
* Sets the text input description.
* <p>
*
* @param description the text input description to set, <b>null</b> if
* none.
* @param description the text input description to set, <b>null</b> if none.
*
*/
public void setDescription(final String description) {

View file

@ -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.
* <p>
* 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.
* <p>
* Implementations must be thread safe.
* <p>
@ -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.
* <p>
* It assumes the given SyndFeedImpl has no properties set.
* <p>
*
* @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.
* <p>
*
* @param syndFeed SyndFeedImpl to copy/convert value from.

View file

@ -68,8 +68,7 @@ public interface SyndCategory extends Cloneable, CopyFrom<SyndCategory> {
* <p>
*
* @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;

View file

@ -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.
* <p>
*
* @param subject the DC subject to wrap.
@ -60,8 +60,7 @@ public class SyndCategoryImpl implements Serializable, SyndCategory {
* <p>
*
* @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.
* <p>
*
* @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.
* <p>
* 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.
* <p>
* 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.
* <P>
* 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).
* <p>
*
* @author Alejandro Abdelnur
@ -272,8 +270,7 @@ class SyndCategoryListFacade extends AbstractList<SyndCategory> {
*
* @param index position to set the category.
* @param obj the SyndCategoryImpl object to set.
* @return the SyndCategoryImpl object that is being replaced, <b>null</b>
* if none.
* @return the SyndCategoryImpl object that is being replaced, <b>null</b> if none.
*
*/
@Override
@ -318,8 +315,7 @@ class SyndCategoryListFacade extends AbstractList<SyndCategory> {
* <p>
*
* @param index position to remove the category from.
* @return the SyndCategoryImpl being removed from position index,
* <b>null</b> if none.
* @return the SyndCategoryImpl being removed from position index, <b>null</b> if none.
*
*/
@Override
@ -333,14 +329,12 @@ class SyndCategoryListFacade extends AbstractList<SyndCategory> {
}
/**
* 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.
* <p>
*
* @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<DCSubject> convertElementsSyndCategoryToSubject(final List<SyndCategory> cList) {

View file

@ -29,8 +29,7 @@ public interface SyndContent extends Cloneable, CopyFrom<SyndContent> {
/**
* Returns the content type.
* <p>
* When used for the description of an entry, if <b>null</b> 'text/plain'
* must be assumed.
* When used for the description of an entry, if <b>null</b> 'text/plain' must be assumed.
* <p>
*
* @return the content type, <b>null</b> if none.
@ -41,8 +40,7 @@ public interface SyndContent extends Cloneable, CopyFrom<SyndContent> {
/**
* Sets the content type.
* <p>
* When used for the description of an entry, if <b>null</b> 'text/plain'
* must be assumed.
* When used for the description of an entry, if <b>null</b> 'text/plain' must be assumed.
* <p>
*
* @param type the content type to set, <b>null</b> if none.
@ -89,8 +87,7 @@ public interface SyndContent extends Cloneable, CopyFrom<SyndContent> {
* <p>
*
* @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;

View file

@ -53,8 +53,7 @@ public class SyndContentImpl implements Serializable, SyndContent {
* <p>
*
* @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.
* <p>
*
* @param other he reference object with which to compare.
@ -105,8 +104,7 @@ public class SyndContentImpl implements Serializable, SyndContent {
/**
* Returns the content type.
* <p>
* When used for the description of an entry, if <b>null</b> 'text/plain'
* must be assumed.
* When used for the description of an entry, if <b>null</b> 'text/plain' must be assumed.
* <p>
*
* @return the content type, <b>null</b> if none.
@ -120,8 +118,7 @@ public class SyndContentImpl implements Serializable, SyndContent {
/**
* Sets the content type.
* <p>
* When used for the description of an entry, if <b>null</b> 'text/plain'
* must be assumed.
* When used for the description of an entry, if <b>null</b> 'text/plain' must be assumed.
* <p>
*
* @param type the content type to set, <b>null</b> if none.

View file

@ -33,8 +33,7 @@ public class SyndEnclosureImpl implements Serializable, SyndEnclosure {
* <p>
*
* @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.
* <p>
*
* @param other he reference object with which to compare.

View file

@ -37,11 +37,10 @@ public interface SyndEntry extends Cloneable, CopyFrom<SyndEntry>, Extendable {
/**
* Returns the entry URI.
* <p>
* 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, <a
* href="http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping">Feed and
* entry URI mapping</a>.
* 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, <a
* href="http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping">Feed and entry URI
* mapping</a>.
* <p>
* The returned URI is a normalized URI as specified in RFC 2396bis.
* <p>
@ -54,11 +53,10 @@ public interface SyndEntry extends Cloneable, CopyFrom<SyndEntry>, Extendable {
/**
* Sets the entry URI.
* <p>
* 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, <a
* href="http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping">Feed and
* entry URI mapping</a>.
* 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, <a
* href="http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping">Feed and entry URI
* mapping</a>.
* <p>
*
* @param uri the entry URI to set, <b>null</b> if none.
@ -160,8 +158,7 @@ public interface SyndEntry extends Cloneable, CopyFrom<SyndEntry>, Extendable {
* Returns the entry contents.
* <p>
*
* @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<SyndContent> getContents();
@ -170,8 +167,8 @@ public interface SyndEntry extends Cloneable, CopyFrom<SyndEntry>, Extendable {
* Sets the entry contents.
* <p>
*
* @param contents the list of SyndContentImpl elements with the entry
* contents to set, an empty list or <b>null</b> if none.
* @param contents the list of SyndContentImpl elements with the entry contents to set, an empty
* list or <b>null</b> if none.
*
*/
void setContents(List<SyndContent> contents);
@ -180,8 +177,7 @@ public interface SyndEntry extends Cloneable, CopyFrom<SyndEntry>, Extendable {
* Returns the entry enclosures.
* <p>
*
* @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<SyndEnclosure> getEnclosures();
@ -190,8 +186,8 @@ public interface SyndEntry extends Cloneable, CopyFrom<SyndEntry>, Extendable {
* Sets the entry enclosures.
* <p>
*
* @param enclosures the list of SyndEnclosure elements with the entry
* enclosures to set, an empty list or <b>null</b> if none.
* @param enclosures the list of SyndEnclosure elements with the entry enclosures to set, an
* empty list or <b>null</b> if none.
*
*/
public void setEnclosures(List<SyndEnclosure> enclosures);
@ -199,8 +195,7 @@ public interface SyndEntry extends Cloneable, CopyFrom<SyndEntry>, Extendable {
/**
* Returns the entry published date.
* <p>
* 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.
* <p>
*
* @return the entry published date, <b>null</b> if none.
@ -211,12 +206,10 @@ public interface SyndEntry extends Cloneable, CopyFrom<SyndEntry>, Extendable {
/**
* Sets the entry published date.
* <p>
* 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.
* <p>
*
* @param publishedDate the entry published date to set, <b>null</b> if
* none.
* @param publishedDate the entry published date to set, <b>null</b> if none.
*
*/
void setPublishedDate(Date publishedDate);
@ -242,9 +235,8 @@ public interface SyndEntry extends Cloneable, CopyFrom<SyndEntry>, Extendable {
/**
* Returns the entry authors.
* <p>
* 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.
* <p>
*
* @return the feed author, <b>null</b> if none.
@ -255,9 +247,8 @@ public interface SyndEntry extends Cloneable, CopyFrom<SyndEntry>, Extendable {
/**
* Sets the entry author.
* <p>
* 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.
* <p>
*
* @param authors the feed author to set, <b>null</b> if none.
@ -268,9 +259,8 @@ public interface SyndEntry extends Cloneable, CopyFrom<SyndEntry>, Extendable {
/**
* Returns the name of the first entry author in the collection of authors.
* <p>
* 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.
* <p>
*
* @return the feed author, <b>null</b> if none.
@ -281,9 +271,8 @@ public interface SyndEntry extends Cloneable, CopyFrom<SyndEntry>, Extendable {
/**
* Sets the entry author.
* <p>
* 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.
* <p>
*
* @param author the feed author to set, <b>null</b> if none.
@ -293,8 +282,7 @@ public interface SyndEntry extends Cloneable, CopyFrom<SyndEntry>, Extendable {
/**
* Returns the feed author.
* <p>
* 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
* <p>
*
* @return the feed author, <b>null</b> if none.
@ -316,12 +304,10 @@ public interface SyndEntry extends Cloneable, CopyFrom<SyndEntry>, Extendable {
/**
* Returns the entry categories.
* <p>
* 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.
* <p>
*
* @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<SyndCategory> getCategories();
@ -329,12 +315,11 @@ public interface SyndEntry extends Cloneable, CopyFrom<SyndEntry>, Extendable {
/**
* Sets the entry categories.
* <p>
* 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.
* <p>
*
* @param categories the list of SyndCategoryImpl elements with the entry
* categories to set, an empty list or <b>null</b> if none.
* @param categories the list of SyndCategoryImpl elements with the entry categories to set, an
* empty list or <b>null</b> if none.
*
*/
void setCategories(List<SyndCategory> categories);
@ -360,12 +345,11 @@ public interface SyndEntry extends Cloneable, CopyFrom<SyndEntry>, 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<SyndEntry>, Extendable {
* Returns the entry modules.
* <p>
*
* @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<SyndEntry>, Extendable {
* Sets the entry modules.
* <p>
*
* @param modules the list of ModuleImpl elements with the entry modules to
* set, an empty list or <b>null</b> if none.
* @param modules the list of ModuleImpl elements with the entry modules to set, an empty list
* or <b>null</b> if none.
*
*/
@Override
@ -443,15 +426,13 @@ public interface SyndEntry extends Cloneable, CopyFrom<SyndEntry>, Extendable {
* <p>
*
* @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);

View file

@ -74,9 +74,8 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
/**
* Unmodifiable Set containing the convenience properties of this class.
* <p>
* 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<String> 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.
* <p>
*
* @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<String> convenienceProperties) {
@ -114,8 +112,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
* <p>
*
* @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.
* <p>
*
* @param other he reference object with which to compare.
@ -181,11 +178,10 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
/**
* Returns the entry URI.
* <p>
* 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, <a
* href="http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping">Feed and
* entry URI mapping</a>.
* 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, <a
* href="http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping">Feed and entry URI
* mapping</a>.
* <p>
* The returned URI is a normalized URI as specified in RFC 2396bis.
* <p>
@ -201,11 +197,10 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
/**
* Sets the entry URI.
* <p>
* 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, <a
* href="http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping">Feed and
* entry URI mapping</a>.
* 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, <a
* href="http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping">Feed and entry URI
* mapping</a>.
* <p>
*
* @param uri the entry URI to set, <b>null</b> if none.
@ -322,8 +317,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
* Returns the entry contents.
* <p>
*
* @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.
* <p>
*
* @param contents the list of SyndContentImpl elements with the entry
* contents to set, an empty list or <b>null</b> if none.
* @param contents the list of SyndContentImpl elements with the entry contents to set, an empty
* list or <b>null</b> if none.
*
*/
@Override
@ -351,8 +345,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
* Returns the entry enclosures.
* <p>
*
* @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.
* <p>
*
* @param enclosures the list of SyndEnclosure elements with the entry
* enclosures to set, an empty list or <b>null</b> if none.
* @param enclosures the list of SyndEnclosure elements with the entry enclosures to set, an
* empty list or <b>null</b> if none.
*
*/
@Override
@ -379,8 +372,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
/**
* Returns the entry published date.
* <p>
* 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.
* <p>
*
* @return the entry published date, <b>null</b> if none.
@ -394,12 +386,10 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
/**
* Sets the entry published date.
* <p>
* 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.
* <p>
*
* @param publishedDate the entry published date to set, <b>null</b> if
* none.
* @param publishedDate the entry published date to set, <b>null</b> if none.
*
*/
@Override
@ -411,8 +401,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
* Returns the entry categories.
* <p>
*
* @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.
* <p>
* 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.
* <p>
*
* @param categories the list of SyndCategoryImpl elements with the entry
* categories to set, an empty list or <b>null</b> if none.
* @param categories the list of SyndCategoryImpl elements with the entry categories to set, an
* empty list or <b>null</b> if none.
*
*/
@Override
@ -440,8 +428,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
* Returns the entry modules.
* <p>
*
* @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.
* <p>
*
* @param modules the list of ModuleImpl elements with the entry modules to
* set, an empty list or <b>null</b> if none.
* @param modules the list of ModuleImpl elements with the entry modules to set, an empty list
* or <b>null</b> if none.
*
*/
@Override
@ -595,8 +582,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
/**
* Returns the entry author.
* <p>
* 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.
* <p>
*
* @return the entry author, <b>null</b> if none.
@ -623,8 +609,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
/**
* Sets the entry author.
* <p>
* 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.
* <p>
*
* @param author the entry author to set, <b>null</b> if none.
@ -669,8 +654,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
* Returns foreign markup found at channel level.
* <p>
*
* @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.
* <p>
*
* @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;
}

View file

@ -29,8 +29,7 @@ import com.sun.syndication.feed.module.Module;
/**
* Bean interface for all types of feeds.
* <p>
* 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.
* <p>
*
* @author Alejandro Abdelnur
@ -39,8 +38,7 @@ import com.sun.syndication.feed.module.Module;
public interface SyndFeed extends Cloneable, CopyFrom<SyndFeed>, 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.
* <p>
*
* @return the real feed type supported.
@ -50,8 +48,7 @@ public interface SyndFeed extends Cloneable, CopyFrom<SyndFeed>, Extendable {
/**
* Creates a real feed containing the information of the SyndFeedImpl.
* <p>
* 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.
* <p>
*
* @return the real feed.
@ -70,9 +67,8 @@ public interface SyndFeed extends Cloneable, CopyFrom<SyndFeed>, 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<SyndFeed>, 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.
* <p>
*
* @return the feed type, <b>null</b> if none.
@ -105,8 +100,7 @@ public interface SyndFeed extends Cloneable, CopyFrom<SyndFeed>, 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.
* <p>
*
* @return the charset encoding of the feed.
@ -126,25 +120,22 @@ public interface SyndFeed extends Cloneable, CopyFrom<SyndFeed>, Extendable {
/**
* Returns the feed URI.
* <p>
* 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, <a
* href="http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping">Feed and
* entry URI mapping</a>.
* 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, <a
* href="http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping">Feed and entry URI
* mapping</a>.
* <p>
* The returned URI is a normalized URI as specified in RFC 2396bis.
* <p>
* 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.
* <p>
*
* @return the feed URI, <b>null</b> if none.
@ -155,23 +146,20 @@ public interface SyndFeed extends Cloneable, CopyFrom<SyndFeed>, Extendable {
/**
* Sets the feed URI.
* <p>
* 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, <a
* href="http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping">Feed and
* entry URI mapping</a>.
* 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, <a
* href="http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping">Feed and entry URI
* mapping</a>.
* <p>
* 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.
* <p>
*
* @param uri the feed URI to set, <b>null</b> if none.
@ -218,17 +206,15 @@ public interface SyndFeed extends Cloneable, CopyFrom<SyndFeed>, Extendable {
/**
* Returns the feed link.
* <p>
* 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.
* <p>
*
* @return the feed link, <b>null</b> if none.
@ -239,17 +225,15 @@ public interface SyndFeed extends Cloneable, CopyFrom<SyndFeed>, Extendable {
/**
* Sets the feed link.
* <p>
* 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.
* <p>
*
* @param link the feed link to set, <b>null</b> if none.
@ -314,8 +298,7 @@ public interface SyndFeed extends Cloneable, CopyFrom<SyndFeed>, Extendable {
/**
* Returns the feed published date.
* <p>
* 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.
* <p>
*
* @return the feed published date, <b>null</b> if none.
@ -326,8 +309,7 @@ public interface SyndFeed extends Cloneable, CopyFrom<SyndFeed>, Extendable {
/**
* Sets the feed published date.
* <p>
* 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.
* <p>
*
* @param publishedDate the feed published date to set, <b>null</b> if none.
@ -338,9 +320,8 @@ public interface SyndFeed extends Cloneable, CopyFrom<SyndFeed>, Extendable {
/**
* Returns the feed authors.
* <p>
* 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.
* <p>
*
* @return the feed authors, <b>null</b> if none.
@ -351,9 +332,8 @@ public interface SyndFeed extends Cloneable, CopyFrom<SyndFeed>, Extendable {
/**
* Sets the feed authors.
* <p>
* 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.
* <p>
*
* @param authors the feed authors to set, <b>null</b> if none.
@ -364,9 +344,8 @@ public interface SyndFeed extends Cloneable, CopyFrom<SyndFeed>, Extendable {
/**
* Returns the name of the first feed author in the collection of authors.
* <p>
* 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.
* <p>
*
* @return the feed author, <b>null</b> if none.
@ -377,9 +356,8 @@ public interface SyndFeed extends Cloneable, CopyFrom<SyndFeed>, Extendable {
/**
* Sets the feed author.
* <p>
* 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.
* <p>
*
* @param author the feed author to set, <b>null</b> if none.
@ -390,8 +368,7 @@ public interface SyndFeed extends Cloneable, CopyFrom<SyndFeed>, Extendable {
/**
* Returns the feed author.
* <p>
* 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
* <p>
*
* @return the feed author, <b>null</b> if none.
@ -413,8 +390,7 @@ public interface SyndFeed extends Cloneable, CopyFrom<SyndFeed>, Extendable {
/**
* Returns the feed copyright.
* <p>
* 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.
* <p>
*
* @return the feed copyright, <b>null</b> if none.
@ -425,8 +401,7 @@ public interface SyndFeed extends Cloneable, CopyFrom<SyndFeed>, Extendable {
/**
* Sets the feed copyright.
* <p>
* 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.
* <p>
*
* @param copyright the feed copyright to set, <b>null</b> if none.
@ -455,12 +430,10 @@ public interface SyndFeed extends Cloneable, CopyFrom<SyndFeed>, Extendable {
/**
* Returns the feed categories.
* <p>
* 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.
* <p>
*
* @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<SyndCategory> getCategories();
@ -468,12 +441,11 @@ public interface SyndFeed extends Cloneable, CopyFrom<SyndFeed>, Extendable {
/**
* Sets the feed categories.
* <p>
* 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.
* <p>
*
* @param categories the list of SyndCategoryImpl elements with the feed
* categories to set, an empty list or <b>null</b> if none.
* @param categories the list of SyndCategoryImpl elements with the feed categories to set, an
* empty list or <b>null</b> if none.
*
*/
void setCategories(List<SyndCategory> categories);
@ -482,8 +454,7 @@ public interface SyndFeed extends Cloneable, CopyFrom<SyndFeed>, Extendable {
* Returns the feed entries.
* <p>
*
* @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<SyndEntry> getEntries();
@ -492,8 +463,8 @@ public interface SyndFeed extends Cloneable, CopyFrom<SyndFeed>, Extendable {
* Sets the feed entries.
* <p>
*
* @param entries the list of SyndEntryImpl elements with the feed entries
* to set, an empty list or <b>null</b> if none.
* @param entries the list of SyndEntryImpl elements with the feed entries to set, an empty list
* or <b>null</b> if none.
*
*/
void setEntries(List<SyndEntry> entries);
@ -501,8 +472,7 @@ public interface SyndFeed extends Cloneable, CopyFrom<SyndFeed>, Extendable {
/**
* Returns the feed language.
* <p>
* 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.
* <p>
*
* @return the feed language, <b>null</b> if none.
@ -513,8 +483,7 @@ public interface SyndFeed extends Cloneable, CopyFrom<SyndFeed>, Extendable {
/**
* Sets the feed language.
* <p>
* 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.
* <p>
*
* @param language the feed language to set, <b>null</b> if none.
@ -536,8 +505,7 @@ public interface SyndFeed extends Cloneable, CopyFrom<SyndFeed>, Extendable {
* Returns the feed modules.
* <p>
*
* @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<SyndFeed>, Extendable {
* Sets the feed modules.
* <p>
*
* @param modules the list of ModuleImpl elements with the feed modules to
* set, an empty list or <b>null</b> if none.
* @param modules the list of ModuleImpl elements with the feed modules to set, an empty list or
* <b>null</b> if none.
*
*/
@Override
@ -573,8 +541,7 @@ public interface SyndFeed extends Cloneable, CopyFrom<SyndFeed>, Extendable {
public void setForeignMarkup(List<Element> 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<SyndFeed>, 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<SyndFeed>, 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<SyndFeed>, 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<SyndFeed>, 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<SyndFeed>, 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<SyndFeed>, Extendable {
* <p>
*
* @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;

View file

@ -44,8 +44,8 @@ import com.sun.syndication.feed.synd.impl.URINormalizer;
/**
* Bean for all types of feeds.
* <p>
* 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.
* <p>
*
* @author Alejandro Abdelnur
@ -85,9 +85,8 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
/**
* Unmodifiable Set containing the convenience properties of this class.
* <p>
* 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<String> 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.
* <p>
*
* @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.
* <p>
*
* @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<String> 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.
* <p>
*
* @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 {
* <p>
*
* @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.
* <p>
*
* @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.
* <p>
* 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.
* <p>
*
* @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. <br />
* 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. <br />
* 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.
* <p>
*
* @return the feed type, <b>null</b> 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.
* <p>
*
* @return the charset encoding of the feed.
@ -343,25 +333,22 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
/**
* Returns the feed URI.
* <p>
* 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, <a
* href="http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping">Feed and
* entry URI mapping</a>.
* 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, <a
* href="http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping">Feed and entry URI
* mapping</a>.
* <p>
* The returned URI is a normalized URI as specified in RFC 2396bis.
* <p>
* 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.
* <p>
*
* @return the feed URI, <b>null</b> if none.
@ -375,23 +362,20 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
/**
* Sets the feed URI.
* <p>
* 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, <a
* href="http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping">Feed and
* entry URI mapping</a>.
* 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, <a
* href="http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping">Feed and entry URI
* mapping</a>.
* <p>
* 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.
* <p>
*
* @param uri the feed URI to set, <b>null</b> if none.
@ -459,17 +443,15 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
/**
* Returns the feed link.
* <p>
* 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.
* <p>
*
* @return the feed link, <b>null</b> if none.
@ -483,17 +465,15 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
/**
* Sets the feed link.
* <p>
* 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.
* <p>
*
* @param link the feed link to set, <b>null</b> if none.
@ -561,8 +541,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
/**
* Returns the feed published date.
* <p>
* 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.
* <p>
*
* @return the feed published date, <b>null</b> if none.
@ -576,8 +555,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
/**
* Sets the feed published date.
* <p>
* 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.
* <p>
*
* @param publishedDate the feed published date to set, <b>null</b> if none.
@ -591,8 +569,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
/**
* Returns the feed copyright.
* <p>
* 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.
* <p>
*
* @return the feed copyright, <b>null</b> if none.
@ -606,8 +583,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
/**
* Sets the feed copyright.
* <p>
* 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.
* <p>
*
* @param copyright the feed copyright to set, <b>null</b> if none.
@ -645,12 +621,10 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
/**
* Returns the feed categories.
* <p>
* 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.
* <p>
*
* @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.
* <p>
* 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.
* <p>
*
* @param categories the list of SyndCategoryImpl elements with the feed
* categories to set, an empty list or <b>null</b> if none.
* @param categories the list of SyndCategoryImpl elements with the feed categories to set, an
* empty list or <b>null</b> if none.
*
*/
@Override
@ -678,8 +651,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
* Returns the feed entries.
* <p>
*
* @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.
* <p>
*
* @param entries the list of SyndEntryImpl elements with the feed entries
* to set, an empty list or <b>null</b> if none.
* @param entries the list of SyndEntryImpl elements with the feed entries to set, an empty list
* or <b>null</b> if none.
*
*/
@Override
@ -706,8 +678,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
/**
* Returns the feed language.
* <p>
* 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.
* <p>
*
* @return the feed language, <b>null</b> if none.
@ -721,8 +692,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
/**
* Sets the feed language.
* <p>
* 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.
* <p>
*
* @param language the feed language to set, <b>null</b> if none.
@ -737,8 +707,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
* Returns the feed modules.
* <p>
*
* @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.
* <p>
*
* @param modules the list of ModuleImpl elements with the feed modules to
* set, an empty list or <b>null</b> if none.
* @param modules the list of ModuleImpl elements with the feed modules to set, an empty list or
* <b>null</b> if none.
*
*/
@Override
@ -865,8 +834,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
/**
* Returns the feed author.
* <p>
* 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.
* <p>
*
* @return the feed author, <b>null</b> if none.
@ -880,8 +848,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
/**
* Sets the feed author.
* <p>
* 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.
* <p>
*
* @param author the feed author to set, <b>null</b> 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;
}
}

View file

@ -104,8 +104,7 @@ public interface SyndImage extends Cloneable, CopyFrom<SyndImage> {
* <p>
*
* @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;

View file

@ -54,8 +54,7 @@ public class SyndImageImpl implements Serializable, SyndImage {
* <p>
*
* @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.
* <p>
*
* @param other he reference object with which to compare.

View file

@ -28,15 +28,14 @@ public interface SyndLink {
* <p>
*
* @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.
* <p>
*
* @param other he reference object with which to compare.

View file

@ -54,8 +54,7 @@ public class SyndLinkImpl implements Cloneable, Serializable, SyndLink {
* <p>
*
* @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.
* <p>
*
* @param other he reference object with which to compare.

View file

@ -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.
* <p>
*
* @author Dave Johnson
@ -64,8 +63,7 @@ public interface SyndPerson extends Cloneable, Extendable {
* <p>
*
* @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;

View file

@ -41,8 +41,8 @@ public class SyndPersonImpl implements Serializable, SyndPerson {
private List<Module> 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 {
* <p>
*
* @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.
* <p>
*
* @param other he reference object with which to compare.
@ -181,8 +180,7 @@ public class SyndPersonImpl implements Serializable, SyndPerson {
* Returns the person modules.
* <p>
*
* @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<Module> getModules() {
@ -196,8 +194,8 @@ public class SyndPersonImpl implements Serializable, SyndPerson {
* Sets the person modules.
* <p>
*
* @param modules the list of ModuleImpl elements with the person modules to
* set, an empty list or <b>null</b> if none.
* @param modules the list of ModuleImpl elements with the person modules to set, an empty list
* or <b>null</b> if none.
*
*/
@Override

View file

@ -73,7 +73,7 @@ public class ConverterForRSS091Userland extends ConverterForRSS090 {
if (!creators.contains(author)) {
final Set<String> s = new LinkedHashSet<String>(); // using a set to
// remove
// remove
// duplicates
s.addAll(creators); // DC creators
s.add(author); // feed native author

View file

@ -53,7 +53,7 @@ public class ConverterForRSS094 extends ConverterForRSS093 {
final List<Category> cats = channel.getCategories(); // c
if (cats.size() > 0) {
final Set<SyndCategory> s = new LinkedHashSet<SyndCategory>(); // 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<String> creators = ((DCModule) syndEntry.getModule(DCModule.URI)).getCreators();
if (!creators.contains(author)) {
final Set<String> s = new LinkedHashSet<String>(); // using a set to
// remove
// remove
// duplicates
s.addAll(creators); // DC creators
s.add(author); // feed native author

View file

@ -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<Converter> {

View file

@ -13,8 +13,8 @@ public class URINormalizer {
* <p>
*
* @param uri to normalize.
* @return the normalized value of the given URI, or <b>null</b> if the
* given URI was <b>null</b>.
* @return the normalized value of the given URI, or <b>null</b> if the given URI was
* <b>null</b>.
*/
public static String normalize(final String uri) {
String normalizedUri = null;

View file

@ -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.
*/

View file

@ -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.
*/

View file

@ -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.
* <p>
*
* @author Alejandro Abdelnur

View file

@ -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.
* <p/>
* 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).
* <p/>
*
* @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<Namespace> getNamespaces();

View file

@ -48,10 +48,8 @@ public interface ModuleParser {
* Parses the XML node (JDOM element) extracting module information.
* <p>
*
* @param element the XML node (JDOM element) to extract module information
* from.
* @return a module instance, <b>null</b> if the element did not have module
* information.
* @param element the XML node (JDOM element) to extract module information from.
* @return a module instance, <b>null</b> if the element did not have module information.
*
*/
public Module parse(Element element, Locale locale);

View file

@ -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.
* <p>
* The first line in the document is line 1.
* </p>
*
* @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.
* <p>
* The first column in a line is position 1.
* </p>
*
* @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) {

View file

@ -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

View file

@ -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.
* <p>
* It delegates to a WireFeedInput to handle all feed types.
* <p>
@ -55,8 +55,8 @@ public class SyndFeedInput {
* Creates a SyndFeedInput instance.
* <p>
*
* @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.
* <p>
* 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.
* <p>
* Healing resolves HTML entities (from literal to code number) in the
* reader.
* Healing resolves HTML entities (from literal to code number) in the reader.
* <p>
* 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.
* <p>
* By default is TRUE.
* <p>
@ -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.
* <p>
* 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.
* <p>
* Healing resolves HTML entities (from literal to code number) in the
* reader.
* Healing resolves HTML entities (from literal to code number) in the reader.
* <p>
* 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.
* <p>
* By default is TRUE.
* <p>
@ -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;

View file

@ -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..
* <p>
* It delegates to a WireFeedOutput to generate all feed types.
* <p>
@ -49,18 +49,15 @@ public class SyndFeedOutput {
/**
* Creates a String with the XML representation for the given SyndFeedImpl.
* <p>
* 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.
* <p>
*
* @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.
* <p>
* 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.
* <p>
*
* @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.
* <p>
* 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.
* <p>
*
* @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.
* <p>
* 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.
* <p>
*
* @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.
* <p>
* 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.
* <p>
*
* @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.
* <p>
* 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.
* <p>
*
* @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.
* <p>
*
* @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.
* <p>
*
* @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 {

View file

@ -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.
*
*/

View file

@ -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).
* <p>
* 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).
* <p>
* The WireFeedInput useds liberal parsers.
* <p>
@ -115,7 +116,8 @@ public class WireFeedInput {
* Creates a WireFeedInput instance.
* <p>
*
* @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
*
*/

View file

@ -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).
* <p>
* 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).
* <p>
*
* @author Alejandro Abdelnur
@ -83,15 +84,18 @@ public class WireFeedOutput {
/**
* Creates a String with the XML representation for the given WireFeed.
* <p>
* 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.
* <p>
* NOTE: This method delages to the 'Document WireFeedOutput#outputJDom(WireFeed)'.
* <p>
*
* @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.
* <p>
* 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.
* <p>
* NOTE: This method delages to the 'Document WireFeedOutput#outputJDom(WireFeed)'.
* <p>
*
* @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.
* <p>
* 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.
* <p>
* NOTE: This method delages to the 'Document WireFeedOutput#outputJDom(WireFeed)'.
* <p>
*
* @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.
* <p>
* 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.
* <p>
* NOTE: This method delages to the 'Document WireFeedOutput#outputJDom(WireFeed)'.
* <p>
*
* @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.
* <p>
* 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.
* <p>
* NOTE: This method delages to the 'Document WireFeedOutput#outputJDom(WireFeed)'.
* <p>
*
* @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.
* <p>
* 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.
* <p>
* NOTE: This method delages to the 'Document WireFeedOutput#outputJDom(WireFeed)'.
* <p>
*
* @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)'.
* <p>
*
* @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.
* <p>
*
* @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.
*
*/

View file

@ -49,14 +49,11 @@ public interface WireFeedParser {
/**
* Inspects an XML Document (JDOM) to check if it can parse it.
* <p>
* 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.
* <p>
*
* @param document XML Document (JDOM) to check if it can be parsed by this
* parser.
* @return <b>true</b> if the parser know how to parser this feed,
* <b>false</b> otherwise.
* @param document XML Document (JDOM) to check if it can be parsed by this parser.
* @return <b>true</b> if the parser know how to parser this feed, <b>false</b> otherwise.
*
*/
public boolean isMyType(Document document);
@ -66,13 +63,10 @@ public interface WireFeedParser {
* <p>
*
* @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;

View file

@ -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.
* <p>
* 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.
* <p>
* 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).
* <p>
* 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.
* <P>
* 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, <a
* href="http://diveintomark.org/archives/2004/02/13/xml-media-types">
* Determining the character encoding of a feed</a>.
* 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, <a
* href="http://diveintomark.org/archives/2004/02/13/xml-media-types"> Determining the character
* encoding of a feed</a>.
* <p>
*
* @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.
* <p/>
* If it is set to NULL the content-type based rules are used.
* <p/>
* By default it is NULL.
* <p/>
*
* @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.
* <p/>
* If it is NULL the content-type based rules are used.
* <p/>
*
* @return the default encoding to use.
*/
public static String getDefaultEncoding() {
return staticDefaultEncoding;
}
private Reader reader;
private String encoding;
/**
* Creates a Reader for a File.
* <p>
* 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.
* <p>
* 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.
* <p>
*
* @param file File to create a Reader from.
@ -125,8 +107,8 @@ public class XmlReader extends Reader {
* <p>
* It follows the same logic used for files.
* <p>
* 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.
* <p>
*
* @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.
* <p>
* It follows the same logic used for files.
* <p>
* 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:
* <p>
* 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.
* <p>
* Else if the XML prolog had a charset encoding that encoding is used.
* <p>
@ -159,12 +141,11 @@ public class XmlReader extends Reader {
* <p>
*
* @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 {
* <p>
* It follows the same logic used for files.
* <p>
* 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:
* <p>
* 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.
* <p>
* Else if the XML prolog had a charset encoding that encoding is used.
* <p>
@ -205,11 +186,10 @@ public class XmlReader extends Reader {
* <p>
*
* @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.
* <p>
* 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.
* <p>
* 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.
* <p>
* 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.
* <p>
*
* @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.
* <p>
* 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.
* <p>
* 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.
* <p>
* 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.
* <p>
*
* @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.
* <p>
* 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.
* <p>
* 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.
* <p>
*
* @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.
* <p>
* 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.
* <p>
* 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:
* <p>
* 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.
* <p>
* Else if the XML prolog had a charset encoding that encoding is used.
* <p>
@ -331,14 +301,12 @@ public class XmlReader extends Reader {
* <p>
*
* @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.
* <p>
* 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.
* <p>
* 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:
* <p>
* 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.
* <p>
* Else if the XML prolog had a charset encoding that encoding is used.
* <p>
@ -384,19 +350,56 @@ public class XmlReader extends Reader {
* <p>
*
* @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.
* <p/>
* If it is NULL the content-type based rules are used.
* <p/>
*
* @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.
* <p/>
* If it is set to NULL the content-type based rules are used.
* <p/>
* By default it is NULL.
* <p/>
*
* @param encoding charset encoding to default to.
*/
public static void setDefaultEncoding(final String encoding) {
staticDefaultEncoding = encoding;
}
/**
* Returns the charset encoding of the XmlReader.
* <p>
*
* @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.
* <p>
*
* @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 <?xml encoding=...?>, 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");
}

View file

@ -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.
* <p>
* 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.
* <p>
*
* @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.
* <p>
* Instances of this exception are thrown by the XmlReader.
* <p>
@ -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.
* <p>
* Instances of this exception are thrown by the XmlReader.
* <p>
@ -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.
* <p>
*
* @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.
* <p>
*
* @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.
* <p>
*
* @return the unconsumed InputStream.

View file

@ -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);

View file

@ -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.
* <p>
*
* @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) {

View file

@ -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.
* <p/>
* 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<String> usedPrefixes = new HashSet<String>();

View file

@ -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.
* <p/>
* 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).
* <p/>
*
* @return a set with all the URIs this module generator uses.

View file

@ -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.
* <p/>
* 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.
* <p/>
*
* @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 <b>null</b> 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
* <b>null</b> 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 {
* <li>"dd MMM yy HH:mm z"</li>
* </ul>
* <p/>
* 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.
* <p/>
*
* @param sDate string to parse for a date.
* @return the Date represented by the given RFC822 string. It returns
* <b>null</b> if it was not possible to parse the given string into
* a Date.
* @return the Date represented by the given RFC822 string. It returns <b>null</b> 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 {
* <li>"yyyy"</li>
* </ul>
* <p/>
* 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.
* <p/>
*
* @param sDate string to parse for a date.
* @return the Date represented by the given W3C date-time string. It
* returns <b>null</b> 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 <b>null</b> 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.
* <p>
*
* @param sDate string to parse for a date.
* @return the Date represented by the given W3C date-time string. It
* returns <b>null</b> 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 <b>null</b> 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.
* <p/>
* 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.
* <p/>
*
* @param date Date to parse
* @return the RFC822 represented by the given Date It returns <b>null</b>
* if it was not possible to parse the date.
* @return the RFC822 represented by the given Date It returns <b>null</b> 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.
* <p/>
* 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.
* <p/>
*
* @param date Date to parse
* @return the W3C Date Time represented by the given Date It returns
* <b>null</b> if it was not possible to parse the date.
* @return the W3C Date Time represented by the given Date It returns <b>null</b> if it was not
* possible to parse the date.
*
*/
public static String formatW3CDateTime(final Date date, final Locale locale) {

View file

@ -23,14 +23,12 @@ import com.sun.syndication.io.WireFeedGenerator;
/**
* Generates an XML document (JDOM Document) out of a Feed.
* <p>
* 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.
* <p>
* WireFeedGenerator instances are thread safe.
* <p>
* 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).
* <p>
*
* @author Alejandro Abdelnur

View file

@ -25,16 +25,14 @@ import com.sun.syndication.io.WireFeedParser;
/**
* Parses an XML document (JDOM Document) into a Feed.
* <p>
* 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.
* <p>
* The WireFeedParser is a liberal parser.
* <p>
* WireFeedParser instances are thread safe.
* <p>
* 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).
* <p>
*
* @author Alejandro Abdelnur
@ -66,8 +64,8 @@ public class FeedParsers extends PluginManager<WireFeedParser> {
* <p>
*
* @param document document feed to find the parser for.
* @return the parser for the given document or <b>null</b> if there is no
* parser for that document.
* @return the parser for the given document or <b>null</b> if there is no parser for that
* document.
*
*/
public WireFeedParser getParserFor(final Document document) {

View file

@ -4,15 +4,12 @@ package com.sun.syndication.io.impl;
* A helper class that parses Numbers out of Strings in a lenient manner.
*
* <p>
* 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.
* </p>
* <p>
* :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.
* </p>
*/
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 <b>null</b>
* if it was not possible to parse the the string.
* @return the Long represented by the given string, It returns <b>null</b> 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
* <b>null</b> is returned and no exception is thrown.
* Parse an Integer from a String. If the String is not an integer <b>null</b> 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();

View file

@ -127,13 +127,15 @@ public abstract class PluginManager<T> {
}
/**
* 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
* <p>
*
* @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")

View file

@ -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.
* <P>
* 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.
* <P>
* 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().
* <p>
*
* @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.
* <p>
*
* @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.
* <p>
*
* @param key property key to retrieve values

View file

@ -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.

View file

@ -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.
* <P>
* This implementation returns the EMTPY namespace.
* <p>
@ -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.
* <P>
* This implementation returns the EMTPY namespace.
* <p>
@ -137,11 +137,10 @@ public class RSS090Parser extends BaseWireFeedParser {
/**
* Parses the root element of an RSS document into a Channel bean.
* <p/>
* 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)
* <p/>
*
* @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.
* <p/>
*/
protected List<Element> 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.
* <p/>
*/
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.
* <p/>
*/
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.
* <p/>
*
* @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.
* <p/>
* 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.
* <p/>
*
* @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<Item> 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.
* <p/>
*
* @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.
* <p/>
* 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.
* <p/>
*
* @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) {

View file

@ -79,8 +79,8 @@ public class RSS091UserlandParser extends RSS090Parser {
/**
* Parses the root element of an RSS document into a Channel bean.
* <p/>
* 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.
* <p/>
*
* @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.
* <p/>
* 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.
* <p/>
*
* @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.
* <p/>
* 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.
* <p/>
*
* @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.
*/

View file

@ -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:

View file

@ -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.
* <p/>
* 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 <b>true</b> if the document is RSS1., <b>false</b> otherwise.
*/
@Override
@ -88,12 +86,11 @@ public class RSS10Parser extends RSS090Parser {
/**
* Parses an item element of an RSS document looking for item information.
* <p/>
* 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.
* <p/>
*
* @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.
*/

View file

@ -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

View file

@ -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.
* <p/>
* 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).
* <p/>
*
* @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<Namespace> getNamespaces() {

View file

@ -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 // <source
* url="http://localhost:8080/item0/source.url">item[0].source</source> //
* <enclosure url="http://localhost:8080/item0/enclosure0.url" length="100"
* type="audio/mpeg"/> // <enclosure
* url="http://localhost:8080/item0/enclosure1.url" length="1000"
* type="audio/mpeg"/> <category
* domain="item0.domain0">item0.category0</category> <category
* domain="item0.domain1">item0.category1</category> <pubDate>Thu, 08 Jul
* 1999 08:00:00 GMT</pubDate> <expirationDate>Thu, 08 Jul 1999 09:00:00
* GMT</.expirationDate> <author>item0.author</author>
* <comments>http://localhost:8080/item0/comments</comments> <guid
* isPermaLink="true">http://localhost:8080/item0/guid</guid> //TODO: I
* still have the elements to test
* url="http://localhost:8080/item0/source.url">item[0].source</source> // <enclosure
* url="http://localhost:8080/item0/enclosure0.url" length="100" type="audio/mpeg"/> //
* <enclosure url="http://localhost:8080/item0/enclosure1.url" length="1000" type="audio/mpeg"/>
* <category domain="item0.domain0">item0.category0</category> <category
* domain="item0.domain1">item0.category1</category> <pubDate>Thu, 08 Jul 1999 08:00:00
* GMT</pubDate> <expirationDate>Thu, 08 Jul 1999 09:00:00 GMT</.expirationDate>
* <author>item0.author</author> <comments>http://localhost:8080/item0/comments</comments> <guid
* isPermaLink="true">http://localhost:8080/item0/guid</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?
/*
* <textInput> <title>Search</title> <description>Search this
* site:</description> <name>q</name>
* <link>http://example.org/mt/mt-search.cgi</link> </textInput> image
* height and width //<copyright>Copyright 2004, Mark Pilgrim</copyright>
* public void test() { assertEqualsStr(getCachedSyndFeed()., ""); }
* //<generator>Sample Toolkit</generator> public void test() {
* assertEqualsStr(feed, ""); } //
* <textInput> <title>Search</title> <description>Search this site:</description> <name>q</name>
* <link>http://example.org/mt/mt-search.cgi</link> </textInput> image height and width
* //<copyright>Copyright 2004, Mark Pilgrim</copyright> public void test() {
* assertEqualsStr(getCachedSyndFeed()., ""); } //<generator>Sample Toolkit</generator> public
* void test() { assertEqualsStr(feed, ""); } //
* <managingEditor>editor@example.org</managingEditor> public void test() {
* assertEqualsStr(feed, ""); } //
* <webMaster>webmaster@example.org</webMaster> public void test() {
* assertEqualsStr(feed, ""); }
* <docs>http://blogs.law.harvard.edu/tech/rss</docs> <cloud
* domain="rpc.sys.com" port="80" path="/RPC2" registerProcedure="pingMe"
* protocol="soap"/> <ttl>60</ttl> <rating>(PICS-1.1
* <EFBFBD>http://www.classify.org/safesurf/<EFBFBD> l r (SS~~000 1))</rating> <skiphours>
* <hour>0</hour> <hour>1</hour> <hour>2</hour> <hour>3</hour>
* <hour>4</hour> <hour>5</hour> <hour>6</hour> <hour>7</hour>
* <hour>8</hour> <hour>9.5</hour> <hour>10</hour> <hour>11</hour>
* <hour>12</hour> <hour>13</hour> <hour>14</hour> <hour>15</hour>
* <hour>16</hour> <hour>17</hour> <hour>18</hour> <hour>19</hour>
* <hour>20</hour> <hour>21</hour> <hour>22</hour> <hour>23</hour>
* </skiphours> <skipdays> <day>Monday</day> <day>Tuesday</day>
* <day>Wednesday</day> <day>Thursday</day> <day>Friday</day>
* <day>Saturday</day> <day>Sunday</day> </skipdays>
* assertEqualsStr(feed, ""); } // <webMaster>webmaster@example.org</webMaster> public void
* test() { assertEqualsStr(feed, ""); } <docs>http://blogs.law.harvard.edu/tech/rss</docs>
* <cloud domain="rpc.sys.com" port="80" path="/RPC2" registerProcedure="pingMe"
* protocol="soap"/> <ttl>60</ttl> <rating>(PICS-1.1 <EFBFBD>http://www.classify.org/safesurf/<EFBFBD> l r
* (SS~~000 1))</rating> <skiphours> <hour>0</hour> <hour>1</hour> <hour>2</hour> <hour>3</hour>
* <hour>4</hour> <hour>5</hour> <hour>6</hour> <hour>7</hour> <hour>8</hour> <hour>9.5</hour>
* <hour>10</hour> <hour>11</hour> <hour>12</hour> <hour>13</hour> <hour>14</hour>
* <hour>15</hour> <hour>16</hour> <hour>17</hour> <hour>18</hour> <hour>19</hour>
* <hour>20</hour> <hour>21</hour> <hour>22</hour> <hour>23</hour> </skiphours> <skipdays>
* <day>Monday</day> <day>Tuesday</day> <day>Wednesday</day> <day>Thursday</day>
* <day>Friday</day> <day>Saturday</day> <day>Sunday</day> </skipdays>
*/
/*

View file

@ -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"));

View file

@ -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 {

View file

@ -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 {

View file

@ -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
*/

View file

@ -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 {

View file

@ -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 {

View file

@ -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("<img src=\"http://www.moe.gov.sg/media/spotlight/assets_c/2009/09/spotlight-single-session-thumb-120x80-282.jpg\"" +
" alt=\"Teacher and his students tossing frisbees into the air\" /><p>MOE will be <a href\n"+
"=\"http://www.moe.gov.sg/media/press/2009/09/moe-to-build-new-primary-schoo.php\">building 11 new primary\n"+
" schools and upgrading another 28 existing schools from November 2009</a>. 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.</p>", feed.getEntries().get(0).getDescription().getValue());
assertEquals("<img src=\"http://www.moe.gov.sg/media/spotlight/assets_c/2009/09/spotlight-wps-thumb-120x80-280\n"+
".jpg\" alt=\"Minister speaking at WPS 2009\" /><p>At the Work Plan Seminar 2009, Minister for Education\n"+
" Dr Ng Eng Hen <a href=\"http://www.moe.gov.sg/media/speeches/2009/09/17/work-plan-seminar.php\">talked\n"+
" about the importance of language &#38; communication skills and growing a world-class education service\n"+
"</a>. He spoke of <a href=\"http://www.moe.gov.sg/media/press/2009/09/teachers-the-heart-of-quality.php\"\n"+
">strengthening the teaching track and of a teacher-driven culture of professional excellence</a>.</p\n"+
">", feed.getEntries().get(1).getDescription().getValue());
assertEquals("<img src=\"http://www.moe.gov.sg/media/spotlight/assets_c/2009/09/spotlight-moa-2009-thumb-120x80-278"+
".jpg\" alt=\"Students at a podcast session\" />\n <p>A total of 275 schools will <a href=\"http:/"+
"/www.moe.gov.sg/media/press/2009/09/recognising-school-achievement.php\">receive 580 Special and Level\n"+
" Two Awards this year under the MOE Masterplan of Awards</a>. 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.</p>", feed.getEntries().get(2).getDescription().getValue());
assertEquals("<img src=\"http://www.moe.gov.sg/media/spotlight/assets_c/2009/09/spotlight-single-session-thumb-120x80-282.jpg\""
+ " alt=\"Teacher and his students tossing frisbees into the air\" /><p>MOE will be <a href\n"
+ "=\"http://www.moe.gov.sg/media/press/2009/09/moe-to-build-new-primary-schoo.php\">building 11 new primary\n"
+ " schools and upgrading another 28 existing schools from November 2009</a>. 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.</p>", feed.getEntries().get(0).getDescription().getValue());
assertEquals("<img src=\"http://www.moe.gov.sg/media/spotlight/assets_c/2009/09/spotlight-wps-thumb-120x80-280\n"
+ ".jpg\" alt=\"Minister speaking at WPS 2009\" /><p>At the Work Plan Seminar 2009, Minister for Education\n"
+ " Dr Ng Eng Hen <a href=\"http://www.moe.gov.sg/media/speeches/2009/09/17/work-plan-seminar.php\">talked\n"
+ " about the importance of language &#38; communication skills and growing a world-class education service\n"
+ "</a>. He spoke of <a href=\"http://www.moe.gov.sg/media/press/2009/09/teachers-the-heart-of-quality.php\"\n"
+ ">strengthening the teaching track and of a teacher-driven culture of professional excellence</a>.</p\n" + ">", feed.getEntries().get(1)
.getDescription().getValue());
assertEquals("<img src=\"http://www.moe.gov.sg/media/spotlight/assets_c/2009/09/spotlight-moa-2009-thumb-120x80-278"
+ ".jpg\" alt=\"Students at a podcast session\" />\n <p>A total of 275 schools will <a href=\"http:/"
+ "/www.moe.gov.sg/media/press/2009/09/recognising-school-achievement.php\">receive 580 Special and Level\n"
+ " Two Awards this year under the MOE Masterplan of Awards</a>. 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.</p>", feed.getEntries().get(2).getDescription().getValue());
}
}

View file

@ -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 {

View file

@ -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 {

View file

@ -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<Item> items = ((Channel) this.getCachedWireFeed()).getItems();
final List<Item> items = ((Channel) getCachedWireFeed()).getItems();
final Item entry = items.get(i);
assertProperty(entry.getComments(), "channel.item[" + i + "].comments");
}

View file

@ -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());
}
}