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

public Class SyndEntryImpl

extends Object
implements Serializable, SyndEntry
Class Inheritance
All Implemented Interfaces
com.rometools.rome.feed.synd.SyndEntry, com.rometools.rome.feed.module.Extendable, com.rometools.rome.feed.CopyFrom, java.lang.Cloneable, java.io.Serializable
Imports
java.io.Serializable, java.util.ArrayList, .Collections, .Date, .HashMap, .HashSet, .List, .Map, .Set, org.jdom2.Element, com.rometools.rome.feed.CopyFrom, com.rometools.rome.feed.impl.CloneableBean, .CopyFromHelper, .EqualsBean, .ToStringBean, com.rometools.rome.feed.module.DCModule, .DCModuleImpl, .Module, .SyModule, .SyModuleImpl, com.rometools.rome.feed.module.impl.ModuleUtils, com.rometools.rome.feed.synd.impl.URINormalizer, com.rometools.utils.Dates, .Lists, .Strings

Bean for entries of SyndFeedImpl feeds.

Field Summary

Modifier and TypeField and Description
private List<SyndPerson>
private final Class<?>
private List<SyndCategory>
private String
private List<SyndContent>
private List<SyndPerson>
public static final Set<String>
CONVENIENCE_PROPERTIES

Unmodifiable Set containing the convenience properties of this class.

private final Set<String>
private static final CopyFromHelper
private SyndContent
private List<SyndEnclosure>
private List<Element>
private static final Set<String>
private String
private List<SyndLink>
private List<Module>
private static final long
private SyndFeed
private SyndContent
private Date
private String
private Object

Constructor Summary

AccessConstructor and Description
protected
SyndEntryImpl(final Class<?> beanClass, final Set<String>
set containing the convenience properties of the SyndEntryImpl (the are ignored during cloning, check CloneableBean for details).
convenienceProperties
)

For implementations extending SyndEntryImpl to be able to use the ObjectBean functionality with extended interfaces.

public

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

a clone of the object.
clone
()

Overrides java.lang.Object.clone.

Implements com.rometools.rome.feed.synd.SyndEntry.clone.

Creates a deep 'bean' clone of the object.
public void
copyFrom(final CopyFrom
the instance to copy properties from.
obj
)

Implements com.rometools.rome.feed.CopyFrom.copyFrom.

Copies all the properties of the given bean into this one.
public boolean

Returns:

