Top Description Methods
com.rometools.rome.feed.synd

public Interface SyndFeed

extends Cloneable, CopyFrom, Extendable
Known Direct Implementers
com.rometools.rome.feed.synd.SyndFeedImpl
Imports
java.util.Date, .List, org.jdom2.Element, com.rometools.rome.feed.CopyFrom, .WireFeed, com.rometools.rome.feed.module.Extendable, .Module

Bean interface for all types of feeds.

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

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

a clone of the object.
clone
()

Creates a deep clone of the object.

public WireFeed

Returns:

the real feed.
createWireFeed
()

Creates a real feed containing the information of the SyndFeedImpl.

public WireFeed

Returns:

the real feed.
createWireFeed
(String
the feed type for the WireFeed to be created.
feedType
)

Creates a real feed containing the information of the SyndFeedImpl.

public String

Returns:

the feed author, null if none.
getAuthor
()

Returns the name of the first feed author in the collection of authors.

public List<SyndPerson>

Returns:

the feed authors, null if none.
getAuthors
()

Returns the feed authors.

public List<SyndCategory>

Returns:

a list of SyndCategoryImpl elements with the feed categories, an empty list if none.
getCategories
()

Returns the feed categories.

public List<SyndPerson>

Returns:

the feed author, null if none.
getContributors
()

Returns the feed author.

public String

Returns:

the feed copyright, null if none.
getCopyright
()

Returns the feed copyright.

public String

Returns:

the feed description, null if none.
getDescription
()

Returns the feed description.

public SyndContent

Returns:

the feed description, null if none.
getDescriptionEx
()

Returns the feed description as a text construct.

public String

Returns:

channel description URL or null
getDocs
()

This tag should contain a URL that references a description of the channel.

public String

Returns:

the charset encoding of the feed.
getEncoding
()

Returns the charset encoding of a the feed.

public List<SyndEntry>

Returns:

a list of SyndEntry elements with the feed entries, an empty list if none.
getEntries
()

Returns the feed entries.

public String

Returns:

the feed type, null if none.
getFeedType
()

Returns the wire feed type the feed had/will-have when converted from/to a WireFeed.

public List<Element>

Returns:

Opaque object to discourage use
getForeignMarkup
()

Returns foreign markup found at channel level.

public String

Returns:

string indicating the program or null
getGenerator
()

A string indicating the program used to generate the channel.

public SyndImage

Returns:

the feed icon, null if none.
getIcon
()

Returns the feed icon.

public SyndImage

Returns:

the feed image, null if none.
getImage
()

Returns the feed image.

public String

Returns:

the feed language, null if none.
getLanguage
()

Returns the feed language.

public String

Returns:

email address of the managing editor or null
getManagingEditor
()

The email address of the managing editor of the site, the person to contact for editorial inquiries.

public Module

Returns:

The module with the given URI, null if none.
getModule
(String
the URI of the ModuleImpl.
uri
)

Redeclares com.rometools.rome.feed.module.Extendable.getModule.

Returns the module identified by a given URI.
public List<Module>

Returns:

a list of ModuleImpl elements with the feed modules, an empty list if none.
getModules
()

Redeclares com.rometools.rome.feed.module.Extendable.getModules.

Returns the feed modules.
public Date

Returns:

the feed published date, null if none.
getPublishedDate
()

Returns the feed published date.

public String

Returns:

styleSheet URL or null
getStyleSheet
()

URL of XSL-Stylesheet.

public List<String>

Returns:

the real feed type supported.
getSupportedFeedTypes
()

Returns the real feed types the SyndFeedImpl supports when converting from and to.

public String

Returns:

the feed title, null if none.
getTitle
()

Returns the feed title.

public SyndContent

Returns:

the feed title, null if none.
getTitleEx
()

Returns the feed title.

public String

Returns:

the feed URI, null if none.
getUri
()

Returns the feed URI.

public String

Returns:

email address of the webmaster or null
getWebMaster
()

The email address of the webmaster for the site, the person to contact if there are technical problems with the channel.

public boolean

Returns:

true if this SyndFeed preserves the WireFeed it was created from
isPreservingWireFeed
()

public WireFeed

Returns:

