|
|||||||||
| Home >> All >> com >> sun >> syndication >> feed >> [ synd overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.sun.syndication.feed.synd
Class SyndFeedImpl

java.lang.Objectcom.sun.syndication.feed.synd.SyndFeedImpl
- All Implemented Interfaces:
- java.lang.Cloneable, com.sun.syndication.feed.CopyFrom, java.io.Serializable, SyndFeed
- public class SyndFeedImpl
- extends java.lang.Object
- implements java.io.Serializable, SyndFeed
- extends java.lang.Object
Bean for all types of feeds.
It handles all RSS versions and Atom 0.3, it normalizes all info, it may lose information.
| Field Summary | |
private java.util.List |
_authors
|
private java.util.List |
_contributors
|
private java.lang.String |
_description
|
private java.lang.String |
_encoding
|
private java.util.List |
_entries
|
private java.lang.String |
_feedType
|
private SyndImage |
_image
|
private java.lang.String |
_link
|
private java.util.List |
_links
|
private java.util.List |
_modules
|
private com.sun.syndication.feed.impl.ObjectBean |
_objBean
|
private java.lang.String |
_title
|
private java.lang.String |
_uri
|
static java.util.Set |
CONVENIENCE_PROPERTIES
Unmodifiable Set containing the convenience properties of this class. |
private static com.sun.syndication.feed.synd.impl.Converters |
CONVERTERS
|
private static com.sun.syndication.feed.impl.CopyFromHelper |
COPY_FROM_HELPER
|
private static java.util.Set |
IGNORE_PROPERTIES
|
| Constructor Summary | |
|
SyndFeedImpl()
Default constructor. |
protected |
SyndFeedImpl(java.lang.Class beanClass,
java.util.Set convenienceProperties)
For implementations extending SyndFeedImpl to be able to use the ObjectBean functionality with extended interfaces. |
|
SyndFeedImpl(com.sun.syndication.feed.WireFeed feed)
Creates a SyndFeedImpl and populates all its properties out of the given RSS Channel or Atom Feed properties. |
| Method Summary | |
java.lang.Object |
clone()
Creates a deep 'bean' clone of the object. |
void |
copyFrom(java.lang.Object obj)
Copies all the properties of the given bean into this one. |
com.sun.syndication.feed.WireFeed |
createWireFeed()
Creates a real feed containing the information of the SyndFeedImpl. |
com.sun.syndication.feed.WireFeed |
createWireFeed(java.lang.String feedType)
Creates a real feed containing the information of the SyndFeedImpl. |
boolean |
equals(java.lang.Object other)
Indicates whether some other object is "equal to" this one as defined by the Object equals() method. |
java.lang.String |
getAuthor()
Returns the feed author. |
java.util.List |
getAuthors()
Returns the feed authors. |
java.util.List |
getCategories()
Returns the feed categories. |
java.util.List |
getContributors()
Returns the feed author. |
java.lang.String |
getCopyright()
Returns the feed copyright. |
private com.sun.syndication.feed.module.DCModule |
getDCModule()
Returns the Dublin Core module of the feed. |
java.lang.String |
getDescription()
Returns the feed description. |
java.lang.String |
getEncoding()
Returns the charset encoding of a the feed. |
java.util.List |
getEntries()
Returns the feed entries. |
java.lang.String |
getFeedType()
Returns the wire feed type the feed had/will-have when coverted from/to a WireFeed. |
SyndImage |
getImage()
Returns the feed image. |
java.lang.Class |
getInterface()
Returns the interface the copyFrom works on. |
java.lang.String |
getLanguage()
Returns the feed language. |
java.lang.String |
getLink()
Returns the feed link. |
java.util.List |
getLinks()
Returns the links |
com.sun.syndication.feed.module.Module |
getModule(java.lang.String uri)
Returns the module identified by a given URI. |
java.util.List |
getModules()
Returns the feed modules. |
java.util.Date |
getPublishedDate()
Returns the feed published date. |
java.util.List |
getSupportedFeedTypes()
Returns the real feed types the SyndFeedImpl supports when converting from and to. |
java.lang.String |
getTitle()
Returns the feed title. |
java.lang.String |
getUri()
Returns the feed URI. |
int |
hashCode()
Returns a hashcode value for the object. |
void |
setAuthor(java.lang.String author)
Sets the feed author. |
void |
setAuthors(java.util.List authors)
Sets the feed author. |
void |
setCategories(java.util.List categories)
Sets the feed categories. |
void |
setContributors(java.util.List contributors)
Sets the feed author. |
void |
setCopyright(java.lang.String copyright)
Sets the feed copyright. |
void |
setDescription(java.lang.String description)
Sets the feed description. |
void |
setEncoding(java.lang.String encoding)
Sets the charset encoding of a the feed. |
void |
setEntries(java.util.List entries)
Sets the feed entries. |
void |
setFeedType(java.lang.String feedType)
Sets the wire feed type the feed will-have when coverted to a WireFeed. |
void |
setImage(SyndImage image)
Sets the feed image. |
void |
setLanguage(java.lang.String language)
Sets the feed language. |
void |
setLink(java.lang.String link)
Sets the feed link. |
void |
setLinks(java.util.List links)
Set the links |
void |
setModules(java.util.List modules)
Sets the feed modules. |
void |
setPublishedDate(java.util.Date publishedDate)
Sets the feed published date. |
void |
setTitle(java.lang.String title)
Sets the feed title. |
void |
setUri(java.lang.String uri)
Sets the feed URI. |
java.lang.String |
toString()
Returns the String representation for the object. |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
_objBean
private com.sun.syndication.feed.impl.ObjectBean _objBean
_encoding
private java.lang.String _encoding
_uri
private java.lang.String _uri
_title
private java.lang.String _title
_feedType
private java.lang.String _feedType
_link
private java.lang.String _link
_links
private java.util.List _links
_description
private java.lang.String _description
_image
private SyndImage _image
_entries
private java.util.List _entries
_modules
private java.util.List _modules
_authors
private java.util.List _authors
_contributors
private java.util.List _contributors
CONVERTERS
private static final com.sun.syndication.feed.synd.impl.Converters CONVERTERS
IGNORE_PROPERTIES
private static final java.util.Set IGNORE_PROPERTIES
CONVENIENCE_PROPERTIES
public static final java.util.Set CONVENIENCE_PROPERTIES
- Unmodifiable Set containing the convenience properties of this class.
Convenience properties are mapped to Modules, for cloning the convenience properties can be ignored as the will be copied as part of the module cloning.
COPY_FROM_HELPER
private static final com.sun.syndication.feed.impl.CopyFromHelper COPY_FROM_HELPER
| Constructor Detail |
SyndFeedImpl
protected SyndFeedImpl(java.lang.Class beanClass, java.util.Set convenienceProperties)
- For implementations extending SyndFeedImpl to be able to use the ObjectBean functionality
with extended interfaces.
SyndFeedImpl
public SyndFeedImpl()
- Default constructor. All properties are set to null.
SyndFeedImpl
public SyndFeedImpl(com.sun.syndication.feed.WireFeed feed)
- Creates a SyndFeedImpl and populates all its properties out of the
given RSS Channel or Atom Feed properties.
| Method Detail |
getSupportedFeedTypes
public java.util.List getSupportedFeedTypes()
- Returns the real feed types the SyndFeedImpl supports when converting from and to.
- Specified by:
getSupportedFeedTypesin interfaceSyndFeed
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
equals
public boolean equals(java.lang.Object other)
- Indicates whether some other object is "equal to" this one as defined by the Object equals() method.
hashCode
public int hashCode()
- Returns a hashcode value for the object.
It follows the contract defined by the Object hashCode() method.
toString
public java.lang.String toString()
- Returns the String representation for the object.
createWireFeed
public com.sun.syndication.feed.WireFeed createWireFeed()
- Creates a real feed containing the information of the SyndFeedImpl.
The feed type of the created WireFeed is taken from the SyndFeedImpl feedType property.
- Specified by:
createWireFeedin interfaceSyndFeed
createWireFeed
public com.sun.syndication.feed.WireFeed createWireFeed(java.lang.String feedType)
- Creates a real feed containing the information of the SyndFeedImpl.
- Specified by:
createWireFeedin interfaceSyndFeed
getFeedType
public java.lang.String getFeedType()
- Returns the wire feed type the feed had/will-have when coverted from/to a WireFeed.
- Specified by:
getFeedTypein interfaceSyndFeed
setFeedType
public void setFeedType(java.lang.String feedType)
- Sets the wire feed type the feed will-have when coverted to a WireFeed.
- Specified by:
setFeedTypein interfaceSyndFeed
getEncoding
public java.lang.String getEncoding()
- Returns the charset encoding of a the feed. This is not set by Rome parsers.
- Specified by:
getEncodingin interfaceSyndFeed
setEncoding
public void setEncoding(java.lang.String encoding)
- Sets the charset encoding of a the feed. This is not set by Rome parsers.
- Specified by:
setEncodingin interfaceSyndFeed
getUri
public java.lang.String getUri()
- Returns the feed URI.
How the feed URI maps to a concrete feed type (RSS or Atom) depends on the concrete feed type. This is explained in detail in Rome documentation, Feed and entry URI mapping.
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.
setUri
public void setUri(java.lang.String uri)
- Sets the feed URI.
How the feed URI maps to a concrete feed type (RSS or Atom) depends on the concrete feed type. This is explained in detail in Rome documentation, Feed and entry URI mapping.
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.
getTitle
public java.lang.String getTitle()
setTitle
public void setTitle(java.lang.String title)
getLink
public java.lang.String getLink()
- Returns the feed link.
Note: The URI is the unique identifier, in the RSS 2.0/atom case this is the GUID, for RSS 1.0 this is the URI attribute of the item. The Link is the URL that the item is accessible under, the URI is the permanent identifier which the aggregator should use to reference this item. Often the URI will use some standardized identifier scheme such as DOI's so that items can be identified even if they appear in multiple feeds with different "links" (they might be on different hosting platforms but be the same item). Also, though rare, there could be multiple items with the same link but a different URI and associated metadata which need to be treated as distinct entities. In the RSS 1.0 case the URI must be a valid RDF URI reference.
setLink
public void setLink(java.lang.String link)
- Sets the feed link.
Note: The URI is the unique identifier, in the RSS 2.0/atom case this is the GUID, for RSS 1.0 this is the URI attribute of the item. The Link is the URL that the item is accessible under, the URI is the permanent identifier which the aggregator should use to reference this item. Often the URI will use some standardized identifier scheme such as DOI's so that items can be identified even if they appear in multiple feeds with different "links" (they might be on different hosting platforms but be the same item). Also, though rare, there could be multiple items with the same link but a different URI and associated metadata which need to be treated as distinct entities. In the RSS 1.0 case the URI must be a valid RDF URI reference.
getDescription
public java.lang.String getDescription()
- Returns the feed description.
- Specified by:
getDescriptionin interfaceSyndFeed
setDescription
public void setDescription(java.lang.String description)
- Sets the feed description.
- Specified by:
setDescriptionin interfaceSyndFeed
getPublishedDate
public java.util.Date getPublishedDate()
- Returns the feed published date.
This method is a convenience method, it maps to the Dublin Core module date.
- Specified by:
getPublishedDatein interfaceSyndFeed
setPublishedDate
public void setPublishedDate(java.util.Date publishedDate)
- Sets the feed published date.
This method is a convenience method, it maps to the Dublin Core module date.
- Specified by:
setPublishedDatein interfaceSyndFeed
getCopyright
public java.lang.String getCopyright()
- Returns the feed copyright.
This method is a convenience method, it maps to the Dublin Core module rights.
- Specified by:
getCopyrightin interfaceSyndFeed
setCopyright
public void setCopyright(java.lang.String copyright)
- Sets the feed copyright.
This method is a convenience method, it maps to the Dublin Core module rights.
- Specified by:
setCopyrightin interfaceSyndFeed
getImage
public SyndImage getImage()
setImage
public void setImage(SyndImage image)
getCategories
public java.util.List getCategories()
- Returns the feed categories.
This method is a convenience method, it maps to the Dublin Core module subjects.
- Specified by:
getCategoriesin interfaceSyndFeed
setCategories
public void setCategories(java.util.List categories)
- Sets the feed categories.
This method is a convenience method, it maps to the Dublin Core module subjects.
- Specified by:
setCategoriesin interfaceSyndFeed
getEntries
public java.util.List getEntries()
- Returns the feed entries.
- Specified by:
getEntriesin interfaceSyndFeed
setEntries
public void setEntries(java.util.List entries)
- Sets the feed entries.
- Specified by:
setEntriesin interfaceSyndFeed
getLanguage
public java.lang.String getLanguage()
- Returns the feed language.
This method is a convenience method, it maps to the Dublin Core module language.
- Specified by:
getLanguagein interfaceSyndFeed
setLanguage
public void setLanguage(java.lang.String language)
- Sets the feed language.
This method is a convenience method, it maps to the Dublin Core module language.
- Specified by:
setLanguagein interfaceSyndFeed
getModules
public java.util.List getModules()
- Returns the feed modules.
- Specified by:
getModulesin interfaceSyndFeed
setModules
public void setModules(java.util.List modules)
- Sets the feed modules.
- Specified by:
setModulesin interfaceSyndFeed
getModule
public com.sun.syndication.feed.module.Module getModule(java.lang.String uri)
getDCModule
private com.sun.syndication.feed.module.DCModule getDCModule()
- Returns the Dublin Core module of the feed.
getInterface
public java.lang.Class getInterface()
- Description copied from interface:
com.sun.syndication.feed.CopyFrom - Returns the interface the copyFrom works on.
This is useful when dealing with properties that may have multiple implementations. For example, Module.
- Specified by:
getInterfacein interfacecom.sun.syndication.feed.CopyFrom
copyFrom
public void copyFrom(java.lang.Object obj)
- Description copied from interface:
com.sun.syndication.feed.CopyFrom - Copies all the properties of the given bean into this one.
Any existing properties in this bean are lost.
This method is useful for moving from one implementation of a bean interface to another. For example from the default SyndFeed bean implementation to a Hibernate ready implementation.
- Specified by:
copyFromin interfacecom.sun.syndication.feed.CopyFrom
getLinks
public java.util.List getLinks()
setLinks
public void setLinks(java.util.List links)
getAuthors
public java.util.List getAuthors()
- Description copied from interface:
SyndFeed - Returns the feed authors.
For Atom feeds, this returns the authors as a list of SyndPerson objects, for RSS feeds this method is a convenience method, it maps to the Dublin Core module creator.
- Specified by:
getAuthorsin interfaceSyndFeed
setAuthors
public void setAuthors(java.util.List authors)
- Description copied from interface:
SyndFeed - Sets the feed author.
For Atom feeds, this sets the authors as a list of SyndPerson objects, for RSS feeds this method is a convenience method, it maps to the Dublin Core module creator.
- Specified by:
setAuthorsin interfaceSyndFeed
getAuthor
public java.lang.String getAuthor()
- Returns the feed author.
This method is a convenience method, it maps to the Dublin Core module creator.
setAuthor
public void setAuthor(java.lang.String author)
- Sets the feed author.
This method is a convenience method, it maps to the Dublin Core module creator.
getContributors
public java.util.List getContributors()
- Description copied from interface:
SyndFeed - Returns the feed author.
For Atom feeds, this returns the contributors as a list of SyndPerson objects
- Specified by:
getContributorsin interfaceSyndFeed
setContributors
public void setContributors(java.util.List contributors)
- Description copied from interface:
SyndFeed - Sets the feed author.
Returns contributors as a list of SyndPerson objects.
- Specified by:
setContributorsin interfaceSyndFeed
|
|||||||||
| Home >> All >> com >> sun >> syndication >> feed >> [ synd overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.sun.syndication.feed.synd.SyndFeedImpl