com.sun.syndication.feed.synd
public class SyndFeedImpl extends Object implements Serializable, SyndFeed
It handles all RSS versions and Atom 0.3, it normalizes all info, it may lose information.
Field Summary | |
---|---|
static Set | CONVENIENCE_PROPERTIES
Unmodifiable Set containing the convenience properties of this class.
|
static Converters | CONVERTERS |
static CopyFromHelper | COPY_FROM_HELPER |
static Set | IGNORE_PROPERTIES |
List | _authors |
List | _contributors |
SyndContent | _description |
String | _encoding |
List | _entries |
String | _feedType |
List | _foreignMarkup |
SyndImage | _image |
String | _link |
List | _links |
List | _modules |
ObjectBean | _objBean |
SyndContent | _title |
String | _uri |
Constructor Summary | |
---|---|
protected | SyndFeedImpl(Class beanClass, Set convenienceProperties)
For implementations extending SyndFeedImpl to be able to use the ObjectBean functionality
with extended interfaces.
|
SyndFeedImpl()
Default constructor. | |
SyndFeedImpl(WireFeed feed)
Creates a SyndFeedImpl and populates all its properties out of the
given RSS Channel or Atom Feed properties.
|
Method Summary | |
---|---|
Object | clone()
Creates a deep 'bean' clone of the object.
|
void | copyFrom(Object obj) |
WireFeed | createWireFeed()
Creates a real feed containing the information of the SyndFeedImpl.
|
WireFeed | createWireFeed(String feedType)
Creates a real feed containing the information of the SyndFeedImpl.
|
boolean | equals(Object other)
Indicates whether some other object is "equal to" this one as defined by the Object equals() method.
|
String | getAuthor()
Returns the feed author.
|
List | getAuthors() |
List | getCategories()
Returns the feed categories.
|
List | getContributors() |
String | getCopyright()
Returns the feed copyright.
|
DCModule | getDCModule()
Returns the Dublin Core module of the feed. |
String | getDescription()
Returns the feed description.
|
SyndContent | getDescriptionEx()
Returns the feed description as a text construct.
|
String | getEncoding()
Returns the charset encoding of a the feed. |
List | getEntries()
Returns the feed entries.
|
String | getFeedType()
Returns the wire feed type the feed had/will-have when coverted from/to a WireFeed.
|
Object | getForeignMarkup()
Returns foreign markup found at channel level.
|
SyndImage | getImage()
Returns the feed image.
|
Class | getInterface() |
String | getLanguage()
Returns the feed language.
|
String | getLink()
Returns the feed link.
|
List | getLinks()
Returns the links
|
Module | getModule(String uri)
Returns the module identified by a given URI.
|
List | getModules()
Returns the feed modules.
|
Date | getPublishedDate()
Returns the feed published date.
|
List | getSupportedFeedTypes()
Returns the real feed types the SyndFeedImpl supports when converting from and to.
|
String | getTitle()
Returns the feed title.
|
SyndContent | getTitleEx()
Returns the feed title as a text construct.
|
String | getUri()
Returns the feed URI.
|
int | hashCode()
Returns a hashcode value for the object.
|
void | setAuthor(String author)
Sets the feed author.
|
void | setAuthors(List authors) |
void | setCategories(List categories)
Sets the feed categories.
|
void | setContributors(List contributors) |
void | setCopyright(String copyright)
Sets the feed copyright.
|
void | setDescription(String description)
Sets the feed description.
|
void | setDescriptionEx(SyndContent description)
Sets the feed description as a text construct.
|
void | setEncoding(String encoding)
Sets the charset encoding of a the feed. |
void | setEntries(List entries)
Sets the feed entries.
|
void | setFeedType(String feedType)
Sets the wire feed type the feed will-have when coverted to a WireFeed.
|
void | setForeignMarkup(Object foreignMarkup)
Sets foreign markup found at channel level.
|
void | setImage(SyndImage image)
Sets the feed image.
|
void | setLanguage(String language)
Sets the feed language.
|
void | setLink(String link)
Sets the feed link.
|
void | setLinks(List links)
Set the links
|
void | setModules(List modules)
Sets the feed modules.
|
void | setPublishedDate(Date publishedDate)
Sets the feed published date.
|
void | setTitle(String title)
Sets the feed title.
|
void | setTitleEx(SyndContent title)
Sets the feed title as a text construct.
|
void | setUri(String uri)
Sets the feed URI.
|
String | toString()
Returns the String representation for the object.
|
Convenience properties are mapped to Modules, for cloning the convenience properties can be ignored as the will be copied as part of the module cloning.
Parameters: beanClass convenienceProperties set containing the convenience properties of the SyndEntryImpl (the are ignored during cloning, check CloneableBean for details).
Parameters: feed the RSS Channel or the Atom Feed to populate the properties from.
Returns: a clone of the object.
Throws: CloneNotSupportedException thrown if an element of the object cannot be cloned.
The feed type of the created WireFeed is taken from the SyndFeedImpl feedType property.
Returns: the real feed.
Parameters: feedType the feed type for the WireFeed to be created.
Returns: the real feed.
Parameters: other he reference object with which to compare.
Returns: true if 'this' object is equal to the 'other' object.
This method is a convenience method, it maps to the Dublin Core module creator.
Returns: the feed author, null if none.
This method is a convenience method, it maps to the Dublin Core module subjects.
Returns: a list of SyndCategoryImpl elements with the feed categories, an empty list if none.
This method is a convenience method, it maps to the Dublin Core module rights.
Returns: the feed copyright, null if none.
Returns: the DC module, it's never null
Returns: the feed description, null if none.
Returns: the feed description, null if none.
Returns: the charset encoding of the feed.
Returns: a list of SyndEntryImpl elements with the feed entries, an empty list if none.
Returns: the feed type, null if none.
Returns: Opaque object to discourage use
Returns: the feed image, null if none.
This method is a convenience method, it maps to the Dublin Core module language.
Returns: the feed language, null if none.
Note: The URI is the unique identifier, in the RSS 2.0/atom case this is the GUID, for RSS 1.0 this is the URI attribute of the item. The Link is the URL that the item is accessible under, the URI is the permanent identifier which the aggregator should use to reference this item. Often the URI will use some standardized identifier scheme such as DOI's so that items can be identified even if they appear in multiple feeds with different "links" (they might be on different hosting platforms but be the same item). Also, though rare, there could be multiple items with the same link but a different URI and associated metadata which need to be treated as distinct entities. In the RSS 1.0 case the URI must be a valid RDF URI reference.
Returns: the feed link, null if none.
Returns: Returns the links.
Parameters: uri the URI of the ModuleImpl.
Returns: The module with the given URI, null if none.
Returns: a list of ModuleImpl elements with the feed modules, an empty list if none.
This method is a convenience method, it maps to the Dublin Core module date.
Returns: the feed published date, null if none.
Returns: the real feed type supported.
Returns: the feed title, null if none.
Returns: the feed title, null if none.
How the feed URI maps to a concrete feed type (RSS or Atom) depends on the concrete feed type. This is explained in detail in Rome documentation, Feed and entry URI mapping.
The returned URI is a normalized URI as specified in RFC 2396bis.
Note: The URI is the unique identifier, in the RSS 2.0/atom case this is the GUID, for RSS 1.0 this is the URI attribute of the item. The Link is the URL that the item is accessible under, the URI is the permanent identifier which the aggregator should use to reference this item. Often the URI will use some standardized identifier scheme such as DOI's so that items can be identified even if they appear in multiple feeds with different "links" (they might be on different hosting platforms but be the same item). Also, though rare, there could be multiple items with the same link but a different URI and associated metadata which need to be treated as distinct entities. In the RSS 1.0 case the URI must be a valid RDF URI reference.
Returns: the feed URI, null if none.
It follows the contract defined by the Object hashCode() method.
Returns: the hashcode of the bean object.
This method is a convenience method, it maps to the Dublin Core module creator.
Parameters: author the feed author to set, null if none.
This method is a convenience method, it maps to the Dublin Core module subjects.
Parameters: categories the list of SyndCategoryImpl elements with the feed categories to set, an empty list or null if none.
This method is a convenience method, it maps to the Dublin Core module rights.
Parameters: copyright the feed copyright to set, null if none.
Parameters: description the feed description to set, null if none.
Parameters: description the feed description to set, null if none.
Parameters: encoding the charset encoding of the feed.
Parameters: entries the list of SyndEntryImpl elements with the feed entries to set, an empty list or null if none.
Parameters: feedType the feed type to set, null if none.
Parameters: foreignMarkup Opaque object to discourage use
Parameters: image the feed image to set, null if none.
This method is a convenience method, it maps to the Dublin Core module language.
Parameters: language the feed language to set, null if none.
Note: The URI is the unique identifier, in the RSS 2.0/atom case this is the GUID, for RSS 1.0 this is the URI attribute of the item. The Link is the URL that the item is accessible under, the URI is the permanent identifier which the aggregator should use to reference this item. Often the URI will use some standardized identifier scheme such as DOI's so that items can be identified even if they appear in multiple feeds with different "links" (they might be on different hosting platforms but be the same item). Also, though rare, there could be multiple items with the same link but a different URI and associated metadata which need to be treated as distinct entities. In the RSS 1.0 case the URI must be a valid RDF URI reference.
Parameters: link the feed link to set, null if none.
Parameters: links The links to set.
Parameters: modules the list of ModuleImpl elements with the feed modules to set, an empty list or null if none.
This method is a convenience method, it maps to the Dublin Core module date.
Parameters: publishedDate the feed published date to set, null if none.
Parameters: title the feed title to set, null if none.
Parameters: title the feed title to set, null if none.
How the feed URI maps to a concrete feed type (RSS or Atom) depends on the concrete feed type. This is explained in detail in Rome documentation, Feed and entry URI mapping.
Note: The URI is the unique identifier, in the RSS 2.0/atom case this is the GUID, for RSS 1.0 this is the URI attribute of the item. The Link is the URL that the item is accessible under, the URI is the permanent identifier which the aggregator should use to reference this item. Often the URI will use some standardized identifier scheme such as DOI's so that items can be identified even if they appear in multiple feeds with different "links" (they might be on different hosting platforms but be the same item). Also, though rare, there could be multiple items with the same link but a different URI and associated metadata which need to be treated as distinct entities. In the RSS 1.0 case the URI must be a valid RDF URI reference.
Parameters: uri the feed URI to set, null if none.
Returns: String representation for the object.