The WireFeed this was created from, or null
originalWireFeed
()

Returns the WireFeed this SyndFeed was created from.

public void
setAuthor(String
the feed author to set, null if none.
author
)

Sets the feed author.

public void
setAuthors(List<SyndPerson>
the feed authors to set, null if none.
authors
)

Sets the feed authors.

public void
setCategories(List<SyndCategory>
the list of SyndCategoryImpl elements with the feed categories to set, an empty list or null if none.
categories
)

Sets the feed categories.

public void
setContributors(List<SyndPerson>
the feed contributors to set, null if none.
contributors
)

Sets the feed author.

public void
setCopyright(String
the feed copyright to set, null if none.
copyright
)

Sets the feed copyright.

public void
setDescription(String
the feed description to set, null if none.
description
)

Sets the feed description.

public void
setDescriptionEx(SyndContent
the feed description to set, null if none.
description
)

Sets the feed description as a text construct.

public void
setDocs(String
description URL
docs
)

This tag should contain a URL that references a description of the channel.

public void
setEncoding(String
the charset encoding of the feed.
encoding
)

Sets the charset encoding of a the feed.

public void
setEntries(List<SyndEntry>
the list of SyndEntryImpl elements with the feed entries to set, an empty list or null if none.
entries
)

Sets the feed entries.

public void
setFeedType(String
the feed type to set, null if none.
feedType
)

Sets the wire feed type the feed will-have when coverted to a WireFeed.

public void
setForeignMarkup(List<Element>
Opaque object to discourage use
foreignMarkup
)

Sets foreign markup found at channel level.

public void
setGenerator(String
indicating the program
generator
)

A string indicating the program used to generate the channel.

public void
setIcon(SyndImage
the feed icon to set, null if none.
icon
)

Sets the feed icon.

public void
setImage(SyndImage
the feed image to set, null if none.
image
)

Sets the feed image.

public void
setLanguage(String
the feed language to set, null if none.
language
)

Sets the feed language.

public void
setManagingEditor(String
email address of the managing editor
managingEditor
)

The email address of the managing editor of the site, the person to contact for editorial inquiries.

public void
setModules(List<Module>
the list of ModuleImpl elements with the feed modules to set, an empty list or null if none.
modules
)

Redeclares com.rometools.rome.feed.module.Extendable.setModules.

Sets the feed modules.
public void
setPublishedDate(Date
the feed published date to set, null if none.
publishedDate
)

Sets the feed published date.

public void
setStyleSheet(String
URL or null
styleSheet
)

URL of XSL-Stylesheet.

public void
setTitle(String
the feed title to set, null if none.
title
)

Sets the feed title.

public void
setTitleEx(SyndContent
the feed title to set, null if none.
title
)

Sets the feed title.

public void
setUri(String
the feed URI to set, null if none.
uri
)

Sets the feed URI.

public void
setWebMaster(String
email address of the webmaster
webMaster
)

The email address of the webmaster for the site, the person to contact if there are technical problems with the channel.

Inherited from com.rometools.rome.feed.CopyFrom:
copyFromgetInterface

Method Detail

cloneback to summary
public Object clone() throws CloneNotSupportedException

Creates a deep clone of the object.

Returns:Object

a clone of the object.

Exceptions
CloneNotSupportedException:
thrown if an element of the object cannot be cloned.
createWireFeedback to summary
public 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.

Returns:WireFeed

the real feed.

createWireFeedback to summary
public WireFeed createWireFeed(String feedType)

Creates a real feed containing the information of the SyndFeedImpl.

Parameters
feedType:String

the feed type for the WireFeed to be created.

Returns:WireFeed

the real feed.

getAuthorback to summary
public String getAuthor()

Returns the name of the first feed author in the collection of authors.

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

Returns:String

the feed author, null if none.

getAuthorsback to summary
public List<SyndPerson> getAuthors()

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.

Returns:List<SyndPerson>

the feed authors, null if none.

getCategoriesback to summary
public List<SyndCategory> getCategories()

Returns the feed categories.

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

Returns:List<SyndCategory>

a list of SyndCategoryImpl elements with the feed categories, an empty list if none.

getContributorsback to summary
public List<SyndPerson> getContributors()

Returns the feed author.

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

Returns:List<SyndPerson>

the feed author, null if none.

getCopyrightback to summary
public String getCopyright()

Returns the feed copyright.

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

Returns:String

the feed copyright, null if none.

getDescriptionback to summary
public String getDescription()

Returns the feed description.

Returns:String

the feed description, null if none.

getDescriptionExback to summary
public SyndContent getDescriptionEx()

Returns the feed description as a text construct.

Returns:SyndContent

the feed description, null if none.

getDocsback to summary
public String getDocs()

This tag should contain a URL that references a description of the channel.

Returns:String

channel description URL or null

Since
2.0.0
getEncodingback to summary
public String getEncoding()

Returns the charset encoding of a the feed. This is not set by Rome parsers.

Returns:String

the charset encoding of the feed.

getEntriesback to summary
public List<SyndEntry> getEntries()

Returns the feed entries.

Returns:List<SyndEntry>

a list of SyndEntry elements with the feed entries, an empty list if none.

getFeedTypeback to summary
public String getFeedType()

Returns the wire feed type the feed had/will-have when converted from/to a WireFeed.

Returns:String

the feed type, null if none.

getForeignMarkupback to summary
public List<Element> getForeignMarkup()

Returns foreign markup found at channel level.

Returns:List<Element>

Opaque object to discourage use

getGeneratorback to summary
public String getGenerator()

A string indicating the program used to generate the channel.

Returns:String

string indicating the program or null

Since
2.0.0
getIconback to summary
public SyndImage getIcon()

Returns the feed icon.

Returns:SyndImage

the feed icon, null if none.

getImageback to summary
public SyndImage getImage()

Returns the feed image.

Returns:SyndImage

the feed image, null if none.

getLanguageback to summary
public String getLanguage()

Returns the feed language.

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

Returns:String

the feed language, null if none.

getManagingEditorback to summary
public String getManagingEditor()

The email address of the managing editor of the site, the person to contact for editorial inquiries.

Returns:String

email address of the managing editor or null

Since
2.0.0
getModuleback to summary
public Module getModule(String uri)

Redeclares com.rometools.rome.feed.module.Extendable.getModule.

Returns the module identified by a given URI.

Parameters
uri:String

the URI of the ModuleImpl.

Returns:Module

The module with the given URI, null if none.

Annotations
@Override
getModulesback to summary
public List<Module> getModules()

Redeclares com.rometools.rome.feed.module.Extendable.getModules.

Returns the feed modules.

Returns:List<Module>

a list of ModuleImpl elements with the feed modules, an empty list if none.

Annotations
@Override
getPublishedDateback to summary
public Date getPublishedDate()

Returns the feed published date.

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

Returns:Date

the feed published date, null if none.

getStyleSheetback to summary
public String getStyleSheet()

URL of XSL-Stylesheet.

Returns:String

styleSheet URL or null

Since
2.0.0
getSupportedFeedTypesback to summary
public List<String> getSupportedFeedTypes()

Returns the real feed types the SyndFeedImpl supports when converting from and to.

Returns:List<String>

the real feed type supported.

getTitleback to summary
public String getTitle()

Returns the feed title.

Returns:String

the feed title, null if none.

getTitleExback to summary
public SyndContent getTitleEx()

Returns the feed title.

Returns:SyndContent

the feed title, null if none.

getUriback to summary
public 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.

Returns:String

the feed URI, null if none.

getWebMasterback to summary
public String getWebMaster()

The email address of the webmaster for the site, the person to contact if there are technical problems with the channel.

Returns:String

email address of the webmaster or null

Since
2.0.0
isPreservingWireFeedback to summary
public boolean isPreservingWireFeed()
Returns:boolean

true if this SyndFeed preserves the WireFeed it was created from

originalWireFeedback to summary
public WireFeed originalWireFeed()

Returns the WireFeed this SyndFeed was created from. Will return null if the original feed is not stored or if this SyndFeed was not created from a WireFeed

Returns:WireFeed

The WireFeed this was created from, or null

setAuthorback to summary
public void setAuthor(String author)

Sets the feed author.

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

Parameters
author:String

the feed author to set, null if none.