true if 'this' object is equal to the 'other' object.
equals
(final Object
he reference object with which to compare.
other
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one as defined by the Object equals() method.
public String
getAuthor()

Implements com.rometools.rome.feed.synd.SyndEntry.getAuthor.

Returns the name of the first entry author in the collection of authors.
public List<SyndPerson>
getAuthors()

Implements com.rometools.rome.feed.synd.SyndEntry.getAuthors.

Returns the entry authors.
public List<SyndCategory>

Returns:

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

Implements com.rometools.rome.feed.synd.SyndEntry.getCategories.

Returns the entry categories.
public String
getComments()

Implements com.rometools.rome.feed.synd.SyndEntry.getComments.

URL of a page for comments relating to the item.
public List<SyndContent>

Returns:

a list of SyndContentImpl elements with the entry contents, an empty list if none.
getContents
()

Implements com.rometools.rome.feed.synd.SyndEntry.getContents.

Returns the entry contents.
public List<SyndPerson>
private DCModule

Returns:

the DC module, it's never null
getDCModule
()

Returns the Dublin Core module of the feed.

public SyndContent

Returns:

the entry description, null if none.
getDescription
()

Implements com.rometools.rome.feed.synd.SyndEntry.getDescription.

Returns the entry description.
public List<SyndEnclosure>

Returns:

a list of SyndEnclosure elements with the entry enclosures, an empty list if none.
getEnclosures
()

Implements com.rometools.rome.feed.synd.SyndEntry.getEnclosures.

Returns the entry enclosures.
public List<Element>

Returns:

list of JDOM nodes containing channel-level foreign markup, an empty list if none.
getForeignMarkup
()

Implements com.rometools.rome.feed.synd.SyndEntry.getForeignMarkup.

Returns foreign markup found at channel level.
public Class<SyndEntry>
getInterface()

Implements com.rometools.rome.feed.CopyFrom.getInterface.

Returns the interface the copyFrom works on.
public Module

Returns:

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

Implements com.rometools.rome.feed.synd.SyndEntry.getModule.

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

Returns:

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

Implements com.rometools.rome.feed.synd.SyndEntry.getModules.

Returns the entry modules.
public Date

Returns:

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

Implements com.rometools.rome.feed.synd.SyndEntry.getPublishedDate.

Returns the entry published date.
public SyndFeed
getSource()

Implements com.rometools.rome.feed.synd.SyndEntry.getSource.

Returns the entry source.
public String

Returns:

the entry title, null if none.
getTitle
()

Implements com.rometools.rome.feed.synd.SyndEntry.getTitle.

Returns the entry title.
public SyndContent

Returns:

the entry title, null if none.
getTitleEx
()

Implements com.rometools.rome.feed.synd.SyndEntry.getTitleEx.

Returns the entry title as a text construct.
public Date

Returns:

Returns the updatedDate.
getUpdatedDate
()

Implements com.rometools.rome.feed.synd.SyndEntry.getUpdatedDate.

Returns the updatedDate

public String

Returns:

the entry URI, null if none.
getUri
()

Implements com.rometools.rome.feed.synd.SyndEntry.getUri.

Returns the entry URI.
public Object
getWireEntry()

Implements com.rometools.rome.feed.synd.SyndEntry.getWireEntry.

Return the original item this SyndEntry is generated from.
public int

Returns:

the hashcode of the bean object.
hashCode
()

Overrides java.lang.Object.hashCode.

Returns a hashcode value for the object.
public void
setAuthor(final String
the entry author to set, null if none.
author
)

Implements com.rometools.rome.feed.synd.SyndEntry.setAuthor.

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

Implements com.rometools.rome.feed.synd.SyndEntry.setAuthors.

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

Implements com.rometools.rome.feed.synd.SyndEntry.setCategories.

Sets the entry categories.
public void
setComments(final String
URL
comments
)

Implements com.rometools.rome.feed.synd.SyndEntry.setComments.

URL of a page for comments relating to the item.
public void
setContents(final List<SyndContent>
the list of SyndContentImpl elements with the entry contents to set, an empty list or null if none.
contents
)

Implements com.rometools.rome.feed.synd.SyndEntry.setContents.

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

Implements com.rometools.rome.feed.synd.SyndEntry.setContributors.

Sets the feed contributors.
public void
setDescription(final SyndContent
the entry description to set, null if none.
description
)

Implements com.rometools.rome.feed.synd.SyndEntry.setDescription.

Sets the entry description.
public void
setEnclosures(final List<SyndEnclosure>
the list of SyndEnclosure elements with the entry enclosures to set, an empty list or null if none.
enclosures
)

Implements com.rometools.rome.feed.synd.SyndEntry.setEnclosures.

Sets the entry enclosures.
public void
setForeignMarkup(final List<Element>
list of JDOM nodes containing channel-level foreign markup, an empty list if none.
foreignMarkup
)

Implements com.rometools.rome.feed.synd.SyndEntry.setForeignMarkup.

Sets foreign markup found at channel level.
public void
setModules(final List<Module>
the list of ModuleImpl elements with the entry modules to set, an empty list or null if none.
modules
)

Implements com.rometools.rome.feed.synd.SyndEntry.setModules.

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

Implements com.rometools.rome.feed.synd.SyndEntry.setPublishedDate.

Sets the entry published date.
public void
setSource(final SyndFeed
the original SyndFeed that contained this article
source
)

Implements com.rometools.rome.feed.synd.SyndEntry.setSource.

Sets the entry source feed (for use if different from containing feed)

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

Implements com.rometools.rome.feed.synd.SyndEntry.setTitle.

Sets the entry title.
public void
setTitleEx(final SyndContent
the entry title to set, null if none.
title
)

Implements com.rometools.rome.feed.synd.SyndEntry.setTitleEx.

Sets the entry title as a text construct.
public void
setUpdatedDate(final Date
The updatedDate to set.
updatedDate
)

Implements com.rometools.rome.feed.synd.SyndEntry.setUpdatedDate.

Set the updatedDate

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

Implements com.rometools.rome.feed.synd.SyndEntry.setUri.

Sets the entry URI.
public void
setWireEntry(final Object wireEntry)

public String

Returns:

String representation for the object.
toString
()

Overrides java.lang.Object.toString.

Returns the String representation for the object.
Inherited from java.lang.Object:
finalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

authorsback to summary
private List<SyndPerson> authors
beanClassback to summary
private final Class<?> beanClass
categoriesback to summary
private List<SyndCategory> categories
commentsback to summary
private String comments
contentsback to summary
private List<SyndContent> contents
contributorsback to summary
private List<SyndPerson> contributors
CONVENIENCE_PROPERTIESback to summary
public static final Set<String> 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.

conveniencePropertiesback to summary
private final Set<String> convenienceProperties
COPY_FROM_HELPERback to summary
private static final CopyFromHelper COPY_FROM_HELPER
descriptionback to summary
private SyndContent description
enclosuresback to summary
private List<SyndEnclosure> enclosures
foreignMarkupback to summary
private List<Element> foreignMarkup
IGNORE_PROPERTIESback to summary
private static final Set<String> IGNORE_PROPERTIES
modulesback to summary
private List<Module> modules
serialVersionUIDback to summary
private static final long serialVersionUID
sourceback to summary
private SyndFeed source
titleback to summary
private SyndContent title
updatedDateback to summary
private Date updatedDate
uriback to summary
private String uri
wireEntryback to summary
private Object wireEntry

Constructor Detail

SyndEntryImplback to summary
protected SyndEntryImpl(final Class<?> beanClass, final Set<String> convenienceProperties)

For implementations extending SyndEntryImpl to be able to use the ObjectBean functionality with extended interfaces.

Parameters
convenienceProperties:Set<String>

set containing the convenience properties of the SyndEntryImpl (the are ignored during cloning, check CloneableBean for details).

SyndEntryImplback to summary
public SyndEntryImpl()

Method Detail

cloneback to summary
public Object clone() throws CloneNotSupportedException

Overrides java.lang.Object.clone.

Implements com.rometools.rome.feed.synd.SyndEntry.clone.

Creates a deep 'bean' clone of the object.

Returns:Object

a clone of the object.

Annotations
@Override
Exceptions
CloneNotSupportedException:
thrown if an element of the object cannot be cloned.
copyFromback to summary
public void copyFrom(final CopyFrom obj)

Implements com.rometools.rome.feed.CopyFrom.copyFrom.

Doc from com.rometools.rome.feed.CopyFrom.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.

Parameters
obj:CopyFrom

the instance to copy properties from.

Annotations
@Override
equalsback to summary
public boolean equals(final Object other)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one as defined by the Object equals() method.

Parameters
other:Object

he reference object with which to compare.

Returns:boolean

true if 'this' object is equal to the 'other' object.

Annotations
@Override
getAuthorback to summary
public String getAuthor()

Implements com.rometools.rome.feed.synd.SyndEntry.getAuthor.

Doc from com.rometools.rome.feed.synd.SyndEntry.getAuthor.

Returns the name of the first entry 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, empty string if none.

Annotations
@Override
getAuthorsback to summary
public List<SyndPerson> getAuthors()

Implements com.rometools.rome.feed.synd.SyndEntry.getAuthors.

Doc from com.rometools.rome.feed.synd.SyndEntry.getAuthors.

Returns the entry authors.

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

Returns:List<SyndPerson>

the feed authors, empty list if none.

Annotations
@Override
getCategoriesback to summary
public List<SyndCategory> getCategories()

Implements com.rometools.rome.feed.synd.SyndEntry.getCategories.

Returns the entry categories.

Returns:List<SyndCategory>

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

Annotations
@Override
getCommentsback to summary
public String getComments()

Implements com.rometools.rome.feed.synd.SyndEntry.getComments.

Doc from com.rometools.rome.feed.synd.SyndEntry.getComments.

URL of a page for comments relating to the item.

Returns:String

comments URL or null.

Annotations
@Override
getContentsback to summary
public List<SyndContent> getContents()

Implements com.rometools.rome.feed.synd.SyndEntry.getContents.

Returns the entry contents.

Returns:List<SyndContent>

a list of SyndContentImpl elements with the entry contents, an empty list if none.

Annotations
@Override
getContributorsback to summary
public List<SyndPerson> getContributors()

Implements com.rometools.rome.feed.synd.SyndEntry.getContributors.

Doc from com.rometools.rome.feed.synd.SyndEntry.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.

Annotations
@Override
getDCModuleback to summary
private DCModule getDCModule()

Returns the Dublin Core module of the feed.

Returns:DCModule

the DC module, it's never null

getDescriptionback to summary
public SyndContent getDescription()

Implements com.rometools.rome.feed.synd.SyndEntry.getDescription.

Returns the entry description.

Returns:SyndContent

the entry description, null if none.

Annotations
@Override
getEnclosuresback to summary
public List<SyndEnclosure> getEnclosures()

Implements com.rometools.rome.feed.synd.SyndEntry.getEnclosures.

Returns the entry enclosures.

Returns:List<SyndEnclosure>

a list of SyndEnclosure elements with the entry enclosures, an empty list if none.

Annotations
@Override
getForeignMarkupback to summary
public List<Element> getForeignMarkup()

Implements com.rometools.rome.feed.synd.SyndEntry.getForeignMarkup.

Returns foreign markup found at channel level.

Returns:List<Element>

list of JDOM nodes containing channel-level foreign markup, an empty list if none.

Annotations
@Override
getInterfaceback to summary
public Class<SyndEntry> getInterface()

Implements com.rometools.rome.feed.CopyFrom.getInterface.

Doc from com.rometools.rome.feed.CopyFrom.getInterface.

Returns the interface the copyFrom works on.

This is useful when dealing with properties that may have multiple implementations. For example, Module.

Returns:Class<SyndEntry>

the interface the copyFrom works on.

Annotations
@Override
getModuleback to summary
public Module getModule(final String uri)

Implements com.rometools.rome.feed.synd.SyndEntry.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()

Implements com.rometools.rome.feed.synd.SyndEntry.getModules.

Returns the entry modules.

Returns:List<Module>

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

Annotations
@Override
getPublishedDateback to summary
public Date getPublishedDate()

Implements com.rometools.rome.feed.synd.SyndEntry.getPublishedDate.

Returns the entry published date.

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

Returns:Date

the entry published date, null if none.

Annotations
@Override
getSourceback to summary
public SyndFeed getSource()

Implements com.rometools.rome.feed.synd.SyndEntry.getSource.

Doc from com.rometools.rome.feed.synd.SyndEntry.getSource.

Returns the entry source.

This returns the entry source as a SyndFeed

Returns:SyndFeed

the SyndFeed to which this entry is attributed

Annotations
@Override
getTitleback to summary
public String getTitle()

Implements com.rometools.rome.feed.synd.SyndEntry.getTitle.

Returns the entry title.

Returns:String

the entry title, null if none.

Annotations
@Override
getTitleExback to summary
public SyndContent getTitleEx()

Implements com.rometools.rome.feed.synd.SyndEntry.getTitleEx.

Returns the entry title as a text construct.

Returns:SyndContent

the entry title, null if none.

Annotations
@Override
getUpdatedDateback to summary
public Date getUpdatedDate()

Implements com.rometools.rome.feed.synd.SyndEntry.getUpdatedDate.

Returns the updatedDate

Returns:Date

Returns the updatedDate.

Annotations
@Override
getUriback to summary
public String getUri()

Implements com.rometools.rome.feed.synd.SyndEntry.getUri.

Returns the entry URI.

How the entry URI maps to a concrete feed type (RSS or Atom) depends on the concrete feed type. This is explained in detail in Rome documentation, Feed and entry URI mapping.

The returned URI is a normalized URI as specified in RFC 2396bis.

Returns:String

the entry URI, null if none.

Annotations
@Override
getWireEntryback to summary
public Object getWireEntry()

Implements com.rometools.rome.feed.synd.SyndEntry.getWireEntry.

Doc from com.rometools.rome.feed.synd.SyndEntry.getWireEntry.

Return the original item this SyndEntry is generated from. The type of the object returned depends on the original type of the feed. Atom 0.3/1.0 will return com.rometools.rome.feed.atom.Entry, while RSS will return com.rometools.rome.feed.rss.Item.java. If this entry was not generated from a WireFeed, or the SyndFeed was not set to preserve the WireFeed then it will return null

Returns:Object

the WireFeed Item or Entry this Entry is generated from, or null

Annotations
@Override
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Returns a hashcode value for the object.

It follows the contract defined by the Object hashCode() method.

Returns:int

the hashcode of the bean object.

Annotations
@Override
setAuthorback to summary
public void setAuthor(final String author)

Implements com.rometools.rome.feed.synd.SyndEntry.setAuthor.

Sets the entry author.

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

Parameters
author:String

the entry author to set, null if none.

Annotations
@Override
setAuthorsback to summary
public void setAuthors(final List<SyndPerson> authors)

Implements com.rometools.rome.feed.synd.SyndEntry.setAuthors.

Doc from com.rometools.rome.feed.synd.SyndEntry.setAuthors.

Sets the entry authors.

For Atom feeds, this sets the authors as a list of SyndPerson objects.

Parameters
authors:List<SyndPerson>

the feed authors to set, null if none.

Annotations
@Override
setCategoriesback to summary
public void setCategories(final List<SyndCategory> categories)

Implements com.rometools.rome.feed.synd.SyndEntry.setCategories.

Sets the entry 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 entry categories to set, an empty list or null if none.

Annotations
@Override
setCommentsback to summary
public void setComments(final String comments)

Implements com.rometools.rome.feed.synd.SyndEntry.setComments.

Doc from com.rometools.rome.feed.synd.SyndEntry.setComments.

URL of a page for comments relating to the item.

Parameters
comments:String

URL

Annotations
@Override
setContentsback to summary
public void setContents(final List<SyndContent> contents)

Implements com.rometools.rome.feed.synd.SyndEntry.setContents.

Sets the entry contents.

Parameters
contents:List<SyndContent>

the list of SyndContentImpl elements with the entry contents to set, an empty list or null if none.

Annotations
@Override
setContributorsback to summary
public void setContributors(final List<SyndPerson> contributors)

Implements com.rometools.rome.feed.synd.SyndEntry.setContributors.

Doc from com.rometools.rome.feed.synd.SyndEntry.setContributors.

Sets the feed contributors.

Returns contributors as a list of SyndPerson objects.

Parameters
contributors:List<SyndPerson>

the feed contributors to set, null if none.

Annotations
@Override
setDescriptionback to summary
public void setDescription(final SyndContent description)

Implements com.rometools.rome.feed.synd.SyndEntry.setDescription.

Sets the entry description.

Parameters
description:SyndContent

the entry description to set, null if none.

Annotations
@Override
setEnclosuresback to summary
public void setEnclosures(final List<SyndEnclosure> enclosures)

Implements com.rometools.rome.feed.synd.SyndEntry.setEnclosures.

Sets the entry enclosures.

Parameters
enclosures:List<SyndEnclosure>

the list of SyndEnclosure elements with the entry enclosures to set, an empty list or null if none.

Annotations
@Override
setForeignMarkupback to summary
public void setForeignMarkup(final List<Element> foreignMarkup)

Implements com.rometools.rome.feed.synd.SyndEntry.setForeignMarkup.

Sets foreign markup found at channel level.

Parameters
foreignMarkup:List<Element>

list of JDOM nodes containing channel-level foreign markup, an empty list if none.

Annotations
@Override
setModulesback to summary
public void setModules(final List<Module> modules)

Implements com.rometools.rome.feed.synd.SyndEntry.setModules.

Sets the entry modules.

Parameters
modules:List<Module>

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

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

Implements com.rometools.rome.feed.synd.SyndEntry.setPublishedDate.

Sets the entry published date.

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

Parameters
publishedDate:Date

the entry published date to set, null if none.

Annotations
@Override
setSourceback to summary
public void setSource(final SyndFeed source)

Implements com.rometools.rome.feed.synd.SyndEntry.setSource.

Doc from com.rometools.rome.feed.synd.SyndEntry.setSource.

Sets the entry source feed (for use if different from containing feed)

Parameters
source:SyndFeed

the original SyndFeed that contained this article

Annotations
@Override
setTitleback to summary
public void setTitle(final String title)

Implements com.rometools.rome.feed.synd.SyndEntry.setTitle.

Sets the entry title.

Parameters
title:String

the entry title to set, null if none.

Annotations
@Override
setTitleExback to summary
public void setTitleEx(final SyndContent title)

Implements com.rometools.rome.feed.synd.SyndEntry.setTitleEx.

Sets the entry title as a text construct.

Parameters
title:SyndContent

the entry title to set, null if none.

Annotations
@Override
setUpdatedDateback to summary
public void setUpdatedDate(final Date updatedDate)

Implements com.rometools.rome.feed.synd.SyndEntry.setUpdatedDate.

Set the updatedDate

Parameters
updatedDate:Date

The updatedDate to set.

Annotations
@Override
setUriback to summary
public void setUri(final String uri)

Implements com.rometools.rome.feed.synd.SyndEntry.setUri.

Sets the entry URI.

How the entry URI maps to a concrete feed type (RSS or Atom) depends on the concrete feed type. This is explained in detail in Rome documentation, Feed and entry URI mapping.

Parameters
uri:String

the entry URI to set, null if none.

Annotations
@Override
setWireEntryback to summary
public void setWireEntry(final Object wireEntry)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Returns the String representation for the object.

Returns:String

String representation for the object.

Annotations
@Override