com.sun.syndication.feed.synd
Class SyndEntryImpl

java.lang.Object
  extended bycom.sun.syndication.common.ObjectBean
      extended bycom.sun.syndication.feed.synd.SyndEntryImpl
All Implemented Interfaces:
java.lang.Cloneable, CopyFrom, java.io.Serializable, SyndEntry, ToString

public class SyndEntryImpl
extends ObjectBean
implements SyndEntry

Bean for entries of SyndFeedImpl feeds.

Author:
Alejandro Abdelnur
See Also:
Serialized Form

Field Summary
static java.util.Set CONVENIENCE_PROPERTIES
          Unmodifiable Set containing the convenience properties of this class.
 
Constructor Summary
  SyndEntryImpl()
          Default constructor.
protected SyndEntryImpl(java.lang.Class beanClass, java.util.Set convenienceProperties)
          For implementations extending SyndEntryImpl to be able to use the ObjectBean functionality with extended interfaces.
 
Method Summary
 void copyFrom(java.lang.Object obj)
          Copies all the properties of the given bean into this one.
 java.lang.String getAuthor()
          Returns the entry author.
 java.util.List getCategories()
          Returns the entry categories.
 java.util.List getContents()
          Returns the entry contents.
 SyndContent getDescription()
          Returns the entry description.
 java.lang.Class getInterface()
          Returns the interface the copyFrom works on.
 java.lang.String getLink()
          Returns the entry link.
 Module getModule(java.lang.String uri)
          Returns the module identified by a given URI.
 java.util.List getModules()
          Returns the entry modules.
 java.util.Date getPublishedDate()
          Returns the entry published date.
 java.lang.String getTitle()
          Returns the entry title.
 java.lang.String getUri()
          Returns the entry URI.
 void setAuthor(java.lang.String author)
          Sets the entry author.
 void setCategories(java.util.List categories)
          Sets the entry categories.
 void setContents(java.util.List contents)
          Sets the entry contents.
 void setDescription(SyndContent description)
          Sets the entry description.
 void setLink(java.lang.String link)
          Sets the entry link.
 void setModules(java.util.List modules)
          Sets the entry modules.
 void setPublishedDate(java.util.Date publishedDate)
          Sets the entry published date.
 void setTitle(java.lang.String title)
          Sets the entry title.
 void setUri(java.lang.String uri)
          Sets the entry URI.
 
Methods inherited from class com.sun.syndication.common.ObjectBean
clone, equals, hashCode, toString, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.sun.syndication.feed.synd.SyndEntry
clone
 
Methods inherited from interface com.sun.syndication.common.ToString
toString
 

Field Detail

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.

Constructor Detail

SyndEntryImpl

protected SyndEntryImpl(java.lang.Class beanClass,
                        java.util.Set convenienceProperties)
For implementations extending SyndEntryImpl to be able to use the ObjectBean functionality with extended interfaces.

Parameters:
beanClass -
convenienceProperties - set containing the convenience properties of the SyndEntryImpl (the are ignored during cloning, check CloneableBean for details).

SyndEntryImpl

public SyndEntryImpl()
Default constructor. All properties are set to null.

Method Detail

getUri

public java.lang.String 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.

Specified by:
getUri in interface SyndEntry
Returns:
the entry URI, null if none.

setUri

public void setUri(java.lang.String uri)
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.

Specified by:
setUri in interface SyndEntry
Parameters:
uri - the entry URI to set, null if none.

getTitle

public java.lang.String getTitle()
Returns the entry title.

Specified by:
getTitle in interface SyndEntry
Returns:
the entry title, null if none.

setTitle

public void setTitle(java.lang.String title)
Sets the entry title.

Specified by:
setTitle in interface SyndEntry
Parameters:
title - the entry title to set, null if none.

getLink

public java.lang.String getLink()
Returns the entry link.

Specified by:
getLink in interface SyndEntry
Returns:
the entry link, null if none.

setLink

public void setLink(java.lang.String link)
Sets the entry link.

Specified by:
setLink in interface SyndEntry
Parameters:
link - the entry link to set, null if none.

getDescription

public SyndContent getDescription()
Returns the entry description.

Specified by:
getDescription in interface SyndEntry
Returns:
the entry description, null if none.

setDescription

public void setDescription(SyndContent description)
Sets the entry description.

Specified by:
setDescription in interface SyndEntry
Parameters:
description - the entry description to set, null if none.

getContents

public java.util.List getContents()
Returns the entry contents.

Specified by:
getContents in interface SyndEntry
Returns:
a list of SyndContentImpl elements with the entry contents, an empty list if none.

setContents

public void setContents(java.util.List contents)
Sets the entry contents.

Specified by:
setContents in interface SyndEntry
Parameters:
contents - the list of SyndContentImpl elements with the entry contents to set, an empty list or null if none.

getPublishedDate

public java.util.Date getPublishedDate()
Returns the entry published date.

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

Specified by:
getPublishedDate in interface SyndEntry
Returns:
the entry published date, null if none.

setPublishedDate

public void setPublishedDate(java.util.Date publishedDate)
Sets the entry published date.

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

Specified by:
setPublishedDate in interface SyndEntry
Parameters:
publishedDate - the entry published date to set, null if none.

getAuthor

public java.lang.String getAuthor()
Returns the entry author.

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

Specified by:
getAuthor in interface SyndEntry
Returns:
the entry author, null if none.

setAuthor

public void setAuthor(java.lang.String author)
Sets the entry author.

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

Specified by:
setAuthor in interface SyndEntry
Parameters:
author - the entry author to set, null if none.

getCategories

public java.util.List getCategories()
Returns the entry categories.

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

Specified by:
getCategories in interface SyndEntry
Returns:
a list of SyndCategoryImpl elements with the entry categories, an empty list if none.

setCategories

public void setCategories(java.util.List categories)
Sets the entry categories.

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

Specified by:
setCategories in interface SyndEntry
Parameters:
categories - the list of SyndCategoryImpl elements with the entry categories to set, an empty list or null if none.

getModules

public java.util.List getModules()
Returns the entry modules.

Specified by:
getModules in interface SyndEntry
Returns:
a list of ModuleImpl elements with the entry modules, an empty list if none.

setModules

public void setModules(java.util.List modules)
Sets the entry modules.

Specified by:
setModules in interface SyndEntry
Parameters:
modules - the list of ModuleImpl elements with the entry modules to set, an empty list or null if none.

getModule

public Module getModule(java.lang.String uri)
Returns the module identified by a given URI.

Specified by:
getModule in interface SyndEntry
Parameters:
uri - the URI of the ModuleImpl.
Returns:
The module with the given URI, null if none.

getInterface

public java.lang.Class getInterface()
Description copied from interface: 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:
getInterface in interface CopyFrom
Returns:
the interface the copyFrom works on.

copyFrom

public void copyFrom(java.lang.Object obj)
Description copied from interface: 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:
copyFrom in interface CopyFrom
Parameters:
obj - the instance to copy properties from.


Copyright © 2004 Sun Microsystems. All Rights Reserved.