setAuthorsback to summary
public void setAuthors(List<SyndPerson> authors)

Sets the feed authors.

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

Parameters
authors:List<SyndPerson>

the feed authors to set, null if none.

setCategoriesback to summary
public void setCategories(List<SyndCategory> categories)

Sets the feed categories.

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

Parameters
categories:List<SyndCategory>

the list of SyndCategoryImpl elements with the feed categories to set, an empty list or null if none.

setContributorsback to summary
public void setContributors(List<SyndPerson> contributors)

Sets the feed author.

Returns contributors as a list of SyndPerson objects.

Parameters
contributors:List<SyndPerson>

the feed contributors to set, null if none.

setCopyrightback to summary
public void setCopyright(String copyright)

Sets the feed copyright.

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

Parameters
copyright:String

the feed copyright to set, null if none.

setDescriptionback to summary
public void setDescription(String description)

Sets the feed description.

Parameters
description:String

the feed description to set, null if none.

setDescriptionExback to summary
public void setDescriptionEx(SyndContent description)

Sets the feed description as a text construct.

Parameters
description:SyndContent

the feed description to set, null if none.

setDocsback to summary
public void setDocs(String docs)

This tag should contain a URL that references a description of the channel.

Parameters
docs:String

description URL

Since
2.0.0
setEncodingback to summary
public void setEncoding(String encoding)

Sets the charset encoding of a the feed. This is not set by Rome parsers.

Parameters
encoding:String

the charset encoding of the feed.

setEntriesback to summary
public void setEntries(List<SyndEntry> entries)

Sets the feed entries.

Parameters
entries:List<SyndEntry>

the list of SyndEntryImpl elements with the feed entries to set, an empty list or null if none.

setFeedTypeback to summary
public void setFeedType(String feedType)

Sets the wire feed type the feed will-have when coverted to a WireFeed.

Parameters
feedType:String

the feed type to set, null if none.

setForeignMarkupback to summary
public void setForeignMarkup(List<Element> foreignMarkup)

Sets foreign markup found at channel level.

Parameters
foreignMarkup:List<Element>

Opaque object to discourage use

setGeneratorback to summary
public void setGenerator(String generator)

A string indicating the program used to generate the channel.

Parameters
generator:String

indicating the program

Since
2.0.0
setIconback to summary
public void setIcon(SyndImage icon)

Sets the feed icon.

Parameters
icon:SyndImage

the feed icon to set, null if none.

setImageback to summary
public void setImage(SyndImage image)

Sets the feed image.

Parameters
image:SyndImage

the feed image to set, null if none.

setLanguageback to summary
public void setLanguage(String language)

Sets the feed language.

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

Parameters
language:String

the feed language to set, null if none.

setManagingEditorback to summary
public void setManagingEditor(String managingEditor)

The email address of the managing editor of the site, the person to contact for editorial inquiries.

Parameters
managingEditor:String

email address of the managing editor

Since
2.0.0
setModulesback to summary
public void setModules(List<Module> modules)

Redeclares com.rometools.rome.feed.module.Extendable.setModules.

Sets the feed modules.

Parameters
modules:List<Module>

the list of ModuleImpl elements with the feed modules to set, an empty list or null if none.

Annotations
@Override
setPublishedDateback to summary
public void setPublishedDate(Date publishedDate)

Sets the feed published date.

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

Parameters
publishedDate:Date

the feed published date to set, null if none.

setStyleSheetback to summary
public void setStyleSheet(String styleSheet)

URL of XSL-Stylesheet.

Parameters
styleSheet:String

URL or null

Since
2.0.0
setTitleback to summary
public void setTitle(String title)

Sets the feed title.

Parameters
title:String

the feed title to set, null if none.

setTitleExback to summary
public void setTitleEx(SyndContent title)

Sets the feed title.

Parameters
title:SyndContent

the feed title to set, null if none.

setUriback to summary
public void setUri(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.

Parameters
uri:String

the feed URI to set, null if none.

setWebMasterback to summary
public void setWebMaster(String webMaster)

The email address of the webmaster for the site, the person to contact if there are technical problems with the channel.

Parameters
webMaster:String

email address of the webmaster

Since
2.0.0