Refactored some code
This commit is contained in:
parent
990ca83787
commit
8ded48b469
99 changed files with 1357 additions and 1698 deletions
|
@ -25,8 +25,8 @@ public interface CopyFrom<T> {
|
||||||
/**
|
/**
|
||||||
* Returns the interface the copyFrom works on.
|
* Returns the interface the copyFrom works on.
|
||||||
* <p>
|
* <p>
|
||||||
* This is useful when dealing with properties that may have multiple
|
* This is useful when dealing with properties that may have multiple implementations. For
|
||||||
* implementations. For example, Module.
|
* example, Module.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the interface the copyFrom works on.
|
* @return the interface the copyFrom works on.
|
||||||
|
@ -38,9 +38,8 @@ public interface CopyFrom<T> {
|
||||||
* <p>
|
* <p>
|
||||||
* Any existing properties in this bean are lost.
|
* Any existing properties in this bean are lost.
|
||||||
* <p>
|
* <p>
|
||||||
* This method is useful for moving from one implementation of a bean
|
* This method is useful for moving from one implementation of a bean interface to another. For
|
||||||
* interface to another. For example from the default SyndFeed bean
|
* example from the default SyndFeed bean implementation to a Hibernate ready implementation.
|
||||||
* implementation to a Hibernate ready implementation.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param obj the instance to copy properties from.
|
* @param obj the instance to copy properties from.
|
||||||
|
|
|
@ -31,12 +31,12 @@ import com.sun.syndication.feed.module.impl.ModuleUtils;
|
||||||
/**
|
/**
|
||||||
* Parent class of the RSS (Channel) and Atom (Feed) feed beans.
|
* Parent class of the RSS (Channel) and Atom (Feed) feed beans.
|
||||||
* <p>
|
* <p>
|
||||||
* NOTE: We don't like this class at this package level but the alternative
|
* NOTE: We don't like this class at this package level but the alternative would have been a
|
||||||
* would have been a proliferation of packages (one more level to hold atom and
|
* proliferation of packages (one more level to hold atom and rss package with this class just in
|
||||||
* rss package with this class just in that package).
|
* that package).
|
||||||
* <p>
|
* <p>
|
||||||
* The format of the 'type' property must be [FEEDNAME]_[FEEDVERSION] with the
|
* The format of the 'type' property must be [FEEDNAME]_[FEEDVERSION] with the FEEDNAME in lower
|
||||||
* FEEDNAME in lower case, for example: rss_0.9, rss_0.93, atom_0.3
|
* case, for example: rss_0.9, rss_0.93, atom_0.3
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @author Alejandro Abdelnur
|
* @author Alejandro Abdelnur
|
||||||
|
@ -77,8 +77,7 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a clone of the object.
|
* @return a clone of the object.
|
||||||
* @throws CloneNotSupportedException thrown if an element of the object
|
* @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
|
||||||
* cannot be cloned.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@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
|
* Indicates whether some other object is "equal to" this one as defined by the Object equals()
|
||||||
* the Object equals() method.
|
* method.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param other he reference object with which to compare.
|
* @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
|
* Sets the feedType of a the feed. <b>Do not use</b>, for bean cloning purposes only.
|
||||||
* purposes only.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param feedType the feedType of the feed.
|
* @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.
|
* Returns the charset encoding of a the feed.
|
||||||
* <p>
|
* <p>
|
||||||
* This property is not set by feed parsers. But it is used by feed
|
* This property is not set by feed parsers. But it is used by feed generators to set the
|
||||||
* generators to set the encoding in the XML prolog.
|
* encoding in the XML prolog.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the charset encoding of the feed.
|
* @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.
|
* Sets the charset encoding of a the feed.
|
||||||
* <p>
|
* <p>
|
||||||
* This property is not set by feed parsers. But it is used by feed
|
* This property is not set by feed parsers. But it is used by feed generators to set the
|
||||||
* generators to set the encoding in the XML prolog.
|
* encoding in the XML prolog.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param encoding the charset encoding of the feed.
|
* @param encoding the charset encoding of the feed.
|
||||||
|
@ -191,8 +189,7 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable {
|
||||||
* Returns the channel modules.
|
* Returns the channel modules.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of ModuleImpl elements with the channel modules, an empty
|
* @return a list of ModuleImpl elements with the channel modules, an empty list if none.
|
||||||
* list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -207,8 +204,8 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable {
|
||||||
* Sets the channel modules.
|
* Sets the channel modules.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param modules the list of ModuleImpl elements with the channel modules
|
* @param modules the list of ModuleImpl elements with the channel modules to set, an empty list
|
||||||
* to set, an empty list or <b>null</b> if none.
|
* or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -269,7 +266,7 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable {
|
||||||
* @since 2.0.0
|
* @since 2.0.0
|
||||||
* @param styleSheet URL or {@code null}
|
* @param styleSheet URL or {@code null}
|
||||||
*/
|
*/
|
||||||
public void setStyleSheet(String styleSheet) {
|
public void setStyleSheet(final String styleSheet) {
|
||||||
this.styleSheet = styleSheet;
|
this.styleSheet = styleSheet;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,8 +50,7 @@ public class Category implements Cloneable, Serializable {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a clone of the object.
|
* @return a clone of the object.
|
||||||
* @throws CloneNotSupportedException thrown if an element of the object
|
* @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
|
||||||
* cannot be cloned.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -60,8 +59,8 @@ public class Category implements Cloneable, Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates whether some other object is "equal to" this one as defined by
|
* Indicates whether some other object is "equal to" this one as defined by the Object equals()
|
||||||
* the Object equals() method.
|
* method.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param other he reference object with which to compare.
|
* @param other he reference object with which to compare.
|
||||||
|
|
|
@ -78,8 +78,7 @@ public class Content implements Cloneable, Serializable {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a clone of the object.
|
* @return a clone of the object.
|
||||||
* @throws CloneNotSupportedException thrown if an element of the object
|
* @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
|
||||||
* cannot be cloned.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -88,8 +87,8 @@ public class Content implements Cloneable, Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates whether some other object is "equal to" this one as defined by
|
* Indicates whether some other object is "equal to" this one as defined by the Object equals()
|
||||||
* the Object equals() method.
|
* method.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param other he reference object with which to compare.
|
* @param other he reference object with which to compare.
|
||||||
|
|
|
@ -70,8 +70,8 @@ public class Entry implements Cloneable, Serializable, Extendable {
|
||||||
* Sets the entry alternate links.
|
* Sets the entry alternate links.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param alternateLinks the list of Link elements with the entry alternate
|
* @param alternateLinks the list of Link elements with the entry alternate links to set, an
|
||||||
* links to set, an empty list or <b>null</b> if none.
|
* empty list or <b>null</b> if none.
|
||||||
*/
|
*/
|
||||||
public void setAlternateLinks(final List<Link> alternateLinks) {
|
public void setAlternateLinks(final List<Link> alternateLinks) {
|
||||||
this.alternateLinks = alternateLinks;
|
this.alternateLinks = alternateLinks;
|
||||||
|
@ -81,8 +81,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
|
||||||
* Returns the entry alternate links.
|
* Returns the entry alternate links.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of Link elements with the entry alternate links, an empty
|
* @return a list of Link elements with the entry alternate links, an empty list if none.
|
||||||
* list if none.
|
|
||||||
*/
|
*/
|
||||||
public List<Link> getAlternateLinks() {
|
public List<Link> getAlternateLinks() {
|
||||||
if (alternateLinks == null) {
|
if (alternateLinks == null) {
|
||||||
|
@ -145,8 +144,8 @@ public class Entry implements Cloneable, Serializable, Extendable {
|
||||||
* Sets the entry contents.
|
* Sets the entry contents.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param contents the list of Content elements with the entry contents to
|
* @param contents the list of Content elements with the entry contents to set, an empty list or
|
||||||
* set, an empty list or <b>null</b> if none.
|
* <b>null</b> if none.
|
||||||
*/
|
*/
|
||||||
public void setContents(final List<Content> contents) {
|
public void setContents(final List<Content> contents) {
|
||||||
this.contents = contents;
|
this.contents = contents;
|
||||||
|
@ -156,8 +155,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
|
||||||
* Returns the entry contents.
|
* Returns the entry contents.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of Content elements with the entry contents, an empty list
|
* @return a list of Content elements with the entry contents, an empty list if none.
|
||||||
* if none.
|
|
||||||
*/
|
*/
|
||||||
public List<Content> getContents() {
|
public List<Content> getContents() {
|
||||||
if (contents == null) {
|
if (contents == null) {
|
||||||
|
@ -170,8 +168,8 @@ public class Entry implements Cloneable, Serializable, Extendable {
|
||||||
* Sets the entry contributors.
|
* Sets the entry contributors.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param contributors the list of Person elements with the entry
|
* @param contributors the list of Person elements with the entry contributors to set, an empty
|
||||||
* contributors to set, an empty list or <b>null</b> if none.
|
* list or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public void setContributors(final List<SyndPerson> contributors) {
|
public void setContributors(final List<SyndPerson> contributors) {
|
||||||
|
@ -182,8 +180,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
|
||||||
* Returns the entry contributors.
|
* Returns the entry contributors.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of Person elements with the entry contributors, an empty
|
* @return a list of Person elements with the entry contributors, an empty list if none.
|
||||||
* list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public List<SyndPerson> getContributors() {
|
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
|
* Sets the entry issued date (Atom 0.3, maps to {@link #setPublished(java.util.Date)}).
|
||||||
* {@link #setPublished(java.util.Date)}).
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param issued the entry issued date, <b>null</b> if none.
|
* @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>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the entry issued date, <b>null</b> if none.
|
* @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
|
* Sets the entry modified date (Atom 0.3, maps to {@link #setUpdated(java.util.Date)}).
|
||||||
* {@link #setUpdated(java.util.Date)}).
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param modified the entry modified date, <b>null</b> if none.
|
* @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>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the entry modified date, <b>null</b> if none.
|
* @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.
|
* Sets the entry modules.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param modules the list of ModuleImpl elements with the entry modules to
|
* @param modules the list of ModuleImpl elements with the entry modules to set, an empty list
|
||||||
* set, an empty list or <b>null</b> if none.
|
* or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -373,8 +366,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
|
||||||
* Returns the entry modules.
|
* Returns the entry modules.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of ModuleImpl elements with the entry modules, an emtpy
|
* @return a list of ModuleImpl elements with the entry modules, an emtpy list if none.
|
||||||
* list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -389,8 +381,8 @@ public class Entry implements Cloneable, Serializable, Extendable {
|
||||||
* Sets the entry non-alternate links.
|
* Sets the entry non-alternate links.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param otherLinks the list Link elements with the entry non-alternate
|
* @param otherLinks the list Link elements with the entry non-alternate links to set, an empty
|
||||||
* links to set, an empty list or <b>null</b> if none.
|
* list or <b>null</b> if none.
|
||||||
*/
|
*/
|
||||||
public void setOtherLinks(final List<Link> otherLinks) {
|
public void setOtherLinks(final List<Link> otherLinks) {
|
||||||
this.otherLinks = otherLinks;
|
this.otherLinks = otherLinks;
|
||||||
|
@ -400,8 +392,8 @@ public class Entry implements Cloneable, Serializable, Extendable {
|
||||||
* Returns the entry non-alternate links.
|
* Returns the entry non-alternate links.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the list of Link elements with the entry non-alternate links to
|
* @return the list of Link elements with the entry non-alternate links to set, an empty list if
|
||||||
* set, an empty list if none.
|
* none.
|
||||||
*/
|
*/
|
||||||
public List<Link> getOtherLinks() {
|
public List<Link> getOtherLinks() {
|
||||||
if (otherLinks == null) {
|
if (otherLinks == null) {
|
||||||
|
@ -613,8 +605,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a clone of the object.
|
* @return a clone of the object.
|
||||||
* @throws CloneNotSupportedException thrown if an element of the object
|
* @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
|
||||||
* cannot be cloned.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@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
|
* Indicates whether some other object is "equal to" this one as defined by the Object equals()
|
||||||
* the Object equals() method.
|
* method.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param other he reference object with which to compare.
|
* @param other he reference object with which to compare.
|
||||||
|
|
|
@ -65,8 +65,7 @@ public class Feed extends WireFeed {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Feed Constructor. All properties, except the type, are set to
|
* Feed Constructor. All properties, except the type, are set to <b>null</b>.
|
||||||
* <b>null</b>.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param type the type of the Atom feed.
|
* @param type the type of the Atom feed.
|
||||||
|
@ -152,8 +151,7 @@ public class Feed extends WireFeed {
|
||||||
* Returns the feed alternate links.
|
* Returns the feed alternate links.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of Link elements with the feed alternate links, an empty
|
* @return a list of Link elements with the feed alternate links, an empty list if none.
|
||||||
* list if none.
|
|
||||||
*/
|
*/
|
||||||
public List<Link> getAlternateLinks() {
|
public List<Link> getAlternateLinks() {
|
||||||
if (alternateLinks == null) {
|
if (alternateLinks == null) {
|
||||||
|
@ -166,8 +164,8 @@ public class Feed extends WireFeed {
|
||||||
* Sets the feed alternate links.
|
* Sets the feed alternate links.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param alternateLinks the list of Link elements with the feed alternate
|
* @param alternateLinks the list of Link elements with the feed alternate links to set, an
|
||||||
* links to set, an empty list or <b>null</b> if none.
|
* empty list or <b>null</b> if none.
|
||||||
*/
|
*/
|
||||||
public void setAlternateLinks(final List<Link> alternateLinks) {
|
public void setAlternateLinks(final List<Link> alternateLinks) {
|
||||||
this.alternateLinks = alternateLinks;
|
this.alternateLinks = alternateLinks;
|
||||||
|
@ -177,8 +175,8 @@ public class Feed extends WireFeed {
|
||||||
* Returns the feed other links (non-alternate ones).
|
* Returns the feed other links (non-alternate ones).
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of Link elements with the feed other links (non-alternate
|
* @return a list of Link elements with the feed other links (non-alternate ones), an empty list
|
||||||
* ones), an empty list if none.
|
* if none.
|
||||||
*/
|
*/
|
||||||
public List<Link> getOtherLinks() {
|
public List<Link> getOtherLinks() {
|
||||||
if (otherLinks == null) {
|
if (otherLinks == null) {
|
||||||
|
@ -191,9 +189,8 @@ public class Feed extends WireFeed {
|
||||||
* Sets the feed other links (non-alternate ones).
|
* Sets the feed other links (non-alternate ones).
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param otherLinks the list of Link elements with the feed other links
|
* @param otherLinks the list of Link elements with the feed other links (non-alternate ones) to
|
||||||
* (non-alternate ones) to set, an empty list or <b>null</b> if
|
* set, an empty list or <b>null</b> if none.
|
||||||
* none.
|
|
||||||
*/
|
*/
|
||||||
public void setOtherLinks(final List<Link> otherLinks) {
|
public void setOtherLinks(final List<Link> otherLinks) {
|
||||||
this.otherLinks = otherLinks;
|
this.otherLinks = otherLinks;
|
||||||
|
@ -228,8 +225,7 @@ public class Feed extends WireFeed {
|
||||||
* Returns the feed contributors.
|
* Returns the feed contributors.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of Person elements with the feed contributors, an empty
|
* @return a list of Person elements with the feed contributors, an empty list if none.
|
||||||
* list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public List<SyndPerson> getContributors() {
|
public List<SyndPerson> getContributors() {
|
||||||
|
@ -243,8 +239,8 @@ public class Feed extends WireFeed {
|
||||||
* Sets the feed contributors.
|
* Sets the feed contributors.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param contributors the list of Person elements with the feed
|
* @param contributors the list of Person elements with the feed contributors to set, an empty
|
||||||
* contributors to set, an empty list or <b>null</b> if none.
|
* list or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public void setContributors(final List<SyndPerson> contributors) {
|
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
|
* Sets the feed copyright (Atom 0.3, maps to {@link #setRights(java.lang.String)}).
|
||||||
* {@link #setRights(java.lang.String)}).
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param copyright the feed copyright to set, <b>null</b> if none.
|
* @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
|
* Sets the feed modified date (Atom 0.3, maps to {@link #setUpdated(java.util.Date)}).
|
||||||
* {@link #setUpdated(java.util.Date)}).
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param modified the feed modified date to set, <b>null</b> if none.
|
* @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.
|
* Returns the feed entries.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of Entry elements with the feed entries, an empty list if
|
* @return a list of Entry elements with the feed entries, an empty list if none.
|
||||||
* none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public List<Entry> getEntries() {
|
public List<Entry> getEntries() {
|
||||||
|
@ -397,8 +390,8 @@ public class Feed extends WireFeed {
|
||||||
* Sets the feed entries.
|
* Sets the feed entries.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param entries the list of Entry elements with the feed entries to set,
|
* @param entries the list of Entry elements with the feed entries to set, an empty list or
|
||||||
* an empty list or <b>null</b> if none.
|
* <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public void setEntries(final List<Entry> entries) {
|
public void setEntries(final List<Entry> entries) {
|
||||||
|
@ -409,8 +402,7 @@ public class Feed extends WireFeed {
|
||||||
* Returns the feed modules.
|
* Returns the feed modules.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of ModuleImpl elements with the feed modules, an empty
|
* @return a list of ModuleImpl elements with the feed modules, an empty list if none.
|
||||||
* list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -425,8 +417,8 @@ public class Feed extends WireFeed {
|
||||||
* Sets the feed moduless.
|
* Sets the feed moduless.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param modules the list of ModuleImpl elements with the feed moduless to
|
* @param modules the list of ModuleImpl elements with the feed moduless to set, an empty list
|
||||||
* set, an empty list or <b>null</b> if none.
|
* or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -48,8 +48,7 @@ public class Generator implements Cloneable, Serializable {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a clone of the object.
|
* @return a clone of the object.
|
||||||
* @throws CloneNotSupportedException thrown if an element of the object
|
* @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
|
||||||
* cannot be cloned.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -58,8 +57,8 @@ public class Generator implements Cloneable, Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates whether some other object is "equal to" this one as defined by
|
* Indicates whether some other object is "equal to" this one as defined by the Object equals()
|
||||||
* the Object equals() method.
|
* method.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param other he reference object with which to compare.
|
* @param other he reference object with which to compare.
|
||||||
|
|
|
@ -54,8 +54,7 @@ public class Link implements Cloneable, Serializable {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a clone of the object.
|
* @return a clone of the object.
|
||||||
* @throws CloneNotSupportedException thrown if an element of the object
|
* @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
|
||||||
* cannot be cloned.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -64,8 +63,8 @@ public class Link implements Cloneable, Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates whether some other object is "equal to" this one as defined by
|
* Indicates whether some other object is "equal to" this one as defined by the Object equals()
|
||||||
* the Object equals() method.
|
* method.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param other he reference object with which to compare.
|
* @param other he reference object with which to compare.
|
||||||
|
|
|
@ -59,8 +59,7 @@ public class Person implements SyndPerson, Cloneable, Serializable, Extendable {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a clone of the object.
|
* @return a clone of the object.
|
||||||
* @throws CloneNotSupportedException thrown if an element of the object
|
* @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
|
||||||
* cannot be cloned.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@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
|
* Indicates whether some other object is "equal to" this one as defined by the Object equals()
|
||||||
* the Object equals() method.
|
* method.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param other he reference object with which to compare.
|
* @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.
|
* Returns the entry modules.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of ModuleImpl elements with the entry modules, an emtpy
|
* @return a list of ModuleImpl elements with the entry modules, an emtpy list if none.
|
||||||
* list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -232,8 +230,8 @@ public class Person implements SyndPerson, Cloneable, Serializable, Extendable {
|
||||||
* Sets the entry modules.
|
* Sets the entry modules.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param modules the list of ModuleImpl elements with the entry modules to
|
* @param modules the list of ModuleImpl elements with the entry modules to set, an empty list
|
||||||
* set, an empty list or <b>null</b> if none.
|
* or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -45,11 +45,14 @@ public class BeanIntrospector {
|
||||||
private static final String BOOLEAN_GETTER = "is";
|
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
|
* @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.
|
* @return All {@link PropertyDescriptor} for properties with getters and setters for the given
|
||||||
* @throws IntrospectionException When the extraction of the desired {@link PropertyDescriptor}s failed
|
* class.
|
||||||
|
* @throws IntrospectionException When the extraction of the desired {@link PropertyDescriptor}s
|
||||||
|
* failed
|
||||||
*/
|
*/
|
||||||
private static synchronized PropertyDescriptor[] getPropertyDescriptors(final Class<?> clazz) throws IntrospectionException {
|
private static synchronized PropertyDescriptor[] getPropertyDescriptors(final Class<?> clazz) throws IntrospectionException {
|
||||||
PropertyDescriptor[] descriptors = introspected.get(clazz);
|
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
|
* @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.
|
* @return All {@link PropertyDescriptor}s for properties with a getter that does not come from
|
||||||
* @throws IntrospectionException When the extraction of the desired {@link PropertyDescriptor}s failed
|
* {@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 {
|
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
|
* Extract all {@link PropertyDescriptor}s for properties with a getter (that does not come from
|
||||||
* setter.
|
* {@link Object} and does not accept parameters) and a setter.
|
||||||
*
|
*
|
||||||
* @param clazz The class to extract the desired {@link PropertyDescriptor}s from
|
* @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
|
* @return All {@link PropertyDescriptor}s for properties with a getter (that does not come from
|
||||||
* setter.
|
* {@link Object} and does not accept parameters) and a setter.
|
||||||
* @throws IntrospectionException When the extraction of the desired {@link PropertyDescriptor}s failed
|
* @throws IntrospectionException When the extraction of the desired {@link PropertyDescriptor}s
|
||||||
|
* failed
|
||||||
*/
|
*/
|
||||||
public static List<PropertyDescriptor> getPropertyDescriptorsWithGettersAndSetters(final Class<?> clazz) throws IntrospectionException {
|
public static List<PropertyDescriptor> getPropertyDescriptorsWithGettersAndSetters(final Class<?> clazz) throws IntrospectionException {
|
||||||
|
|
||||||
|
|
|
@ -36,8 +36,8 @@ import org.slf4j.LoggerFactory;
|
||||||
/**
|
/**
|
||||||
* Provides deep <b>Bean</b> clonning support.
|
* Provides deep <b>Bean</b> clonning support.
|
||||||
* <p>
|
* <p>
|
||||||
* It works on all read/write properties, recursively. It support all primitive types, Strings, Collections, Cloneable objects and multi-dimensional arrays of
|
* It works on all read/write properties, recursively. It support all primitive types, Strings,
|
||||||
* any of them.
|
* Collections, Cloneable objects and multi-dimensional arrays of any of them.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @author Alejandro Abdelnur
|
* @author Alejandro Abdelnur
|
||||||
|
@ -109,9 +109,11 @@ public class CloneableBean implements Serializable, Cloneable {
|
||||||
/**
|
/**
|
||||||
* Creates a CloneableBean to be used in a delegation pattern.
|
* Creates a CloneableBean to be used in a delegation pattern.
|
||||||
* <p>
|
* <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
|
* The property names in the ignoreProperties Set will not be copied into the cloned instance.
|
||||||
* properties (properties that are actually references to other properties or properties of properties). For example SyndFeed and SyndEntry beans have
|
* This is useful for cases where the Bean has convenience properties (properties that are
|
||||||
* convenience properties, publishedDate, author, copyright and categories all of them mapped to properties in the DC Module.
|
* 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>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param obj object bean to clone.
|
* @param obj object bean to clone.
|
||||||
|
@ -130,8 +132,8 @@ public class CloneableBean implements Serializable, Cloneable {
|
||||||
/**
|
/**
|
||||||
* Makes a deep bean clone of the object.
|
* Makes a deep bean clone of the object.
|
||||||
* <p>
|
* <p>
|
||||||
* To be used by classes extending CloneableBean. Although it works also for classes using CloneableBean in a delegation pattern, for correctness those
|
* To be used by classes extending CloneableBean. Although it works also for classes using
|
||||||
* classes should use the
|
* CloneableBean in a delegation pattern, for correctness those classes should use the
|
||||||
*
|
*
|
||||||
* @see #beanClone() beanClone method.
|
* @see #beanClone() beanClone method.
|
||||||
* <p>
|
* <p>
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
package com.sun.syndication.feed.impl;
|
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
|
* This class addresses some ClassLoader problems in OSGi environments. If you have ClassLoader
|
||||||
* {@link #setClassLoader(ClassLoader)} method before calling any ROME code. Unfortunately I don't know whether this works because I have absolutely no
|
* problems, simply override the default ClassLoader by calling the
|
||||||
* experience with OSGi.
|
* {@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
|
* @author Patrick Gotthard
|
||||||
*
|
*
|
||||||
|
@ -17,7 +18,8 @@ public enum ConfigurableClassLoader {
|
||||||
/**
|
/**
|
||||||
* Get the configured ClassLoader. Returns
|
* 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() {
|
public ClassLoader getClassLoader() {
|
||||||
if (classLoader == null) {
|
if (classLoader == null) {
|
||||||
|
|
|
@ -25,8 +25,8 @@ import java.util.List;
|
||||||
/**
|
/**
|
||||||
* Provides deep <b>Bean</b> equals() and hashCode() functionality for Java Beans.
|
* Provides deep <b>Bean</b> equals() and hashCode() functionality for Java Beans.
|
||||||
* <p>
|
* <p>
|
||||||
* It works on all read/write properties, recursively. It support all primitive types, Strings, Collections, bean-like objects and multi-dimensional arrays of
|
* It works on all read/write properties, recursively. It support all primitive types, Strings,
|
||||||
* any of them.
|
* Collections, bean-like objects and multi-dimensional arrays of any of them.
|
||||||
* <p>
|
* <p>
|
||||||
* The hashcode is calculated by getting the hashcode of the Bean String representation.
|
* The hashcode is calculated by getting the hashcode of the Bean String representation.
|
||||||
* <p>
|
* <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>
|
* <p>
|
||||||
* To be used by classes extending EqualsBean. Although it works also for classes using EqualsBean in a delegation pattern, for correctness those classes
|
* To be used by classes extending EqualsBean. Although it works also for classes using
|
||||||
* should use the
|
* EqualsBean in a delegation pattern, for correctness those classes should use the
|
||||||
*
|
*
|
||||||
* @see #beanEquals(Object) beanEquals method.
|
* @see #beanEquals(Object) beanEquals method.
|
||||||
* <p>
|
* <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>
|
* <p>
|
||||||
* To be used by classes using EqualsBean in a delegation pattern,
|
* To be used by classes using EqualsBean in a delegation pattern,
|
||||||
*
|
*
|
||||||
|
@ -170,8 +172,8 @@ public class EqualsBean implements Serializable {
|
||||||
* <p>
|
* <p>
|
||||||
* The hashcode is calculated by getting the hashcode of the Bean String representation.
|
* The hashcode is calculated by getting the hashcode of the Bean String representation.
|
||||||
* <p>
|
* <p>
|
||||||
* To be used by classes extending EqualsBean. Although it works also for classes using EqualsBean in a delegation pattern, for correctness those classes
|
* To be used by classes extending EqualsBean. Although it works also for classes using
|
||||||
* should use the
|
* EqualsBean in a delegation pattern, for correctness those classes should use the
|
||||||
*
|
*
|
||||||
* @see #beanHashCode() beanHashCode method.
|
* @see #beanHashCode() beanHashCode method.
|
||||||
* <p>
|
* <p>
|
||||||
|
|
|
@ -20,7 +20,8 @@ import java.io.Serializable;
|
||||||
import java.util.Set;
|
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>
|
* <p>
|
||||||
* It works on all read/write properties, recursively.
|
* It works on all read/write properties, recursively.
|
||||||
* <p>
|
* <p>
|
||||||
|
@ -28,9 +29,10 @@ import java.util.Set;
|
||||||
* <p>
|
* <p>
|
||||||
* <h3>ObjectBean programming conventions</h3>
|
* <h3>ObjectBean programming conventions</h3>
|
||||||
* <P>
|
* <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
|
* All ObjectBean subclasses having properties that return collections they should never return null
|
||||||
* collection has not been set. They should create and return an empty collection, this empty collection instance should also be set to the corresponding
|
* if the property has been set to <b>null</b> or if a collection has not been set. They should
|
||||||
* property.
|
* create and return an empty collection, this empty collection instance should also be set to the
|
||||||
|
* corresponding property.
|
||||||
* <P>
|
* <P>
|
||||||
* All ObjectBean subclasses properties should be live references.
|
* All ObjectBean subclasses properties should be live references.
|
||||||
* <p>
|
* <p>
|
||||||
|
@ -60,9 +62,11 @@ public class ObjectBean implements Serializable, Cloneable {
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
* <p>
|
* <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
|
* The property names in the ignoreProperties Set will not be copied into the cloned instance.
|
||||||
* properties (properties that are actually references to other properties or properties of properties). For example SyndFeed and SyndEntry beans have
|
* This is useful for cases where the Bean has convenience properties (properties that are
|
||||||
* convenience properties, publishedDate, author, copyright and categories all of them mapped to properties in the DC Module.
|
* 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>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param beanClass the class/interface to be used for property scanning.
|
* @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>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param other he reference object with which to compare.
|
* @param other he reference object with which to compare.
|
||||||
|
|
|
@ -33,8 +33,8 @@ import org.slf4j.LoggerFactory;
|
||||||
/**
|
/**
|
||||||
* Provides deep <b>Bean</b> toString support.
|
* Provides deep <b>Bean</b> toString support.
|
||||||
* <p>
|
* <p>
|
||||||
* It works on all read/write properties, recursively. It support all primitive types, Strings, Collections, ToString objects and multi-dimensional arrays of
|
* It works on all read/write properties, recursively. It support all primitive types, Strings,
|
||||||
* any of them.
|
* Collections, ToString objects and multi-dimensional arrays of any of them.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @author Alejandro Abdelnur
|
* @author Alejandro Abdelnur
|
||||||
|
|
|
@ -23,8 +23,7 @@ import java.util.List;
|
||||||
* Dublin Core Module.
|
* Dublin Core Module.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @see <a href="http://web.resource.org/rss/1.0/modules/dc/">Dublin Core
|
* @see <a href="http://web.resource.org/rss/1.0/modules/dc/">Dublin Core module</a>.
|
||||||
* module</a>.
|
|
||||||
* @author Alejandro Abdelnur
|
* @author Alejandro Abdelnur
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -40,8 +39,7 @@ public interface DCModule extends Module {
|
||||||
* Returns the DublinCore module titles.
|
* Returns the DublinCore module titles.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of Strings representing the DublinCore module title, an
|
* @return a list of Strings representing the DublinCore module title, an empty list if none.
|
||||||
* empty list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
List<String> getTitles();
|
List<String> getTitles();
|
||||||
|
@ -50,15 +48,15 @@ public interface DCModule extends Module {
|
||||||
* Sets the DublinCore module titles.
|
* Sets the DublinCore module titles.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param titles the list of String representing the DublinCore module
|
* @param titles the list of String representing the DublinCore module titles to set, an empty
|
||||||
* titles to set, an empty list or <b>null</b> if none.
|
* list or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void setTitles(List<String> titles);
|
void setTitles(List<String> titles);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the DublinCore module title. Convenience method that can be used to
|
* Gets the DublinCore module title. Convenience method that can be used to obtain the first
|
||||||
* obtain the first item, <b>null</b> if none.
|
* item, <b>null</b> if none.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the first DublinCore module title, <b>null</b> if none.
|
* @return the first DublinCore module title, <b>null</b> if none.
|
||||||
|
@ -66,8 +64,8 @@ public interface DCModule extends Module {
|
||||||
String getTitle();
|
String getTitle();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the DublinCore module title. Convenience method that can be used
|
* Sets the DublinCore module title. Convenience method that can be used when there is only one
|
||||||
* when there is only one title to set.
|
* title to set.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param title the DublinCore module title to set, <b>null</b> if none.
|
* @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.
|
* Returns the DublinCore module creator.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of Strings representing the DublinCore module creator, an
|
* @return a list of Strings representing the DublinCore module creator, an empty list if none.
|
||||||
* empty list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
List<String> getCreators();
|
List<String> getCreators();
|
||||||
|
@ -89,15 +86,15 @@ public interface DCModule extends Module {
|
||||||
* Sets the DublinCore module creators.
|
* Sets the DublinCore module creators.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param creators the list of String representing the DublinCore module
|
* @param creators the list of String representing the DublinCore module creators to set, an
|
||||||
* creators to set, an empty list or <b>null</b> if none.
|
* empty list or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void setCreators(List<String> creators);
|
void setCreators(List<String> creators);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the DublinCore module creator. Convenience method that can be used
|
* Gets the DublinCore module creator. Convenience method that can be used to obtain the first
|
||||||
* to obtain the first item, <b>null</b> if none.
|
* item, <b>null</b> if none.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the first DublinCore module creator, <b>null</b> if none.
|
* @return the first DublinCore module creator, <b>null</b> if none.
|
||||||
|
@ -105,8 +102,8 @@ public interface DCModule extends Module {
|
||||||
String getCreator();
|
String getCreator();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the DublinCore module creator. Convenience method that can be used
|
* Sets the DublinCore module creator. Convenience method that can be used when there is only
|
||||||
* when there is only one creator to set.
|
* one creator to set.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param creator the DublinCore module creator to set, <b>null</b> if none.
|
* @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.
|
* Returns the DublinCore module subjects.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of DCSubject elements with the DublinCore module subjects,
|
* @return a list of DCSubject elements with the DublinCore module subjects, an empty list if
|
||||||
* an empty list if none.
|
* none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
List<DCSubject> getSubjects();
|
List<DCSubject> getSubjects();
|
||||||
|
@ -128,15 +125,15 @@ public interface DCModule extends Module {
|
||||||
* Sets the DublinCore module subjects.
|
* Sets the DublinCore module subjects.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param subjects the list of DCSubject elements with the DublinCore module
|
* @param subjects the list of DCSubject elements with the DublinCore module subjects to set, an
|
||||||
* subjects to set, an empty list or <b>null</b> if none.
|
* empty list or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void setSubjects(List<DCSubject> subjects);
|
void setSubjects(List<DCSubject> subjects);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the DublinCore module subject. Convenience method that can be used
|
* Gets the DublinCore module subject. Convenience method that can be used to obtain the first
|
||||||
* to obtain the first item, <b>null</b> if none.
|
* item, <b>null</b> if none.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the first DublinCore module subject, <b>null</b> if none.
|
* @return the first DublinCore module subject, <b>null</b> if none.
|
||||||
|
@ -144,8 +141,8 @@ public interface DCModule extends Module {
|
||||||
DCSubject getSubject();
|
DCSubject getSubject();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the DCSubject element. Convenience method that can be used when
|
* Sets the DCSubject element. Convenience method that can be used when there is only one
|
||||||
* there is only one subject to set.
|
* subject to set.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param subject the DublinCore module subject to set, <b>null</b> if none.
|
* @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.
|
* Returns the DublinCore module description.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of Strings representing the DublinCore module description,
|
* @return a list of Strings representing the DublinCore module description, an empty list if
|
||||||
* an empty list if none.
|
* none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
List<String> getDescriptions();
|
List<String> getDescriptions();
|
||||||
|
@ -167,15 +164,15 @@ public interface DCModule extends Module {
|
||||||
* Sets the DublinCore module descriptions.
|
* Sets the DublinCore module descriptions.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param descriptions the list of String representing the DublinCore module
|
* @param descriptions the list of String representing the DublinCore module descriptions to
|
||||||
* descriptions to set, an empty list or <b>null</b> if none.
|
* set, an empty list or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void setDescriptions(List<String> descriptions);
|
void setDescriptions(List<String> descriptions);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the DublinCore module description. Convenience method that can be
|
* Gets the DublinCore module description. Convenience method that can be used to obtain the
|
||||||
* used to obtain the first item, <b>null</b> if none.
|
* first item, <b>null</b> if none.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the first DublinCore module description, <b>null</b> if none.
|
* @return the first DublinCore module description, <b>null</b> if none.
|
||||||
|
@ -183,12 +180,11 @@ public interface DCModule extends Module {
|
||||||
String getDescription();
|
String getDescription();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the DublinCore module description. Convenience method that can be
|
* Sets the DublinCore module description. Convenience method that can be used when there is
|
||||||
* used when there is only one description to set.
|
* only one description to set.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param description the DublinCore module description to set, <b>null</b>
|
* @param description the DublinCore module description to set, <b>null</b> if none.
|
||||||
* if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void setDescription(String description);
|
void setDescription(String description);
|
||||||
|
@ -197,8 +193,8 @@ public interface DCModule extends Module {
|
||||||
* Returns the DublinCore module publisher.
|
* Returns the DublinCore module publisher.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of Strings representing the DublinCore module publisher,
|
* @return a list of Strings representing the DublinCore module publisher, an empty list if
|
||||||
* an empty list if none.
|
* none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
List<String> getPublishers();
|
List<String> getPublishers();
|
||||||
|
@ -207,15 +203,15 @@ public interface DCModule extends Module {
|
||||||
* Sets the DublinCore module publishers.
|
* Sets the DublinCore module publishers.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param publishers the list of String representing the DublinCore module
|
* @param publishers the list of String representing the DublinCore module publishers to set, an
|
||||||
* publishers to set, an empty list or <b>null</b> if none.
|
* empty list or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void setPublishers(List<String> publishers);
|
void setPublishers(List<String> publishers);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the DublinCore module publisher. Convenience method that can be used
|
* Gets the DublinCore module publisher. Convenience method that can be used to obtain the first
|
||||||
* to obtain the first item, <b>null</b> if none.
|
* item, <b>null</b> if none.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the first DublinCore module publisher, <b>null</b> if none.
|
* @return the first DublinCore module publisher, <b>null</b> if none.
|
||||||
|
@ -223,12 +219,11 @@ public interface DCModule extends Module {
|
||||||
String getPublisher();
|
String getPublisher();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the DublinCore module publisher. Convenience method that can be used
|
* Sets the DublinCore module publisher. Convenience method that can be used when there is only
|
||||||
* when there is only one publisher to set.
|
* one publisher to set.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param publisher the DublinCore module publisher to set, <b>null</b> if
|
* @param publisher the DublinCore module publisher to set, <b>null</b> if none.
|
||||||
* none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void setPublisher(String publisher);
|
void setPublisher(String publisher);
|
||||||
|
@ -237,8 +232,8 @@ public interface DCModule extends Module {
|
||||||
* Returns the DublinCore module contributor.
|
* Returns the DublinCore module contributor.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of Strings representing the DublinCore module contributor,
|
* @return a list of Strings representing the DublinCore module contributor, an empty list if
|
||||||
* an empty list if none.
|
* none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
List<String> getContributors();
|
List<String> getContributors();
|
||||||
|
@ -247,15 +242,15 @@ public interface DCModule extends Module {
|
||||||
* Sets the DublinCore module contributors.
|
* Sets the DublinCore module contributors.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param contributors the list of String representing the DublinCore module
|
* @param contributors the list of String representing the DublinCore module contributors to
|
||||||
* contributors to set, an empty list or <b>null</b> if none.
|
* set, an empty list or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void setContributors(List<String> contributors);
|
void setContributors(List<String> contributors);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the DublinCore module contributor. Convenience method that can be
|
* Gets the DublinCore module contributor. Convenience method that can be used to obtain the
|
||||||
* used to obtain the first item, <b>null</b> if none.
|
* first item, <b>null</b> if none.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the first DublinCore module contributor, <b>null</b> if none.
|
* @return the first DublinCore module contributor, <b>null</b> if none.
|
||||||
|
@ -263,12 +258,11 @@ public interface DCModule extends Module {
|
||||||
String getContributor();
|
String getContributor();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the DublinCore module contributor. Convenience method that can be
|
* Sets the DublinCore module contributor. Convenience method that can be used when there is
|
||||||
* used when there is only one contributor to set.
|
* only one contributor to set.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param contributor the DublinCore module contributor to set, <b>null</b>
|
* @param contributor the DublinCore module contributor to set, <b>null</b> if none.
|
||||||
* if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void setContributor(String contributor);
|
void setContributor(String contributor);
|
||||||
|
@ -277,8 +271,7 @@ public interface DCModule extends Module {
|
||||||
* Returns the DublinCore module date.
|
* Returns the DublinCore module date.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of Strings representing the DublinCore module date, an
|
* @return a list of Strings representing the DublinCore module date, an empty list if none.
|
||||||
* empty list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
List<Date> getDates();
|
List<Date> getDates();
|
||||||
|
@ -287,15 +280,15 @@ public interface DCModule extends Module {
|
||||||
* Sets the DublinCore module dates.
|
* Sets the DublinCore module dates.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param dates the list of Date representing the DublinCore module dates to
|
* @param dates the list of Date representing the DublinCore module dates to set, an empty list
|
||||||
* set, an empty list or <b>null</b> if none.
|
* or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void setDates(List<Date> dates);
|
void setDates(List<Date> dates);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the DublinCore module date. Convenience method that can be used to
|
* Gets the DublinCore module date. Convenience method that can be used to obtain the first
|
||||||
* obtain the first item, <b>null</b> if none.
|
* item, <b>null</b> if none.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the first DublinCore module date, <b>null</b> if none.
|
* @return the first DublinCore module date, <b>null</b> if none.
|
||||||
|
@ -303,8 +296,8 @@ public interface DCModule extends Module {
|
||||||
Date getDate();
|
Date getDate();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the DublinCore module date. Convenience method that can be used when
|
* Sets the DublinCore module date. Convenience method that can be used when there is only one
|
||||||
* there is only one date to set.
|
* date to set.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param date the DublinCore module date to set, <b>null</b> if none.
|
* @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.
|
* Returns the DublinCore module type.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of Strings representing the DublinCore module type, an
|
* @return a list of Strings representing the DublinCore module type, an empty list if none.
|
||||||
* empty list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
List<String> getTypes();
|
List<String> getTypes();
|
||||||
|
@ -326,15 +318,15 @@ public interface DCModule extends Module {
|
||||||
* Sets the DublinCore module types.
|
* Sets the DublinCore module types.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param types the list of String representing the DublinCore module types
|
* @param types the list of String representing the DublinCore module types to set, an empty
|
||||||
* to set, an empty list or <b>null</b> if none.
|
* list or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void setTypes(List<String> types);
|
void setTypes(List<String> types);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the DublinCore module type. Convenience method that can be used to
|
* Gets the DublinCore module type. Convenience method that can be used to obtain the first
|
||||||
* obtain the first item, <b>null</b> if none.
|
* item, <b>null</b> if none.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the first DublinCore module type, <b>null</b> if none.
|
* @return the first DublinCore module type, <b>null</b> if none.
|
||||||
|
@ -342,8 +334,8 @@ public interface DCModule extends Module {
|
||||||
String getType();
|
String getType();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the DublinCore module type. Convenience method that can be used when
|
* Sets the DublinCore module type. Convenience method that can be used when there is only one
|
||||||
* there is only one type to set.
|
* type to set.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param type the DublinCore module type to set, <b>null</b> if none.
|
* @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.
|
* Returns the DublinCore module format.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of Strings representing the DublinCore module format, an
|
* @return a list of Strings representing the DublinCore module format, an empty list if none.
|
||||||
* empty list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
List<String> getFormats();
|
List<String> getFormats();
|
||||||
|
@ -365,15 +356,15 @@ public interface DCModule extends Module {
|
||||||
* Sets the DublinCore module formats.
|
* Sets the DublinCore module formats.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param formats the list of String representing the DublinCore module
|
* @param formats the list of String representing the DublinCore module formats to set, an empty
|
||||||
* formats to set, an empty list or <b>null</b> if none.
|
* list or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void setFormats(List<String> formats);
|
void setFormats(List<String> formats);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the DublinCore module format. Convenience method that can be used to
|
* Gets the DublinCore module format. Convenience method that can be used to obtain the first
|
||||||
* obtain the first item, <b>null</b> if none.
|
* item, <b>null</b> if none.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the first DublinCore module format, <b>null</b> if none.
|
* @return the first DublinCore module format, <b>null</b> if none.
|
||||||
|
@ -381,8 +372,8 @@ public interface DCModule extends Module {
|
||||||
String getFormat();
|
String getFormat();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the DublinCore module format. Convenience method that can be used
|
* Sets the DublinCore module format. Convenience method that can be used when there is only one
|
||||||
* when there is only one format to set.
|
* format to set.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param format the DublinCore module format to set, <b>null</b> if none.
|
* @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.
|
* Returns the DublinCore module identifier.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of Strings representing the DublinCore module identifier,
|
* @return a list of Strings representing the DublinCore module identifier, an empty list if
|
||||||
* an empty list if none.
|
* none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
List<String> getIdentifiers();
|
List<String> getIdentifiers();
|
||||||
|
@ -404,15 +395,15 @@ public interface DCModule extends Module {
|
||||||
* Sets the DublinCore module identifiers.
|
* Sets the DublinCore module identifiers.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param identifiers the list of String representing the DublinCore module
|
* @param identifiers the list of String representing the DublinCore module identifiers to set,
|
||||||
* identifiers to set, an empty list or <b>null</b> if none.
|
* an empty list or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void setIdentifiers(List<String> identifiers);
|
void setIdentifiers(List<String> identifiers);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the DublinCore module identifier. Convenience method that can be
|
* Gets the DublinCore module identifier. Convenience method that can be used to obtain the
|
||||||
* used to obtain the first item, <b>null</b> if none.
|
* first item, <b>null</b> if none.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the first DublinCore module identifier, <b>null</b> if none.
|
* @return the first DublinCore module identifier, <b>null</b> if none.
|
||||||
|
@ -420,12 +411,11 @@ public interface DCModule extends Module {
|
||||||
String getIdentifier();
|
String getIdentifier();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the DublinCore module identifier. Convenience method that can be
|
* Sets the DublinCore module identifier. Convenience method that can be used when there is only
|
||||||
* used when there is only one identifier to set.
|
* one identifier to set.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param identifier the DublinCore module identifier to set, <b>null</b> if
|
* @param identifier the DublinCore module identifier to set, <b>null</b> if none.
|
||||||
* none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void setIdentifier(String identifier);
|
void setIdentifier(String identifier);
|
||||||
|
@ -434,8 +424,7 @@ public interface DCModule extends Module {
|
||||||
* Returns the DublinCore module source.
|
* Returns the DublinCore module source.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of Strings representing the DublinCore module source, an
|
* @return a list of Strings representing the DublinCore module source, an empty list if none.
|
||||||
* empty list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
List<String> getSources();
|
List<String> getSources();
|
||||||
|
@ -444,15 +433,15 @@ public interface DCModule extends Module {
|
||||||
* Sets the DublinCore module sources.
|
* Sets the DublinCore module sources.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param sources the list of String representing the DublinCore module
|
* @param sources the list of String representing the DublinCore module sources to set, an empty
|
||||||
* sources to set, an empty list or <b>null</b> if none.
|
* list or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void setSources(List<String> sources);
|
void setSources(List<String> sources);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the DublinCore module subject. Convenience method that can be used
|
* Gets the DublinCore module subject. Convenience method that can be used to obtain the first
|
||||||
* to obtain the first item, <b>null</b> if none.
|
* item, <b>null</b> if none.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the first DublinCore module creator, <b>null</b> if none.
|
* @return the first DublinCore module creator, <b>null</b> if none.
|
||||||
|
@ -460,8 +449,8 @@ public interface DCModule extends Module {
|
||||||
String getSource();
|
String getSource();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the DublinCore module source. Convenience method that can be used
|
* Sets the DublinCore module source. Convenience method that can be used when there is only one
|
||||||
* when there is only one source to set.
|
* source to set.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param source the DublinCore module source to set, <b>null</b> if none.
|
* @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.
|
* Returns the DublinCore module language.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of Strings representing the DublinCore module language, an
|
* @return a list of Strings representing the DublinCore module language, an empty list if none.
|
||||||
* empty list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
List<String> getLanguages();
|
List<String> getLanguages();
|
||||||
|
@ -483,15 +471,15 @@ public interface DCModule extends Module {
|
||||||
* Sets the DublinCore module languages.
|
* Sets the DublinCore module languages.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param languages the list of String representing the DublinCore module
|
* @param languages the list of String representing the DublinCore module languages to set, an
|
||||||
* languages to set, an empty list or <b>null</b> if none.
|
* empty list or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void setLanguages(List<String> languages);
|
void setLanguages(List<String> languages);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the DublinCore module language. Convenience method that can be used
|
* Gets the DublinCore module language. Convenience method that can be used to obtain the first
|
||||||
* to obtain the first item, <b>null</b> if none.
|
* item, <b>null</b> if none.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the first DublinCore module language, <b>null</b> if none.
|
* @return the first DublinCore module language, <b>null</b> if none.
|
||||||
|
@ -499,12 +487,11 @@ public interface DCModule extends Module {
|
||||||
String getLanguage();
|
String getLanguage();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the DublinCore module language. Convenience method that can be used
|
* Sets the DublinCore module language. Convenience method that can be used when there is only
|
||||||
* when there is only one language to set.
|
* one language to set.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param language the DublinCore module language to set, <b>null</b> if
|
* @param language the DublinCore module language to set, <b>null</b> if none.
|
||||||
* none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void setLanguage(String language);
|
void setLanguage(String language);
|
||||||
|
@ -513,8 +500,7 @@ public interface DCModule extends Module {
|
||||||
* Returns the DublinCore module relation.
|
* Returns the DublinCore module relation.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of Strings representing the DublinCore module relation, an
|
* @return a list of Strings representing the DublinCore module relation, an empty list if none.
|
||||||
* empty list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
List<String> getRelations();
|
List<String> getRelations();
|
||||||
|
@ -523,15 +509,15 @@ public interface DCModule extends Module {
|
||||||
* Sets the DublinCore module relations.
|
* Sets the DublinCore module relations.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param relations the list of String representing the DublinCore module
|
* @param relations the list of String representing the DublinCore module relations to set, an
|
||||||
* relations to set, an empty list or <b>null</b> if none.
|
* empty list or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void setRelations(List<String> relations);
|
void setRelations(List<String> relations);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the DublinCore module relation. Convenience method that can be used
|
* Gets the DublinCore module relation. Convenience method that can be used to obtain the first
|
||||||
* to obtain the first item, <b>null</b> if none.
|
* item, <b>null</b> if none.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the first DublinCore module relation, <b>null</b> if none.
|
* @return the first DublinCore module relation, <b>null</b> if none.
|
||||||
|
@ -539,12 +525,11 @@ public interface DCModule extends Module {
|
||||||
String getRelation();
|
String getRelation();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the DublinCore module relation. Convenience method that can be used
|
* Sets the DublinCore module relation. Convenience method that can be used when there is only
|
||||||
* when there is only one relation to set.
|
* one relation to set.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param relation the DublinCore module relation to set, <b>null</b> if
|
* @param relation the DublinCore module relation to set, <b>null</b> if none.
|
||||||
* none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void setRelation(String relation);
|
void setRelation(String relation);
|
||||||
|
@ -553,8 +538,7 @@ public interface DCModule extends Module {
|
||||||
* Returns the DublinCore module coverage.
|
* Returns the DublinCore module coverage.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of Strings representing the DublinCore module coverage, an
|
* @return a list of Strings representing the DublinCore module coverage, an empty list if none.
|
||||||
* empty list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
List<String> getCoverages();
|
List<String> getCoverages();
|
||||||
|
@ -563,15 +547,15 @@ public interface DCModule extends Module {
|
||||||
* Sets the DublinCore module coverages.
|
* Sets the DublinCore module coverages.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param coverages the list of String representing the DublinCore module
|
* @param coverages the list of String representing the DublinCore module coverages to set, an
|
||||||
* coverages to set, an empty list or <b>null</b> if none.
|
* empty list or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void setCoverages(List<String> coverages);
|
void setCoverages(List<String> coverages);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the DublinCore module coverage. Convenience method that can be used
|
* Gets the DublinCore module coverage. Convenience method that can be used to obtain the first
|
||||||
* to obtain the first item, <b>null</b> if none.
|
* item, <b>null</b> if none.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the first DublinCore module coverage, <b>null</b> if none.
|
* @return the first DublinCore module coverage, <b>null</b> if none.
|
||||||
|
@ -579,12 +563,11 @@ public interface DCModule extends Module {
|
||||||
String getCoverage();
|
String getCoverage();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the DublinCore module coverage. Convenience method that can be used
|
* Sets the DublinCore module coverage. Convenience method that can be used when there is only
|
||||||
* when there is only one coverage to set.
|
* one coverage to set.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param coverage the DublinCore module coverage to set, <b>null</b> if
|
* @param coverage the DublinCore module coverage to set, <b>null</b> if none.
|
||||||
* none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void setCoverage(String coverage);
|
void setCoverage(String coverage);
|
||||||
|
@ -593,8 +576,7 @@ public interface DCModule extends Module {
|
||||||
* Returns the DublinCore module rights.
|
* Returns the DublinCore module rights.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of Strings representing the DublinCore module rights, an
|
* @return a list of Strings representing the DublinCore module rights, an empty list if none.
|
||||||
* empty list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
List<String> getRightsList();
|
List<String> getRightsList();
|
||||||
|
@ -603,15 +585,15 @@ public interface DCModule extends Module {
|
||||||
* Sets the DublinCore module rightss.
|
* Sets the DublinCore module rightss.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param rights the list of String representing the DublinCore module
|
* @param rights the list of String representing the DublinCore module rights to set, an empty
|
||||||
* rights to set, an empty list or <b>null</b> if none.
|
* list or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void setRightsList(List<String> rights);
|
void setRightsList(List<String> rights);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the DublinCore module right. Convenience method that can be used to
|
* Gets the DublinCore module right. Convenience method that can be used to obtain the first
|
||||||
* obtain the first item, <b>null</b> if none.
|
* item, <b>null</b> if none.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the first DublinCore module right, <b>null</b> if none.
|
* @return the first DublinCore module right, <b>null</b> if none.
|
||||||
|
@ -619,8 +601,8 @@ public interface DCModule extends Module {
|
||||||
String getRights();
|
String getRights();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the DublinCore module rights. Convenience method that can be used
|
* Sets the DublinCore module rights. Convenience method that can be used when there is only one
|
||||||
* when there is only one rights to set.
|
* rights to set.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param rights the DublinCore module rights to set, <b>null</b> if none.
|
* @param rights the DublinCore module rights to set, <b>null</b> if none.
|
||||||
|
|
|
@ -33,8 +33,7 @@ import com.sun.syndication.feed.impl.ObjectBean;
|
||||||
* Dublin Core ModuleImpl, default implementation.
|
* Dublin Core ModuleImpl, default implementation.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @see <a href="http://web.resource.org/rss/1.0/modules/dc/">Dublin Core
|
* @see <a href="http://web.resource.org/rss/1.0/modules/dc/">Dublin Core module</a>.
|
||||||
* module</a>.
|
|
||||||
* @author Alejandro Abdelnur
|
* @author Alejandro Abdelnur
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -65,9 +64,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
|
||||||
/**
|
/**
|
||||||
* Unmodifiable Set containing the convenience properties of this class.
|
* Unmodifiable Set containing the convenience properties of this class.
|
||||||
* <p>
|
* <p>
|
||||||
* Convenience properties are mapped to Modules, for cloning the convenience
|
* Convenience properties are mapped to Modules, for cloning the convenience properties can be
|
||||||
* properties can be ignored as the will be copied as part of the module
|
* ignored as the will be copied as part of the module cloning.
|
||||||
* cloning.
|
|
||||||
*/
|
*/
|
||||||
public static final Set<String> CONVENIENCE_PROPERTIES = Collections.unmodifiableSet(IGNORE_PROPERTIES);
|
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.
|
* Returns the DublinCore module titles.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of Strings representing the DublinCore module title, an
|
* @return a list of Strings representing the DublinCore module title, an empty list if none.
|
||||||
* empty list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -119,8 +116,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
|
||||||
* Sets the DublinCore module titles.
|
* Sets the DublinCore module titles.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param titles the list of String representing the DublinCore module
|
* @param titles the list of String representing the DublinCore module titles to set, an empty
|
||||||
* titles to set, an empty list or <b>null</b> if none.
|
* list or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -129,8 +126,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the DublinCore module title. Convenience method that can be used to
|
* Gets the DublinCore module title. Convenience method that can be used to obtain the first
|
||||||
* obtain the first item, <b>null</b> if none.
|
* item, <b>null</b> if none.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the first DublinCore module title, <b>null</b> if none.
|
* @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
|
* Sets the DublinCore module title. Convenience method that can be used when there is only one
|
||||||
* when there is only one title to set.
|
* title to set.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param title the DublinCore module title to set, <b>null</b> if none.
|
* @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.
|
* Returns the DublinCore module creator.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of Strings representing the DublinCore module creator, an
|
* @return a list of Strings representing the DublinCore module creator, an empty list if none.
|
||||||
* empty list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -178,8 +174,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
|
||||||
* Sets the DublinCore module creators.
|
* Sets the DublinCore module creators.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param creators the list of String representing the DublinCore module
|
* @param creators the list of String representing the DublinCore module creators to set, an
|
||||||
* creators to set, an empty list or <b>null</b> if none.
|
* empty list or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -188,8 +184,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the DublinCore module title. Convenience method that can be used to
|
* Gets the DublinCore module title. Convenience method that can be used to obtain the first
|
||||||
* obtain the first item, <b>null</b> if none.
|
* item, <b>null</b> if none.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the first DublinCore module title, <b>null</b> if none.
|
* @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
|
* Sets the DublinCore module creator. Convenience method that can be used when there is only
|
||||||
* when there is only one creator to set.
|
* one creator to set.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param creator the DublinCore module creator to set, <b>null</b> if none.
|
* @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.
|
* Returns the DublinCore module subjects.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of DCSubject elements with the DublinCore module subjects,
|
* @return a list of DCSubject elements with the DublinCore module subjects, an empty list if
|
||||||
* an empty list if none.
|
* none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -237,8 +233,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
|
||||||
* Sets the DublinCore module subjects.
|
* Sets the DublinCore module subjects.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param subjects the list of DCSubject elements with the DublinCore module
|
* @param subjects the list of DCSubject elements with the DublinCore module subjects to set, an
|
||||||
* subjects to set, an empty list or <b>null</b> if none.
|
* empty list or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -247,8 +243,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the DublinCore module subject. Convenience method that can be used
|
* Gets the DublinCore module subject. Convenience method that can be used to obtain the first
|
||||||
* to obtain the first item, <b>null</b> if none.
|
* item, <b>null</b> if none.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the first DublinCore module subject, <b>null</b> if none.
|
* @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
|
* Sets the DCSubject element. Convenience method that can be used when there is only one
|
||||||
* there is only one subject to set.
|
* subject to set.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param subject the DublinCore module subject to set, <b>null</b> if none.
|
* @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.
|
* Returns the DublinCore module description.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of Strings representing the DublinCore module description,
|
* @return a list of Strings representing the DublinCore module description, an empty list if
|
||||||
* an empty list if none.
|
* none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -296,8 +292,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
|
||||||
* Sets the DublinCore module descriptions.
|
* Sets the DublinCore module descriptions.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param descriptions the list of String representing the DublinCore module
|
* @param descriptions the list of String representing the DublinCore module descriptions to
|
||||||
* descriptions to set, an empty list or <b>null</b> if none.
|
* set, an empty list or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -306,8 +302,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the DublinCore module description. Convenience method that can be
|
* Gets the DublinCore module description. Convenience method that can be used to obtain the
|
||||||
* used to obtain the first item, <b>null</b> if none.
|
* first item, <b>null</b> if none.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the first DublinCore module description, <b>null</b> if none.
|
* @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
|
* Sets the DublinCore module description. Convenience method that can be used when there is
|
||||||
* used when there is only one description to set.
|
* only one description to set.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param description the DublinCore module description to set, <b>null</b>
|
* @param description the DublinCore module description to set, <b>null</b> if none.
|
||||||
* if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -340,8 +335,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
|
||||||
* Returns the DublinCore module publisher.
|
* Returns the DublinCore module publisher.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of Strings representing the DublinCore module publisher,
|
* @return a list of Strings representing the DublinCore module publisher, an empty list if
|
||||||
* an empty list if none.
|
* none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -356,8 +351,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
|
||||||
* Sets the DublinCore module publishers.
|
* Sets the DublinCore module publishers.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param publishers the list of String representing the DublinCore module
|
* @param publishers the list of String representing the DublinCore module publishers to set, an
|
||||||
* publishers to set, an empty list or <b>null</b> if none.
|
* empty list or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -366,8 +361,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the DublinCore module title. Convenience method that can be used to
|
* Gets the DublinCore module title. Convenience method that can be used to obtain the first
|
||||||
* obtain the first item, <b>null</b> if none.
|
* item, <b>null</b> if none.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the first DublinCore module title, <b>null</b> if none.
|
* @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
|
* Sets the DublinCore module publisher. Convenience method that can be used when there is only
|
||||||
* when there is only one publisher to set.
|
* one publisher to set.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param publisher the DublinCore module publisher to set, <b>null</b> if
|
* @param publisher the DublinCore module publisher to set, <b>null</b> if none.
|
||||||
* none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -400,8 +394,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
|
||||||
* Returns the DublinCore module contributor.
|
* Returns the DublinCore module contributor.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of Strings representing the DublinCore module contributor,
|
* @return a list of Strings representing the DublinCore module contributor, an empty list if
|
||||||
* an empty list if none.
|
* none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -416,8 +410,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
|
||||||
* Sets the DublinCore module contributors.
|
* Sets the DublinCore module contributors.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param contributors the list of String representing the DublinCore module
|
* @param contributors the list of String representing the DublinCore module contributors to
|
||||||
* contributors to set, an empty list or <b>null</b> if none.
|
* set, an empty list or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -426,8 +420,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the DublinCore module contributor. Convenience method that can be
|
* Gets the DublinCore module contributor. Convenience method that can be used to obtain the
|
||||||
* used to obtain the first item, <b>null</b> if none.
|
* first item, <b>null</b> if none.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the first DublinCore module contributor, <b>null</b> if none.
|
* @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
|
* Sets the DublinCore module contributor. Convenience method that can be used when there is
|
||||||
* used when there is only one contributor to set.
|
* only one contributor to set.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param contributor the DublinCore module contributor to set, <b>null</b>
|
* @param contributor the DublinCore module contributor to set, <b>null</b> if none.
|
||||||
* if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -460,8 +453,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
|
||||||
* Returns the DublinCore module date.
|
* Returns the DublinCore module date.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of Strings representing the DublinCore module date, an
|
* @return a list of Strings representing the DublinCore module date, an empty list if none.
|
||||||
* empty list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -476,8 +468,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
|
||||||
* Sets the DublinCore module dates.
|
* Sets the DublinCore module dates.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param dates the list of Date representing the DublinCore module dates to
|
* @param dates the list of Date representing the DublinCore module dates to set, an empty list
|
||||||
* set, an empty list or <b>null</b> if none.
|
* or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -486,8 +478,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the DublinCore module date. Convenience method that can be used to
|
* Gets the DublinCore module date. Convenience method that can be used to obtain the first
|
||||||
* obtain the first item, <b>null</b> if none.
|
* item, <b>null</b> if none.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the first DublinCore module date, <b>null</b> if none.
|
* @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
|
* Sets the DublinCore module date. Convenience method that can be used when there is only one
|
||||||
* there is only one date to set.
|
* date to set.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param date the DublinCore module date to set, <b>null</b> if none.
|
* @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.
|
* Returns the DublinCore module type.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of Strings representing the DublinCore module type, an
|
* @return a list of Strings representing the DublinCore module type, an empty list if none.
|
||||||
* empty list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -535,8 +526,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
|
||||||
* Sets the DublinCore module types.
|
* Sets the DublinCore module types.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param types the list of String representing the DublinCore module types
|
* @param types the list of String representing the DublinCore module types to set, an empty
|
||||||
* to set, an empty list or <b>null</b> if none.
|
* list or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -545,8 +536,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the DublinCore module type. Convenience method that can be used to
|
* Gets the DublinCore module type. Convenience method that can be used to obtain the first
|
||||||
* obtain the first item, <b>null</b> if none.
|
* item, <b>null</b> if none.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the first DublinCore module type, <b>null</b> if none.
|
* @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
|
* Sets the DublinCore module type. Convenience method that can be used when there is only one
|
||||||
* there is only one type to set.
|
* type to set.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param type the DublinCore module type to set, <b>null</b> if none.
|
* @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.
|
* Returns the DublinCore module format.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of Strings representing the DublinCore module format, an
|
* @return a list of Strings representing the DublinCore module format, an empty list if none.
|
||||||
* empty list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -594,8 +584,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
|
||||||
* Sets the DublinCore module formats.
|
* Sets the DublinCore module formats.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param formats the list of String representing the DublinCore module
|
* @param formats the list of String representing the DublinCore module formats to set, an empty
|
||||||
* formats to set, an empty list or <b>null</b> if none.
|
* list or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -604,8 +594,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the DublinCore module format. Convenience method that can be used to
|
* Gets the DublinCore module format. Convenience method that can be used to obtain the first
|
||||||
* obtain the first item, <b>null</b> if none.
|
* item, <b>null</b> if none.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the first DublinCore module format, <b>null</b> if none.
|
* @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
|
* Sets the DublinCore module format. Convenience method that can be used when there is only one
|
||||||
* when there is only one format to set.
|
* format to set.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param format the DublinCore module format to set, <b>null</b> if none.
|
* @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.
|
* Returns the DublinCore module identifier.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of Strings representing the DublinCore module identifier,
|
* @return a list of Strings representing the DublinCore module identifier, an empty list if
|
||||||
* an empty list if none.
|
* none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -653,8 +643,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
|
||||||
* Sets the DublinCore module identifiers.
|
* Sets the DublinCore module identifiers.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param identifiers the list of String representing the DublinCore module
|
* @param identifiers the list of String representing the DublinCore module identifiers to set,
|
||||||
* identifiers to set, an empty list or <b>null</b> if none.
|
* an empty list or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -663,8 +653,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the DublinCore module identifier. Convenience method that can be
|
* Gets the DublinCore module identifier. Convenience method that can be used to obtain the
|
||||||
* used to obtain the first item, <b>null</b> if none.
|
* first item, <b>null</b> if none.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the first DublinCore module identifier, <b>null</b> if none.
|
* @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
|
* Sets the DublinCore module identifier. Convenience method that can be used when there is only
|
||||||
* used when there is only one identifier to set.
|
* one identifier to set.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param identifier the DublinCore module identifier to set, <b>null</b> if
|
* @param identifier the DublinCore module identifier to set, <b>null</b> if none.
|
||||||
* none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -697,8 +686,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
|
||||||
* Returns the DublinCore module source.
|
* Returns the DublinCore module source.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of Strings representing the DublinCore module source, an
|
* @return a list of Strings representing the DublinCore module source, an empty list if none.
|
||||||
* empty list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -713,8 +701,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
|
||||||
* Sets the DublinCore module sources.
|
* Sets the DublinCore module sources.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param sources the list of String representing the DublinCore module
|
* @param sources the list of String representing the DublinCore module sources to set, an empty
|
||||||
* sources to set, an empty list or <b>null</b> if none.
|
* list or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -723,8 +711,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the DublinCore module source. Convenience method that can be used to
|
* Gets the DublinCore module source. Convenience method that can be used to obtain the first
|
||||||
* obtain the first item, <b>null</b> if none.
|
* item, <b>null</b> if none.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the first DublinCore module source, <b>null</b> if none.
|
* @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
|
* Sets the DublinCore module source. Convenience method that can be used when there is only one
|
||||||
* when there is only one source to set.
|
* source to set.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param source the DublinCore module source to set, <b>null</b> if none.
|
* @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.
|
* Returns the DublinCore module language.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of Strings representing the DublinCore module language, an
|
* @return a list of Strings representing the DublinCore module language, an empty list if none.
|
||||||
* empty list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -772,8 +759,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
|
||||||
* Sets the DublinCore module languages.
|
* Sets the DublinCore module languages.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param languages the list of String representing the DublinCore module
|
* @param languages the list of String representing the DublinCore module languages to set, an
|
||||||
* languages to set, an empty list or <b>null</b> if none.
|
* empty list or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -782,8 +769,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the DublinCore module language. Convenience method that can be used
|
* Gets the DublinCore module language. Convenience method that can be used to obtain the first
|
||||||
* to obtain the first item, <b>null</b> if none.
|
* item, <b>null</b> if none.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the first DublinCore module langauge, <b>null</b> if none.
|
* @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
|
* Sets the DublinCore module language. Convenience method that can be used when there is only
|
||||||
* when there is only one language to set.
|
* one language to set.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param language the DublinCore module language to set, <b>null</b> if
|
* @param language the DublinCore module language to set, <b>null</b> if none.
|
||||||
* none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -816,8 +802,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
|
||||||
* Returns the DublinCore module relation.
|
* Returns the DublinCore module relation.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of Strings representing the DublinCore module relation, an
|
* @return a list of Strings representing the DublinCore module relation, an empty list if none.
|
||||||
* empty list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -832,8 +817,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
|
||||||
* Sets the DublinCore module relations.
|
* Sets the DublinCore module relations.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param relations the list of String representing the DublinCore module
|
* @param relations the list of String representing the DublinCore module relations to set, an
|
||||||
* relations to set, an empty list or <b>null</b> if none.
|
* empty list or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -842,8 +827,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the DublinCore module relation. Convenience method that can be used
|
* Gets the DublinCore module relation. Convenience method that can be used to obtain the first
|
||||||
* to obtain the first item, <b>null</b> if none.
|
* item, <b>null</b> if none.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the first DublinCore module relation, <b>null</b> if none.
|
* @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
|
* Sets the DublinCore module relation. Convenience method that can be used when there is only
|
||||||
* when there is only one relation to set.
|
* one relation to set.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param relation the DublinCore module relation to set, <b>null</b> if
|
* @param relation the DublinCore module relation to set, <b>null</b> if none.
|
||||||
* none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -876,8 +860,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
|
||||||
* Returns the DublinCore module coverage.
|
* Returns the DublinCore module coverage.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of Strings representing the DublinCore module coverage, an
|
* @return a list of Strings representing the DublinCore module coverage, an empty list if none.
|
||||||
* empty list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -892,8 +875,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
|
||||||
* Sets the DublinCore module coverages.
|
* Sets the DublinCore module coverages.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param coverages the list of String representing the DublinCore module
|
* @param coverages the list of String representing the DublinCore module coverages to set, an
|
||||||
* coverages to set, an empty list or <b>null</b> if none.
|
* empty list or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -902,8 +885,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the DublinCore module coverage. Convenience method that can be used
|
* Gets the DublinCore module coverage. Convenience method that can be used to obtain the first
|
||||||
* to obtain the first item, <b>null</b> if none.
|
* item, <b>null</b> if none.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the first DublinCore module coverage, <b>null</b> if none.
|
* @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
|
* Sets the DublinCore module coverage. Convenience method that can be used when there is only
|
||||||
* when there is only one coverage to set.
|
* one coverage to set.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param coverage the DublinCore module coverage to set, <b>null</b> if
|
* @param coverage the DublinCore module coverage to set, <b>null</b> if none.
|
||||||
* none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -936,8 +918,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
|
||||||
* Returns the DublinCore module rights.
|
* Returns the DublinCore module rights.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of Strings representing the DublinCore module rights, an
|
* @return a list of Strings representing the DublinCore module rights, an empty list if none.
|
||||||
* empty list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -952,8 +933,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
|
||||||
* Sets the DublinCore module rights.
|
* Sets the DublinCore module rights.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param rights the list of String representing the DublinCore module
|
* @param rights the list of String representing the DublinCore module rights to set, an empty
|
||||||
* rights to set, an empty list or <b>null</b> if none.
|
* list or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -962,8 +943,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the DublinCore module rights. Convenience method that can be used to
|
* Gets the DublinCore module rights. Convenience method that can be used to obtain the first
|
||||||
* obtain the first item, <b>null</b> if none.
|
* item, <b>null</b> if none.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the first DublinCore module rights, <b>null</b> if none.
|
* @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
|
* Sets the DublinCore module rights. Convenience method that can be used when there is only one
|
||||||
* when there is only one rights to set.
|
* rights to set.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param rights the DublinCore module rights to set, <b>null</b> if none.
|
* @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>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a clone of the object.
|
* @return a clone of the object.
|
||||||
* @throws CloneNotSupportedException thrown if an element of the object
|
* @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
|
||||||
* cannot be cloned.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@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
|
* Indicates whether some other object is "equal to" this one as defined by the Object equals()
|
||||||
* the Object equals() method.
|
* method.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param other he reference object with which to compare.
|
* @param other he reference object with which to compare.
|
||||||
|
|
|
@ -22,8 +22,7 @@ import com.sun.syndication.feed.CopyFrom;
|
||||||
* Subject of the Dublin Core ModuleImpl.
|
* Subject of the Dublin Core ModuleImpl.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @see <a href="http://web.resource.org/rss/1.0/modules/dc/">Dublin Core
|
* @see <a href="http://web.resource.org/rss/1.0/modules/dc/">Dublin Core module</a>.
|
||||||
* module</a>.
|
|
||||||
* @author Alejandro Abdelnur
|
* @author Alejandro Abdelnur
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -41,8 +40,7 @@ public interface DCSubject extends Cloneable, CopyFrom<DCSubject> {
|
||||||
* Sets the DublinCore subject taxonomy URI.
|
* Sets the DublinCore subject taxonomy URI.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param taxonomyUri the DublinCore subject taxonomy URI to set,
|
* @param taxonomyUri the DublinCore subject taxonomy URI to set, <b>null</b> if none.
|
||||||
* <b>null</b> if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void setTaxonomyUri(String taxonomyUri);
|
void setTaxonomyUri(String taxonomyUri);
|
||||||
|
@ -70,8 +68,7 @@ public interface DCSubject extends Cloneable, CopyFrom<DCSubject> {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a clone of the object.
|
* @return a clone of the object.
|
||||||
* @throws CloneNotSupportedException thrown if an element of the object
|
* @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
|
||||||
* cannot be cloned.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public Object clone() throws CloneNotSupportedException;
|
public Object clone() throws CloneNotSupportedException;
|
||||||
|
|
|
@ -29,8 +29,7 @@ import com.sun.syndication.feed.impl.ObjectBean;
|
||||||
* Subject of the Dublin Core ModuleImpl, default implementation.
|
* Subject of the Dublin Core ModuleImpl, default implementation.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @see <a href="http://web.resource.org/rss/1.0/modules/dc/">Dublin Core
|
* @see <a href="http://web.resource.org/rss/1.0/modules/dc/">Dublin Core module</a>.
|
||||||
* module</a>.
|
|
||||||
* @author Alejandro Abdelnur
|
* @author Alejandro Abdelnur
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -54,8 +53,7 @@ public class DCSubjectImpl implements Cloneable, Serializable, DCSubject {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a clone of the object.
|
* @return a clone of the object.
|
||||||
* @throws CloneNotSupportedException thrown if an element of the object
|
* @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
|
||||||
* cannot be cloned.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@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
|
* Indicates whether some other object is "equal to" this one as defined by the Object equals()
|
||||||
* the Object equals() method.
|
* method.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param other he reference object with which to compare.
|
* @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.
|
* Sets the DublinCore subject taxonomy URI.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param taxonomyUri the DublinCore subject taxonomy URI to set,
|
* @param taxonomyUri the DublinCore subject taxonomy URI to set, <b>null</b> if none.
|
||||||
* <b>null</b> if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -39,8 +39,7 @@ public interface Extendable {
|
||||||
* Returns the entry modules.
|
* Returns the entry modules.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of ModuleImpl elements with the entry modules, an empty
|
* @return a list of ModuleImpl elements with the entry modules, an empty list if none.
|
||||||
* list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
List<Module> getModules();
|
List<Module> getModules();
|
||||||
|
@ -49,8 +48,8 @@ public interface Extendable {
|
||||||
* Sets the entry modules.
|
* Sets the entry modules.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param modules the list of ModuleImpl elements with the entry modules to
|
* @param modules the list of ModuleImpl elements with the entry modules to set, an empty list
|
||||||
* set, an empty list or <b>null</b> if none.
|
* or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void setModules(List<Module> modules);
|
void setModules(List<Module> modules);
|
||||||
|
|
|
@ -21,8 +21,8 @@ import java.io.Serializable;
|
||||||
import com.sun.syndication.feed.CopyFrom;
|
import com.sun.syndication.feed.CopyFrom;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base class for modules describing Metadata of feeds. Examples of such modules
|
* Base class for modules describing Metadata of feeds. Examples of such modules are the Dublin Core
|
||||||
* are the Dublin Core and Syndication modules.
|
* and Syndication modules.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @author Alejandro Abdelnur
|
* @author Alejandro Abdelnur
|
||||||
|
@ -44,8 +44,7 @@ public interface Module extends Cloneable, CopyFrom<Module>, Serializable {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a clone of the object.
|
* @return a clone of the object.
|
||||||
* @throws CloneNotSupportedException thrown if an element of the object
|
* @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
|
||||||
* cannot be cloned.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public Object clone() throws CloneNotSupportedException;
|
public Object clone() throws CloneNotSupportedException;
|
||||||
|
|
|
@ -21,8 +21,8 @@ import java.io.Serializable;
|
||||||
import com.sun.syndication.feed.impl.ObjectBean;
|
import com.sun.syndication.feed.impl.ObjectBean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base class for modules describing Metadata of feeds, default implementations.
|
* Base class for modules describing Metadata of feeds, default implementations. Examples of such
|
||||||
* Examples of such modules are the Dublin Core and Syndication modules.
|
* modules are the Dublin Core and Syndication modules.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @author Alejandro Abdelnur
|
* @author Alejandro Abdelnur
|
||||||
|
@ -50,8 +50,7 @@ public abstract class ModuleImpl implements Cloneable, Serializable, Module {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a clone of the object.
|
* @return a clone of the object.
|
||||||
* @throws CloneNotSupportedException thrown if an element of the object
|
* @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
|
||||||
* cannot be cloned.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@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
|
* Indicates whether some other object is "equal to" this one as defined by the Object equals()
|
||||||
* the Object equals() method.
|
* method.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param other he reference object with which to compare.
|
* @param other he reference object with which to compare.
|
||||||
|
|
|
@ -22,17 +22,14 @@ import java.util.Date;
|
||||||
* Syndication ModuleImpl.
|
* Syndication ModuleImpl.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @see <a
|
* @see <a href="http://web.resource.org/rss/1.0/modules/syndication/">Syndication module</a>.
|
||||||
* href="http://web.resource.org/rss/1.0/modules/syndication/">Syndication
|
|
||||||
* module</a>.
|
|
||||||
* @author Alejandro Abdelnur
|
* @author Alejandro Abdelnur
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public interface SyModule extends Module {
|
public interface SyModule extends Module {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* URI of the Syndication ModuleImpl
|
* URI of the Syndication ModuleImpl (http://purl.org/rss/1.0/modules/syndication/).
|
||||||
* (http://purl.org/rss/1.0/modules/syndication/).
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
static final String URI = "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.
|
* Sets the Syndication module update period.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param updatePeriod the Syndication module update period to set,
|
* @param updatePeriod the Syndication module update period to set, <b>null</b> if none.
|
||||||
* <b>null</b> if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void setUpdatePeriod(String updatePeriod);
|
void setUpdatePeriod(String updatePeriod);
|
||||||
|
@ -75,8 +71,7 @@ public interface SyModule extends Module {
|
||||||
* Sets the Syndication module update frequency.
|
* Sets the Syndication module update frequency.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param updateFrequency the Syndication module update frequency to set,
|
* @param updateFrequency the Syndication module update frequency to set, <b>null</b> if none.
|
||||||
* <b>null</b> if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void setUpdateFrequency(int updateFrequency);
|
void setUpdateFrequency(int updateFrequency);
|
||||||
|
@ -94,8 +89,7 @@ public interface SyModule extends Module {
|
||||||
* Sets the Syndication module update base date.
|
* Sets the Syndication module update base date.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param updateBase the Syndication module update base date to set,
|
* @param updateBase the Syndication module update base date to set, <b>null</b> if none.
|
||||||
* <b>null</b> if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void setUpdateBase(Date updateBase);
|
void setUpdateBase(Date updateBase);
|
||||||
|
|
|
@ -30,9 +30,7 @@ import com.sun.syndication.feed.impl.CopyFromHelper;
|
||||||
* Syndication ModuleImpl, default implementation.
|
* Syndication ModuleImpl, default implementation.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @see <a
|
* @see <a href="http://web.resource.org/rss/1.0/modules/syndication/">Syndication module</a>.
|
||||||
* href="http://web.resource.org/rss/1.0/modules/syndication/">Syndication
|
|
||||||
* module</a>.
|
|
||||||
* @author Alejandro Abdelnur
|
* @author Alejandro Abdelnur
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -77,8 +75,7 @@ public class SyModuleImpl extends ModuleImpl implements SyModule {
|
||||||
* Sets the Syndication module update period.
|
* Sets the Syndication module update period.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param updatePeriod the Syndication module update period to set,
|
* @param updatePeriod the Syndication module update period to set, <b>null</b> if none.
|
||||||
* <b>null</b> if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -105,8 +102,7 @@ public class SyModuleImpl extends ModuleImpl implements SyModule {
|
||||||
* Sets the Syndication module update frequency.
|
* Sets the Syndication module update frequency.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param updateFrequency the Syndication module update frequency to set,
|
* @param updateFrequency the Syndication module update frequency to set, <b>null</b> if none.
|
||||||
* <b>null</b> if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -130,8 +126,7 @@ public class SyModuleImpl extends ModuleImpl implements SyModule {
|
||||||
* Sets the Syndication module update base date.
|
* Sets the Syndication module update base date.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param updateBase the Syndication module update base date to set,
|
* @param updateBase the Syndication module update base date to set, <b>null</b> if none.
|
||||||
* <b>null</b> if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -48,8 +48,7 @@ public class Category implements Cloneable, Serializable {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a clone of the object.
|
* @return a clone of the object.
|
||||||
* @throws CloneNotSupportedException thrown if an element of the object
|
* @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
|
||||||
* cannot be cloned.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -58,8 +57,8 @@ public class Category implements Cloneable, Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates whether some other object is "equal to" this one as defined by
|
* Indicates whether some other object is "equal to" this one as defined by the Object equals()
|
||||||
* the Object equals() method.
|
* method.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param other he reference object with which to compare.
|
* @param other he reference object with which to compare.
|
||||||
|
|
|
@ -31,8 +31,8 @@ import com.sun.syndication.feed.module.impl.ModuleUtils;
|
||||||
/**
|
/**
|
||||||
* Bean for RSS feeds.
|
* Bean for RSS feeds.
|
||||||
* <p>
|
* <p>
|
||||||
* It handles all RSS versions (0.9, 0.91, 0.92, 0.93, 0.94, 1.0 and 2.0)
|
* It handles all RSS versions (0.9, 0.91, 0.92, 0.93, 0.94, 1.0 and 2.0) without losing
|
||||||
* without losing information.
|
* information.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @author Alejandro Abdelnur
|
* @author Alejandro Abdelnur
|
||||||
|
@ -93,8 +93,7 @@ public class Channel extends WireFeed {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Channel Constructor. All properties, except the type, are set to
|
* Channel Constructor. All properties, except the type, are set to <b>null</b>.
|
||||||
* <b>null</b>.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param type the type of the RSS feed.
|
* @param type the type of the RSS feed.
|
||||||
|
@ -216,8 +215,7 @@ public class Channel extends WireFeed {
|
||||||
* Returns the channel items.
|
* Returns the channel items.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of Item elements with the channel items, an empty list if
|
* @return a list of Item elements with the channel items, an empty list if none.
|
||||||
* none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public List<Item> getItems() {
|
public List<Item> getItems() {
|
||||||
|
@ -231,8 +229,8 @@ public class Channel extends WireFeed {
|
||||||
* Sets the channel items.
|
* Sets the channel items.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param items the list of Item elements with the channel items to set, an
|
* @param items the list of Item elements with the channel items to set, an empty list or
|
||||||
* empty list or <b>null</b> if none.
|
* <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public void setItems(final List<Item> items) {
|
public void setItems(final List<Item> items) {
|
||||||
|
@ -376,8 +374,7 @@ public class Channel extends WireFeed {
|
||||||
* Sets the channel last build date.
|
* Sets the channel last build date.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param lastBuildDate the channel last build date to set, <b>null</b> if
|
* @param lastBuildDate the channel last build date to set, <b>null</b> if none.
|
||||||
* none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public void setLastBuildDate(final Date lastBuildDate) {
|
public void setLastBuildDate(final Date lastBuildDate) {
|
||||||
|
@ -425,8 +422,7 @@ public class Channel extends WireFeed {
|
||||||
* Sets the channel managing editor.
|
* Sets the channel managing editor.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param managingEditor the channel managing editor to set, <b>null</b> if
|
* @param managingEditor the channel managing editor to set, <b>null</b> if none.
|
||||||
* none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public void setManagingEditor(final String managingEditor) {
|
public void setManagingEditor(final String managingEditor) {
|
||||||
|
@ -459,8 +455,7 @@ public class Channel extends WireFeed {
|
||||||
* Returns the channel skip hours.
|
* Returns the channel skip hours.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of Integer elements with the channel skip hours, an empty
|
* @return a list of Integer elements with the channel skip hours, an empty list if none.
|
||||||
* list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public List<Integer> getSkipHours() {
|
public List<Integer> getSkipHours() {
|
||||||
|
@ -475,8 +470,8 @@ public class Channel extends WireFeed {
|
||||||
* Sets the channel skip hours.
|
* Sets the channel skip hours.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param skipHours the list of Integer elements with the channel skip hours
|
* @param skipHours the list of Integer elements with the channel skip hours to set, an empty
|
||||||
* to set, an empty list or <b>null</b> if none.
|
* list or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public void setSkipHours(final List<Integer> skipHours) {
|
public void setSkipHours(final List<Integer> skipHours) {
|
||||||
|
@ -500,8 +495,7 @@ public class Channel extends WireFeed {
|
||||||
* Returns the channel skip days.
|
* Returns the channel skip days.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of Day elements with the channel skip days, an empty list
|
* @return a list of Day elements with the channel skip days, an empty list if none.
|
||||||
* if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public List<String> getSkipDays() {
|
public List<String> getSkipDays() {
|
||||||
|
@ -516,8 +510,8 @@ public class Channel extends WireFeed {
|
||||||
* Sets the channel skip days.
|
* Sets the channel skip days.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param skipDays the list of Day elements with the channel skip days to
|
* @param skipDays the list of Day elements with the channel skip days to set, an empty list or
|
||||||
* set, an empty list or <b>null</b> if none.
|
* <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public void setSkipDays(final List<String> skipDays) {
|
public void setSkipDays(final List<String> skipDays) {
|
||||||
|
@ -564,8 +558,7 @@ public class Channel extends WireFeed {
|
||||||
* Returns the channel categories.
|
* Returns the channel categories.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of Category elements with the channel categories, an empty
|
* @return a list of Category elements with the channel categories, an empty list if none.
|
||||||
* list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public List<Category> getCategories() {
|
public List<Category> getCategories() {
|
||||||
|
@ -579,8 +572,8 @@ public class Channel extends WireFeed {
|
||||||
* Sets the channel categories.
|
* Sets the channel categories.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param categories the list of Category elements with the channel
|
* @param categories the list of Category elements with the channel categories to set, an empty
|
||||||
* categories to set, an empty list or <b>null</b> if none.
|
* list or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public void setCategories(final List<Category> categories) {
|
public void setCategories(final List<Category> categories) {
|
||||||
|
@ -635,8 +628,7 @@ public class Channel extends WireFeed {
|
||||||
* Returns the channel modules.
|
* Returns the channel modules.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of ModuleImpl elements with the channel modules, an empty
|
* @return a list of ModuleImpl elements with the channel modules, an empty list if none.
|
||||||
* list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -651,8 +643,8 @@ public class Channel extends WireFeed {
|
||||||
* Sets the channel modules.
|
* Sets the channel modules.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param modules the list of ModuleImpl elements with the channel modules
|
* @param modules the list of ModuleImpl elements with the channel modules to set, an empty list
|
||||||
* to set, an empty list or <b>null</b> if none.
|
* or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -51,8 +51,7 @@ public class Cloud implements Cloneable, Serializable {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a clone of the object.
|
* @return a clone of the object.
|
||||||
* @throws CloneNotSupportedException thrown if an element of the object
|
* @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
|
||||||
* cannot be cloned.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -61,8 +60,8 @@ public class Cloud implements Cloneable, Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates whether some other object is "equal to" this one as defined by
|
* Indicates whether some other object is "equal to" this one as defined by the Object equals()
|
||||||
* the Object equals() method.
|
* method.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param other he reference object with which to compare.
|
* @param other he reference object with which to compare.
|
||||||
|
@ -181,8 +180,7 @@ public class Cloud implements Cloneable, Serializable {
|
||||||
* Sets the cloud register procedure.
|
* Sets the cloud register procedure.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param registerProcedure the cloud register procedure to set, <b>null</b>
|
* @param registerProcedure the cloud register procedure to set, <b>null</b> if none.
|
||||||
* if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public void setRegisterProcedure(final String registerProcedure) {
|
public void setRegisterProcedure(final String registerProcedure) {
|
||||||
|
|
|
@ -94,8 +94,7 @@ public class Content implements Cloneable, Serializable {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a clone of the object.
|
* @return a clone of the object.
|
||||||
* @throws CloneNotSupportedException thrown if an element of the object
|
* @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
|
||||||
* cannot be cloned.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -104,8 +103,8 @@ public class Content implements Cloneable, Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates whether some other object is "equal to" this one as defined by
|
* Indicates whether some other object is "equal to" this one as defined by the Object equals()
|
||||||
* the Object equals() method.
|
* method.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param other he reference object with which to compare.
|
* @param other he reference object with which to compare.
|
||||||
|
|
|
@ -48,8 +48,7 @@ public class Description implements Cloneable, Serializable {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a clone of the object.
|
* @return a clone of the object.
|
||||||
* @throws CloneNotSupportedException thrown if an element of the object
|
* @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
|
||||||
* cannot be cloned.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -58,8 +57,8 @@ public class Description implements Cloneable, Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates whether some other object is "equal to" this one as defined by
|
* Indicates whether some other object is "equal to" this one as defined by the Object equals()
|
||||||
* the Object equals() method.
|
* method.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param other he reference object with which to compare.
|
* @param other he reference object with which to compare.
|
||||||
|
|
|
@ -49,8 +49,7 @@ public class Enclosure implements Cloneable, Serializable {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a clone of the object.
|
* @return a clone of the object.
|
||||||
* @throws CloneNotSupportedException thrown if an element of the object
|
* @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
|
||||||
* cannot be cloned.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -59,8 +58,8 @@ public class Enclosure implements Cloneable, Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates whether some other object is "equal to" this one as defined by
|
* Indicates whether some other object is "equal to" this one as defined by the Object equals()
|
||||||
* the Object equals() method.
|
* method.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param other he reference object with which to compare.
|
* @param other he reference object with which to compare.
|
||||||
|
|
|
@ -48,8 +48,7 @@ public class Guid implements Cloneable, Serializable {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a clone of the object.
|
* @return a clone of the object.
|
||||||
* @throws CloneNotSupportedException thrown if an element of the object
|
* @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
|
||||||
* cannot be cloned.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -58,8 +57,8 @@ public class Guid implements Cloneable, Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates whether some other object is "equal to" this one as defined by
|
* Indicates whether some other object is "equal to" this one as defined by the Object equals()
|
||||||
* the Object equals() method.
|
* method.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param other he reference object with which to compare.
|
* @param other he reference object with which to compare.
|
||||||
|
|
|
@ -51,8 +51,7 @@ public class Image implements Cloneable, Serializable {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a clone of the object.
|
* @return a clone of the object.
|
||||||
* @throws CloneNotSupportedException thrown if an element of the object
|
* @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
|
||||||
* cannot be cloned.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -61,8 +60,8 @@ public class Image implements Cloneable, Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates whether some other object is "equal to" this one as defined by
|
* Indicates whether some other object is "equal to" this one as defined by the Object equals()
|
||||||
* the Object equals() method.
|
* method.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param other he reference object with which to compare.
|
* @param other he reference object with which to compare.
|
||||||
|
|
|
@ -34,8 +34,8 @@ import com.sun.syndication.feed.module.impl.ModuleUtils;
|
||||||
* <p>
|
* <p>
|
||||||
* It handles all RSS versions without loosing information.
|
* It handles all RSS versions without loosing information.
|
||||||
* <p>
|
* <p>
|
||||||
* For RSS1.0 it supports Dublin Core and Syndication modules. Note that those
|
* For RSS1.0 it supports Dublin Core and Syndication modules. Note that those modules currently
|
||||||
* modules currently support simple syntax format only.
|
* support simple syntax format only.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @author Alejandro Abdelnur
|
* @author Alejandro Abdelnur
|
||||||
|
@ -74,8 +74,7 @@ public class Item implements Cloneable, Serializable, Extendable {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a clone of the object.
|
* @return a clone of the object.
|
||||||
* @throws CloneNotSupportedException thrown if an element of the object
|
* @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
|
||||||
* cannot be cloned.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@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
|
* Indicates whether some other object is "equal to" this one as defined by the Object equals()
|
||||||
* the Object equals() method.
|
* method.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param other he reference object with which to compare.
|
* @param other he reference object with which to compare.
|
||||||
|
@ -266,8 +265,7 @@ public class Item implements Cloneable, Serializable, Extendable {
|
||||||
* Returns the item enclosures.
|
* Returns the item enclosures.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of Enclosure elements with the item enclosures, an empty
|
* @return a list of Enclosure elements with the item enclosures, an empty list if none.
|
||||||
* list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public List<Enclosure> getEnclosures() {
|
public List<Enclosure> getEnclosures() {
|
||||||
|
@ -281,8 +279,8 @@ public class Item implements Cloneable, Serializable, Extendable {
|
||||||
* Sets the item enclosures.
|
* Sets the item enclosures.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param enclosures the list of Enclosure elements with the item enclosures
|
* @param enclosures the list of Enclosure elements with the item enclosures to set, an empty
|
||||||
* to set, an empty list or <b>null</b> if none.
|
* list or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public void setEnclosures(final List<Enclosure> enclosures) {
|
public void setEnclosures(final List<Enclosure> enclosures) {
|
||||||
|
@ -293,8 +291,7 @@ public class Item implements Cloneable, Serializable, Extendable {
|
||||||
* Returns the item categories.
|
* Returns the item categories.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of Category elements with the item categories, an empty
|
* @return a list of Category elements with the item categories, an empty list if none.
|
||||||
* list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public List<Category> getCategories() {
|
public List<Category> getCategories() {
|
||||||
|
@ -308,8 +305,8 @@ public class Item implements Cloneable, Serializable, Extendable {
|
||||||
* Sets the item categories.
|
* Sets the item categories.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param categories the list of Categories elements with the item
|
* @param categories the list of Categories elements with the item categories to set, an empty
|
||||||
* categories to set, an empty list or <b>null</b> if none.
|
* list or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public void setCategories(final List<Category> categories) {
|
public void setCategories(final List<Category> categories) {
|
||||||
|
@ -386,8 +383,7 @@ public class Item implements Cloneable, Serializable, Extendable {
|
||||||
* Returns the item modules.
|
* Returns the item modules.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of ModuleImpl elements with the item modules, an empty
|
* @return a list of ModuleImpl elements with the item modules, an empty list if none.
|
||||||
* list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -402,8 +398,8 @@ public class Item implements Cloneable, Serializable, Extendable {
|
||||||
* Sets the item modules.
|
* Sets the item modules.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param modules the list of ModuleImpl elements with the item modules to
|
* @param modules the list of ModuleImpl elements with the item modules to set, an empty list or
|
||||||
* set, an empty list or <b>null</b> if none.
|
* <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -472,8 +468,7 @@ public class Item implements Cloneable, Serializable, Extendable {
|
||||||
* Sets the item expiration date.
|
* Sets the item expiration date.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param expirationDate the item expiration date to set, <b>null</b> if
|
* @param expirationDate the item expiration date to set, <b>null</b> if none.
|
||||||
* none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public void setExpirationDate(final Date expirationDate) {
|
public void setExpirationDate(final Date expirationDate) {
|
||||||
|
|
|
@ -48,8 +48,7 @@ public class Source implements Cloneable, Serializable {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a clone of the object.
|
* @return a clone of the object.
|
||||||
* @throws CloneNotSupportedException thrown if an element of the object
|
* @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
|
||||||
* cannot be cloned.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -58,8 +57,8 @@ public class Source implements Cloneable, Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates whether some other object is "equal to" this one as defined by
|
* Indicates whether some other object is "equal to" this one as defined by the Object equals()
|
||||||
* the Object equals() method.
|
* method.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param other he reference object with which to compare.
|
* @param other he reference object with which to compare.
|
||||||
|
|
|
@ -50,8 +50,7 @@ public class TextInput implements Cloneable, Serializable {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a clone of the object.
|
* @return a clone of the object.
|
||||||
* @throws CloneNotSupportedException thrown if an element of the object
|
* @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
|
||||||
* cannot be cloned.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -60,8 +59,8 @@ public class TextInput implements Cloneable, Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates whether some other object is "equal to" this one as defined by
|
* Indicates whether some other object is "equal to" this one as defined by the Object equals()
|
||||||
* the Object equals() method.
|
* method.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param other he reference object with which to compare.
|
* @param other he reference object with which to compare.
|
||||||
|
@ -139,8 +138,7 @@ public class TextInput implements Cloneable, Serializable {
|
||||||
* Sets the text input description.
|
* Sets the text input description.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param description the text input description to set, <b>null</b> if
|
* @param description the text input description to set, <b>null</b> if none.
|
||||||
* none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public void setDescription(final String description) {
|
public void setDescription(final String description) {
|
||||||
|
|
|
@ -19,11 +19,10 @@ package com.sun.syndication.feed.synd;
|
||||||
import com.sun.syndication.feed.WireFeed;
|
import com.sun.syndication.feed.WireFeed;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface that defines the functionality to convert a SyndFeedImpl to a real
|
* Interface that defines the functionality to convert a SyndFeedImpl to a real feed (RSS or Atom)
|
||||||
* feed (RSS or Atom) and vice versa.
|
* and vice versa.
|
||||||
* <p>
|
* <p>
|
||||||
* Each implementation knows how to deal with a specific type (version) of a
|
* Each implementation knows how to deal with a specific type (version) of a real feed.
|
||||||
* real feed.
|
|
||||||
* <p>
|
* <p>
|
||||||
* Implementations must be thread safe.
|
* Implementations must be thread safe.
|
||||||
* <p>
|
* <p>
|
||||||
|
@ -47,22 +46,20 @@ public interface Converter {
|
||||||
public String getType();
|
public String getType();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Makes a deep copy/conversion of the values of a real feed into a
|
* Makes a deep copy/conversion of the values of a real feed into a SyndFeedImpl.
|
||||||
* SyndFeedImpl.
|
|
||||||
* <p>
|
* <p>
|
||||||
* It assumes the given SyndFeedImpl has no properties set.
|
* It assumes the given SyndFeedImpl has no properties set.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param feed real feed to copy/convert.
|
* @param feed real feed to copy/convert.
|
||||||
* @param syndFeed the SyndFeedImpl that will contain the copied/converted
|
* @param syndFeed the SyndFeedImpl that will contain the copied/converted values of the real
|
||||||
* values of the real feed.
|
* feed.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public void copyInto(WireFeed feed, SyndFeed syndFeed);
|
public void copyInto(WireFeed feed, SyndFeed syndFeed);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates real feed with a deep copy/conversion of the values of a
|
* Creates real feed with a deep copy/conversion of the values of a SyndFeedImpl.
|
||||||
* SyndFeedImpl.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param syndFeed SyndFeedImpl to copy/convert value from.
|
* @param syndFeed SyndFeedImpl to copy/convert value from.
|
||||||
|
|
|
@ -68,8 +68,7 @@ public interface SyndCategory extends Cloneable, CopyFrom<SyndCategory> {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a clone of the object.
|
* @return a clone of the object.
|
||||||
* @throws CloneNotSupportedException thrown if an element of the object
|
* @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
|
||||||
* cannot be cloned.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public Object clone() throws CloneNotSupportedException;
|
public Object clone() throws CloneNotSupportedException;
|
||||||
|
|
|
@ -44,8 +44,8 @@ public class SyndCategoryImpl implements Serializable, SyndCategory {
|
||||||
private final DCSubject subject;
|
private final DCSubject subject;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For implementations extending SyndContentImpl to be able to use the
|
* For implementations extending SyndContentImpl to be able to use the ObjectBean functionality
|
||||||
* ObjectBean functionality with extended interfaces.
|
* with extended interfaces.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param subject the DC subject to wrap.
|
* @param subject the DC subject to wrap.
|
||||||
|
@ -60,8 +60,7 @@ public class SyndCategoryImpl implements Serializable, SyndCategory {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a clone of the object.
|
* @return a clone of the object.
|
||||||
* @throws CloneNotSupportedException thrown if an element of the object
|
* @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
|
||||||
* cannot be cloned.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -70,8 +69,8 @@ public class SyndCategoryImpl implements Serializable, SyndCategory {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates whether some other object is "equal to" this one as defined by
|
* Indicates whether some other object is "equal to" this one as defined by the Object equals()
|
||||||
* the Object equals() method.
|
* method.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param other he reference object with which to compare.
|
* @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
|
* List implementation for SyndCategoryImpl elements. To be directly used by the SyndFeedImpl and
|
||||||
* SyndFeedImpl and SyndEntryImpl classes only.
|
* SyndEntryImpl classes only.
|
||||||
* <p>
|
* <p>
|
||||||
* It acts as a facade on top of the DCSubjectImpl elements of the underlying
|
* It acts as a facade on top of the DCSubjectImpl elements of the underlying list and remains in
|
||||||
* list and remains in synch with it. It is possible to work on either list, the
|
* synch with it. It is possible to work on either list, the categories one or the subjects one and
|
||||||
* categories one or the subjects one and they remain in synch.
|
* they remain in synch.
|
||||||
* <p>
|
* <p>
|
||||||
* This is necessary because the SyndFeedImpl categories are just a convenience
|
* This is necessary because the SyndFeedImpl categories are just a convenience to access the
|
||||||
* to access the DublinCore subjects.
|
* DublinCore subjects.
|
||||||
* <P>
|
* <P>
|
||||||
* All this mess to avoid making DCSubjectImpl implement SyndCategory (which it
|
* All this mess to avoid making DCSubjectImpl implement SyndCategory (which it would be odd).
|
||||||
* would be odd).
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @author Alejandro Abdelnur
|
* @author Alejandro Abdelnur
|
||||||
|
@ -272,8 +270,7 @@ class SyndCategoryListFacade extends AbstractList<SyndCategory> {
|
||||||
*
|
*
|
||||||
* @param index position to set the category.
|
* @param index position to set the category.
|
||||||
* @param obj the SyndCategoryImpl object to set.
|
* @param obj the SyndCategoryImpl object to set.
|
||||||
* @return the SyndCategoryImpl object that is being replaced, <b>null</b>
|
* @return the SyndCategoryImpl object that is being replaced, <b>null</b> if none.
|
||||||
* if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -318,8 +315,7 @@ class SyndCategoryListFacade extends AbstractList<SyndCategory> {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param index position to remove the category from.
|
* @param index position to remove the category from.
|
||||||
* @return the SyndCategoryImpl being removed from position index,
|
* @return the SyndCategoryImpl being removed from position index, <b>null</b> if none.
|
||||||
* <b>null</b> if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -333,14 +329,12 @@ class SyndCategoryListFacade extends AbstractList<SyndCategory> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a list with the DCSubject elements of the SyndCategoryImpl list
|
* Returns a list with the DCSubject elements of the SyndCategoryImpl list facade. To be used by
|
||||||
* facade. To be used by the SyndFeedImpl class only.
|
* the SyndFeedImpl class only.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param cList the list with SyndCategoryImpl elements to convert to
|
* @param cList the list with SyndCategoryImpl elements to convert to subject list.
|
||||||
* subject list.
|
* @return a list with DCSubject elements corresponding to the categories in the given list.
|
||||||
* @return a list with DCSubject elements corresponding to the categories in
|
|
||||||
* the given list.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static List<DCSubject> convertElementsSyndCategoryToSubject(final List<SyndCategory> cList) {
|
public static List<DCSubject> convertElementsSyndCategoryToSubject(final List<SyndCategory> cList) {
|
||||||
|
|
|
@ -29,8 +29,7 @@ public interface SyndContent extends Cloneable, CopyFrom<SyndContent> {
|
||||||
/**
|
/**
|
||||||
* Returns the content type.
|
* Returns the content type.
|
||||||
* <p>
|
* <p>
|
||||||
* When used for the description of an entry, if <b>null</b> 'text/plain'
|
* When used for the description of an entry, if <b>null</b> 'text/plain' must be assumed.
|
||||||
* must be assumed.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the content type, <b>null</b> if none.
|
* @return the content type, <b>null</b> if none.
|
||||||
|
@ -41,8 +40,7 @@ public interface SyndContent extends Cloneable, CopyFrom<SyndContent> {
|
||||||
/**
|
/**
|
||||||
* Sets the content type.
|
* Sets the content type.
|
||||||
* <p>
|
* <p>
|
||||||
* When used for the description of an entry, if <b>null</b> 'text/plain'
|
* When used for the description of an entry, if <b>null</b> 'text/plain' must be assumed.
|
||||||
* must be assumed.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param type the content type to set, <b>null</b> if none.
|
* @param type the content type to set, <b>null</b> if none.
|
||||||
|
@ -89,8 +87,7 @@ public interface SyndContent extends Cloneable, CopyFrom<SyndContent> {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a clone of the object.
|
* @return a clone of the object.
|
||||||
* @throws CloneNotSupportedException thrown if an element of the object
|
* @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
|
||||||
* cannot be cloned.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public Object clone() throws CloneNotSupportedException;
|
public Object clone() throws CloneNotSupportedException;
|
||||||
|
|
|
@ -53,8 +53,7 @@ public class SyndContentImpl implements Serializable, SyndContent {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a clone of the object.
|
* @return a clone of the object.
|
||||||
* @throws CloneNotSupportedException thrown if an element of the object
|
* @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
|
||||||
* cannot be cloned.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -63,8 +62,8 @@ public class SyndContentImpl implements Serializable, SyndContent {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates whether some other object is "equal to" this one as defined by
|
* Indicates whether some other object is "equal to" this one as defined by the Object equals()
|
||||||
* the Object equals() method.
|
* method.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param other he reference object with which to compare.
|
* @param other he reference object with which to compare.
|
||||||
|
@ -105,8 +104,7 @@ public class SyndContentImpl implements Serializable, SyndContent {
|
||||||
/**
|
/**
|
||||||
* Returns the content type.
|
* Returns the content type.
|
||||||
* <p>
|
* <p>
|
||||||
* When used for the description of an entry, if <b>null</b> 'text/plain'
|
* When used for the description of an entry, if <b>null</b> 'text/plain' must be assumed.
|
||||||
* must be assumed.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the content type, <b>null</b> if none.
|
* @return the content type, <b>null</b> if none.
|
||||||
|
@ -120,8 +118,7 @@ public class SyndContentImpl implements Serializable, SyndContent {
|
||||||
/**
|
/**
|
||||||
* Sets the content type.
|
* Sets the content type.
|
||||||
* <p>
|
* <p>
|
||||||
* When used for the description of an entry, if <b>null</b> 'text/plain'
|
* When used for the description of an entry, if <b>null</b> 'text/plain' must be assumed.
|
||||||
* must be assumed.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param type the content type to set, <b>null</b> if none.
|
* @param type the content type to set, <b>null</b> if none.
|
||||||
|
|
|
@ -33,8 +33,7 @@ public class SyndEnclosureImpl implements Serializable, SyndEnclosure {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a clone of the object.
|
* @return a clone of the object.
|
||||||
* @throws CloneNotSupportedException thrown if an element of the object
|
* @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
|
||||||
* cannot be cloned.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -43,8 +42,8 @@ public class SyndEnclosureImpl implements Serializable, SyndEnclosure {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates whether some other object is "equal to" this one as defined by
|
* Indicates whether some other object is "equal to" this one as defined by the Object equals()
|
||||||
* the Object equals() method.
|
* method.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param other he reference object with which to compare.
|
* @param other he reference object with which to compare.
|
||||||
|
|
|
@ -37,11 +37,10 @@ public interface SyndEntry extends Cloneable, CopyFrom<SyndEntry>, Extendable {
|
||||||
/**
|
/**
|
||||||
* Returns the entry URI.
|
* Returns the entry URI.
|
||||||
* <p>
|
* <p>
|
||||||
* How the entry URI maps to a concrete feed type (RSS or Atom) depends on
|
* How the entry URI maps to a concrete feed type (RSS or Atom) depends on the concrete feed
|
||||||
* the concrete feed type. This is explained in detail in Rome
|
* type. This is explained in detail in Rome documentation, <a
|
||||||
* documentation, <a
|
* href="http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping">Feed and entry URI
|
||||||
* href="http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping">Feed and
|
* mapping</a>.
|
||||||
* entry URI mapping</a>.
|
|
||||||
* <p>
|
* <p>
|
||||||
* The returned URI is a normalized URI as specified in RFC 2396bis.
|
* The returned URI is a normalized URI as specified in RFC 2396bis.
|
||||||
* <p>
|
* <p>
|
||||||
|
@ -54,11 +53,10 @@ public interface SyndEntry extends Cloneable, CopyFrom<SyndEntry>, Extendable {
|
||||||
/**
|
/**
|
||||||
* Sets the entry URI.
|
* Sets the entry URI.
|
||||||
* <p>
|
* <p>
|
||||||
* How the entry URI maps to a concrete feed type (RSS or Atom) depends on
|
* How the entry URI maps to a concrete feed type (RSS or Atom) depends on the concrete feed
|
||||||
* the concrete feed type. This is explained in detail in Rome
|
* type. This is explained in detail in Rome documentation, <a
|
||||||
* documentation, <a
|
* href="http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping">Feed and entry URI
|
||||||
* href="http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping">Feed and
|
* mapping</a>.
|
||||||
* entry URI mapping</a>.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param uri the entry URI to set, <b>null</b> if none.
|
* @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.
|
* Returns the entry contents.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of SyndContentImpl elements with the entry contents, an
|
* @return a list of SyndContentImpl elements with the entry contents, an empty list if none.
|
||||||
* empty list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
List<SyndContent> getContents();
|
List<SyndContent> getContents();
|
||||||
|
@ -170,8 +167,8 @@ public interface SyndEntry extends Cloneable, CopyFrom<SyndEntry>, Extendable {
|
||||||
* Sets the entry contents.
|
* Sets the entry contents.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param contents the list of SyndContentImpl elements with the entry
|
* @param contents the list of SyndContentImpl elements with the entry contents to set, an empty
|
||||||
* contents to set, an empty list or <b>null</b> if none.
|
* list or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void setContents(List<SyndContent> contents);
|
void setContents(List<SyndContent> contents);
|
||||||
|
@ -180,8 +177,7 @@ public interface SyndEntry extends Cloneable, CopyFrom<SyndEntry>, Extendable {
|
||||||
* Returns the entry enclosures.
|
* Returns the entry enclosures.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of SyndEnclosure elements with the entry enclosures, an
|
* @return a list of SyndEnclosure elements with the entry enclosures, an empty list if none.
|
||||||
* empty list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public List<SyndEnclosure> getEnclosures();
|
public List<SyndEnclosure> getEnclosures();
|
||||||
|
@ -190,8 +186,8 @@ public interface SyndEntry extends Cloneable, CopyFrom<SyndEntry>, Extendable {
|
||||||
* Sets the entry enclosures.
|
* Sets the entry enclosures.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param enclosures the list of SyndEnclosure elements with the entry
|
* @param enclosures the list of SyndEnclosure elements with the entry enclosures to set, an
|
||||||
* enclosures to set, an empty list or <b>null</b> if none.
|
* empty list or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public void setEnclosures(List<SyndEnclosure> enclosures);
|
public void setEnclosures(List<SyndEnclosure> enclosures);
|
||||||
|
@ -199,8 +195,7 @@ public interface SyndEntry extends Cloneable, CopyFrom<SyndEntry>, Extendable {
|
||||||
/**
|
/**
|
||||||
* Returns the entry published date.
|
* Returns the entry published date.
|
||||||
* <p>
|
* <p>
|
||||||
* This method is a convenience method, it maps to the Dublin Core module
|
* This method is a convenience method, it maps to the Dublin Core module date.
|
||||||
* date.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the entry published date, <b>null</b> if none.
|
* @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.
|
* Sets the entry published date.
|
||||||
* <p>
|
* <p>
|
||||||
* This method is a convenience method, it maps to the Dublin Core module
|
* This method is a convenience method, it maps to the Dublin Core module date.
|
||||||
* date.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param publishedDate the entry published date to set, <b>null</b> if
|
* @param publishedDate the entry published date to set, <b>null</b> if none.
|
||||||
* none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void setPublishedDate(Date publishedDate);
|
void setPublishedDate(Date publishedDate);
|
||||||
|
@ -242,9 +235,8 @@ public interface SyndEntry extends Cloneable, CopyFrom<SyndEntry>, Extendable {
|
||||||
/**
|
/**
|
||||||
* Returns the entry authors.
|
* Returns the entry authors.
|
||||||
* <p>
|
* <p>
|
||||||
* For Atom feeds, this returns the authors as a list of SyndPerson objects,
|
* For Atom feeds, this returns the authors as a list of SyndPerson objects, for RSS feeds this
|
||||||
* for RSS feeds this method is a convenience method, it maps to the Dublin
|
* method is a convenience method, it maps to the Dublin Core module creator.
|
||||||
* Core module creator.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the feed author, <b>null</b> if none.
|
* @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.
|
* Sets the entry author.
|
||||||
* <p>
|
* <p>
|
||||||
* For Atom feeds, this sets the authors as a list of SyndPerson objects,
|
* For Atom feeds, this sets the authors as a list of SyndPerson objects, for RSS feeds this
|
||||||
* for RSS feeds this method is a convenience method, it maps to the Dublin
|
* method is a convenience method, it maps to the Dublin Core module creator.
|
||||||
* Core module creator.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param authors the feed author to set, <b>null</b> if none.
|
* @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.
|
* Returns the name of the first entry author in the collection of authors.
|
||||||
* <p>
|
* <p>
|
||||||
* For Atom feeds, this returns the authors as a list of SyndPerson objects,
|
* For Atom feeds, this returns the authors as a list of SyndPerson objects, for RSS feeds this
|
||||||
* for RSS feeds this method is a convenience method, it maps to the Dublin
|
* method is a convenience method, it maps to the Dublin Core module creator.
|
||||||
* Core module creator.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the feed author, <b>null</b> if none.
|
* @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.
|
* Sets the entry author.
|
||||||
* <p>
|
* <p>
|
||||||
* For Atom feeds, this sets the feed author's name, for RSS feeds this
|
* For Atom feeds, this sets the feed author's name, for RSS feeds this method is a convenience
|
||||||
* method is a convenience method, it maps to the Dublin Core module
|
* method, it maps to the Dublin Core module creator.
|
||||||
* creator.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param author the feed author to set, <b>null</b> if none.
|
* @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.
|
* Returns the feed author.
|
||||||
* <p>
|
* <p>
|
||||||
* For Atom feeds, this returns the contributors as a list of SyndPerson
|
* For Atom feeds, this returns the contributors as a list of SyndPerson objects
|
||||||
* objects
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the feed author, <b>null</b> if none.
|
* @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.
|
* Returns the entry categories.
|
||||||
* <p>
|
* <p>
|
||||||
* This method is a convenience method, it maps to the Dublin Core module
|
* This method is a convenience method, it maps to the Dublin Core module subjects.
|
||||||
* subjects.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of SyndCategoryImpl elements with the entry categories, an
|
* @return a list of SyndCategoryImpl elements with the entry categories, an empty list if none.
|
||||||
* empty list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
List<SyndCategory> getCategories();
|
List<SyndCategory> getCategories();
|
||||||
|
@ -329,12 +315,11 @@ public interface SyndEntry extends Cloneable, CopyFrom<SyndEntry>, Extendable {
|
||||||
/**
|
/**
|
||||||
* Sets the entry categories.
|
* Sets the entry categories.
|
||||||
* <p>
|
* <p>
|
||||||
* This method is a convenience method, it maps to the Dublin Core module
|
* This method is a convenience method, it maps to the Dublin Core module subjects.
|
||||||
* subjects.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param categories the list of SyndCategoryImpl elements with the entry
|
* @param categories the list of SyndCategoryImpl elements with the entry categories to set, an
|
||||||
* categories to set, an empty list or <b>null</b> if none.
|
* empty list or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void setCategories(List<SyndCategory> categories);
|
void setCategories(List<SyndCategory> categories);
|
||||||
|
@ -360,12 +345,11 @@ public interface SyndEntry extends Cloneable, CopyFrom<SyndEntry>, Extendable {
|
||||||
void setSource(SyndFeed source);
|
void setSource(SyndFeed source);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the original item this SyndEntry is generated from. The type of
|
* Return the original item this SyndEntry is generated from. The type of the object returned
|
||||||
* the object returned depends on the original type of the feed. Atom
|
* depends on the original type of the feed. Atom 0.3/1.0 will return
|
||||||
* 0.3/1.0 will return com.sun.syndication.feed.atom.Entry, while RSS will
|
* com.sun.syndication.feed.atom.Entry, while RSS will return
|
||||||
* return com.sun.syndication.feed.rss.Item.java. If this entry was not
|
* com.sun.syndication.feed.rss.Item.java. If this entry was not generated from a WireFeed, or
|
||||||
* generated from a WireFeed, or the SyndFeed was not set to preserve the
|
* the SyndFeed was not set to preserve the WireFeed then it will return null
|
||||||
* WireFeed then it will return null
|
|
||||||
*
|
*
|
||||||
* @return the WireFeed Item or Entry this Entry is generated from, or 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.
|
* Returns the entry modules.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of ModuleImpl elements with the entry modules, an empty
|
* @return a list of ModuleImpl elements with the entry modules, an empty list if none.
|
||||||
* list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -396,8 +379,8 @@ public interface SyndEntry extends Cloneable, CopyFrom<SyndEntry>, Extendable {
|
||||||
* Sets the entry modules.
|
* Sets the entry modules.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param modules the list of ModuleImpl elements with the entry modules to
|
* @param modules the list of ModuleImpl elements with the entry modules to set, an empty list
|
||||||
* set, an empty list or <b>null</b> if none.
|
* or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -443,15 +426,13 @@ public interface SyndEntry extends Cloneable, CopyFrom<SyndEntry>, Extendable {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a clone of the object.
|
* @return a clone of the object.
|
||||||
* @throws CloneNotSupportedException thrown if an element of the object
|
* @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
|
||||||
* cannot be cloned.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public Object clone() throws CloneNotSupportedException;
|
public Object clone() throws CloneNotSupportedException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the first instance of a SyndLink with the specified relation, or
|
* Returns the first instance of a SyndLink with the specified relation, or null
|
||||||
* null
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public SyndLink findRelatedLink(String relation);
|
public SyndLink findRelatedLink(String relation);
|
||||||
|
|
|
@ -74,9 +74,8 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
|
||||||
/**
|
/**
|
||||||
* Unmodifiable Set containing the convenience properties of this class.
|
* Unmodifiable Set containing the convenience properties of this class.
|
||||||
* <p>
|
* <p>
|
||||||
* Convenience properties are mapped to Modules, for cloning the convenience
|
* Convenience properties are mapped to Modules, for cloning the convenience properties can be
|
||||||
* properties can be ignored as the will be copied as part of the module
|
* ignored as the will be copied as part of the module cloning.
|
||||||
* cloning.
|
|
||||||
*/
|
*/
|
||||||
public static final Set<String> CONVENIENCE_PROPERTIES = Collections.unmodifiableSet(IGNORE_PROPERTIES);
|
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
|
* For implementations extending SyndEntryImpl to be able to use the ObjectBean functionality
|
||||||
* ObjectBean functionality with extended interfaces.
|
* with extended interfaces.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param beanClass
|
* @param beanClass
|
||||||
* @param convenienceProperties set containing the convenience properties of
|
* @param convenienceProperties set containing the convenience properties of the SyndEntryImpl
|
||||||
* the SyndEntryImpl (the are ignored during cloning, check
|
* (the are ignored during cloning, check CloneableBean for details).
|
||||||
* CloneableBean for details).
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
protected SyndEntryImpl(final Class<?> beanClass, final Set<String> convenienceProperties) {
|
protected SyndEntryImpl(final Class<?> beanClass, final Set<String> convenienceProperties) {
|
||||||
|
@ -114,8 +112,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a clone of the object.
|
* @return a clone of the object.
|
||||||
* @throws CloneNotSupportedException thrown if an element of the object
|
* @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
|
||||||
* cannot be cloned.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -124,8 +121,8 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates whether some other object is "equal to" this one as defined by
|
* Indicates whether some other object is "equal to" this one as defined by the Object equals()
|
||||||
* the Object equals() method.
|
* method.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param other he reference object with which to compare.
|
* @param other he reference object with which to compare.
|
||||||
|
@ -181,11 +178,10 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
|
||||||
/**
|
/**
|
||||||
* Returns the entry URI.
|
* Returns the entry URI.
|
||||||
* <p>
|
* <p>
|
||||||
* How the entry URI maps to a concrete feed type (RSS or Atom) depends on
|
* How the entry URI maps to a concrete feed type (RSS or Atom) depends on the concrete feed
|
||||||
* the concrete feed type. This is explained in detail in Rome
|
* type. This is explained in detail in Rome documentation, <a
|
||||||
* documentation, <a
|
* href="http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping">Feed and entry URI
|
||||||
* href="http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping">Feed and
|
* mapping</a>.
|
||||||
* entry URI mapping</a>.
|
|
||||||
* <p>
|
* <p>
|
||||||
* The returned URI is a normalized URI as specified in RFC 2396bis.
|
* The returned URI is a normalized URI as specified in RFC 2396bis.
|
||||||
* <p>
|
* <p>
|
||||||
|
@ -201,11 +197,10 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
|
||||||
/**
|
/**
|
||||||
* Sets the entry URI.
|
* Sets the entry URI.
|
||||||
* <p>
|
* <p>
|
||||||
* How the entry URI maps to a concrete feed type (RSS or Atom) depends on
|
* How the entry URI maps to a concrete feed type (RSS or Atom) depends on the concrete feed
|
||||||
* the concrete feed type. This is explained in detail in Rome
|
* type. This is explained in detail in Rome documentation, <a
|
||||||
* documentation, <a
|
* href="http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping">Feed and entry URI
|
||||||
* href="http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping">Feed and
|
* mapping</a>.
|
||||||
* entry URI mapping</a>.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param uri the entry URI to set, <b>null</b> if none.
|
* @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.
|
* Returns the entry contents.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of SyndContentImpl elements with the entry contents, an
|
* @return a list of SyndContentImpl elements with the entry contents, an empty list if none.
|
||||||
* empty list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -338,8 +332,8 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
|
||||||
* Sets the entry contents.
|
* Sets the entry contents.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param contents the list of SyndContentImpl elements with the entry
|
* @param contents the list of SyndContentImpl elements with the entry contents to set, an empty
|
||||||
* contents to set, an empty list or <b>null</b> if none.
|
* list or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -351,8 +345,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
|
||||||
* Returns the entry enclosures.
|
* Returns the entry enclosures.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of SyndEnclosure elements with the entry enclosures, an
|
* @return a list of SyndEnclosure elements with the entry enclosures, an empty list if none.
|
||||||
* empty list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -367,8 +360,8 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
|
||||||
* Sets the entry enclosures.
|
* Sets the entry enclosures.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param enclosures the list of SyndEnclosure elements with the entry
|
* @param enclosures the list of SyndEnclosure elements with the entry enclosures to set, an
|
||||||
* enclosures to set, an empty list or <b>null</b> if none.
|
* empty list or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -379,8 +372,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
|
||||||
/**
|
/**
|
||||||
* Returns the entry published date.
|
* Returns the entry published date.
|
||||||
* <p>
|
* <p>
|
||||||
* This method is a convenience method, it maps to the Dublin Core module
|
* This method is a convenience method, it maps to the Dublin Core module date.
|
||||||
* date.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the entry published date, <b>null</b> if none.
|
* @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.
|
* Sets the entry published date.
|
||||||
* <p>
|
* <p>
|
||||||
* This method is a convenience method, it maps to the Dublin Core module
|
* This method is a convenience method, it maps to the Dublin Core module date.
|
||||||
* date.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param publishedDate the entry published date to set, <b>null</b> if
|
* @param publishedDate the entry published date to set, <b>null</b> if none.
|
||||||
* none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -411,8 +401,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
|
||||||
* Returns the entry categories.
|
* Returns the entry categories.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of SyndCategoryImpl elements with the entry categories, an
|
* @return a list of SyndCategoryImpl elements with the entry categories, an empty list if none.
|
||||||
* empty list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -423,12 +412,11 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
|
||||||
/**
|
/**
|
||||||
* Sets the entry categories.
|
* Sets the entry categories.
|
||||||
* <p>
|
* <p>
|
||||||
* This method is a convenience method, it maps to the Dublin Core module
|
* This method is a convenience method, it maps to the Dublin Core module subjects.
|
||||||
* subjects.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param categories the list of SyndCategoryImpl elements with the entry
|
* @param categories the list of SyndCategoryImpl elements with the entry categories to set, an
|
||||||
* categories to set, an empty list or <b>null</b> if none.
|
* empty list or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -440,8 +428,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
|
||||||
* Returns the entry modules.
|
* Returns the entry modules.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of ModuleImpl elements with the entry modules, an empty
|
* @return a list of ModuleImpl elements with the entry modules, an empty list if none.
|
||||||
* list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -459,8 +446,8 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
|
||||||
* Sets the entry modules.
|
* Sets the entry modules.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param modules the list of ModuleImpl elements with the entry modules to
|
* @param modules the list of ModuleImpl elements with the entry modules to set, an empty list
|
||||||
* set, an empty list or <b>null</b> if none.
|
* or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -595,8 +582,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
|
||||||
/**
|
/**
|
||||||
* Returns the entry author.
|
* Returns the entry author.
|
||||||
* <p>
|
* <p>
|
||||||
* This method is a convenience method, it maps to the Dublin Core module
|
* This method is a convenience method, it maps to the Dublin Core module creator.
|
||||||
* creator.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the entry author, <b>null</b> if none.
|
* @return the entry author, <b>null</b> if none.
|
||||||
|
@ -623,8 +609,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
|
||||||
/**
|
/**
|
||||||
* Sets the entry author.
|
* Sets the entry author.
|
||||||
* <p>
|
* <p>
|
||||||
* This method is a convenience method, it maps to the Dublin Core module
|
* This method is a convenience method, it maps to the Dublin Core module creator.
|
||||||
* creator.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param author the entry author to set, <b>null</b> if none.
|
* @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.
|
* Returns foreign markup found at channel level.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return list of JDOM nodes containing channel-level foreign markup, an
|
* @return list of JDOM nodes containing channel-level foreign markup, an empty list if none.
|
||||||
* empty list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -685,8 +669,8 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
|
||||||
* Sets foreign markup found at channel level.
|
* Sets foreign markup found at channel level.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param foreignMarkup list of JDOM nodes containing channel-level foreign
|
* @param foreignMarkup list of JDOM nodes containing channel-level foreign markup, an empty
|
||||||
* markup, an empty list if none.
|
* list if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -706,7 +690,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void setComments(String comments) {
|
public void setComments(final String comments) {
|
||||||
this.comments = comments;
|
this.comments = comments;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,8 +29,7 @@ import com.sun.syndication.feed.module.Module;
|
||||||
/**
|
/**
|
||||||
* Bean interface for all types of feeds.
|
* Bean interface for all types of feeds.
|
||||||
* <p>
|
* <p>
|
||||||
* It handles all RSS versions and Atom 0.3, it normalizes all info, it may lose
|
* It handles all RSS versions and Atom 0.3, it normalizes all info, it may lose information.
|
||||||
* information.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @author Alejandro Abdelnur
|
* @author Alejandro Abdelnur
|
||||||
|
@ -39,8 +38,7 @@ import com.sun.syndication.feed.module.Module;
|
||||||
public interface SyndFeed extends Cloneable, CopyFrom<SyndFeed>, Extendable {
|
public interface SyndFeed extends Cloneable, CopyFrom<SyndFeed>, Extendable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the real feed types the SyndFeedImpl supports when converting
|
* Returns the real feed types the SyndFeedImpl supports when converting from and to.
|
||||||
* from and to.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the real feed type supported.
|
* @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.
|
* Creates a real feed containing the information of the SyndFeedImpl.
|
||||||
* <p>
|
* <p>
|
||||||
* The feed type of the created WireFeed is taken from the SyndFeedImpl
|
* The feed type of the created WireFeed is taken from the SyndFeedImpl feedType property.
|
||||||
* feedType property.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the real feed.
|
* @return the real feed.
|
||||||
|
@ -70,9 +67,8 @@ public interface SyndFeed extends Cloneable, CopyFrom<SyndFeed>, Extendable {
|
||||||
WireFeed createWireFeed(String feedType);
|
WireFeed createWireFeed(String feedType);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the WireFeed this SyndFeed was created from. Will return null if
|
* Returns the WireFeed this SyndFeed was created from. Will return null if the original feed is
|
||||||
* the original feed is not stored or if this SyndFeed was not created from
|
* not stored or if this SyndFeed was not created from a WireFeed
|
||||||
* a WireFeed
|
|
||||||
*
|
*
|
||||||
* @return The WireFeed this was created from, or null
|
* @return The WireFeed this was created from, or null
|
||||||
*
|
*
|
||||||
|
@ -86,8 +82,7 @@ public interface SyndFeed extends Cloneable, CopyFrom<SyndFeed>, Extendable {
|
||||||
boolean isPreservingWireFeed();
|
boolean isPreservingWireFeed();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the wire feed type the feed had/will-have when converted from/to
|
* Returns the wire feed type the feed had/will-have when converted from/to a WireFeed.
|
||||||
* a WireFeed.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the feed type, <b>null</b> if none.
|
* @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);
|
void setFeedType(String feedType);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the charset encoding of a the feed. This is not set by Rome
|
* Returns the charset encoding of a the feed. This is not set by Rome parsers.
|
||||||
* parsers.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the charset encoding of the feed.
|
* @return the charset encoding of the feed.
|
||||||
|
@ -126,25 +120,22 @@ public interface SyndFeed extends Cloneable, CopyFrom<SyndFeed>, Extendable {
|
||||||
/**
|
/**
|
||||||
* Returns the feed URI.
|
* Returns the feed URI.
|
||||||
* <p>
|
* <p>
|
||||||
* How the feed URI maps to a concrete feed type (RSS or Atom) depends on
|
* How the feed URI maps to a concrete feed type (RSS or Atom) depends on the concrete feed
|
||||||
* the concrete feed type. This is explained in detail in Rome
|
* type. This is explained in detail in Rome documentation, <a
|
||||||
* documentation, <a
|
* href="http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping">Feed and entry URI
|
||||||
* href="http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping">Feed and
|
* mapping</a>.
|
||||||
* entry URI mapping</a>.
|
|
||||||
* <p>
|
* <p>
|
||||||
* The returned URI is a normalized URI as specified in RFC 2396bis.
|
* The returned URI is a normalized URI as specified in RFC 2396bis.
|
||||||
* <p>
|
* <p>
|
||||||
* Note: The URI is the unique identifier, in the RSS 2.0/atom case this is
|
* Note: The URI is the unique identifier, in the RSS 2.0/atom case this is the GUID, for RSS
|
||||||
* the GUID, for RSS 1.0 this is the URI attribute of the item. The Link is
|
* 1.0 this is the URI attribute of the item. The Link is the URL that the item is accessible
|
||||||
* the URL that the item is accessible under, the URI is the permanent
|
* under, the URI is the permanent identifier which the aggregator should use to reference this
|
||||||
* identifier which the aggregator should use to reference this item. Often
|
* item. Often the URI will use some standardized identifier scheme such as DOI's so that items
|
||||||
* the URI will use some standardized identifier scheme such as DOI's so
|
* can be identified even if they appear in multiple feeds with different "links" (they might be
|
||||||
* that items can be identified even if they appear in multiple feeds with
|
* on different hosting platforms but be the same item). Also, though rare, there could be
|
||||||
* different "links" (they might be on different hosting platforms but be
|
* multiple items with the same link but a different URI and associated metadata which need to
|
||||||
* the same item). Also, though rare, there could be multiple items with the
|
* be treated as distinct entities. In the RSS 1.0 case the URI must be a valid RDF URI
|
||||||
* same link but a different URI and associated metadata which need to be
|
* reference.
|
||||||
* treated as distinct entities. In the RSS 1.0 case the URI must be a valid
|
|
||||||
* RDF URI reference.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the feed URI, <b>null</b> if none.
|
* @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.
|
* Sets the feed URI.
|
||||||
* <p>
|
* <p>
|
||||||
* How the feed URI maps to a concrete feed type (RSS or Atom) depends on
|
* How the feed URI maps to a concrete feed type (RSS or Atom) depends on the concrete feed
|
||||||
* the concrete feed type. This is explained in detail in Rome
|
* type. This is explained in detail in Rome documentation, <a
|
||||||
* documentation, <a
|
* href="http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping">Feed and entry URI
|
||||||
* href="http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping">Feed and
|
* mapping</a>.
|
||||||
* entry URI mapping</a>.
|
|
||||||
* <p>
|
* <p>
|
||||||
* Note: The URI is the unique identifier, in the RSS 2.0/atom case this is
|
* Note: The URI is the unique identifier, in the RSS 2.0/atom case this is the GUID, for RSS
|
||||||
* the GUID, for RSS 1.0 this is the URI attribute of the item. The Link is
|
* 1.0 this is the URI attribute of the item. The Link is the URL that the item is accessible
|
||||||
* the URL that the item is accessible under, the URI is the permanent
|
* under, the URI is the permanent identifier which the aggregator should use to reference this
|
||||||
* identifier which the aggregator should use to reference this item. Often
|
* item. Often the URI will use some standardized identifier scheme such as DOI's so that items
|
||||||
* the URI will use some standardized identifier scheme such as DOI's so
|
* can be identified even if they appear in multiple feeds with different "links" (they might be
|
||||||
* that items can be identified even if they appear in multiple feeds with
|
* on different hosting platforms but be the same item). Also, though rare, there could be
|
||||||
* different "links" (they might be on different hosting platforms but be
|
* multiple items with the same link but a different URI and associated metadata which need to
|
||||||
* the same item). Also, though rare, there could be multiple items with the
|
* be treated as distinct entities. In the RSS 1.0 case the URI must be a valid RDF URI
|
||||||
* same link but a different URI and associated metadata which need to be
|
* reference.
|
||||||
* treated as distinct entities. In the RSS 1.0 case the URI must be a valid
|
|
||||||
* RDF URI reference.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param uri the feed URI to set, <b>null</b> if none.
|
* @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.
|
* Returns the feed link.
|
||||||
* <p>
|
* <p>
|
||||||
* Note: The URI is the unique identifier, in the RSS 2.0/atom case this is
|
* Note: The URI is the unique identifier, in the RSS 2.0/atom case this is the GUID, for RSS
|
||||||
* the GUID, for RSS 1.0 this is the URI attribute of the item. The Link is
|
* 1.0 this is the URI attribute of the item. The Link is the URL that the item is accessible
|
||||||
* the URL that the item is accessible under, the URI is the permanent
|
* under, the URI is the permanent identifier which the aggregator should use to reference this
|
||||||
* identifier which the aggregator should use to reference this item. Often
|
* item. Often the URI will use some standardized identifier scheme such as DOI's so that items
|
||||||
* the URI will use some standardized identifier scheme such as DOI's so
|
* can be identified even if they appear in multiple feeds with different "links" (they might be
|
||||||
* that items can be identified even if they appear in multiple feeds with
|
* on different hosting platforms but be the same item). Also, though rare, there could be
|
||||||
* different "links" (they might be on different hosting platforms but be
|
* multiple items with the same link but a different URI and associated metadata which need to
|
||||||
* the same item). Also, though rare, there could be multiple items with the
|
* be treated as distinct entities. In the RSS 1.0 case the URI must be a valid RDF URI
|
||||||
* same link but a different URI and associated metadata which need to be
|
* reference.
|
||||||
* treated as distinct entities. In the RSS 1.0 case the URI must be a valid
|
|
||||||
* RDF URI reference.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the feed link, <b>null</b> if none.
|
* @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.
|
* Sets the feed link.
|
||||||
* <p>
|
* <p>
|
||||||
* Note: The URI is the unique identifier, in the RSS 2.0/atom case this is
|
* Note: The URI is the unique identifier, in the RSS 2.0/atom case this is the GUID, for RSS
|
||||||
* the GUID, for RSS 1.0 this is the URI attribute of the item. The Link is
|
* 1.0 this is the URI attribute of the item. The Link is the URL that the item is accessible
|
||||||
* the URL that the item is accessible under, the URI is the permanent
|
* under, the URI is the permanent identifier which the aggregator should use to reference this
|
||||||
* identifier which the aggregator should use to reference this item. Often
|
* item. Often the URI will use some standardized identifier scheme such as DOI's so that items
|
||||||
* the URI will use some standardized identifier scheme such as DOI's so
|
* can be identified even if they appear in multiple feeds with different "links" (they might be
|
||||||
* that items can be identified even if they appear in multiple feeds with
|
* on different hosting platforms but be the same item). Also, though rare, there could be
|
||||||
* different "links" (they might be on different hosting platforms but be
|
* multiple items with the same link but a different URI and associated metadata which need to
|
||||||
* the same item). Also, though rare, there could be multiple items with the
|
* be treated as distinct entities. In the RSS 1.0 case the URI must be a valid RDF URI
|
||||||
* same link but a different URI and associated metadata which need to be
|
* reference.
|
||||||
* treated as distinct entities. In the RSS 1.0 case the URI must be a valid
|
|
||||||
* RDF URI reference.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param link the feed link to set, <b>null</b> if none.
|
* @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.
|
* Returns the feed published date.
|
||||||
* <p>
|
* <p>
|
||||||
* This method is a convenience method, it maps to the Dublin Core module
|
* This method is a convenience method, it maps to the Dublin Core module date.
|
||||||
* date.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the feed published date, <b>null</b> if none.
|
* @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.
|
* Sets the feed published date.
|
||||||
* <p>
|
* <p>
|
||||||
* This method is a convenience method, it maps to the Dublin Core module
|
* This method is a convenience method, it maps to the Dublin Core module date.
|
||||||
* date.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param publishedDate the feed published date to set, <b>null</b> if none.
|
* @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.
|
* Returns the feed authors.
|
||||||
* <p>
|
* <p>
|
||||||
* For Atom feeds, this returns the authors as a list of SyndPerson objects,
|
* For Atom feeds, this returns the authors as a list of SyndPerson objects, for RSS feeds this
|
||||||
* for RSS feeds this method is a convenience method, it maps to the Dublin
|
* method is a convenience method, it maps to the Dublin Core module creator.
|
||||||
* Core module creator.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the feed authors, <b>null</b> if none.
|
* @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.
|
* Sets the feed authors.
|
||||||
* <p>
|
* <p>
|
||||||
* For Atom feeds, this sets the authors as a list of SyndPerson objects,
|
* For Atom feeds, this sets the authors as a list of SyndPerson objects, for RSS feeds this
|
||||||
* for RSS feeds this method is a convenience method, it maps to the Dublin
|
* method is a convenience method, it maps to the Dublin Core module creator.
|
||||||
* Core module creator.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param authors the feed authors to set, <b>null</b> if none.
|
* @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.
|
* Returns the name of the first feed author in the collection of authors.
|
||||||
* <p>
|
* <p>
|
||||||
* For Atom feeds, this returns the authors as a list of SyndPerson objects,
|
* For Atom feeds, this returns the authors as a list of SyndPerson objects, for RSS feeds this
|
||||||
* for RSS feeds this method is a convenience method, it maps to the Dublin
|
* method is a convenience method, it maps to the Dublin Core module creator.
|
||||||
* Core module creator.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the feed author, <b>null</b> if none.
|
* @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.
|
* Sets the feed author.
|
||||||
* <p>
|
* <p>
|
||||||
* For Atom feeds, this sets the feed author's name, for RSS feeds this
|
* For Atom feeds, this sets the feed author's name, for RSS feeds this method is a convenience
|
||||||
* method is a convenience method, it maps to the Dublin Core module
|
* method, it maps to the Dublin Core module creator.
|
||||||
* creator.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param author the feed author to set, <b>null</b> if none.
|
* @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.
|
* Returns the feed author.
|
||||||
* <p>
|
* <p>
|
||||||
* For Atom feeds, this returns the contributors as a list of SyndPerson
|
* For Atom feeds, this returns the contributors as a list of SyndPerson objects
|
||||||
* objects
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the feed author, <b>null</b> if none.
|
* @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.
|
* Returns the feed copyright.
|
||||||
* <p>
|
* <p>
|
||||||
* This method is a convenience method, it maps to the Dublin Core module
|
* This method is a convenience method, it maps to the Dublin Core module rights.
|
||||||
* rights.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the feed copyright, <b>null</b> if none.
|
* @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.
|
* Sets the feed copyright.
|
||||||
* <p>
|
* <p>
|
||||||
* This method is a convenience method, it maps to the Dublin Core module
|
* This method is a convenience method, it maps to the Dublin Core module rights.
|
||||||
* rights.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param copyright the feed copyright to set, <b>null</b> if none.
|
* @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.
|
* Returns the feed categories.
|
||||||
* <p>
|
* <p>
|
||||||
* This method is a convenience method, it maps to the Dublin Core module
|
* This method is a convenience method, it maps to the Dublin Core module subjects.
|
||||||
* subjects.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of SyndCategoryImpl elements with the feed categories, an
|
* @return a list of SyndCategoryImpl elements with the feed categories, an empty list if none.
|
||||||
* empty list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
List<SyndCategory> getCategories();
|
List<SyndCategory> getCategories();
|
||||||
|
@ -468,12 +441,11 @@ public interface SyndFeed extends Cloneable, CopyFrom<SyndFeed>, Extendable {
|
||||||
/**
|
/**
|
||||||
* Sets the feed categories.
|
* Sets the feed categories.
|
||||||
* <p>
|
* <p>
|
||||||
* This method is a convenience method, it maps to the Dublin Core module
|
* This method is a convenience method, it maps to the Dublin Core module subjects.
|
||||||
* subjects.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param categories the list of SyndCategoryImpl elements with the feed
|
* @param categories the list of SyndCategoryImpl elements with the feed categories to set, an
|
||||||
* categories to set, an empty list or <b>null</b> if none.
|
* empty list or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void setCategories(List<SyndCategory> categories);
|
void setCategories(List<SyndCategory> categories);
|
||||||
|
@ -482,8 +454,7 @@ public interface SyndFeed extends Cloneable, CopyFrom<SyndFeed>, Extendable {
|
||||||
* Returns the feed entries.
|
* Returns the feed entries.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of SyndEntry elements with the feed entries, an empty list
|
* @return a list of SyndEntry elements with the feed entries, an empty list if none.
|
||||||
* if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
List<SyndEntry> getEntries();
|
List<SyndEntry> getEntries();
|
||||||
|
@ -492,8 +463,8 @@ public interface SyndFeed extends Cloneable, CopyFrom<SyndFeed>, Extendable {
|
||||||
* Sets the feed entries.
|
* Sets the feed entries.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param entries the list of SyndEntryImpl elements with the feed entries
|
* @param entries the list of SyndEntryImpl elements with the feed entries to set, an empty list
|
||||||
* to set, an empty list or <b>null</b> if none.
|
* or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void setEntries(List<SyndEntry> entries);
|
void setEntries(List<SyndEntry> entries);
|
||||||
|
@ -501,8 +472,7 @@ public interface SyndFeed extends Cloneable, CopyFrom<SyndFeed>, Extendable {
|
||||||
/**
|
/**
|
||||||
* Returns the feed language.
|
* Returns the feed language.
|
||||||
* <p>
|
* <p>
|
||||||
* This method is a convenience method, it maps to the Dublin Core module
|
* This method is a convenience method, it maps to the Dublin Core module language.
|
||||||
* language.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the feed language, <b>null</b> if none.
|
* @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.
|
* Sets the feed language.
|
||||||
* <p>
|
* <p>
|
||||||
* This method is a convenience method, it maps to the Dublin Core module
|
* This method is a convenience method, it maps to the Dublin Core module language.
|
||||||
* language.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param language the feed language to set, <b>null</b> if none.
|
* @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.
|
* Returns the feed modules.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of ModuleImpl elements with the feed modules, an empty
|
* @return a list of ModuleImpl elements with the feed modules, an empty list if none.
|
||||||
* list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -547,8 +515,8 @@ public interface SyndFeed extends Cloneable, CopyFrom<SyndFeed>, Extendable {
|
||||||
* Sets the feed modules.
|
* Sets the feed modules.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param modules the list of ModuleImpl elements with the feed modules to
|
* @param modules the list of ModuleImpl elements with the feed modules to set, an empty list or
|
||||||
* set, an empty list or <b>null</b> if none.
|
* <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -573,8 +541,7 @@ public interface SyndFeed extends Cloneable, CopyFrom<SyndFeed>, Extendable {
|
||||||
public void setForeignMarkup(List<Element> foreignMarkup);
|
public void setForeignMarkup(List<Element> foreignMarkup);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This tag should contain a URL that references a description of the
|
* This tag should contain a URL that references a description of the channel.
|
||||||
* channel.
|
|
||||||
*
|
*
|
||||||
* @since 2.0.0
|
* @since 2.0.0
|
||||||
* @return channel description URL or {@code null}
|
* @return channel description URL or {@code null}
|
||||||
|
@ -582,8 +549,7 @@ public interface SyndFeed extends Cloneable, CopyFrom<SyndFeed>, Extendable {
|
||||||
String getDocs();
|
String getDocs();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This tag should contain a URL that references a description of the
|
* This tag should contain a URL that references a description of the channel.
|
||||||
* channel.
|
|
||||||
*
|
*
|
||||||
* @since 2.0.0
|
* @since 2.0.0
|
||||||
* @param channel description URL
|
* @param channel description URL
|
||||||
|
@ -607,8 +573,8 @@ public interface SyndFeed extends Cloneable, CopyFrom<SyndFeed>, Extendable {
|
||||||
public void setGenerator(String generator);
|
public void setGenerator(String generator);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The email address of the managing editor of the site, the person to
|
* The email address of the managing editor of the site, the person to contact for editorial
|
||||||
* contact for editorial inquiries.
|
* inquiries.
|
||||||
*
|
*
|
||||||
* @since 2.0.0
|
* @since 2.0.0
|
||||||
* @return email address of the managing editor or {@code null}
|
* @return email address of the managing editor or {@code null}
|
||||||
|
@ -616,8 +582,8 @@ public interface SyndFeed extends Cloneable, CopyFrom<SyndFeed>, Extendable {
|
||||||
String getManagingEditor();
|
String getManagingEditor();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The email address of the managing editor of the site, the person to
|
* The email address of the managing editor of the site, the person to contact for editorial
|
||||||
* contact for editorial inquiries.
|
* inquiries.
|
||||||
*
|
*
|
||||||
* @since 2.0.0
|
* @since 2.0.0
|
||||||
* @param managingEditor email address of the managing editor
|
* @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);
|
public void setManagingEditor(String managingEditor);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The email address of the webmaster for the site, the person to contact if
|
* The email address of the webmaster for the site, the person to contact if there are technical
|
||||||
* there are technical problems with the channel.
|
* problems with the channel.
|
||||||
*
|
*
|
||||||
* @since 2.0.0
|
* @since 2.0.0
|
||||||
* @return email address of the webmaster or {@code null}
|
* @return email address of the webmaster or {@code null}
|
||||||
|
@ -634,8 +600,8 @@ public interface SyndFeed extends Cloneable, CopyFrom<SyndFeed>, Extendable {
|
||||||
String getWebMaster();
|
String getWebMaster();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The email address of the webmaster for the site, the person to contact if
|
* The email address of the webmaster for the site, the person to contact if there are technical
|
||||||
* there are technical problems with the channel.
|
* problems with the channel.
|
||||||
*
|
*
|
||||||
* @since 2.0.0
|
* @since 2.0.0
|
||||||
* @param webMaster email address of the webmaster
|
* @param webMaster email address of the webmaster
|
||||||
|
@ -663,8 +629,7 @@ public interface SyndFeed extends Cloneable, CopyFrom<SyndFeed>, Extendable {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a clone of the object.
|
* @return a clone of the object.
|
||||||
* @throws CloneNotSupportedException thrown if an element of the object
|
* @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
|
||||||
* cannot be cloned.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public Object clone() throws CloneNotSupportedException;
|
public Object clone() throws CloneNotSupportedException;
|
||||||
|
|
|
@ -44,8 +44,8 @@ import com.sun.syndication.feed.synd.impl.URINormalizer;
|
||||||
/**
|
/**
|
||||||
* Bean for all types of feeds.
|
* Bean for all types of feeds.
|
||||||
* <p>
|
* <p>
|
||||||
* It handles all RSS versions, Atom 0.3 and Atom 1.0, it normalizes all info,
|
* It handles all RSS versions, Atom 0.3 and Atom 1.0, it normalizes all info, it may lose
|
||||||
* it may lose information.
|
* information.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @author Alejandro Abdelnur
|
* @author Alejandro Abdelnur
|
||||||
|
@ -85,9 +85,8 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
|
||||||
/**
|
/**
|
||||||
* Unmodifiable Set containing the convenience properties of this class.
|
* Unmodifiable Set containing the convenience properties of this class.
|
||||||
* <p>
|
* <p>
|
||||||
* Convenience properties are mapped to Modules, for cloning the convenience
|
* Convenience properties are mapped to Modules, for cloning the convenience properties can be
|
||||||
* properties can be ignored as the will be copied as part of the module
|
* ignored as the will be copied as part of the module cloning.
|
||||||
* cloning.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public static final Set<String> CONVENIENCE_PROPERTIES = Collections.unmodifiableSet(IGNORE_PROPERTIES);
|
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
|
* Returns the real feed types the SyndFeedImpl supports when converting from and to.
|
||||||
* from and to.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the real feed type supported.
|
* @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
|
* For implementations extending SyndFeedImpl to be able to use the ObjectBean functionality
|
||||||
* ObjectBean functionality with extended interfaces.
|
* with extended interfaces.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param beanClass
|
* @param beanClass
|
||||||
* @param convenienceProperties set containing the convenience properties of
|
* @param convenienceProperties set containing the convenience properties of the SyndEntryImpl
|
||||||
* the SyndEntryImpl (the are ignored during cloning, check
|
* (the are ignored during cloning, check CloneableBean for details).
|
||||||
* CloneableBean for details).
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
protected SyndFeedImpl(final Class<?> beanClass, final Set<String> convenienceProperties) {
|
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
|
* Creates a SyndFeedImpl and populates all its properties out of the given RSS Channel or Atom
|
||||||
* RSS Channel or Atom Feed properties.
|
* Feed properties.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param feed the RSS Channel or the Atom Feed to populate the properties
|
* @param feed the RSS Channel or the Atom Feed to populate the properties from.
|
||||||
* from.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public SyndFeedImpl(final WireFeed feed) {
|
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
|
* Creates a SyndFeedImpl and populates all its properties out of the given RSS Channel or Atom
|
||||||
* RSS Channel or Atom Feed properties, while optionally preserving the
|
* Feed properties, while optionally preserving the WireFeed for access via the
|
||||||
* WireFeed for access via the orignalWireFeed() method.
|
* orignalWireFeed() method.
|
||||||
*
|
*
|
||||||
* @param feed
|
* @param feed
|
||||||
* @param preserveWireFeed
|
* @param preserveWireFeed
|
||||||
|
@ -181,8 +177,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a clone of the object.
|
* @return a clone of the object.
|
||||||
* @throws CloneNotSupportedException thrown if an element of the object
|
* @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
|
||||||
* cannot be cloned.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -191,8 +186,8 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates whether some other object is "equal to" this one as defined by
|
* Indicates whether some other object is "equal to" this one as defined by the Object equals()
|
||||||
* the Object equals() method.
|
* method.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param other he reference object with which to compare.
|
* @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.
|
* Creates a real feed containing the information of the SyndFeedImpl.
|
||||||
* <p>
|
* <p>
|
||||||
* The feed type of the created WireFeed is taken from the SyndFeedImpl
|
* The feed type of the created WireFeed is taken from the SyndFeedImpl feedType property.
|
||||||
* feedType property.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the real feed.
|
* @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
|
* Returns the WireFeed this SyndFeed was created from. Will return null if the original feed is
|
||||||
* the original feed is not stored or if this SyndFeed was not created from
|
* not stored or if this SyndFeed was not created from a WireFeed. <br />
|
||||||
* a WireFeed. <br />
|
* Note: The wire feed returned here will NOT contain any modifications done on this SyndFeed
|
||||||
* Note: The wire feed returned here will NOT contain any modifications done
|
* since it was created. That is in contrast to the createWireFeed method, which will reflect
|
||||||
* on this SyndFeed since it was created. That is in contrast to the
|
* the current state of the SyndFeed
|
||||||
* createWireFeed method, which will reflect the current state of the
|
|
||||||
* SyndFeed
|
|
||||||
*
|
*
|
||||||
* @return The WireFeed this was created from, or null
|
* @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
|
* Returns the wire feed type the feed had/will-have when coverted from/to a WireFeed.
|
||||||
* WireFeed.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the feed type, <b>null</b> if none.
|
* @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
|
* Returns the charset encoding of a the feed. This is not set by Rome parsers.
|
||||||
* parsers.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the charset encoding of the feed.
|
* @return the charset encoding of the feed.
|
||||||
|
@ -343,25 +333,22 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
|
||||||
/**
|
/**
|
||||||
* Returns the feed URI.
|
* Returns the feed URI.
|
||||||
* <p>
|
* <p>
|
||||||
* How the feed URI maps to a concrete feed type (RSS or Atom) depends on
|
* How the feed URI maps to a concrete feed type (RSS or Atom) depends on the concrete feed
|
||||||
* the concrete feed type. This is explained in detail in Rome
|
* type. This is explained in detail in Rome documentation, <a
|
||||||
* documentation, <a
|
* href="http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping">Feed and entry URI
|
||||||
* href="http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping">Feed and
|
* mapping</a>.
|
||||||
* entry URI mapping</a>.
|
|
||||||
* <p>
|
* <p>
|
||||||
* The returned URI is a normalized URI as specified in RFC 2396bis.
|
* The returned URI is a normalized URI as specified in RFC 2396bis.
|
||||||
* <p>
|
* <p>
|
||||||
* Note: The URI is the unique identifier, in the RSS 2.0/atom case this is
|
* Note: The URI is the unique identifier, in the RSS 2.0/atom case this is the GUID, for RSS
|
||||||
* the GUID, for RSS 1.0 this is the URI attribute of the item. The Link is
|
* 1.0 this is the URI attribute of the item. The Link is the URL that the item is accessible
|
||||||
* the URL that the item is accessible under, the URI is the permanent
|
* under, the URI is the permanent identifier which the aggregator should use to reference this
|
||||||
* identifier which the aggregator should use to reference this item. Often
|
* item. Often the URI will use some standardized identifier scheme such as DOI's so that items
|
||||||
* the URI will use some standardized identifier scheme such as DOI's so
|
* can be identified even if they appear in multiple feeds with different "links" (they might be
|
||||||
* that items can be identified even if they appear in multiple feeds with
|
* on different hosting platforms but be the same item). Also, though rare, there could be
|
||||||
* different "links" (they might be on different hosting platforms but be
|
* multiple items with the same link but a different URI and associated metadata which need to
|
||||||
* the same item). Also, though rare, there could be multiple items with the
|
* be treated as distinct entities. In the RSS 1.0 case the URI must be a valid RDF URI
|
||||||
* same link but a different URI and associated metadata which need to be
|
* reference.
|
||||||
* treated as distinct entities. In the RSS 1.0 case the URI must be a valid
|
|
||||||
* RDF URI reference.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the feed URI, <b>null</b> if none.
|
* @return the feed URI, <b>null</b> if none.
|
||||||
|
@ -375,23 +362,20 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
|
||||||
/**
|
/**
|
||||||
* Sets the feed URI.
|
* Sets the feed URI.
|
||||||
* <p>
|
* <p>
|
||||||
* How the feed URI maps to a concrete feed type (RSS or Atom) depends on
|
* How the feed URI maps to a concrete feed type (RSS or Atom) depends on the concrete feed
|
||||||
* the concrete feed type. This is explained in detail in Rome
|
* type. This is explained in detail in Rome documentation, <a
|
||||||
* documentation, <a
|
* href="http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping">Feed and entry URI
|
||||||
* href="http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping">Feed and
|
* mapping</a>.
|
||||||
* entry URI mapping</a>.
|
|
||||||
* <p>
|
* <p>
|
||||||
* Note: The URI is the unique identifier, in the RSS 2.0/atom case this is
|
* Note: The URI is the unique identifier, in the RSS 2.0/atom case this is the GUID, for RSS
|
||||||
* the GUID, for RSS 1.0 this is the URI attribute of the item. The Link is
|
* 1.0 this is the URI attribute of the item. The Link is the URL that the item is accessible
|
||||||
* the URL that the item is accessible under, the URI is the permanent
|
* under, the URI is the permanent identifier which the aggregator should use to reference this
|
||||||
* identifier which the aggregator should use to reference this item. Often
|
* item. Often the URI will use some standardized identifier scheme such as DOI's so that items
|
||||||
* the URI will use some standardized identifier scheme such as DOI's so
|
* can be identified even if they appear in multiple feeds with different "links" (they might be
|
||||||
* that items can be identified even if they appear in multiple feeds with
|
* on different hosting platforms but be the same item). Also, though rare, there could be
|
||||||
* different "links" (they might be on different hosting platforms but be
|
* multiple items with the same link but a different URI and associated metadata which need to
|
||||||
* the same item). Also, though rare, there could be multiple items with the
|
* be treated as distinct entities. In the RSS 1.0 case the URI must be a valid RDF URI
|
||||||
* same link but a different URI and associated metadata which need to be
|
* reference.
|
||||||
* treated as distinct entities. In the RSS 1.0 case the URI must be a valid
|
|
||||||
* RDF URI reference.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param uri the feed URI to set, <b>null</b> if none.
|
* @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.
|
* Returns the feed link.
|
||||||
* <p>
|
* <p>
|
||||||
* Note: The URI is the unique identifier, in the RSS 2.0/atom case this is
|
* Note: The URI is the unique identifier, in the RSS 2.0/atom case this is the GUID, for RSS
|
||||||
* the GUID, for RSS 1.0 this is the URI attribute of the item. The Link is
|
* 1.0 this is the URI attribute of the item. The Link is the URL that the item is accessible
|
||||||
* the URL that the item is accessible under, the URI is the permanent
|
* under, the URI is the permanent identifier which the aggregator should use to reference this
|
||||||
* identifier which the aggregator should use to reference this item. Often
|
* item. Often the URI will use some standardized identifier scheme such as DOI's so that items
|
||||||
* the URI will use some standardized identifier scheme such as DOI's so
|
* can be identified even if they appear in multiple feeds with different "links" (they might be
|
||||||
* that items can be identified even if they appear in multiple feeds with
|
* on different hosting platforms but be the same item). Also, though rare, there could be
|
||||||
* different "links" (they might be on different hosting platforms but be
|
* multiple items with the same link but a different URI and associated metadata which need to
|
||||||
* the same item). Also, though rare, there could be multiple items with the
|
* be treated as distinct entities. In the RSS 1.0 case the URI must be a valid RDF URI
|
||||||
* same link but a different URI and associated metadata which need to be
|
* reference.
|
||||||
* treated as distinct entities. In the RSS 1.0 case the URI must be a valid
|
|
||||||
* RDF URI reference.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the feed link, <b>null</b> if none.
|
* @return the feed link, <b>null</b> if none.
|
||||||
|
@ -483,17 +465,15 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
|
||||||
/**
|
/**
|
||||||
* Sets the feed link.
|
* Sets the feed link.
|
||||||
* <p>
|
* <p>
|
||||||
* Note: The URI is the unique identifier, in the RSS 2.0/atom case this is
|
* Note: The URI is the unique identifier, in the RSS 2.0/atom case this is the GUID, for RSS
|
||||||
* the GUID, for RSS 1.0 this is the URI attribute of the item. The Link is
|
* 1.0 this is the URI attribute of the item. The Link is the URL that the item is accessible
|
||||||
* the URL that the item is accessible under, the URI is the permanent
|
* under, the URI is the permanent identifier which the aggregator should use to reference this
|
||||||
* identifier which the aggregator should use to reference this item. Often
|
* item. Often the URI will use some standardized identifier scheme such as DOI's so that items
|
||||||
* the URI will use some standardized identifier scheme such as DOI's so
|
* can be identified even if they appear in multiple feeds with different "links" (they might be
|
||||||
* that items can be identified even if they appear in multiple feeds with
|
* on different hosting platforms but be the same item). Also, though rare, there could be
|
||||||
* different "links" (they might be on different hosting platforms but be
|
* multiple items with the same link but a different URI and associated metadata which need to
|
||||||
* the same item). Also, though rare, there could be multiple items with the
|
* be treated as distinct entities. In the RSS 1.0 case the URI must be a valid RDF URI
|
||||||
* same link but a different URI and associated metadata which need to be
|
* reference.
|
||||||
* treated as distinct entities. In the RSS 1.0 case the URI must be a valid
|
|
||||||
* RDF URI reference.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param link the feed link to set, <b>null</b> if none.
|
* @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.
|
* Returns the feed published date.
|
||||||
* <p>
|
* <p>
|
||||||
* This method is a convenience method, it maps to the Dublin Core module
|
* This method is a convenience method, it maps to the Dublin Core module date.
|
||||||
* date.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the feed published date, <b>null</b> if none.
|
* @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.
|
* Sets the feed published date.
|
||||||
* <p>
|
* <p>
|
||||||
* This method is a convenience method, it maps to the Dublin Core module
|
* This method is a convenience method, it maps to the Dublin Core module date.
|
||||||
* date.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param publishedDate the feed published date to set, <b>null</b> if none.
|
* @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.
|
* Returns the feed copyright.
|
||||||
* <p>
|
* <p>
|
||||||
* This method is a convenience method, it maps to the Dublin Core module
|
* This method is a convenience method, it maps to the Dublin Core module rights.
|
||||||
* rights.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the feed copyright, <b>null</b> if none.
|
* @return the feed copyright, <b>null</b> if none.
|
||||||
|
@ -606,8 +583,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
|
||||||
/**
|
/**
|
||||||
* Sets the feed copyright.
|
* Sets the feed copyright.
|
||||||
* <p>
|
* <p>
|
||||||
* This method is a convenience method, it maps to the Dublin Core module
|
* This method is a convenience method, it maps to the Dublin Core module rights.
|
||||||
* rights.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param copyright the feed copyright to set, <b>null</b> if none.
|
* @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.
|
* Returns the feed categories.
|
||||||
* <p>
|
* <p>
|
||||||
* This method is a convenience method, it maps to the Dublin Core module
|
* This method is a convenience method, it maps to the Dublin Core module subjects.
|
||||||
* subjects.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of SyndCategoryImpl elements with the feed categories, an
|
* @return a list of SyndCategoryImpl elements with the feed categories, an empty list if none.
|
||||||
* empty list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -661,12 +635,11 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
|
||||||
/**
|
/**
|
||||||
* Sets the feed categories.
|
* Sets the feed categories.
|
||||||
* <p>
|
* <p>
|
||||||
* This method is a convenience method, it maps to the Dublin Core module
|
* This method is a convenience method, it maps to the Dublin Core module subjects.
|
||||||
* subjects.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param categories the list of SyndCategoryImpl elements with the feed
|
* @param categories the list of SyndCategoryImpl elements with the feed categories to set, an
|
||||||
* categories to set, an empty list or <b>null</b> if none.
|
* empty list or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -678,8 +651,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
|
||||||
* Returns the feed entries.
|
* Returns the feed entries.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of SyndEntryImpl elements with the feed entries, an empty
|
* @return a list of SyndEntryImpl elements with the feed entries, an empty list if none.
|
||||||
* list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -694,8 +666,8 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
|
||||||
* Sets the feed entries.
|
* Sets the feed entries.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param entries the list of SyndEntryImpl elements with the feed entries
|
* @param entries the list of SyndEntryImpl elements with the feed entries to set, an empty list
|
||||||
* to set, an empty list or <b>null</b> if none.
|
* or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -706,8 +678,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
|
||||||
/**
|
/**
|
||||||
* Returns the feed language.
|
* Returns the feed language.
|
||||||
* <p>
|
* <p>
|
||||||
* This method is a convenience method, it maps to the Dublin Core module
|
* This method is a convenience method, it maps to the Dublin Core module language.
|
||||||
* language.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the feed language, <b>null</b> if none.
|
* @return the feed language, <b>null</b> if none.
|
||||||
|
@ -721,8 +692,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
|
||||||
/**
|
/**
|
||||||
* Sets the feed language.
|
* Sets the feed language.
|
||||||
* <p>
|
* <p>
|
||||||
* This method is a convenience method, it maps to the Dublin Core module
|
* This method is a convenience method, it maps to the Dublin Core module language.
|
||||||
* language.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param language the feed language to set, <b>null</b> if none.
|
* @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.
|
* Returns the feed modules.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of ModuleImpl elements with the feed modules, an empty
|
* @return a list of ModuleImpl elements with the feed modules, an empty list if none.
|
||||||
* list if none.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -756,8 +725,8 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
|
||||||
* Sets the feed modules.
|
* Sets the feed modules.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param modules the list of ModuleImpl elements with the feed modules to
|
* @param modules the list of ModuleImpl elements with the feed modules to set, an empty list or
|
||||||
* set, an empty list or <b>null</b> if none.
|
* <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -865,8 +834,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
|
||||||
/**
|
/**
|
||||||
* Returns the feed author.
|
* Returns the feed author.
|
||||||
* <p>
|
* <p>
|
||||||
* This method is a convenience method, it maps to the Dublin Core module
|
* This method is a convenience method, it maps to the Dublin Core module creator.
|
||||||
* creator.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the feed author, <b>null</b> if none.
|
* @return the feed author, <b>null</b> if none.
|
||||||
|
@ -880,8 +848,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
|
||||||
/**
|
/**
|
||||||
* Sets the feed author.
|
* Sets the feed author.
|
||||||
* <p>
|
* <p>
|
||||||
* This method is a convenience method, it maps to the Dublin Core module
|
* This method is a convenience method, it maps to the Dublin Core module creator.
|
||||||
* creator.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param author the feed author to set, <b>null</b> if none.
|
* @param author the feed author to set, <b>null</b> if none.
|
||||||
|
@ -949,7 +916,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void setDocs(String docs) {
|
public void setDocs(final String docs) {
|
||||||
this.docs = docs;
|
this.docs = docs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -965,7 +932,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void setGenerator(String generator) {
|
public void setGenerator(final String generator) {
|
||||||
this.generator = generator;
|
this.generator = generator;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -981,7 +948,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void setManagingEditor(String managingEditor) {
|
public void setManagingEditor(final String managingEditor) {
|
||||||
this.managingEditor = managingEditor;
|
this.managingEditor = managingEditor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -997,7 +964,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void setWebMaster(String webMaster) {
|
public void setWebMaster(final String webMaster) {
|
||||||
this.webMaster = webMaster;
|
this.webMaster = webMaster;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1013,7 +980,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void setStyleSheet(String styleSheet) {
|
public void setStyleSheet(final String styleSheet) {
|
||||||
this.styleSheet = styleSheet;
|
this.styleSheet = styleSheet;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,8 +104,7 @@ public interface SyndImage extends Cloneable, CopyFrom<SyndImage> {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a clone of the object.
|
* @return a clone of the object.
|
||||||
* @throws CloneNotSupportedException thrown if an element of the object
|
* @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
|
||||||
* cannot be cloned.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public Object clone() throws CloneNotSupportedException;
|
public Object clone() throws CloneNotSupportedException;
|
||||||
|
|
|
@ -54,8 +54,7 @@ public class SyndImageImpl implements Serializable, SyndImage {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a clone of the object.
|
* @return a clone of the object.
|
||||||
* @throws CloneNotSupportedException thrown if an element of the object
|
* @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
|
||||||
* cannot be cloned.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -64,8 +63,8 @@ public class SyndImageImpl implements Serializable, SyndImage {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates whether some other object is "equal to" this one as defined by
|
* Indicates whether some other object is "equal to" this one as defined by the Object equals()
|
||||||
* the Object equals() method.
|
* method.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param other he reference object with which to compare.
|
* @param other he reference object with which to compare.
|
||||||
|
|
|
@ -28,15 +28,14 @@ public interface SyndLink {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a clone of the object.
|
* @return a clone of the object.
|
||||||
* @throws CloneNotSupportedException thrown if an element of the object
|
* @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
|
||||||
* cannot be cloned.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public abstract Object clone() throws CloneNotSupportedException;
|
public abstract Object clone() throws CloneNotSupportedException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates whether some other object is "equal to" this one as defined by
|
* Indicates whether some other object is "equal to" this one as defined by the Object equals()
|
||||||
* the Object equals() method.
|
* method.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param other he reference object with which to compare.
|
* @param other he reference object with which to compare.
|
||||||
|
|
|
@ -54,8 +54,7 @@ public class SyndLinkImpl implements Cloneable, Serializable, SyndLink {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a clone of the object.
|
* @return a clone of the object.
|
||||||
* @throws CloneNotSupportedException thrown if an element of the object
|
* @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
|
||||||
* cannot be cloned.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@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
|
* Indicates whether some other object is "equal to" this one as defined by the Object equals()
|
||||||
* the Object equals() method.
|
* method.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param other he reference object with which to compare.
|
* @param other he reference object with which to compare.
|
||||||
|
|
|
@ -20,8 +20,7 @@ package com.sun.syndication.feed.synd;
|
||||||
import com.sun.syndication.feed.module.Extendable;
|
import com.sun.syndication.feed.module.Extendable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Bean interface for authors and contributors of SyndFeedImpl feeds and
|
* Bean interface for authors and contributors of SyndFeedImpl feeds and entries.
|
||||||
* entries.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @author Dave Johnson
|
* @author Dave Johnson
|
||||||
|
@ -64,8 +63,7 @@ public interface SyndPerson extends Cloneable, Extendable {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a clone of the object.
|
* @return a clone of the object.
|
||||||
* @throws CloneNotSupportedException thrown if an element of the object
|
* @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
|
||||||
* cannot be cloned.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public Object clone() throws CloneNotSupportedException;
|
public Object clone() throws CloneNotSupportedException;
|
||||||
|
|
|
@ -41,8 +41,8 @@ public class SyndPersonImpl implements Serializable, SyndPerson {
|
||||||
private List<Module> modules;
|
private List<Module> modules;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For implementations extending SyndContentImpl to be able to use the
|
* For implementations extending SyndContentImpl to be able to use the ObjectBean functionality
|
||||||
* ObjectBean functionality with extended interfaces.
|
* with extended interfaces.
|
||||||
*/
|
*/
|
||||||
public SyndPersonImpl() {
|
public SyndPersonImpl() {
|
||||||
objBean = new ObjectBean(SyndPerson.class, this);
|
objBean = new ObjectBean(SyndPerson.class, this);
|
||||||
|
@ -53,8 +53,7 @@ public class SyndPersonImpl implements Serializable, SyndPerson {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a clone of the object.
|
* @return a clone of the object.
|
||||||
* @throws CloneNotSupportedException thrown if an element of the object
|
* @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
|
||||||
* cannot be cloned.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -63,8 +62,8 @@ public class SyndPersonImpl implements Serializable, SyndPerson {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates whether some other object is "equal to" this one as defined by
|
* Indicates whether some other object is "equal to" this one as defined by the Object equals()
|
||||||
* the Object equals() method.
|
* method.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param other he reference object with which to compare.
|
* @param other he reference object with which to compare.
|
||||||
|
@ -181,8 +180,7 @@ public class SyndPersonImpl implements Serializable, SyndPerson {
|
||||||
* Returns the person modules.
|
* Returns the person modules.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return a list of ModuleImpl elements with the person modules, an empty
|
* @return a list of ModuleImpl elements with the person modules, an empty list if none.
|
||||||
* list if none.
|
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<Module> getModules() {
|
public List<Module> getModules() {
|
||||||
|
@ -196,8 +194,8 @@ public class SyndPersonImpl implements Serializable, SyndPerson {
|
||||||
* Sets the person modules.
|
* Sets the person modules.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param modules the list of ModuleImpl elements with the person modules to
|
* @param modules the list of ModuleImpl elements with the person modules to set, an empty list
|
||||||
* set, an empty list or <b>null</b> if none.
|
* or <b>null</b> if none.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -22,8 +22,8 @@ import com.sun.syndication.feed.synd.Converter;
|
||||||
import com.sun.syndication.io.impl.PluginManager;
|
import com.sun.syndication.io.impl.PluginManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by IntelliJ IDEA. User: tucu Date: May 21, 2004 Time: 5:26:04 PM To
|
* Created by IntelliJ IDEA. User: tucu Date: May 21, 2004 Time: 5:26:04 PM To change this template
|
||||||
* change this template use Options | File Templates.
|
* use Options | File Templates.
|
||||||
*/
|
*/
|
||||||
public class Converters extends PluginManager<Converter> {
|
public class Converters extends PluginManager<Converter> {
|
||||||
|
|
||||||
|
|
|
@ -13,8 +13,8 @@ public class URINormalizer {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param uri to normalize.
|
* @param uri to normalize.
|
||||||
* @return the normalized value of the given URI, or <b>null</b> if the
|
* @return the normalized value of the given URI, or <b>null</b> if the given URI was
|
||||||
* given URI was <b>null</b>.
|
* <b>null</b>.
|
||||||
*/
|
*/
|
||||||
public static String normalize(final String uri) {
|
public static String normalize(final String uri) {
|
||||||
String normalizedUri = null;
|
String normalizedUri = null;
|
||||||
|
|
|
@ -1,15 +1,13 @@
|
||||||
package com.sun.syndication.io;
|
package com.sun.syndication.io;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the ability to give a direct wire feed generator reference to plugin
|
* Adds the ability to give a direct wire feed generator reference to plugin modules that need to
|
||||||
* modules that need to call back to their wire feed to complete generation of
|
* call back to their wire feed to complete generation of their particular namespace. Examples of
|
||||||
* their particular namespace. Examples of such parsers include the
|
* such parsers include the SSE091Generator.
|
||||||
* SSE091Generator.
|
|
||||||
*/
|
*/
|
||||||
public interface DelegatingModuleGenerator extends ModuleGenerator {
|
public interface DelegatingModuleGenerator extends ModuleGenerator {
|
||||||
/**
|
/**
|
||||||
* Provides a parent wirefeed reference to this ModuleParser, or
|
* Provides a parent wirefeed reference to this ModuleParser, or "plugin-in".
|
||||||
* "plugin-in".
|
|
||||||
*
|
*
|
||||||
* @param feedGenerator the parent wirefeed generator for this plugin.
|
* @param feedGenerator the parent wirefeed generator for this plugin.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
package com.sun.syndication.io;
|
package com.sun.syndication.io;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the ability to give a direct wire feed reference to plugin modules that
|
* Adds the ability to give a direct wire feed reference to plugin modules that need to call back to
|
||||||
* need to call back to their wire feed to complete parsing of their particular
|
* their wire feed to complete parsing of their particular namespace. Examples of such parsers
|
||||||
* namespace. Examples of such parsers include the SSE091Parser.
|
* include the SSE091Parser.
|
||||||
*/
|
*/
|
||||||
public interface DelegatingModuleParser extends ModuleParser {
|
public interface DelegatingModuleParser extends ModuleParser {
|
||||||
/**
|
/**
|
||||||
* Provides a parent wirefeed reference to this ModuleParser, or
|
* Provides a parent wirefeed reference to this ModuleParser, or "plugin-in".
|
||||||
* "plugin-in".
|
|
||||||
*
|
*
|
||||||
* @param feedParser the parent wirefeed parser for this plugin.
|
* @param feedParser the parent wirefeed parser for this plugin.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
package com.sun.syndication.io;
|
package com.sun.syndication.io;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Exception thrown by WireFeedInput, WireFeedOutput, WireFeedParser and
|
* Exception thrown by WireFeedInput, WireFeedOutput, WireFeedParser and WireFeedGenerator instances
|
||||||
* WireFeedGenerator instances if they can not parse or generate a feed.
|
* if they can not parse or generate a feed.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @author Alejandro Abdelnur
|
* @author Alejandro Abdelnur
|
||||||
|
|
|
@ -46,16 +46,13 @@ public interface ModuleGenerator {
|
||||||
public String getNamespaceUri();
|
public String getNamespaceUri();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a set with all the URIs (JDOM Namespace elements) this module
|
* Returns a set with all the URIs (JDOM Namespace elements) this module generator uses.
|
||||||
* generator uses.
|
|
||||||
* <p/>
|
* <p/>
|
||||||
* It is used by the the feed generators to add their namespace definition
|
* It is used by the the feed generators to add their namespace definition in the root element
|
||||||
* in the root element of the generated document (forward-missing of Java
|
* of the generated document (forward-missing of Java 5.0 Generics).
|
||||||
* 5.0 Generics).
|
|
||||||
* <p/>
|
* <p/>
|
||||||
*
|
*
|
||||||
* @return a set with all the URIs (JDOM Namespace elements) this module
|
* @return a set with all the URIs (JDOM Namespace elements) this module generator uses.
|
||||||
* generator uses.
|
|
||||||
*/
|
*/
|
||||||
public Set<Namespace> getNamespaces();
|
public Set<Namespace> getNamespaces();
|
||||||
|
|
||||||
|
|
|
@ -48,10 +48,8 @@ public interface ModuleParser {
|
||||||
* Parses the XML node (JDOM element) extracting module information.
|
* Parses the XML node (JDOM element) extracting module information.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param element the XML node (JDOM element) to extract module information
|
* @param element the XML node (JDOM element) to extract module information from.
|
||||||
* from.
|
* @return a module instance, <b>null</b> if the element did not have module information.
|
||||||
* @return a module instance, <b>null</b> if the element did not have module
|
|
||||||
* information.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public Module parse(Element element, Locale locale);
|
public Module parse(Element element, Locale locale);
|
||||||
|
|
|
@ -53,14 +53,12 @@ public class ParsingFeedException extends FeedException {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the line number of the end of the text where the parse error
|
* Returns the line number of the end of the text where the parse error occurred.
|
||||||
* occurred.
|
|
||||||
* <p>
|
* <p>
|
||||||
* The first line in the document is line 1.
|
* The first line in the document is line 1.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @return an integer representing the line number, or -1 if the information
|
* @return an integer representing the line number, or -1 if the information is not available.
|
||||||
* is not available.
|
|
||||||
*/
|
*/
|
||||||
public int getLineNumber() {
|
public int getLineNumber() {
|
||||||
if (getCause() instanceof JDOMParseException) {
|
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
|
* Returns the column number of the end of the text where the parse error occurred.
|
||||||
* occurred.
|
|
||||||
* <p>
|
* <p>
|
||||||
* The first column in a line is position 1.
|
* The first column in a line is position 1.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @return an integer representing the column number, or -1 if the
|
* @return an integer representing the column number, or -1 if the information is not available.
|
||||||
* information is not available.
|
|
||||||
*/
|
*/
|
||||||
public int getColumnNumber() {
|
public int getColumnNumber() {
|
||||||
if (getCause() instanceof JDOMParseException) {
|
if (getCause() instanceof JDOMParseException) {
|
||||||
|
|
|
@ -17,14 +17,15 @@ import org.xml.sax.XMLReader;
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class SAXBuilder extends org.jdom2.input.SAXBuilder {
|
public class SAXBuilder extends org.jdom2.input.SAXBuilder {
|
||||||
|
|
||||||
public SAXBuilder(final XMLReaderJDOMFactory factory) {
|
public SAXBuilder(final XMLReaderJDOMFactory factory) {
|
||||||
super(factory);
|
super(factory);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @deprecated use SAXBuilder(XMLReaderJDOMFactory) with either
|
* @deprecated use SAXBuilder(XMLReaderJDOMFactory) with either XMLReaders.DTDVALIDATING or
|
||||||
* XMLReaders.DTDVALIDATING or XMLReaders.NONVALIDATING
|
* XMLReaders.NONVALIDATING
|
||||||
* @param validate
|
* @param validate
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
|
|
|
@ -29,8 +29,8 @@ import com.sun.syndication.feed.synd.SyndFeed;
|
||||||
import com.sun.syndication.feed.synd.SyndFeedImpl;
|
import com.sun.syndication.feed.synd.SyndFeedImpl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parses an XML document (File, InputStream, Reader, W3C SAX InputSource, W3C
|
* Parses an XML document (File, InputStream, Reader, W3C SAX InputSource, W3C DOM Document or JDom
|
||||||
* DOM Document or JDom DOcument) into an SyndFeedImpl.
|
* DOcument) into an SyndFeedImpl.
|
||||||
* <p>
|
* <p>
|
||||||
* It delegates to a WireFeedInput to handle all feed types.
|
* It delegates to a WireFeedInput to handle all feed types.
|
||||||
* <p>
|
* <p>
|
||||||
|
@ -55,8 +55,8 @@ public class SyndFeedInput {
|
||||||
* Creates a SyndFeedInput instance.
|
* Creates a SyndFeedInput instance.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param validate indicates if the input should be validated. NOT
|
* @param validate indicates if the input should be validated. NOT IMPLEMENTED YET (validation
|
||||||
* IMPLEMENTED YET (validation does not happen)
|
* does not happen)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public SyndFeedInput(final boolean validate, final Locale locale) {
|
public SyndFeedInput(final boolean validate, final Locale locale) {
|
||||||
|
@ -66,14 +66,11 @@ public class SyndFeedInput {
|
||||||
/**
|
/**
|
||||||
* Enables XML healing in the WiredFeedInput instance.
|
* Enables XML healing in the WiredFeedInput instance.
|
||||||
* <p>
|
* <p>
|
||||||
* Healing trims leading chars from the stream (empty spaces and comments)
|
* Healing trims leading chars from the stream (empty spaces and comments) until the XML prolog.
|
||||||
* until the XML prolog.
|
|
||||||
* <p>
|
* <p>
|
||||||
* Healing resolves HTML entities (from literal to code number) in the
|
* Healing resolves HTML entities (from literal to code number) in the reader.
|
||||||
* reader.
|
|
||||||
* <p>
|
* <p>
|
||||||
* The healing is done only with the build(File) and build(Reader)
|
* The healing is done only with the build(File) and build(Reader) signatures.
|
||||||
* signatures.
|
|
||||||
* <p>
|
* <p>
|
||||||
* By default is TRUE.
|
* By default is TRUE.
|
||||||
* <p>
|
* <p>
|
||||||
|
@ -86,17 +83,13 @@ public class SyndFeedInput {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates if the WiredFeedInput instance will XML heal (if necessary) the
|
* Indicates if the WiredFeedInput instance will XML heal (if necessary) the character stream.
|
||||||
* character stream.
|
|
||||||
* <p>
|
* <p>
|
||||||
* Healing trims leading chars from the stream (empty spaces and comments)
|
* Healing trims leading chars from the stream (empty spaces and comments) until the XML prolog.
|
||||||
* until the XML prolog.
|
|
||||||
* <p>
|
* <p>
|
||||||
* Healing resolves HTML entities (from literal to code number) in the
|
* Healing resolves HTML entities (from literal to code number) in the reader.
|
||||||
* reader.
|
|
||||||
* <p>
|
* <p>
|
||||||
* The healing is done only with the build(File) and build(Reader)
|
* The healing is done only with the build(File) and build(Reader) signatures.
|
||||||
* signatures.
|
|
||||||
* <p>
|
* <p>
|
||||||
* By default is TRUE.
|
* By default is TRUE.
|
||||||
* <p>
|
* <p>
|
||||||
|
@ -116,8 +109,8 @@ public class SyndFeedInput {
|
||||||
* @return the SyndFeedImpl read from the file.
|
* @return the SyndFeedImpl read from the file.
|
||||||
* @throws FileNotFoundException thrown if the file could not be found.
|
* @throws FileNotFoundException thrown if the file could not be found.
|
||||||
* @throws IOException thrown if there is problem reading the file.
|
* @throws IOException thrown if there is problem reading the file.
|
||||||
* @throws IllegalArgumentException thrown if feed type could not be
|
* @throws IllegalArgumentException thrown if feed type could not be understood by any of the
|
||||||
* understood by any of the underlying parsers.
|
* underlying parsers.
|
||||||
* @throws FeedException if the feed could not be parsed
|
* @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.
|
* @param reader Reader to read to create the SyndFeedImpl.
|
||||||
* @return the SyndFeedImpl read from the Reader.
|
* @return the SyndFeedImpl read from the Reader.
|
||||||
* @throws IllegalArgumentException thrown if feed type could not be
|
* @throws IllegalArgumentException thrown if feed type could not be understood by any of the
|
||||||
* understood by any of the underlying parsers.
|
* underlying parsers.
|
||||||
* @throws FeedException if the feed could not be parsed
|
* @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.
|
* @param is W3C SAX InputSource to read to create the SyndFeedImpl.
|
||||||
* @return the SyndFeedImpl read from the W3C SAX InputSource.
|
* @return the SyndFeedImpl read from the W3C SAX InputSource.
|
||||||
* @throws IllegalArgumentException thrown if feed type could not be
|
* @throws IllegalArgumentException thrown if feed type could not be understood by any of the
|
||||||
* understood by any of the underlying parsers.
|
* underlying parsers.
|
||||||
* @throws FeedException if the feed could not be parsed
|
* @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.
|
* @param document W3C DOM document to read to create the SyndFeedImpl.
|
||||||
* @return the SyndFeedImpl read from the W3C DOM document.
|
* @return the SyndFeedImpl read from the W3C DOM document.
|
||||||
* @throws IllegalArgumentException thrown if feed type could not be
|
* @throws IllegalArgumentException thrown if feed type could not be understood by any of the
|
||||||
* understood by any of the underlying parsers.
|
* underlying parsers.
|
||||||
* @throws FeedException if the feed could not be parsed
|
* @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.
|
* @param document JDOM document to read to create the SyndFeedImpl.
|
||||||
* @return the SyndFeedImpl read from the JDOM document.
|
* @return the SyndFeedImpl read from the JDOM document.
|
||||||
* @throws IllegalArgumentException thrown if feed type could not be
|
* @throws IllegalArgumentException thrown if feed type could not be understood by any of the
|
||||||
* understood by any of the underlying parsers.
|
* underlying parsers.
|
||||||
* @throws FeedException if the feed could not be parsed
|
* @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
|
* @return true if the WireFeed is made available in the SyndFeed. False by default.
|
||||||
* default.
|
|
||||||
*/
|
*/
|
||||||
public boolean isPreserveWireFeed() {
|
public boolean isPreserveWireFeed() {
|
||||||
return preserveWireFeed;
|
return preserveWireFeed;
|
||||||
|
@ -196,8 +188,8 @@ public class SyndFeedInput {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param preserveWireFeed set to true to make the WireFeed is made
|
* @param preserveWireFeed set to true to make the WireFeed is made available in the SyndFeed.
|
||||||
* available in the SyndFeed. False by default.
|
* False by default.
|
||||||
*/
|
*/
|
||||||
public void setPreserveWireFeed(final boolean preserveWireFeed) {
|
public void setPreserveWireFeed(final boolean preserveWireFeed) {
|
||||||
this.preserveWireFeed = preserveWireFeed;
|
this.preserveWireFeed = preserveWireFeed;
|
||||||
|
|
|
@ -25,8 +25,8 @@ import org.jdom2.Document;
|
||||||
import com.sun.syndication.feed.synd.SyndFeed;
|
import com.sun.syndication.feed.synd.SyndFeed;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generates an XML document (String, File, OutputStream, Writer, W3C DOM
|
* Generates an XML document (String, File, OutputStream, Writer, W3C DOM document or JDOM document)
|
||||||
* document or JDOM document) out of an SyndFeedImpl..
|
* out of an SyndFeedImpl..
|
||||||
* <p>
|
* <p>
|
||||||
* It delegates to a WireFeedOutput to generate all feed types.
|
* It delegates to a WireFeedOutput to generate all feed types.
|
||||||
* <p>
|
* <p>
|
||||||
|
@ -49,18 +49,15 @@ public class SyndFeedOutput {
|
||||||
/**
|
/**
|
||||||
* Creates a String with the XML representation for the given SyndFeedImpl.
|
* Creates a String with the XML representation for the given SyndFeedImpl.
|
||||||
* <p>
|
* <p>
|
||||||
* If the feed encoding is not NULL, it will be used in the XML prolog
|
* If the feed encoding is not NULL, it will be used in the XML prolog encoding attribute. It is
|
||||||
* encoding attribute. It is the responsibility of the developer to ensure
|
* the responsibility of the developer to ensure that if the String is written to a character
|
||||||
* that if the String is written to a character stream the stream charset is
|
* stream the stream charset is the same as the feed encoding property.
|
||||||
* the same as the feed encoding property.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param feed Abstract feed to create XML representation from. The type of
|
* @param feed Abstract feed to create XML representation from. The type of the SyndFeedImpl
|
||||||
* the SyndFeedImpl must match the type given to the FeedOuptut
|
* must match the type given to the FeedOuptut constructor.
|
||||||
* constructor.
|
|
||||||
* @return a String with the XML representation for the given SyndFeedImpl.
|
* @return a String with the XML representation for the given SyndFeedImpl.
|
||||||
* @throws FeedException thrown if the XML representation for the feed could
|
* @throws FeedException thrown if the XML representation for the feed could not be created.
|
||||||
* not be created.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public String outputString(final SyndFeed feed) throws FeedException {
|
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.
|
* Creates a String with the XML representation for the given SyndFeedImpl.
|
||||||
* <p>
|
* <p>
|
||||||
* If the feed encoding is not NULL, it will be used in the XML prolog
|
* If the feed encoding is not NULL, it will be used in the XML prolog encoding attribute. It is
|
||||||
* encoding attribute. It is the responsibility of the developer to ensure
|
* the responsibility of the developer to ensure that if the String is written to a character
|
||||||
* that if the String is written to a character stream the stream charset is
|
* stream the stream charset is the same as the feed encoding property.
|
||||||
* the same as the feed encoding property.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param feed Abstract feed to create XML representation from. The type of
|
* @param feed Abstract feed to create XML representation from. The type of the SyndFeedImpl
|
||||||
* the SyndFeedImpl must match the type given to the FeedOuptut
|
* must match the type given to the FeedOuptut constructor.
|
||||||
* constructor.
|
|
||||||
* @param prettyPrint pretty-print XML (true) oder collapsed
|
* @param prettyPrint pretty-print XML (true) oder collapsed
|
||||||
* @return a String with the XML representation for the given SyndFeedImpl.
|
* @return a String with the XML representation for the given SyndFeedImpl.
|
||||||
* @throws FeedException thrown if the XML representation for the feed could
|
* @throws FeedException thrown if the XML representation for the feed could not be created.
|
||||||
* not be created.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public String outputString(final SyndFeed feed, final boolean prettyPrint) throws FeedException {
|
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
|
* Creates a File containing with the XML representation for the given SyndFeedImpl.
|
||||||
* SyndFeedImpl.
|
|
||||||
* <p>
|
* <p>
|
||||||
* If the feed encoding is not NULL, it will be used in the XML prolog
|
* If the feed encoding is not NULL, it will be used in the XML prolog encoding attribute. The
|
||||||
* encoding attribute. The platform default charset encoding is used to
|
* platform default charset encoding is used to write the feed to the file. It is the
|
||||||
* write the feed to the file. It is the responsibility of the developer to
|
* responsibility of the developer to ensure the feed encoding is set to the platform charset
|
||||||
* ensure the feed encoding is set to the platform charset encoding.
|
* encoding.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param feed Abstract feed to create XML representation from. The type of
|
* @param feed Abstract feed to create XML representation from. The type of the SyndFeedImpl
|
||||||
* the SyndFeedImpl must match the type given to the FeedOuptut
|
* must match the type given to the FeedOuptut constructor.
|
||||||
* constructor.
|
* @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 IOException thrown if there was some problem writing to the File.
|
||||||
* @throws FeedException thrown if the XML representation for the feed could
|
* @throws FeedException thrown if the XML representation for the feed could not be created.
|
||||||
* not be created.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public void output(final SyndFeed feed, final File file) throws IOException, FeedException {
|
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
|
* Creates a File containing with the XML representation for the given SyndFeedImpl.
|
||||||
* SyndFeedImpl.
|
|
||||||
* <p>
|
* <p>
|
||||||
* If the feed encoding is not NULL, it will be used in the XML prolog
|
* If the feed encoding is not NULL, it will be used in the XML prolog encoding attribute. The
|
||||||
* encoding attribute. The platform default charset encoding is used to
|
* platform default charset encoding is used to write the feed to the file. It is the
|
||||||
* write the feed to the file. It is the responsibility of the developer to
|
* responsibility of the developer to ensure the feed encoding is set to the platform charset
|
||||||
* ensure the feed encoding is set to the platform charset encoding.
|
* encoding.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param feed Abstract feed to create XML representation from. The type of
|
* @param feed Abstract feed to create XML representation from. The type of the SyndFeedImpl
|
||||||
* the SyndFeedImpl must match the type given to the FeedOuptut
|
* must match the type given to the FeedOuptut constructor.
|
||||||
* constructor.
|
|
||||||
* @param prettyPrint pretty-print XML (true) oder collapsed
|
* @param prettyPrint pretty-print XML (true) oder collapsed
|
||||||
* @param file the file where to write the XML representation for the given
|
* @param file the file where to write the XML representation for the given SyndFeedImpl.
|
||||||
* SyndFeedImpl.
|
|
||||||
* @throws IOException thrown if there was some problem writing to the File.
|
* @throws IOException thrown if there was some problem writing to the File.
|
||||||
* @throws FeedException thrown if the XML representation for the feed could
|
* @throws FeedException thrown if the XML representation for the feed could not be created.
|
||||||
* not be created.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public void output(final SyndFeed feed, final File file, final boolean prettyPrint) throws IOException, FeedException {
|
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.
|
* Writes to an Writer the XML representation for the given SyndFeedImpl.
|
||||||
* <p>
|
* <p>
|
||||||
* If the feed encoding is not NULL, it will be used in the XML prolog
|
* If the feed encoding is not NULL, it will be used in the XML prolog encoding attribute. It is
|
||||||
* encoding attribute. It is the responsibility of the developer to ensure
|
* the responsibility of the developer to ensure that if the String is written to a character
|
||||||
* that if the String is written to a character stream the stream charset is
|
* stream the stream charset is the same as the feed encoding property.
|
||||||
* the same as the feed encoding property.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param feed Abstract feed to create XML representation from. The type of
|
* @param feed Abstract feed to create XML representation from. The type of the SyndFeedImpl
|
||||||
* the SyndFeedImpl must match the type given to the FeedOuptut
|
* must match the type given to the FeedOuptut constructor.
|
||||||
* constructor.
|
* @param writer Writer to write the XML representation for the given SyndFeedImpl.
|
||||||
* @param writer Writer to write the XML representation for the given
|
* @throws IOException thrown if there was some problem writing to the Writer.
|
||||||
* SyndFeedImpl.
|
* @throws FeedException thrown if the XML representation for the feed could not be created.
|
||||||
* @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 {
|
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.
|
* Writes to an Writer the XML representation for the given SyndFeedImpl.
|
||||||
* <p>
|
* <p>
|
||||||
* If the feed encoding is not NULL, it will be used in the XML prolog
|
* If the feed encoding is not NULL, it will be used in the XML prolog encoding attribute. It is
|
||||||
* encoding attribute. It is the responsibility of the developer to ensure
|
* the responsibility of the developer to ensure that if the String is written to a character
|
||||||
* that if the String is written to a character stream the stream charset is
|
* stream the stream charset is the same as the feed encoding property.
|
||||||
* the same as the feed encoding property.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param feed Abstract feed to create XML representation from. The type of
|
* @param feed Abstract feed to create XML representation from. The type of the SyndFeedImpl
|
||||||
* the SyndFeedImpl must match the type given to the FeedOuptut
|
* must match the type given to the FeedOuptut constructor.
|
||||||
* constructor.
|
|
||||||
* @param prettyPrint pretty-print XML (true) oder collapsed
|
* @param prettyPrint pretty-print XML (true) oder collapsed
|
||||||
* @param writer Writer to write the XML representation for the given
|
* @param writer Writer to write the XML representation for the given SyndFeedImpl.
|
||||||
* SyndFeedImpl.
|
* @throws IOException thrown if there was some problem writing to the Writer.
|
||||||
* @throws IOException thrown if there was some problem writing to the
|
* @throws FeedException thrown if the XML representation for the feed could not be created.
|
||||||
* 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 {
|
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.
|
* This method does not use the feed encoding property.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param feed Abstract feed to create W3C DOM document from. The type of
|
* @param feed Abstract feed to create W3C DOM document from. The type of the SyndFeedImpl must
|
||||||
* the SyndFeedImpl must match the type given to the FeedOuptut
|
* match the type given to the FeedOuptut constructor.
|
||||||
* constructor.
|
|
||||||
* @return the W3C DOM document for the given SyndFeedImpl.
|
* @return the W3C DOM document for the given SyndFeedImpl.
|
||||||
* @throws FeedException thrown if the W3C DOM document for the feed could
|
* @throws FeedException thrown if the W3C DOM document for the feed could not be created.
|
||||||
* not be created.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public org.w3c.dom.Document outputW3CDom(final SyndFeed feed) throws FeedException {
|
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.
|
* This method does not use the feed encoding property.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param feed Abstract feed to create JDOM document from. The type of the
|
* @param feed Abstract feed to create JDOM document from. The type of the SyndFeedImpl must
|
||||||
* SyndFeedImpl must match the type given to the FeedOuptut
|
* match the type given to the FeedOuptut constructor.
|
||||||
* constructor.
|
|
||||||
* @return the JDOM document for the given SyndFeedImpl.
|
* @return the JDOM document for the given SyndFeedImpl.
|
||||||
* @throws FeedException thrown if the JDOM document for the feed could not
|
* @throws FeedException thrown if the JDOM document for the feed could not be created.
|
||||||
* be created.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public Document outputJDom(final SyndFeed feed) throws FeedException {
|
public Document outputJDom(final SyndFeed feed) throws FeedException {
|
||||||
|
|
|
@ -50,8 +50,8 @@ public interface WireFeedGenerator {
|
||||||
*
|
*
|
||||||
* @param feed the feed bean to generate the XML document from.
|
* @param feed the feed bean to generate the XML document from.
|
||||||
* @return the generated XML document (JDOM).
|
* @return the generated XML document (JDOM).
|
||||||
* @throws IllegalArgumentException thrown if the type of the given feed
|
* @throws IllegalArgumentException thrown if the type of the given feed bean does not match
|
||||||
* bean does not match with the type of the WireFeedGenerator.
|
* with the type of the WireFeedGenerator.
|
||||||
* @throws FeedException thrown if the XML Document could not be created.
|
* @throws FeedException thrown if the XML Document could not be created.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -44,10 +44,11 @@ import com.sun.syndication.io.impl.FeedParsers;
|
||||||
import com.sun.syndication.io.impl.XmlFixerReader;
|
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>
|
* <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
|
* 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.
|
||||||
* interface).
|
* Parsers are plugable (they must implement the WireFeedParser interface).
|
||||||
* <p>
|
* <p>
|
||||||
* The WireFeedInput useds liberal parsers.
|
* The WireFeedInput useds liberal parsers.
|
||||||
* <p>
|
* <p>
|
||||||
|
@ -115,7 +116,8 @@ public class WireFeedInput {
|
||||||
* Creates a WireFeedInput instance.
|
* Creates a WireFeedInput instance.
|
||||||
* <p>
|
* <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) {
|
public WireFeedInput(final boolean validate, final Locale locale) {
|
||||||
|
@ -172,7 +174,8 @@ public class WireFeedInput {
|
||||||
* @return the WireFeed read from the file.
|
* @return the WireFeed read from the file.
|
||||||
* @throws FileNotFoundException thrown if the file could not be found.
|
* @throws FileNotFoundException thrown if the file could not be found.
|
||||||
* @throws IOException thrown if there is problem reading the file.
|
* @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
|
* @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.
|
* @param reader Reader to read to create the WireFeed.
|
||||||
* @return the WireFeed read from the Reader.
|
* @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
|
* @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.
|
* @param is W3C SAX InputSource to read to create the WireFeed.
|
||||||
* @return the WireFeed read from the W3C SAX InputSource.
|
* @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
|
* @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.
|
* @param document W3C DOM document to read to create the WireFeed.
|
||||||
* @return the WireFeed read from the W3C DOM document.
|
* @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
|
* @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.
|
* @param document JDOM document to read to create the WireFeed.
|
||||||
* @return the WireFeed read from the JDOM document.
|
* @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
|
* @throws FeedException if the feed could not be parsed
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -35,10 +35,11 @@ import com.sun.syndication.feed.impl.ConfigurableClassLoader;
|
||||||
import com.sun.syndication.io.impl.FeedGenerators;
|
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>
|
* <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
|
* 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.
|
||||||
* interface).
|
* Generators are plugable (they must implement the ModuleParser interface).
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @author Alejandro Abdelnur
|
* @author Alejandro Abdelnur
|
||||||
|
@ -83,15 +84,18 @@ public class WireFeedOutput {
|
||||||
/**
|
/**
|
||||||
* Creates a String with the XML representation for the given WireFeed.
|
* Creates a String with the XML representation for the given WireFeed.
|
||||||
* <p>
|
* <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
|
* If the feed encoding is not NULL, it will be used in the XML prolog encoding attribute. It is
|
||||||
* String is written to a character stream the stream charset is the same as the feed encoding property.
|
* 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>
|
* <p>
|
||||||
* NOTE: This method delages to the 'Document WireFeedOutput#outputJDom(WireFeed)'.
|
* NOTE: This method delages to the 'Document WireFeedOutput#outputJDom(WireFeed)'.
|
||||||
* <p>
|
* <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.
|
* @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.
|
* @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.
|
* Creates a String with the XML representation for the given WireFeed.
|
||||||
* <p>
|
* <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
|
* If the feed encoding is not NULL, it will be used in the XML prolog encoding attribute. It is
|
||||||
* String is written to a character stream the stream charset is the same as the feed encoding property.
|
* 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>
|
* <p>
|
||||||
* NOTE: This method delages to the 'Document WireFeedOutput#outputJDom(WireFeed)'.
|
* NOTE: This method delages to the 'Document WireFeedOutput#outputJDom(WireFeed)'.
|
||||||
* <p>
|
* <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
|
* @param prettyPrint pretty-print XML (true) oder collapsed
|
||||||
* @return a String with the XML representation for the given WireFeed.
|
* @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.
|
* @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.
|
* Creates a File containing with the XML representation for the given WireFeed.
|
||||||
* <p>
|
* <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
|
* If the feed encoding is not NULL, it will be used in the XML prolog encoding attribute. The
|
||||||
* to the file. It is the responsibility of the developer to ensure the feed encoding is set to the platform charset encoding.
|
* 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>
|
* <p>
|
||||||
* NOTE: This method delages to the 'Document WireFeedOutput#outputJDom(WireFeed)'.
|
* NOTE: This method delages to the 'Document WireFeedOutput#outputJDom(WireFeed)'.
|
||||||
* <p>
|
* <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 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 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.
|
||||||
*
|
*
|
||||||
|
@ -154,16 +165,20 @@ public class WireFeedOutput {
|
||||||
/**
|
/**
|
||||||
* Creates a File containing with the XML representation for the given WireFeed.
|
* Creates a File containing with the XML representation for the given WireFeed.
|
||||||
* <p>
|
* <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
|
* If the feed encoding is not NULL, it will be used in the XML prolog encoding attribute. The
|
||||||
* to the file. It is the responsibility of the developer to ensure the feed encoding is set to the platform charset encoding.
|
* 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>
|
* <p>
|
||||||
* NOTE: This method delages to the 'Document WireFeedOutput#outputJDom(WireFeed)'.
|
* NOTE: This method delages to the 'Document WireFeedOutput#outputJDom(WireFeed)'.
|
||||||
* <p>
|
* <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 file the file where to write the XML representation for the given WireFeed.
|
||||||
* @param prettyPrint pretty-print XML (true) oder collapsed
|
* @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 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.
|
||||||
*
|
*
|
||||||
|
@ -177,15 +192,18 @@ public class WireFeedOutput {
|
||||||
/**
|
/**
|
||||||
* Writes to an Writer the XML representation for the given WireFeed.
|
* Writes to an Writer the XML representation for the given WireFeed.
|
||||||
* <p>
|
* <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
|
* If the feed encoding is not NULL, it will be used in the XML prolog encoding attribute. It is
|
||||||
* instance is using the same charset encoding.
|
* the responsibility of the developer to ensure the Writer instance is using the same charset
|
||||||
|
* encoding.
|
||||||
* <p>
|
* <p>
|
||||||
* NOTE: This method delages to the 'Document WireFeedOutput#outputJDom(WireFeed)'.
|
* NOTE: This method delages to the 'Document WireFeedOutput#outputJDom(WireFeed)'.
|
||||||
* <p>
|
* <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 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 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.
|
* @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.
|
* Writes to an Writer the XML representation for the given WireFeed.
|
||||||
* <p>
|
* <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
|
* If the feed encoding is not NULL, it will be used in the XML prolog encoding attribute. It is
|
||||||
* instance is using the same charset encoding.
|
* the responsibility of the developer to ensure the Writer instance is using the same charset
|
||||||
|
* encoding.
|
||||||
* <p>
|
* <p>
|
||||||
* NOTE: This method delages to the 'Document WireFeedOutput#outputJDom(WireFeed)'.
|
* NOTE: This method delages to the 'Document WireFeedOutput#outputJDom(WireFeed)'.
|
||||||
* <p>
|
* <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 writer Writer to write the XML representation for the given WireFeed.
|
||||||
* @param prettyPrint pretty-print XML (true) oder collapsed
|
* @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 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.
|
* @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)'.
|
* NOTE: This method delages to the 'Document WireFeedOutput#outputJDom(WireFeed)'.
|
||||||
* <p>
|
* <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.
|
* @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.
|
* @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.
|
* NOTE: All other output methods delegate to this method.
|
||||||
* <p>
|
* <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.
|
* @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.
|
* @throws FeedException thrown if the JDOM document for the feed could not be created.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -49,14 +49,11 @@ public interface WireFeedParser {
|
||||||
/**
|
/**
|
||||||
* Inspects an XML Document (JDOM) to check if it can parse it.
|
* Inspects an XML Document (JDOM) to check if it can parse it.
|
||||||
* <p>
|
* <p>
|
||||||
* It checks if the given document if the type of feeds the parser
|
* It checks if the given document if the type of feeds the parser understands.
|
||||||
* understands.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param document XML Document (JDOM) to check if it can be parsed by this
|
* @param document XML Document (JDOM) to check if it can be parsed by this parser.
|
||||||
* parser.
|
* @return <b>true</b> if the parser know how to parser this feed, <b>false</b> otherwise.
|
||||||
* @return <b>true</b> if the parser know how to parser this feed,
|
|
||||||
* <b>false</b> otherwise.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public boolean isMyType(Document document);
|
public boolean isMyType(Document document);
|
||||||
|
@ -66,13 +63,10 @@ public interface WireFeedParser {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param document XML document (JDOM) to parse.
|
* @param document XML document (JDOM) to parse.
|
||||||
* @param validate indicates if the feed should be strictly validated (NOT
|
* @param validate indicates if the feed should be strictly validated (NOT YET IMPLEMENTED).
|
||||||
* YET IMPLEMENTED).
|
|
||||||
* @return the resulting feed bean.
|
* @return the resulting feed bean.
|
||||||
* @throws IllegalArgumentException thrown if the parser cannot handle the
|
* @throws IllegalArgumentException thrown if the parser cannot handle the given feed type.
|
||||||
* given feed type.
|
* @throws FeedException thrown if a feed bean cannot be created out of the XML document (JDOM).
|
||||||
* @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;
|
public WireFeed parse(Document document, boolean validate, final Locale locale) throws IllegalArgumentException, FeedException;
|
||||||
|
|
|
@ -34,82 +34,64 @@ import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Character stream that handles (or at least attemtps to) all the necessary
|
* Character stream that handles (or at least attemtps to) all the necessary Voodo to figure out the
|
||||||
* Voodo to figure out the charset encoding of the XML document within the
|
* charset encoding of the XML document within the stream.
|
||||||
* stream.
|
|
||||||
* <p>
|
* <p>
|
||||||
* IMPORTANT: This class is not related in any way to the org.xml.sax.XMLReader.
|
* IMPORTANT: This class is not related in any way to the org.xml.sax.XMLReader. This one IS a
|
||||||
* This one IS a character stream.
|
* character stream.
|
||||||
* <p>
|
* <p>
|
||||||
* All this has to be done without consuming characters from the stream, if not
|
* All this has to be done without consuming characters from the stream, if not the XML parser will
|
||||||
* the XML parser will not recognized the document as a valid XML. This is not
|
* not recognized the document as a valid XML. This is not 100% true, but it's close enough (UTF-8
|
||||||
* 100% true, but it's close enough (UTF-8 BOM is not handled by all parsers
|
* BOM is not handled by all parsers right now, XmlReader handles it and things work in all
|
||||||
* right now, XmlReader handles it and things work in all parsers).
|
* parsers).
|
||||||
* <p>
|
* <p>
|
||||||
* The XmlReader class handles the charset encoding of XML documents in Files,
|
* The XmlReader class handles the charset encoding of XML documents in Files, raw streams and HTTP
|
||||||
* raw streams and HTTP streams by offering a wide set of constructors.
|
* streams by offering a wide set of constructors.
|
||||||
* <P>
|
* <P>
|
||||||
* By default the charset encoding detection is lenient, the constructor with
|
* By default the charset encoding detection is lenient, the constructor with the lenient flag can
|
||||||
* the lenient flag can be used for an script (following HTTP MIME and XML
|
* be used for an script (following HTTP MIME and XML specifications). All this is nicely explained
|
||||||
* specifications). All this is nicely explained by Mark Pilgrim in his blog, <a
|
* by Mark Pilgrim in his blog, <a
|
||||||
* href="http://diveintomark.org/archives/2004/02/13/xml-media-types">
|
* href="http://diveintomark.org/archives/2004/02/13/xml-media-types"> Determining the character
|
||||||
* Determining the character encoding of a feed</a>.
|
* encoding of a feed</a>.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @author Alejandro Abdelnur
|
* @author Alejandro Abdelnur
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class XmlReader extends Reader {
|
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 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_16BE = "UTF-16BE";
|
||||||
private static final String UTF_16LE = "UTF-16LE";
|
private static final String UTF_16LE = "UTF-16LE";
|
||||||
private static final String UTF_16 = "UTF-16";
|
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 static String staticDefaultEncoding = null;
|
||||||
|
|
||||||
private Reader reader;
|
|
||||||
private String encoding;
|
|
||||||
private final String defaultEncoding;
|
private final String defaultEncoding;
|
||||||
|
|
||||||
/**
|
private Reader reader;
|
||||||
* Sets the default encoding to use if none is set in HTTP content-type, XML
|
private String encoding;
|
||||||
* 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a Reader for a File.
|
* Creates a Reader for a File.
|
||||||
* <p>
|
* <p>
|
||||||
* It looks for the UTF-8 BOM first, if none sniffs the XML prolog charset,
|
* It looks for the UTF-8 BOM first, if none sniffs the XML prolog charset, if this is also
|
||||||
* if this is also missing defaults to UTF-8.
|
* missing defaults to UTF-8.
|
||||||
* <p>
|
* <p>
|
||||||
* It does a lenient charset encoding detection, check the constructor with
|
* It does a lenient charset encoding detection, check the constructor with the lenient
|
||||||
* the lenient parameter for details.
|
* parameter for details.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param file File to create a Reader from.
|
* @param file File to create a Reader from.
|
||||||
|
@ -125,8 +107,8 @@ public class XmlReader extends Reader {
|
||||||
* <p>
|
* <p>
|
||||||
* It follows the same logic used for files.
|
* It follows the same logic used for files.
|
||||||
* <p>
|
* <p>
|
||||||
* It does a lenient charset encoding detection, check the constructor with
|
* It does a lenient charset encoding detection, check the constructor with the lenient
|
||||||
* the lenient parameter for details.
|
* parameter for details.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param is InputStream to create a Reader from.
|
* @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
|
* Creates a Reader for a raw InputStream and uses the provided default encoding if none is
|
||||||
* encoding if none is determined.
|
* determined.
|
||||||
* <p>
|
* <p>
|
||||||
* It follows the same logic used for files.
|
* It follows the same logic used for files.
|
||||||
* <p>
|
* <p>
|
||||||
* If lenient detection is indicated and the detection above fails as per
|
* If lenient detection is indicated and the detection above fails as per specifications it then
|
||||||
* specifications it then attempts the following:
|
* attempts the following:
|
||||||
* <p>
|
* <p>
|
||||||
* If the content type was 'text/html' it replaces it with 'text/xml' and
|
* If the content type was 'text/html' it replaces it with 'text/xml' and tries the detection
|
||||||
* tries the detection again.
|
* again.
|
||||||
* <p>
|
* <p>
|
||||||
* Else if the XML prolog had a charset encoding that encoding is used.
|
* Else if the XML prolog had a charset encoding that encoding is used.
|
||||||
* <p>
|
* <p>
|
||||||
|
@ -159,12 +141,11 @@ public class XmlReader extends Reader {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param is InputStream to create a Reader from.
|
* @param is InputStream to create a Reader from.
|
||||||
* @param lenient indicates if the charset encoding detection should be
|
* @param lenient indicates if the charset encoding detection should be relaxed.
|
||||||
* relaxed.
|
|
||||||
* @param defaultEncoding default encoding to use if one cannot be detected.
|
* @param defaultEncoding default encoding to use if one cannot be detected.
|
||||||
* @throws IOException thrown if there is a problem reading the stream.
|
* @throws IOException thrown if there is a problem reading the stream.
|
||||||
* @throws XmlReaderException thrown if the charset encoding could not be
|
* @throws XmlReaderException thrown if the charset encoding could not be determined according
|
||||||
* determined according to the specs.
|
* to the specs.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public XmlReader(final InputStream is, final boolean lenient, final String defaultEncoding) throws IOException, XmlReaderException {
|
public XmlReader(final InputStream is, final boolean lenient, final String defaultEncoding) throws IOException, XmlReaderException {
|
||||||
|
@ -189,11 +170,11 @@ public class XmlReader extends Reader {
|
||||||
* <p>
|
* <p>
|
||||||
* It follows the same logic used for files.
|
* It follows the same logic used for files.
|
||||||
* <p>
|
* <p>
|
||||||
* If lenient detection is indicated and the detection above fails as per
|
* If lenient detection is indicated and the detection above fails as per specifications it then
|
||||||
* specifications it then attempts the following:
|
* attempts the following:
|
||||||
* <p>
|
* <p>
|
||||||
* If the content type was 'text/html' it replaces it with 'text/xml' and
|
* If the content type was 'text/html' it replaces it with 'text/xml' and tries the detection
|
||||||
* tries the detection again.
|
* again.
|
||||||
* <p>
|
* <p>
|
||||||
* Else if the XML prolog had a charset encoding that encoding is used.
|
* Else if the XML prolog had a charset encoding that encoding is used.
|
||||||
* <p>
|
* <p>
|
||||||
|
@ -205,11 +186,10 @@ public class XmlReader extends Reader {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param is InputStream to create a Reader from.
|
* @param is InputStream to create a Reader from.
|
||||||
* @param lenient indicates if the charset encoding detection should be
|
* @param lenient indicates if the charset encoding detection should be relaxed.
|
||||||
* relaxed.
|
|
||||||
* @throws IOException thrown if there is a problem reading the stream.
|
* @throws IOException thrown if there is a problem reading the stream.
|
||||||
* @throws XmlReaderException thrown if the charset encoding could not be
|
* @throws XmlReaderException thrown if the charset encoding could not be determined according
|
||||||
* determined according to the specs.
|
* to the specs.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public XmlReader(final InputStream is, final boolean lenient) throws IOException, XmlReaderException {
|
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.
|
* Creates a Reader using the InputStream of a URL.
|
||||||
* <p>
|
* <p>
|
||||||
* If the URL is not of type HTTP and there is not 'content-type' header in
|
* If the URL is not of type HTTP and there is not 'content-type' header in the fetched data it
|
||||||
* the fetched data it uses the same logic used for Files.
|
* uses the same logic used for Files.
|
||||||
* <p>
|
* <p>
|
||||||
* If the URL is a HTTP Url or there is a 'content-type' header in the
|
* If the URL is a HTTP Url or there is a 'content-type' header in the fetched data it uses the
|
||||||
* fetched data it uses the same logic used for an InputStream with
|
* same logic used for an InputStream with content-type.
|
||||||
* content-type.
|
|
||||||
* <p>
|
* <p>
|
||||||
* It does a lenient charset encoding detection, check the constructor with
|
* It does a lenient charset encoding detection, check the constructor with the lenient
|
||||||
* the lenient parameter for details.
|
* parameter for details.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param url URL to create a Reader from.
|
* @param url URL to create a Reader from.
|
||||||
* @throws IOException thrown if there is a problem reading the stream of
|
* @throws IOException thrown if there is a problem reading the stream of the URL.
|
||||||
* the URL.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public XmlReader(final URL url) throws IOException {
|
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.
|
* Creates a Reader using the InputStream of a URLConnection.
|
||||||
* <p>
|
* <p>
|
||||||
* If the URLConnection is not of type HttpURLConnection and there is not
|
* If the URLConnection is not of type HttpURLConnection and there is not 'content-type' header
|
||||||
* 'content-type' header in the fetched data it uses the same logic used for
|
* in the fetched data it uses the same logic used for files.
|
||||||
* files.
|
|
||||||
* <p>
|
* <p>
|
||||||
* If the URLConnection is a HTTP Url or there is a 'content-type' header in
|
* If the URLConnection is a HTTP Url or there is a 'content-type' header in the fetched data it
|
||||||
* the fetched data it uses the same logic used for an InputStream with
|
* uses the same logic used for an InputStream with content-type.
|
||||||
* content-type.
|
|
||||||
* <p>
|
* <p>
|
||||||
* It does a lenient charset encoding detection, check the constructor with
|
* It does a lenient charset encoding detection, check the constructor with the lenient
|
||||||
* the lenient parameter for details.
|
* parameter for details.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param conn URLConnection to create a Reader from.
|
* @param conn URLConnection to create a Reader from.
|
||||||
* @throws IOException thrown if there is a problem reading the stream of
|
* @throws IOException thrown if there is a problem reading the stream of the URLConnection.
|
||||||
* the URLConnection.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public XmlReader(final URLConnection conn) throws IOException {
|
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
|
* Creates a Reader using an InputStream and the associated content-type header.
|
||||||
* header.
|
|
||||||
* <p>
|
* <p>
|
||||||
* First it checks if the stream has BOM. If there is not BOM checks the
|
* First it checks if the stream has BOM. If there is not BOM checks the content-type encoding.
|
||||||
* content-type encoding. If there is not content-type encoding checks the
|
* If there is not content-type encoding checks the XML prolog encoding. If there is not XML
|
||||||
* XML prolog encoding. If there is not XML prolog encoding uses the default
|
* prolog encoding uses the default encoding mandated by the content-type MIME type.
|
||||||
* encoding mandated by the content-type MIME type.
|
|
||||||
* <p>
|
* <p>
|
||||||
* It does a lenient charset encoding detection, check the constructor with
|
* It does a lenient charset encoding detection, check the constructor with the lenient
|
||||||
* the lenient parameter for details.
|
* parameter for details.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param is InputStream to create the reader from.
|
* @param is InputStream to create the reader from.
|
||||||
* @param httpContentType content-type header to use for the resolution of
|
* @param httpContentType content-type header to use for the resolution of the charset encoding.
|
||||||
* the charset encoding.
|
|
||||||
* @throws IOException thrown if there is a problem reading the file.
|
* @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
|
* Creates a Reader using an InputStream and the associated content-type header.
|
||||||
* header.
|
|
||||||
* <p>
|
* <p>
|
||||||
* First it checks if the stream has BOM. If there is not BOM checks the
|
* First it checks if the stream has BOM. If there is not BOM checks the content-type encoding.
|
||||||
* content-type encoding. If there is not content-type encoding checks the
|
* If there is not content-type encoding checks the XML prolog encoding. If there is not XML
|
||||||
* XML prolog encoding. If there is not XML prolog encoding uses the default
|
* prolog encoding uses the default encoding mandated by the content-type MIME type.
|
||||||
* encoding mandated by the content-type MIME type.
|
|
||||||
* <p>
|
* <p>
|
||||||
* If lenient detection is indicated and the detection above fails as per
|
* If lenient detection is indicated and the detection above fails as per specifications it then
|
||||||
* specifications it then attempts the following:
|
* attempts the following:
|
||||||
* <p>
|
* <p>
|
||||||
* If the content type was 'text/html' it replaces it with 'text/xml' and
|
* If the content type was 'text/html' it replaces it with 'text/xml' and tries the detection
|
||||||
* tries the detection again.
|
* again.
|
||||||
* <p>
|
* <p>
|
||||||
* Else if the XML prolog had a charset encoding that encoding is used.
|
* Else if the XML prolog had a charset encoding that encoding is used.
|
||||||
* <p>
|
* <p>
|
||||||
|
@ -331,14 +301,12 @@ public class XmlReader extends Reader {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param is InputStream to create the reader from.
|
* @param is InputStream to create the reader from.
|
||||||
* @param httpContentType content-type header to use for the resolution of
|
* @param httpContentType content-type header to use for the resolution of the charset encoding.
|
||||||
* the charset encoding.
|
* @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.
|
* @param defaultEncoding default encoding to use if one cannot be detected.
|
||||||
* @throws IOException thrown if there is a problem reading the file.
|
* @throws IOException thrown if there is a problem reading the file.
|
||||||
* @throws XmlReaderException thrown if the charset encoding could not be
|
* @throws XmlReaderException thrown if the charset encoding could not be determined according
|
||||||
* determined according to the specs.
|
* to the specs.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public XmlReader(final InputStream is, final String httpContentType, final boolean lenient, final String defaultEncoding) throws IOException,
|
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
|
* Creates a Reader using an InputStream and the associated content-type header.
|
||||||
* header.
|
|
||||||
* <p>
|
* <p>
|
||||||
* First it checks if the stream has BOM. If there is not BOM checks the
|
* First it checks if the stream has BOM. If there is not BOM checks the content-type encoding.
|
||||||
* content-type encoding. If there is not content-type encoding checks the
|
* If there is not content-type encoding checks the XML prolog encoding. If there is not XML
|
||||||
* XML prolog encoding. If there is not XML prolog encoding uses the default
|
* prolog encoding uses the default encoding mandated by the content-type MIME type.
|
||||||
* encoding mandated by the content-type MIME type.
|
|
||||||
* <p>
|
* <p>
|
||||||
* If lenient detection is indicated and the detection above fails as per
|
* If lenient detection is indicated and the detection above fails as per specifications it then
|
||||||
* specifications it then attempts the following:
|
* attempts the following:
|
||||||
* <p>
|
* <p>
|
||||||
* If the content type was 'text/html' it replaces it with 'text/xml' and
|
* If the content type was 'text/html' it replaces it with 'text/xml' and tries the detection
|
||||||
* tries the detection again.
|
* again.
|
||||||
* <p>
|
* <p>
|
||||||
* Else if the XML prolog had a charset encoding that encoding is used.
|
* Else if the XML prolog had a charset encoding that encoding is used.
|
||||||
* <p>
|
* <p>
|
||||||
|
@ -384,19 +350,56 @@ public class XmlReader extends Reader {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param is InputStream to create the reader from.
|
* @param is InputStream to create the reader from.
|
||||||
* @param httpContentType content-type header to use for the resolution of
|
* @param httpContentType content-type header to use for the resolution of the charset encoding.
|
||||||
* the charset encoding.
|
* @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 file.
|
* @throws IOException thrown if there is a problem reading the file.
|
||||||
* @throws XmlReaderException thrown if the charset encoding could not be
|
* @throws XmlReaderException thrown if the charset encoding could not be determined according
|
||||||
* determined according to the specs.
|
* to the specs.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public XmlReader(final InputStream is, final String httpContentType, final boolean lenient) throws IOException, XmlReaderException {
|
public XmlReader(final InputStream is, final String httpContentType, final boolean lenient) throws IOException, XmlReaderException {
|
||||||
this(is, httpContentType, lenient, null);
|
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 {
|
private void doLenientDetection(String httpContentType, XmlReaderException ex) throws IOException {
|
||||||
if (httpContentType != null) {
|
if (httpContentType != null) {
|
||||||
if (httpContentType.startsWith("text/html")) {
|
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
|
@Override
|
||||||
public int read(final char[] buf, final int offset, final int len) throws IOException {
|
public int read(final char[] buf, final int offset, final int len) throws IOException {
|
||||||
return reader.read(buf, offset, len);
|
return reader.read(buf, offset, len);
|
||||||
|
@ -571,8 +563,6 @@ public class XmlReader extends Reader {
|
||||||
return mime;
|
return mime;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final Pattern CHARSET_PATTERN = Pattern.compile("charset=([.[^; ]]*)");
|
|
||||||
|
|
||||||
// returns charset parameter value, NULL if not present, NULL if
|
// returns charset parameter value, NULL if not present, NULL if
|
||||||
// httpContentType is NULL
|
// httpContentType is NULL
|
||||||
private static String getContentTypeEncoding(final String httpContentType) {
|
private static String getContentTypeEncoding(final String httpContentType) {
|
||||||
|
@ -646,8 +636,6 @@ public class XmlReader extends Reader {
|
||||||
return encoding;
|
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
|
// returns the encoding declared in the <?xml encoding=...?>, NULL if none
|
||||||
private static String getXmlProlog(final BufferedInputStream is, final String guessedEnc) throws IOException {
|
private static String getXmlProlog(final BufferedInputStream is, final String guessedEnc) throws IOException {
|
||||||
String encoding = null;
|
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"));
|
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");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,14 +4,12 @@ import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The XmlReaderException is thrown by the XmlReader constructors if the charset
|
* The XmlReaderException is thrown by the XmlReader constructors if the charset encoding can not be
|
||||||
* encoding can not be determined according to the XML 1.0 specification and RFC
|
* determined according to the XML 1.0 specification and RFC 3023.
|
||||||
* 3023.
|
|
||||||
* <p>
|
* <p>
|
||||||
* The exception returns the unconsumed InputStream to allow the application to
|
* The exception returns the unconsumed InputStream to allow the application to do an alternate
|
||||||
* do an alternate processing with the stream. Note that the original
|
* processing with the stream. Note that the original InputStream given to the XmlReader cannot be
|
||||||
* InputStream given to the XmlReader cannot be used as that one has been
|
* used as that one has been already read.
|
||||||
* already read.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @author Alejandro Abdelnur
|
* @author Alejandro Abdelnur
|
||||||
|
@ -27,8 +25,7 @@ public class XmlReaderException extends IOException {
|
||||||
private final InputStream is;
|
private final InputStream is;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an exception instance if the charset encoding could not be
|
* Creates an exception instance if the charset encoding could not be determined.
|
||||||
* determined.
|
|
||||||
* <p>
|
* <p>
|
||||||
* Instances of this exception are thrown by the XmlReader.
|
* Instances of this exception are thrown by the XmlReader.
|
||||||
* <p>
|
* <p>
|
||||||
|
@ -45,8 +42,7 @@ public class XmlReaderException extends IOException {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an exception instance if the charset encoding could not be
|
* Creates an exception instance if the charset encoding could not be determined.
|
||||||
* determined.
|
|
||||||
* <p>
|
* <p>
|
||||||
* Instances of this exception are thrown by the XmlReader.
|
* Instances of this exception are thrown by the XmlReader.
|
||||||
* <p>
|
* <p>
|
||||||
|
@ -105,12 +101,11 @@ public class XmlReaderException extends IOException {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the MIME type in the content-type used to attempt determining the
|
* Returns the MIME type in the content-type used to attempt determining the encoding.
|
||||||
* encoding.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the MIME type in the content-type, null if there was not
|
* @return the MIME type in the content-type, null if there was not content-type or the encoding
|
||||||
* content-type or the encoding detection did not involve HTTP.
|
* detection did not involve HTTP.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public String getContentTypeMime() {
|
public String getContentTypeMime() {
|
||||||
|
@ -118,13 +113,11 @@ public class XmlReaderException extends IOException {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the encoding in the content-type used to attempt determining the
|
* Returns the encoding in the content-type used to attempt determining the encoding.
|
||||||
* encoding.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the encoding in the content-type, null if there was not
|
* @return the encoding in the content-type, null if there was not content-type, no encoding in
|
||||||
* content-type, no encoding in it or the encoding detection did not
|
* it or the encoding detection did not involve HTTP.
|
||||||
* involve HTTP.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public String getContentTypeEncoding() {
|
public String getContentTypeEncoding() {
|
||||||
|
@ -132,8 +125,8 @@ public class XmlReaderException extends IOException {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the unconsumed InputStream to allow the application to do an
|
* Returns the unconsumed InputStream to allow the application to do an alternate encoding
|
||||||
* alternate encoding detection on the InputStream.
|
* detection on the InputStream.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return the unconsumed InputStream.
|
* @return the unconsumed InputStream.
|
||||||
|
|
|
@ -501,8 +501,8 @@ public class Atom10Parser extends BaseWireFeedParser {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resolve URI via base URL and parent element. Resolve URI based
|
* Resolve URI via base URL and parent element. Resolve URI based considering xml:base and
|
||||||
* considering xml:base and baseURI.
|
* baseURI.
|
||||||
*
|
*
|
||||||
* @param baseURI Base URI used to fetch the XML document
|
* @param baseURI Base URI used to fetch the XML document
|
||||||
* @param parent Parent element from which to consider xml:base
|
* @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
|
* Return URL string of Atom link element under parent element. Link with no rel attribute is
|
||||||
* rel attribute is considered to be rel="alternate"
|
* considered to be rel="alternate"
|
||||||
*
|
*
|
||||||
* @param parent Consider only children of this parent element
|
* @param parent Consider only children of this parent element
|
||||||
* @param rel Consider only links with this relationship
|
* @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
|
* Form URI by combining base with append portion and giving special consideration to append
|
||||||
* consideration to append portions that begin with ".."
|
* portions that begin with ".."
|
||||||
*
|
*
|
||||||
* @param base Base of URI, may end with trailing slash
|
* @param base Base of URI, may end with trailing slash
|
||||||
* @param append String to append, may begin with slash or ".."
|
* @param append String to append, may begin with slash or ".."
|
||||||
|
@ -660,7 +660,8 @@ public class Atom10Parser extends BaseWireFeedParser {
|
||||||
/**
|
/**
|
||||||
* Parse entry from reader.
|
* 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
|
// Parse entry into JDOM tree
|
||||||
final SAXBuilder builder = new SAXBuilder();
|
final SAXBuilder builder = new SAXBuilder();
|
||||||
final Document entryDoc = builder.build(rd);
|
final Document entryDoc = builder.build(rd);
|
||||||
|
|
|
@ -27,8 +27,7 @@ package com.sun.syndication.io.impl;
|
||||||
public class Base64 {
|
public class Base64 {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Encodes a String into a base 64 String. The resulting encoding is chunked
|
* Encodes a String into a base 64 String. The resulting encoding is chunked at 76 bytes.
|
||||||
* at 76 bytes.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param s String to encode.
|
* @param s String to encode.
|
||||||
|
@ -48,8 +47,8 @@ public class Base64 {
|
||||||
*
|
*
|
||||||
* @param s String to decode.
|
* @param s String to decode.
|
||||||
* @return encoded string.
|
* @return encoded string.
|
||||||
* @throws java.lang.IllegalArgumentException thrown if the given byte array
|
* @throws java.lang.IllegalArgumentException thrown if the given byte array was not valid
|
||||||
* was not valid com.sun.syndication.io.impl.Base64 encoding.
|
* com.sun.syndication.io.impl.Base64 encoding.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static String decode(String s) throws IllegalArgumentException {
|
public static String decode(String s) throws IllegalArgumentException {
|
||||||
|
@ -146,8 +145,8 @@ public class Base64 {
|
||||||
*
|
*
|
||||||
* @param eData byte array to decode.
|
* @param eData byte array to decode.
|
||||||
* @return decoded byte array.
|
* @return decoded byte array.
|
||||||
* @throws java.lang.IllegalArgumentException thrown if the given byte array
|
* @throws java.lang.IllegalArgumentException thrown if the given byte array was not valid
|
||||||
* was not valid com.sun.syndication.io.impl.Base64 encoding.
|
* com.sun.syndication.io.impl.Base64 encoding.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static byte[] decode(final byte[] eData) {
|
public static byte[] decode(final byte[] eData) {
|
||||||
|
|
|
@ -99,16 +99,14 @@ public abstract class BaseWireFeedGenerator implements WireFeedGenerator {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Purging unused declarations is less optimal, performance-wise, than never
|
* Purging unused declarations is less optimal, performance-wise, than never adding them in the
|
||||||
* adding them in the first place. So, we should still ask the ROME guys to
|
* first place. So, we should still ask the ROME guys to fix their code (not adding dozens of
|
||||||
* fix their code (not adding dozens of unnecessary module declarations).
|
* unnecessary module declarations). Having said that: purging them here, before XML generation,
|
||||||
* Having said that: purging them here, before XML generation, is more
|
* is more efficient than parsing and re-molding the XML after ROME generates it.
|
||||||
* efficient than parsing and re-molding the XML after ROME generates it.
|
|
||||||
* <p/>
|
* <p/>
|
||||||
* Note that the calling app could still add declarations/modules to the
|
* Note that the calling app could still add declarations/modules to the Feed tree after this.
|
||||||
* Feed tree after this. Which is fine. But those modules are then
|
* Which is fine. But those modules are then responsible for crawling to the root of the tree,
|
||||||
* responsible for crawling to the root of the tree, at generate() time, to
|
* at generate() time, to make sure their namespace declarations are present.
|
||||||
* make sure their namespace declarations are present.
|
|
||||||
*/
|
*/
|
||||||
protected static void purgeUnusedNamespaceDeclarations(final Element root) {
|
protected static void purgeUnusedNamespaceDeclarations(final Element root) {
|
||||||
final Set<String> usedPrefixes = new HashSet<String>();
|
final Set<String> usedPrefixes = new HashSet<String>();
|
||||||
|
|
|
@ -78,12 +78,10 @@ public class DCModuleGenerator implements ModuleGenerator {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a set with all the URIs (JDOM Namespace elements) this module
|
* Returns a set with all the URIs (JDOM Namespace elements) this module generator uses.
|
||||||
* generator uses.
|
|
||||||
* <p/>
|
* <p/>
|
||||||
* It is used by the the feed generators to add their namespace definition
|
* It is used by the the feed generators to add their namespace definition in the root element
|
||||||
* in the root element of the generated document (forward-missing of Java
|
* of the generated document (forward-missing of Java 5.0 Generics).
|
||||||
* 5.0 Generics).
|
|
||||||
* <p/>
|
* <p/>
|
||||||
*
|
*
|
||||||
* @return a set with all the URIs this module generator uses.
|
* @return a set with all the URIs this module generator uses.
|
||||||
|
|
|
@ -24,12 +24,12 @@ import java.util.Locale;
|
||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A helper class that parses Dates out of Strings with date time in RFC822 and
|
* A helper class that parses Dates out of Strings with date time in RFC822 and W3CDateTime formats
|
||||||
* W3CDateTime formats plus the variants Atom (0.3) and RSS (0.9, 0.91, 0.92,
|
* plus the variants Atom (0.3) and RSS (0.9, 0.91, 0.92, 0.93, 0.94, 1.0 and 2.0) specificators
|
||||||
* 0.93, 0.94, 1.0 and 2.0) specificators added to those formats.
|
* added to those formats.
|
||||||
* <p/>
|
* <p/>
|
||||||
* It uses the JDK java.text.SimpleDateFormat class attemtping the parse using a
|
* It uses the JDK java.text.SimpleDateFormat class attemtping the parse using a mask for each one
|
||||||
* mask for each one of the possible formats.
|
* of the possible formats.
|
||||||
* <p/>
|
* <p/>
|
||||||
*
|
*
|
||||||
* @author Alejandro Abdelnur
|
* @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" };
|
"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
|
* The masks used to validate and parse the input to this Atom date. These are a lot more
|
||||||
* are a lot more forgiving than what the Atom spec allows. The forms that
|
* forgiving than what the Atom spec allows. The forms that are invalid according to the spec
|
||||||
* are invalid according to the spec are indicated.
|
* are indicated.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
private static final String[] masks = { "yyyy-MM-dd'T'HH:mm:ss.SSSz", "yyyy-MM-dd't'HH:mm:ss.SSSz", // invalid
|
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 masks array of masks to use for parsing the string
|
||||||
* @param sDate string to parse for a date.
|
* @param sDate string to parse for a date.
|
||||||
* @return the Date represented by the given string using one of the given
|
* @return the Date represented by the given string using one of the given masks. It returns
|
||||||
* masks. It returns <b>null</b> if it was not possible to parse the
|
* <b>null</b> if it was not possible to parse the the string with any of the masks.
|
||||||
* the string with any of the masks.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static Date parseUsingMask(final String[] masks, String sDate, final Locale locale) {
|
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>
|
* <li>"dd MMM yy HH:mm z"</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
* <p/>
|
* <p/>
|
||||||
* Refer to the java.text.SimpleDateFormat javadocs for details on the
|
* Refer to the java.text.SimpleDateFormat javadocs for details on the format of each element.
|
||||||
* format of each element.
|
|
||||||
* <p/>
|
* <p/>
|
||||||
*
|
*
|
||||||
* @param sDate string to parse for a date.
|
* @param sDate string to parse for a date.
|
||||||
* @return the Date represented by the given RFC822 string. It returns
|
* @return the Date represented by the given RFC822 string. It returns <b>null</b> if it was not
|
||||||
* <b>null</b> if it was not possible to parse the given string into
|
* possible to parse the given string into a Date.
|
||||||
* a Date.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static Date parseRFC822(String sDate, final Locale locale) {
|
public static Date parseRFC822(String sDate, final Locale locale) {
|
||||||
|
@ -176,14 +173,12 @@ public class DateParser {
|
||||||
* <li>"yyyy"</li>
|
* <li>"yyyy"</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
* <p/>
|
* <p/>
|
||||||
* Refer to the java.text.SimpleDateFormat javadocs for details on the
|
* Refer to the java.text.SimpleDateFormat javadocs for details on the format of each element.
|
||||||
* format of each element.
|
|
||||||
* <p/>
|
* <p/>
|
||||||
*
|
*
|
||||||
* @param sDate string to parse for a date.
|
* @param sDate string to parse for a date.
|
||||||
* @return the Date represented by the given W3C date-time string. It
|
* @return the Date represented by the given W3C date-time string. It returns <b>null</b> if it
|
||||||
* returns <b>null</b> if it was not possible to parse the given
|
* was not possible to parse the given string into a Date.
|
||||||
* string into a Date.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static Date parseW3CDateTime(String sDate, final Locale locale) {
|
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
|
* Parses a Date out of a String with a date in W3C date-time format or in a RFC822 format.
|
||||||
* RFC822 format.
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param sDate string to parse for a date.
|
* @param sDate string to parse for a date.
|
||||||
* @return the Date represented by the given W3C date-time string. It
|
* @return the Date represented by the given W3C date-time string. It returns <b>null</b> if it
|
||||||
* returns <b>null</b> if it was not possible to parse the given
|
* was not possible to parse the given string into a Date.
|
||||||
* string into a Date.
|
|
||||||
*
|
*
|
||||||
* */
|
* */
|
||||||
public static Date parseDate(final String sDate, final Locale locale) {
|
public static Date parseDate(final String sDate, final Locale locale) {
|
||||||
|
@ -239,13 +232,12 @@ public class DateParser {
|
||||||
/**
|
/**
|
||||||
* create a RFC822 representation of a date.
|
* create a RFC822 representation of a date.
|
||||||
* <p/>
|
* <p/>
|
||||||
* Refer to the java.text.SimpleDateFormat javadocs for details on the
|
* Refer to the java.text.SimpleDateFormat javadocs for details on the format of each element.
|
||||||
* format of each element.
|
|
||||||
* <p/>
|
* <p/>
|
||||||
*
|
*
|
||||||
* @param date Date to parse
|
* @param date Date to parse
|
||||||
* @return the RFC822 represented by the given Date It returns <b>null</b>
|
* @return the RFC822 represented by the given Date It returns <b>null</b> if it was not
|
||||||
* if it was not possible to parse the date.
|
* possible to parse the date.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static String formatRFC822(final Date date, final Locale locale) {
|
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.
|
* create a W3C Date Time representation of a date.
|
||||||
* <p/>
|
* <p/>
|
||||||
* Refer to the java.text.SimpleDateFormat javadocs for details on the
|
* Refer to the java.text.SimpleDateFormat javadocs for details on the format of each element.
|
||||||
* format of each element.
|
|
||||||
* <p/>
|
* <p/>
|
||||||
*
|
*
|
||||||
* @param date Date to parse
|
* @param date Date to parse
|
||||||
* @return the W3C Date Time represented by the given Date It returns
|
* @return the W3C Date Time represented by the given Date It returns <b>null</b> if it was not
|
||||||
* <b>null</b> if it was not possible to parse the date.
|
* possible to parse the date.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static String formatW3CDateTime(final Date date, final Locale locale) {
|
public static String formatW3CDateTime(final Date date, final Locale locale) {
|
||||||
|
|
|
@ -23,14 +23,12 @@ import com.sun.syndication.io.WireFeedGenerator;
|
||||||
/**
|
/**
|
||||||
* Generates an XML document (JDOM Document) out of a Feed.
|
* Generates an XML document (JDOM Document) out of a Feed.
|
||||||
* <p>
|
* <p>
|
||||||
* It can generate all flavors of RSS (0.90, 0.91, 0.92, 0.93, 0.94, 1.0 and
|
* 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.
|
||||||
* 2.0) and Atom 0.3 feed.
|
|
||||||
* <p>
|
* <p>
|
||||||
* WireFeedGenerator instances are thread safe.
|
* WireFeedGenerator instances are thread safe.
|
||||||
* <p>
|
* <p>
|
||||||
* Generators for a specific type must extend this class and register in the
|
* Generators for a specific type must extend this class and register in the generator list. (Right
|
||||||
* generator list. (Right now registration is hardcoded in the WireFeedGenerator
|
* now registration is hardcoded in the WireFeedGenerator constructor).
|
||||||
* constructor).
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @author Alejandro Abdelnur
|
* @author Alejandro Abdelnur
|
||||||
|
|
|
@ -25,16 +25,14 @@ import com.sun.syndication.io.WireFeedParser;
|
||||||
/**
|
/**
|
||||||
* Parses an XML document (JDOM Document) into a Feed.
|
* Parses an XML document (JDOM Document) into a Feed.
|
||||||
* <p>
|
* <p>
|
||||||
* It accepts all flavors of RSS (0.90, 0.91, 0.92, 0.93, 0.94, 1.0 and 2.0) and
|
* 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.
|
||||||
* Atom 0.3 feeds.
|
|
||||||
* <p>
|
* <p>
|
||||||
* The WireFeedParser is a liberal parser.
|
* The WireFeedParser is a liberal parser.
|
||||||
* <p>
|
* <p>
|
||||||
* WireFeedParser instances are thread safe.
|
* WireFeedParser instances are thread safe.
|
||||||
* <p>
|
* <p>
|
||||||
* Parsers for a specific type must extend this class and register in the parser
|
* Parsers for a specific type must extend this class and register in the parser list. (Right now
|
||||||
* list. (Right now registration is hardcoded in the WireFeedParser
|
* registration is hardcoded in the WireFeedParser constructor).
|
||||||
* constructor).
|
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @author Alejandro Abdelnur
|
* @author Alejandro Abdelnur
|
||||||
|
@ -66,8 +64,8 @@ public class FeedParsers extends PluginManager<WireFeedParser> {
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param document document feed to find the parser for.
|
* @param document document feed to find the parser for.
|
||||||
* @return the parser for the given document or <b>null</b> if there is no
|
* @return the parser for the given document or <b>null</b> if there is no parser for that
|
||||||
* parser for that document.
|
* document.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public WireFeedParser getParserFor(final Document document) {
|
public WireFeedParser getParserFor(final Document document) {
|
||||||
|
|
|
@ -4,15 +4,12 @@ package com.sun.syndication.io.impl;
|
||||||
* A helper class that parses Numbers out of Strings in a lenient manner.
|
* A helper class that parses Numbers out of Strings in a lenient manner.
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* No method will throw any sort of Exception when parsing a string. All methods
|
* No method will throw any sort of Exception when parsing a string. All methods accept any Java
|
||||||
* accept any Java String or null as legal input, if the input is non null,
|
* String or null as legal input, if the input is non null, whitespace will be trimmed first, and
|
||||||
* whitespace will be trimmed first, and then parsing will be attempted.
|
* then parsing will be attempted.
|
||||||
* </p>
|
|
||||||
* <p>
|
|
||||||
* :TODO: Add Integer, Float, and Double methods as needed.
|
|
||||||
* </p>
|
* </p>
|
||||||
*/
|
*/
|
||||||
public class NumberParser {
|
public final class NumberParser {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Private constructor to avoid NumberParser instances creation.
|
* Private constructor to avoid NumberParser instances creation.
|
||||||
|
@ -24,8 +21,8 @@ public class NumberParser {
|
||||||
* Parses a Long out of a string.
|
* Parses a Long out of a string.
|
||||||
*
|
*
|
||||||
* @param str string to parse for a Long.
|
* @param str string to parse for a Long.
|
||||||
* @return the Long represented by the given string, It returns <b>null</b>
|
* @return the Long represented by the given string, It returns <b>null</b> if it was not
|
||||||
* if it was not possible to parse the the string.
|
* possible to parse the the string.
|
||||||
*/
|
*/
|
||||||
public static Long parseLong(final String str) {
|
public static Long parseLong(final String str) {
|
||||||
if (null != str) {
|
if (null != str) {
|
||||||
|
@ -39,12 +36,11 @@ public class NumberParser {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parse an Integer from a String. If the String is not an integer
|
* Parse an Integer from a String. If the String is not an integer <b>null</b> is returned and
|
||||||
* <b>null</b> is returned and no exception is thrown.
|
* no exception is thrown.
|
||||||
*
|
*
|
||||||
* @param str the String to parse
|
* @param str the String to parse
|
||||||
* @return The Integer represented by the String, or null if it could not be
|
* @return The Integer represented by the String, or null if it could not be parsed.
|
||||||
* parsed.
|
|
||||||
*/
|
*/
|
||||||
public static Integer parseInt(final String str) {
|
public static Integer parseInt(final String str) {
|
||||||
if (null != 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
|
* Parse a Float from a String without exceptions. If the String is not a Float then null is
|
||||||
* Float then null is returned
|
* returned
|
||||||
*
|
*
|
||||||
* @param str the String to parse
|
* @param str the String to parse
|
||||||
* @return The Float represented by the String, or null if it could not be
|
* @return The Float represented by the String, or null if it could not be parsed.
|
||||||
* parsed.
|
|
||||||
*/
|
*/
|
||||||
public static Float parseFloat(final String str) {
|
public static Float parseFloat(final String str) {
|
||||||
if (null != str) {
|
if (null != str) {
|
||||||
|
@ -96,13 +91,12 @@ public class NumberParser {
|
||||||
* Parses a long out of a string.
|
* Parses a long out of a string.
|
||||||
*
|
*
|
||||||
* @param str string to parse for a long.
|
* @param str string to parse for a long.
|
||||||
* @param def default value to return if it is not possible to parse the the
|
* @param def default value to return if it is not possible to parse the the string.
|
||||||
* string.
|
|
||||||
* @return the long represented by the given string, or the default.
|
* @return the long represented by the given string, or the default.
|
||||||
*/
|
*/
|
||||||
public static long parseLong(final String str, final long def) {
|
public static long parseLong(final String str, final long def) {
|
||||||
final Long ret = parseLong(str);
|
final Long ret = parseLong(str);
|
||||||
if (null == ret) {
|
if (ret == null) {
|
||||||
return def;
|
return def;
|
||||||
} else {
|
} else {
|
||||||
return ret.longValue();
|
return ret.longValue();
|
||||||
|
|
|
@ -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
|
* Loads and returns the classes defined in the properties files. If the system property
|
||||||
* classLoader.loadClass will be used to load classes (instead of Class.forName). This is designed to improve OSGi compatibility. Further information can be
|
* "rome.pluginmanager.useloadclass" is set to true then classLoader.loadClass will be used to
|
||||||
* found in https://rome.dev.java.net/issues/show_bug.cgi?id=118
|
* 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>
|
* <p>
|
||||||
*
|
*
|
||||||
* @return array containing the classes defined in the properties files.
|
* @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")
|
@SuppressWarnings("unchecked")
|
||||||
|
|
|
@ -14,13 +14,16 @@ import java.util.WeakHashMap;
|
||||||
import com.sun.syndication.feed.impl.ConfigurableClassLoader;
|
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>
|
* <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
|
* The master properties file has to be in a distinct location than the extra properties files.
|
||||||
* properties files in their order of appearance in the classpath.
|
* First the master properties file is loaded, then all the extra properties files in their order of
|
||||||
|
* appearance in the classpath.
|
||||||
* <P>
|
* <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
|
* Current use cases (plugin manager for parsers/converters/generators for feeds and modules and
|
||||||
* the only method to get property values is the getTokenizedProperty().
|
* date formats) assume properties are list of tokens, that why the only method to get property
|
||||||
|
* values is the getTokenizedProperty().
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @author Alejandro Abdelnur
|
* @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
|
* Returns an array of tokenized values stored under a property key in all properties files. If
|
||||||
* first ones in the array.
|
* the master file has this property its tokens will be the first ones in the array.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param key property key to retrieve values
|
* @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.
|
* @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
|
* Returns an array of values stored under a property key in all properties files. If the master
|
||||||
* array.
|
* file has this property it will be the first ones in the array.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* @param key property key to retrieve values
|
* @param key property key to retrieve values
|
||||||
|
|
|
@ -104,8 +104,8 @@ public class RSS090Generator extends BaseWireFeedGenerator {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Populates the given channel with parsed data from the ROME element that
|
* Populates the given channel with parsed data from the ROME element that holds the channel
|
||||||
* holds the channel data.
|
* data.
|
||||||
*
|
*
|
||||||
* @param channel the channel into which parsed data will be added.
|
* @param channel the channel into which parsed data will be added.
|
||||||
* @param eChannel the XML element that holds the data for the channel.
|
* @param eChannel the XML element that holds the data for the channel.
|
||||||
|
|
|
@ -97,8 +97,8 @@ public class RSS090Parser extends BaseWireFeedParser {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the namespace used by RSS elements in document of the RSS version
|
* Returns the namespace used by RSS elements in document of the RSS version the parser
|
||||||
* the parser supports.
|
* supports.
|
||||||
* <P>
|
* <P>
|
||||||
* This implementation returns the EMTPY namespace.
|
* This implementation returns the EMTPY namespace.
|
||||||
* <p>
|
* <p>
|
||||||
|
@ -110,8 +110,8 @@ public class RSS090Parser extends BaseWireFeedParser {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the namespace used by RDF elements in document of the RSS version
|
* Returns the namespace used by RDF elements in document of the RSS version the parser
|
||||||
* the parser supports.
|
* supports.
|
||||||
* <P>
|
* <P>
|
||||||
* This implementation returns the EMTPY namespace.
|
* This implementation returns the EMTPY namespace.
|
||||||
* <p>
|
* <p>
|
||||||
|
@ -137,11 +137,10 @@ public class RSS090Parser extends BaseWireFeedParser {
|
||||||
/**
|
/**
|
||||||
* Parses the root element of an RSS document into a Channel bean.
|
* Parses the root element of an RSS document into a Channel bean.
|
||||||
* <p/>
|
* <p/>
|
||||||
* It reads title, link and description and delegates to parseImage,
|
* It reads title, link and description and delegates to parseImage, parseItems and
|
||||||
* parseItems and parseTextInput. This delegation always passes the root
|
* parseTextInput. This delegation always passes the root element of the RSS document as
|
||||||
* element of the RSS document as different RSS version may have this
|
* different RSS version may have this information in different parts of the XML tree (no
|
||||||
* information in different parts of the XML tree (no assumptions made
|
* assumptions made thanks to the specs variaty)
|
||||||
* thanks to the specs variaty)
|
|
||||||
* <p/>
|
* <p/>
|
||||||
*
|
*
|
||||||
* @param rssRoot the root element of the RSS document to parse.
|
* @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
|
* This method exists because RSS0.90 and RSS1.0 have the 'item' elements under the root
|
||||||
* under the root elemment. And RSS0.91, RSS0.02, RSS0.93, RSS0.94 and
|
* elemment. And RSS0.91, RSS0.02, RSS0.93, RSS0.94 and RSS2.0 have the item elements under the
|
||||||
* RSS2.0 have the item elements under the 'channel' element.
|
* 'channel' element.
|
||||||
* <p/>
|
* <p/>
|
||||||
*/
|
*/
|
||||||
protected List<Element> getItems(final Element rssRoot) {
|
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
|
* This method exists because RSS0.90 and RSS1.0 have the 'image' element under the root
|
||||||
* under the root elemment. And RSS0.91, RSS0.02, RSS0.93, RSS0.94 and
|
* elemment. And RSS0.91, RSS0.02, RSS0.93, RSS0.94 and RSS2.0 have it under the 'channel'
|
||||||
* RSS2.0 have it under the 'channel' element.
|
* element.
|
||||||
* <p/>
|
* <p/>
|
||||||
*/
|
*/
|
||||||
protected Element getImage(final Element rssRoot) {
|
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'
|
* This method exists because RSS0.90 and RSS1.0 have the 'textinput' element under the root
|
||||||
* element under the root elemment. And RSS0.91, RSS0.02, RSS0.93, RSS0.94
|
* elemment. And RSS0.91, RSS0.02, RSS0.93, RSS0.94 and RSS2.0 have it under the 'channel'
|
||||||
* and RSS2.0 have it under the 'channel' element.
|
* element.
|
||||||
* <p/>
|
* <p/>
|
||||||
*/
|
*/
|
||||||
protected Element getTextInput(final Element rssRoot) {
|
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.
|
* It reads title and url out of the 'image' element.
|
||||||
* <p/>
|
* <p/>
|
||||||
*
|
*
|
||||||
* @param rssRoot the root element of the RSS document to parse for image
|
* @param rssRoot the root element of the RSS document to parse for image information.
|
||||||
* information.
|
|
||||||
* @return the parsed image bean.
|
* @return the parsed image bean.
|
||||||
*/
|
*/
|
||||||
protected Image parseImage(final Element rssRoot) {
|
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
|
* Parses the root element of an RSS document looking for all items information.
|
||||||
* information.
|
|
||||||
* <p/>
|
* <p/>
|
||||||
* It iterates through the item elements list, obtained from the getItems()
|
* It iterates through the item elements list, obtained from the getItems() method, and invoke
|
||||||
* method, and invoke parseItem() for each item element. The resulting
|
* parseItem() for each item element. The resulting RSSItem of each item element is stored in a
|
||||||
* RSSItem of each item element is stored in a list.
|
* list.
|
||||||
* <p/>
|
* <p/>
|
||||||
*
|
*
|
||||||
* @param rssRoot the root element of the RSS document to parse for all
|
* @param rssRoot the root element of the RSS document to parse for all items information.
|
||||||
* items information.
|
|
||||||
* @return a list with all the parsed RSSItem beans.
|
* @return a list with all the parsed RSSItem beans.
|
||||||
*/
|
*/
|
||||||
protected List<Item> parseItems(final Element rssRoot, final Locale locale) {
|
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.
|
* It reads title and link out of the 'item' element.
|
||||||
* <p/>
|
* <p/>
|
||||||
*
|
*
|
||||||
* @param rssRoot the root element of the RSS document in case it's needed
|
* @param rssRoot the root element of the RSS document in case it's needed for context.
|
||||||
* for context.
|
|
||||||
* @param eItem the item element to parse.
|
* @param eItem the item element to parse.
|
||||||
* @return the parsed RSSItem bean.
|
* @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
|
* Parses the root element of an RSS document looking for text-input information.
|
||||||
* information.
|
|
||||||
* <p/>
|
* <p/>
|
||||||
* It reads title, description, name and link out of the 'textinput' or
|
* It reads title, description, name and link out of the 'textinput' or 'textInput' element.
|
||||||
* 'textInput' element.
|
|
||||||
* <p/>
|
* <p/>
|
||||||
*
|
*
|
||||||
* @param rssRoot the root element of the RSS document to parse for
|
* @param rssRoot the root element of the RSS document to parse for text-input information.
|
||||||
* text-input information.
|
|
||||||
* @return the parsed RSSTextInput bean.
|
* @return the parsed RSSTextInput bean.
|
||||||
*/
|
*/
|
||||||
protected TextInput parseTextInput(final Element rssRoot) {
|
protected TextInput parseTextInput(final Element rssRoot) {
|
||||||
|
|
|
@ -79,8 +79,8 @@ public class RSS091UserlandParser extends RSS090Parser {
|
||||||
/**
|
/**
|
||||||
* Parses the root element of an RSS document into a Channel bean.
|
* Parses the root element of an RSS document into a Channel bean.
|
||||||
* <p/>
|
* <p/>
|
||||||
* It first invokes super.parseChannel and then parses and injects the
|
* It first invokes super.parseChannel and then parses and injects the following properties if
|
||||||
* following properties if present: language, pubDate, rating and copyright.
|
* present: language, pubDate, rating and copyright.
|
||||||
* <p/>
|
* <p/>
|
||||||
*
|
*
|
||||||
* @param rssRoot the root element of the RSS document to parse.
|
* @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.
|
* Parses the root element of an RSS document looking for image information.
|
||||||
* <p/>
|
* <p/>
|
||||||
* It first invokes super.parseImage and then parses and injects the
|
* It first invokes super.parseImage and then parses and injects the following properties if
|
||||||
* following properties if present: url, link, width, height and
|
* present: url, link, width, height and description.
|
||||||
* description.
|
|
||||||
* <p/>
|
* <p/>
|
||||||
*
|
*
|
||||||
* @param rssRoot the root element of the RSS document to parse for image
|
* @param rssRoot the root element of the RSS document to parse for image information.
|
||||||
* information.
|
|
||||||
* @return the parsed RSSImage bean.
|
* @return the parsed RSSImage bean.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -242,12 +240,11 @@ public class RSS091UserlandParser extends RSS090Parser {
|
||||||
/**
|
/**
|
||||||
* Parses an item element of an RSS document looking for item information.
|
* Parses an item element of an RSS document looking for item information.
|
||||||
* <p/>
|
* <p/>
|
||||||
* It first invokes super.parseItem and then parses and injects the
|
* It first invokes super.parseItem and then parses and injects the description property if
|
||||||
* description property if present.
|
* present.
|
||||||
* <p/>
|
* <p/>
|
||||||
*
|
*
|
||||||
* @param rssRoot the root element of the RSS document in case it's needed
|
* @param rssRoot the root element of the RSS document in case it's needed for context.
|
||||||
* for context.
|
|
||||||
* @param eItem the item element to parse.
|
* @param eItem the item element to parse.
|
||||||
* @return the parsed RSSItem bean.
|
* @return the parsed RSSItem bean.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -44,15 +44,13 @@ public class RSS10Parser extends RSS090Parser {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates if a JDom document is an RSS instance that can be parsed with
|
* Indicates if a JDom document is an RSS instance that can be parsed with the parser.
|
||||||
* the parser.
|
|
||||||
* <p/>
|
* <p/>
|
||||||
* It checks for RDF ("http://www.w3.org/1999/02/22-rdf-syntax-ns#")
|
* It checks for RDF ("http://www.w3.org/1999/02/22-rdf-syntax-ns#") namespace being defined in
|
||||||
* namespace being defined in the root element and for the RSS 1.0
|
* the root element and for the RSS 1.0 ("http://purl.org/rss/1.0/") namespace in the channel
|
||||||
* ("http://purl.org/rss/1.0/") namespace in the channel element.
|
* element.
|
||||||
*
|
*
|
||||||
* @param document document to check if it can be parsed with this parser
|
* @param document document to check if it can be parsed with this parser implementation.
|
||||||
* implementation.
|
|
||||||
* @return <b>true</b> if the document is RSS1., <b>false</b> otherwise.
|
* @return <b>true</b> if the document is RSS1., <b>false</b> otherwise.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -88,12 +86,11 @@ public class RSS10Parser extends RSS090Parser {
|
||||||
/**
|
/**
|
||||||
* Parses an item element of an RSS document looking for item information.
|
* Parses an item element of an RSS document looking for item information.
|
||||||
* <p/>
|
* <p/>
|
||||||
* It first invokes super.parseItem and then parses and injects the
|
* It first invokes super.parseItem and then parses and injects the description property if
|
||||||
* description property if present.
|
* present.
|
||||||
* <p/>
|
* <p/>
|
||||||
*
|
*
|
||||||
* @param rssRoot the root element of the RSS document in case it's needed
|
* @param rssRoot the root element of the RSS document in case it's needed for context.
|
||||||
* for context.
|
|
||||||
* @param eItem the item element to parse.
|
* @param eItem the item element to parse.
|
||||||
* @return the parsed RSSItem bean.
|
* @return the parsed RSSItem bean.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -27,14 +27,12 @@ import com.sun.syndication.feed.WireFeed;
|
||||||
/**
|
/**
|
||||||
* To address issue with certain feeds (brought up by Charles Miller):
|
* 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,
|
* "During the debacle that was the rollout of RSS2.0, this namespace was tried, and even appeared
|
||||||
* and even appeared in Dave Winer's Scripting News feed for a while. It was
|
* in Dave Winer's Scripting News feed for a while. It was then withdrawn, but the wonderful thing
|
||||||
* then withdrawn, but the wonderful thing about standards is the moment you
|
* about standards is the moment you roll one out, even if it's marked as unfinished and subject to
|
||||||
* roll one out, even if it's marked as unfinished and subject to change,
|
* change, someone will end up stuck with it forever."
|
||||||
* someone will end up stuck with it forever."
|
|
||||||
*
|
*
|
||||||
* Note that there is not counter part on the generator, we only generate the
|
* Note that there is not counter part on the generator, we only generate the final RSS2
|
||||||
* final RSS2
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class RSS20wNSParser extends RSS20Parser {
|
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
|
* After we parse the feed we put "rss_2.0" in it (so converters and generators work) this
|
||||||
* generators work) this parser is a phantom.
|
* parser is a phantom.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -55,16 +55,13 @@ public class SyModuleGenerator implements ModuleGenerator {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a set with all the URIs (JDOM Namespace elements) this module
|
* Returns a set with all the URIs (JDOM Namespace elements) this module generator uses.
|
||||||
* generator uses.
|
|
||||||
* <p/>
|
* <p/>
|
||||||
* It is used by the the feed generators to add their namespace definition
|
* It is used by the the feed generators to add their namespace definition in the root element
|
||||||
* in the root element of the generated document (forward-missing of Java
|
* of the generated document (forward-missing of Java 5.0 Generics).
|
||||||
* 5.0 Generics).
|
|
||||||
* <p/>
|
* <p/>
|
||||||
*
|
*
|
||||||
* @return a set with all the URIs (JDOM Namespace elements) this module
|
* @return a set with all the URIs (JDOM Namespace elements) this module generator uses.
|
||||||
* generator uses.
|
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Set<Namespace> getNamespaces() {
|
public Set<Namespace> getNamespaces() {
|
||||||
|
|
|
@ -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;
|
package com.sun.syndication.unittest;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
@ -16,7 +10,6 @@ import com.sun.syndication.io.impl.DateParser;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author pat
|
* @author pat
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public abstract class SyndFeedTest extends FeedTest {
|
public abstract class SyndFeedTest extends FeedTest {
|
||||||
private String prefix = null;
|
private String prefix = null;
|
||||||
|
@ -68,12 +61,11 @@ public abstract class SyndFeedTest extends FeedTest {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* public void testCategories() throws Exception { List catlist =
|
* public void testCategories() throws Exception { List catlist =
|
||||||
* getCachedSyndFeed().getCategories(); //don't understand why this one
|
* getCachedSyndFeed().getCategories(); //don't understand why this one fails assertEquals(2,
|
||||||
* fails assertEquals(2, catlist.size()); SyndCategory cat =
|
* catlist.size()); SyndCategory cat = (SyndCategory)catlist.get(0);
|
||||||
* (SyndCategory)catlist.get(0); assertEquals("channel.category[0]",
|
* assertEquals("channel.category[0]", cat.getName());
|
||||||
* cat.getName()); assertEquals("channel.category[0]^domain",
|
* assertEquals("channel.category[0]^domain", cat.getTaxonomyUri()); cat =
|
||||||
* cat.getTaxonomyUri()); cat = (SyndCategory)catlist.get(1);
|
* (SyndCategory)catlist.get(1); assertEquals("channel.category[1]", cat.getName());
|
||||||
* assertEquals("channel.category[1]", cat.getName());
|
|
||||||
* assertEquals("channel.category[1]^domain", cat.getTaxonomyUri()); }
|
* assertEquals("channel.category[1]^domain", cat.getTaxonomyUri()); }
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -140,20 +132,17 @@ public abstract class SyndFeedTest extends FeedTest {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* public void testEntryCategories() throws Exception { SyndEntry e =
|
* public void testEntryCategories() throws Exception { SyndEntry e =
|
||||||
* (SyndEntry)getCachedSyndFeed().getEntries().get(0); List catlist =
|
* (SyndEntry)getCachedSyndFeed().getEntries().get(0); List catlist = e.getCategories(); //don't
|
||||||
* e.getCategories(); //don't understand why this one fails assertEquals(2,
|
* understand why this one fails assertEquals(2, catlist.size()); SyndCategory cat =
|
||||||
* catlist.size()); SyndCategory cat = (SyndCategory)catlist.get(0);
|
* (SyndCategory)catlist.get(0); assertEquals("channel.item[0].category[0]", cat.getName());
|
||||||
* assertEquals("channel.item[0].category[0]", cat.getName());
|
* assertEquals("channel.item[0].category[0]^domain", cat.getTaxonomyUri()); cat =
|
||||||
* assertEquals("channel.item[0].category[0]^domain", cat.getTaxonomyUri());
|
* (SyndCategory)catlist.get(1); assertEquals("channel.item[0].category[1]", cat.getName());
|
||||||
* cat = (SyndCategory)catlist.get(1);
|
* assertEquals("channel.item[0].category[1]^domain", cat.getTaxonomyUri()); //DO 2nd set of
|
||||||
* assertEquals("channel.item[0].category[1]", cat.getName());
|
* items }
|
||||||
* assertEquals("channel.item[0].category[1]^domain", cat.getTaxonomyUri());
|
|
||||||
* //DO 2nd set of items }
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* public void testEntryAuthor() throws Exception {
|
* public void testEntryAuthor() throws Exception { assertEqualsStr("channel.item[0].author",
|
||||||
* assertEqualsStr("channel.item[0].author",
|
|
||||||
* getEntryAuthor(getCachedSyndFeed().getEntries().get(0)));
|
* getEntryAuthor(getCachedSyndFeed().getEntries().get(0)));
|
||||||
* assertEqualsStr("channel.item[1].author",
|
* assertEqualsStr("channel.item[1].author",
|
||||||
* getEntryAuthor(getCachedSyndFeed().getEntries().get(1))); }
|
* getEntryAuthor(getCachedSyndFeed().getEntries().get(1))); }
|
||||||
|
@ -166,51 +155,41 @@ public abstract class SyndFeedTest extends FeedTest {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* //things you cannot get from SyndEntryImpl // <source
|
* //things you cannot get from SyndEntryImpl // <source
|
||||||
* url="http://localhost:8080/item0/source.url">item[0].source</source> //
|
* url="http://localhost:8080/item0/source.url">item[0].source</source> // <enclosure
|
||||||
* <enclosure url="http://localhost:8080/item0/enclosure0.url" length="100"
|
* url="http://localhost:8080/item0/enclosure0.url" length="100" type="audio/mpeg"/> //
|
||||||
* type="audio/mpeg"/> // <enclosure
|
* <enclosure url="http://localhost:8080/item0/enclosure1.url" length="1000" type="audio/mpeg"/>
|
||||||
* url="http://localhost:8080/item0/enclosure1.url" length="1000"
|
* <category domain="item0.domain0">item0.category0</category> <category
|
||||||
* type="audio/mpeg"/> <category
|
* domain="item0.domain1">item0.category1</category> <pubDate>Thu, 08 Jul 1999 08:00:00
|
||||||
* domain="item0.domain0">item0.category0</category> <category
|
* GMT</pubDate> <expirationDate>Thu, 08 Jul 1999 09:00:00 GMT</.expirationDate>
|
||||||
* domain="item0.domain1">item0.category1</category> <pubDate>Thu, 08 Jul
|
* <author>item0.author</author> <comments>http://localhost:8080/item0/comments</comments> <guid
|
||||||
* 1999 08:00:00 GMT</pubDate> <expirationDate>Thu, 08 Jul 1999 09:00:00
|
* isPermaLink="true">http://localhost:8080/item0/guid</guid> //TODO: I still have the elements
|
||||||
* GMT</.expirationDate> <author>item0.author</author>
|
* to test
|
||||||
* <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() {
|
* public void test() { assertEqualsStr(feed, ""); } public void test() { assertEqualsStr(feed,
|
||||||
* assertEqualsStr(feed, ""); }
|
* ""); }
|
||||||
*/
|
*/
|
||||||
// Things that you cannot get form a SyndFeedImpl today
|
// Things that you cannot get form a SyndFeedImpl today
|
||||||
// these need to be put in a RSS 2.0 module
|
// these need to be put in a RSS 2.0 module
|
||||||
// or is a roundtrip to wirefeed the right way to do this?
|
// or is a roundtrip to wirefeed the right way to do this?
|
||||||
/*
|
/*
|
||||||
* <textInput> <title>Search</title> <description>Search this
|
* <textInput> <title>Search</title> <description>Search this site:</description> <name>q</name>
|
||||||
* site:</description> <name>q</name>
|
* <link>http://example.org/mt/mt-search.cgi</link> </textInput> image height and width
|
||||||
* <link>http://example.org/mt/mt-search.cgi</link> </textInput> image
|
* //<copyright>Copyright 2004, Mark Pilgrim</copyright> public void test() {
|
||||||
* height and width //<copyright>Copyright 2004, Mark Pilgrim</copyright>
|
* assertEqualsStr(getCachedSyndFeed()., ""); } //<generator>Sample Toolkit</generator> public
|
||||||
* public void test() { assertEqualsStr(getCachedSyndFeed()., ""); }
|
* void test() { assertEqualsStr(feed, ""); } //
|
||||||
* //<generator>Sample Toolkit</generator> public void test() {
|
|
||||||
* assertEqualsStr(feed, ""); } //
|
|
||||||
* <managingEditor>editor@example.org</managingEditor> public void test() {
|
* <managingEditor>editor@example.org</managingEditor> public void test() {
|
||||||
* assertEqualsStr(feed, ""); } //
|
* assertEqualsStr(feed, ""); } // <webMaster>webmaster@example.org</webMaster> public void
|
||||||
* <webMaster>webmaster@example.org</webMaster> public void test() {
|
* test() { assertEqualsStr(feed, ""); } <docs>http://blogs.law.harvard.edu/tech/rss</docs>
|
||||||
* assertEqualsStr(feed, ""); }
|
* <cloud domain="rpc.sys.com" port="80" path="/RPC2" registerProcedure="pingMe"
|
||||||
* <docs>http://blogs.law.harvard.edu/tech/rss</docs> <cloud
|
* protocol="soap"/> <ttl>60</ttl> <rating>(PICS-1.1 <EFBFBD>http://www.classify.org/safesurf/<EFBFBD> l r
|
||||||
* domain="rpc.sys.com" port="80" path="/RPC2" registerProcedure="pingMe"
|
* (SS~~000 1))</rating> <skiphours> <hour>0</hour> <hour>1</hour> <hour>2</hour> <hour>3</hour>
|
||||||
* protocol="soap"/> <ttl>60</ttl> <rating>(PICS-1.1
|
* <hour>4</hour> <hour>5</hour> <hour>6</hour> <hour>7</hour> <hour>8</hour> <hour>9.5</hour>
|
||||||
* <EFBFBD>http://www.classify.org/safesurf/<EFBFBD> l r (SS~~000 1))</rating> <skiphours>
|
* <hour>10</hour> <hour>11</hour> <hour>12</hour> <hour>13</hour> <hour>14</hour>
|
||||||
* <hour>0</hour> <hour>1</hour> <hour>2</hour> <hour>3</hour>
|
* <hour>15</hour> <hour>16</hour> <hour>17</hour> <hour>18</hour> <hour>19</hour>
|
||||||
* <hour>4</hour> <hour>5</hour> <hour>6</hour> <hour>7</hour>
|
* <hour>20</hour> <hour>21</hour> <hour>22</hour> <hour>23</hour> </skiphours> <skipdays>
|
||||||
* <hour>8</hour> <hour>9.5</hour> <hour>10</hour> <hour>11</hour>
|
* <day>Monday</day> <day>Tuesday</day> <day>Wednesday</day> <day>Thursday</day>
|
||||||
* <hour>12</hour> <hour>13</hour> <hour>14</hour> <hour>15</hour>
|
* <day>Friday</day> <day>Saturday</day> <day>Sunday</day> </skipdays>
|
||||||
* <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>
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -20,7 +20,7 @@ public class TestDublinCore extends FeedTest {
|
||||||
|
|
||||||
public void testDublinCoreDateIsPreferredWhenAvailableRatherThanRss20PubDate() throws Exception {
|
public void testDublinCoreDateIsPreferredWhenAvailableRatherThanRss20PubDate() throws Exception {
|
||||||
final SyndFeed feed = this.getCachedSyndFeed();
|
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 DCModule dc = (DCModule) entry.getModule(DCModule.URI);
|
||||||
final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'", Locale.ENGLISH);
|
final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'", Locale.ENGLISH);
|
||||||
sdf.setTimeZone(TimeZone.getTimeZone("UTC"));
|
sdf.setTimeZone(TimeZone.getTimeZone("UTC"));
|
||||||
|
|
|
@ -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;
|
package com.sun.syndication.unittest;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
@ -17,9 +11,6 @@ import com.sun.syndication.io.impl.DateParser;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author pat
|
* @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 {
|
public class TestSyndFeedAtom03DCSyModules extends TestSyndFeedAtom03 {
|
||||||
|
|
||||||
|
|
|
@ -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;
|
package com.sun.syndication.unittest;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
@ -17,9 +11,6 @@ import com.sun.syndication.io.impl.DateParser;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author pat
|
* @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 {
|
public class TestSyndFeedRSS10DCSyModules extends TestSyndFeedRSS10 {
|
||||||
|
|
||||||
|
|
|
@ -38,8 +38,7 @@ public class TestSyndFeedRSS20 extends TestSyndFeedRSS094 {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test we can get to RSS attributes which aren't exposed in the SyndEntry
|
* Test we can get to RSS attributes which aren't exposed in the SyndEntry object
|
||||||
* object
|
|
||||||
*
|
*
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -11,6 +11,7 @@ import com.sun.syndication.unittest.FeedTest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test for #131: SyndFeedImpl copyFrom method does not copy Entry Categories.
|
* Test for #131: SyndFeedImpl copyFrom method does not copy Entry Categories.
|
||||||
|
*
|
||||||
* @author Martin Kurz
|
* @author Martin Kurz
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -5,6 +5,7 @@ import com.sun.syndication.unittest.FeedTest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test for #134: Incorrect handling of CDATA sections.
|
* Test for #134: Incorrect handling of CDATA sections.
|
||||||
|
*
|
||||||
* @author Martin Kurz
|
* @author Martin Kurz
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -5,6 +5,7 @@ import com.sun.syndication.unittest.FeedTest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test for #137: RSS item description is not complete.
|
* Test for #137: RSS item description is not complete.
|
||||||
|
*
|
||||||
* @author Martin Kurz
|
* @author Martin Kurz
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -16,24 +17,24 @@ public class Issue137Test extends FeedTest {
|
||||||
|
|
||||||
public void testDescription() throws Exception {
|
public void testDescription() throws Exception {
|
||||||
final SyndFeed feed = this.getCachedSyndFeed();
|
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\"" +
|
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"+
|
+ " 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"+
|
+ "=\"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"+
|
+ " 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"+
|
+ " 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());
|
+ " 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"+
|
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"+
|
+ ".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"+
|
+ " 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 & communication skills and growing a world-class education service\n"+
|
+ " about the importance of language & 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"+
|
+ "</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"+
|
+ ">strengthening the teaching track and of a teacher-driven culture of professional excellence</a>.</p\n" + ">", feed.getEntries().get(1)
|
||||||
">", feed.getEntries().get(1).getDescription().getValue());
|
.getDescription().getValue());
|
||||||
assertEquals("<img src=\"http://www.moe.gov.sg/media/spotlight/assets_c/2009/09/spotlight-moa-2009-thumb-120x80-278"+
|
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:/"+
|
+ ".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"+
|
+ "/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"+
|
+ " 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());
|
+ " MOE Work Plan Seminar on 17 Sep 09 by the Minister for Education, Dr Ng Eng Hen.</p>", feed.getEntries().get(2).getDescription().getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import com.sun.syndication.unittest.FeedTest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test for #161: No source element in RSS 2.0 items.
|
* Test for #161: No source element in RSS 2.0 items.
|
||||||
|
*
|
||||||
* @author Martin Kurz
|
* @author Martin Kurz
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -7,6 +7,7 @@ import com.sun.syndication.unittest.TestSyndFeedRSS20;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test for #161: No source element in RSS 2.0 items.
|
* Test for #161: No source element in RSS 2.0 items.
|
||||||
|
*
|
||||||
* @author Martin Kurz
|
* @author Martin Kurz
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -10,6 +10,7 @@ import com.sun.syndication.unittest.TestSyndFeedRSS20;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test for #161: No source element in RSS 2.0 items.
|
* Test for #161: No source element in RSS 2.0 items.
|
||||||
|
*
|
||||||
* @author Martin Kurz
|
* @author Martin Kurz
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -20,7 +21,7 @@ public class Issue162Test extends TestSyndFeedRSS20 {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testWireFeed() throws Exception {
|
public void testWireFeed() throws Exception {
|
||||||
final Channel channel = ((Channel) this.getCachedWireFeed());
|
final Channel channel = (Channel) getCachedWireFeed();
|
||||||
assertProperty(channel.getDocs(), "channel.docs");
|
assertProperty(channel.getDocs(), "channel.docs");
|
||||||
assertProperty(channel.getGenerator(), "channel.generator");
|
assertProperty(channel.getGenerator(), "channel.generator");
|
||||||
assertProperty(channel.getManagingEditor(), "channel.managingEditor");
|
assertProperty(channel.getManagingEditor(), "channel.managingEditor");
|
||||||
|
@ -28,14 +29,14 @@ public class Issue162Test extends TestSyndFeedRSS20 {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testWireFeedItems() throws Exception {
|
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++) {
|
for (int i = 0; i < count; i++) {
|
||||||
testItem(i);
|
testItem(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void testWireFeedItem(final int i) throws Exception {
|
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);
|
final Item entry = items.get(i);
|
||||||
assertProperty(entry.getComments(), "channel.item[" + i + "].comments");
|
assertProperty(entry.getComments(), "channel.item[" + i + "].comments");
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import com.sun.syndication.unittest.FeedTest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test for #134: Incorrect handling of CDATA sections.
|
* Test for #134: Incorrect handling of CDATA sections.
|
||||||
|
*
|
||||||
* @author Martin Kurz
|
* @author Martin Kurz
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -15,7 +16,7 @@ public class Issue88Test extends FeedTest {
|
||||||
|
|
||||||
public void testStyleSheet() throws Exception {
|
public void testStyleSheet() throws Exception {
|
||||||
assertEquals("stylesheet in syndfeed missing", "http://test.example/test.xslt", this.getCachedSyndFeed().getStyleSheet());
|
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());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue