com.sun.syndication.feed.rss

Class Item

public class Item extends Object implements Cloneable, Serializable, Extendable

Bean for items of RSS feeds.

It handles all RSS versions without loosing information.

For RSS1.0 it supports Dublin Core and Syndication modules. Note that those modules currently support simple syntax format only.

Author: Alejandro Abdelnur

Field Summary
String_author
List_categories
String_comments
Content_content
Description_description
List_enclosures
Date_expirationDate
List_foreignMarkup
Guid_guid
String_link
List_modules
ObjectBean_objBean
Date_pubDate
Source_source
String_title
String_uri
Constructor Summary
Item()
Default constructor.
Method Summary
Objectclone()
Creates a deep 'bean' clone of the object.
booleanequals(Object other)
Indicates whether some other object is "equal to" this one as defined by the Object equals() method.
StringgetAuthor()
Returns the item author.
ListgetCategories()
Returns the item categories.
StringgetComments()
Returns the item comments.
ContentgetContent()
Returns the item content.
DescriptiongetDescription()
Returns the item description.
ListgetEnclosures()
Returns the item enclosures.
DategetExpirationDate()
Returns the item expiration date.
ObjectgetForeignMarkup()
Returns foreign markup found at item level.
GuidgetGuid()
Returns the item GUID.
StringgetLink()
Returns the item link.
ModulegetModule(String uri)
Returns the module identified by a given URI.
ListgetModules()
Returns the item modules.
DategetPubDate()
Returns the item publishing date.
SourcegetSource()
Returns the item source.
StringgetTitle()
Returns the item title.
StringgetUri()
Returns the item uri.
inthashCode()
Returns a hashcode value for the object.
voidsetAuthor(String author)
Sets the item author.
voidsetCategories(List categories)
Sets the item categories.
voidsetComments(String comments)
Sets the item comments.
voidsetContent(Content content)
Sets the item content.
voidsetDescription(Description description)
Sets the item description.
voidsetEnclosures(List enclosures)
Sets the item enclosures.
voidsetExpirationDate(Date expirationDate)
Sets the item expiration date.
voidsetForeignMarkup(Object foreignMarkup)
Sets foreign markup found at item level.
voidsetGuid(Guid guid)
Sets the item GUID.
voidsetLink(String link)
Sets the item link.
voidsetModules(List modules)
Sets the item modules.
voidsetPubDate(Date pubDate)
Sets the item publishing date.
voidsetSource(Source source)
Sets the item source.
voidsetTitle(String title)
Sets the item title.
voidsetUri(String uri)
Sets the item uri.
StringtoString()
Returns the String representation for the object.

Field Detail

_author

private String _author

_categories

private List _categories

_comments

private String _comments

_content

private Content _content

_description

private Description _description

_enclosures

private List _enclosures

_expirationDate

private Date _expirationDate

_foreignMarkup

private List _foreignMarkup

_guid

private Guid _guid

_link

private String _link

_modules

private List _modules

_objBean

private ObjectBean _objBean

_pubDate

private Date _pubDate

_source

private Source _source

_title

private String _title

_uri

private String _uri

Constructor Detail

Item

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

Method Detail

clone

public Object clone()
Creates a deep 'bean' clone of the object.

Returns: a clone of the object.

Throws: CloneNotSupportedException thrown if an element of the object cannot be cloned.

equals

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

Parameters: other he reference object with which to compare.

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

getAuthor

public String getAuthor()
Returns the item author.

Returns: the item author, null if none.

getCategories

public List getCategories()
Returns the item categories.

Returns: a list of Category elements with the item categories, an empty list if none.

getComments

public String getComments()
Returns the item comments.

Returns: the item comments, null if none.

getContent

public Content getContent()
Returns the item content.

Returns: the item content, null if none.

getDescription

public Description getDescription()
Returns the item description.

Returns: the item description, null if none.

getEnclosures

public List getEnclosures()
Returns the item enclosures.

Returns: a list of Enclosure elements with the item enclosures, an empty list if none.

getExpirationDate

public Date getExpirationDate()
Returns the item expiration date.

Returns: the item expiration date, null if none.

getForeignMarkup

public Object getForeignMarkup()
Returns foreign markup found at item level.

Returns: Opaque object to discourage use

getGuid

public Guid getGuid()
Returns the item GUID.

Returns: the item GUID, null if none.

getLink

public String getLink()
Returns the item link.

Returns: the item link, null if none.

getModule

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

Parameters: uri the URI of the ModuleImpl.

Returns: The module with the given URI, null if none.

getModules

public List getModules()
Returns the item modules.

Returns: a list of ModuleImpl elements with the item modules, an empty list if none.

getPubDate

public Date getPubDate()
Returns the item publishing date.

Returns: the item publishing date, null if none.

getSource

public Source getSource()
Returns the item source.

Returns: the item source, null if none.

getTitle

public String getTitle()
Returns the item title.

Returns: the item title, null if none.

getUri

public String getUri()
Returns the item uri.

Returns: the item uri, null if none.

hashCode

public int hashCode()
Returns a hashcode value for the object.

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

Returns: the hashcode of the bean object.

setAuthor

public void setAuthor(String author)
Sets the item author.

Parameters: author the item author to set, null if none.

setCategories

public void setCategories(List categories)
Sets the item categories.

Parameters: categories the list of Categories elements with the item categories to set, an empty list or null if none.

setComments

public void setComments(String comments)
Sets the item comments.

Parameters: comments the item comments to set, null if none.

setContent

public void setContent(Content content)
Sets the item content.

Parameters: content the item content to set, null if none.

setDescription

public void setDescription(Description description)
Sets the item description.

Parameters: description the item description to set, null if none.

setEnclosures

public void setEnclosures(List enclosures)
Sets the item enclosures.

Parameters: enclosures the list of Enclosure elements with the item enclosures to set, an empty list or null if none.

setExpirationDate

public void setExpirationDate(Date expirationDate)
Sets the item expiration date.

Parameters: expirationDate the item expiration date to set, null if none.

setForeignMarkup

public void setForeignMarkup(Object foreignMarkup)
Sets foreign markup found at item level.

Parameters: foreignMarkup Opaque object to discourage use

setGuid

public void setGuid(Guid guid)
Sets the item GUID.

Parameters: guid the item GUID to set, null if none.

setLink

public void setLink(String link)
Sets the item link.

Parameters: link the item link to set, null if none.

setModules

public void setModules(List modules)
Sets the item modules.

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

setPubDate

public void setPubDate(Date pubDate)
Sets the item publishing date.

Parameters: pubDate the item publishing date to set, null if none.

setSource

public void setSource(Source source)
Sets the item source.

Parameters: source the item source to set, null if none.

setTitle

public void setTitle(String title)
Sets the item title.

Parameters: title the item title to set, null if none.

setUri

public void setUri(String uri)
Sets the item uri.

Parameters: uri the item uri to set, null if none.

toString

public String toString()
Returns the String representation for the object.

Returns: String representation for the object.

Copyright © Sun Microsystems. All Rights Reserved.