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

public Class Item

extends Object
implements Cloneable, Serializable, Extendable
Class Inheritance
All Implemented Interfaces
com.rometools.rome.feed.module.Extendable, java.io.Serializable, java.lang.Cloneable
Imports
java.io.Serializable, java.util.Collections, .Date, .List, org.jdom2.Element, com.rometools.rome.feed.impl.CloneableBean, .EqualsBean, .ToStringBean, com.rometools.rome.feed.module.Extendable, .Module, com.rometools.rome.feed.module.impl.ModuleUtils, com.rometools.utils.Dates, .Lists

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.

Field Summary

Modifier and TypeField and Description
private String
private List<Category>
private String
private Content
private Description
private List<Enclosure>
private Date
private List<Element>
private Guid
private String
private List<Module>
private Date
private static final long
private Source
private String
private String

Constructor Summary

AccessConstructor and Description
public
Item()

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

a clone of the object.
clone
()

Overrides java.lang.Object.clone.

Creates a deep 'bean' clone of the object.
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

Returns:

the item author, null if none.
getAuthor
()

Returns the item author.

public List<Category>

Returns:

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

Returns the item categories.

public String

Returns:

the item comments, null if none.
getComments
()

Returns the item comments.

public Content

Returns:

the item content, null if none.
getContent
()

Returns the item content.

public Description

Returns:

the item description, null if none.
getDescription
()

Returns the item description.

public List<Enclosure>

Returns:

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

Returns the item enclosures.

public Date

Returns:

the item expiration date, null if none.
getExpirationDate
()

Returns the item expiration date.

public List<Element>

Returns:

Opaque object to discourage use
getForeignMarkup
()

Returns foreign markup found at item level.

public Guid

Returns:

the item GUID, null if none.
getGuid
()

Returns the item GUID.

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.module.Extendable.getModule.

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

Returns:

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

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

Returns the item modules.
public Date

Returns:

the item publishing date, null if none.
getPubDate
()

Returns the item publishing date.

public Source

Returns:

the item source, null if none.
getSource
()

Returns the item source.

public String

Returns:

the item title, null if none.
getTitle
()

Returns the item title.

public String

Returns:

the item uri, null if none.
getUri
()

Returns the item uri.

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 item author to set, null if none.
author
)

Sets the item author.

public void
setCategories(final List<Category>
the list of Categories elements with the item categories to set, an empty list or null if none.
categories
)

Sets the item categories.

public void
setComments(final String
the item comments to set, null if none.
comments
)

Sets the item comments.

public void
setContent(final Content
the item content to set, null if none.
content
)

Sets the item content.

public void
setDescription(final Description
the item description to set, null if none.
description
)

Sets the item description.

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

Sets the item enclosures.

public void
setExpirationDate(final Date
the item expiration date to set, null if none.
expirationDate
)

Sets the item expiration date.

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

Sets foreign markup found at item level.

public void
setGuid(final Guid
the item GUID to set, null if none.
guid
)

Sets the item GUID.

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

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

Sets the item modules.
public void
setPubDate(final Date
the item publishing date to set, null if none.
pubDate
)

Sets the item publishing date.

public void
setSource(final Source
the item source to set, null if none.
source
)

Sets the item source.

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

Sets the item title.

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

Sets the item uri.

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

authorback to summary
private String author
categoriesback to summary
private List<Category> categories
commentsback to summary
private String comments
contentback to summary
private Content content
descriptionback to summary
private Description description
enclosuresback to summary
private List<Enclosure> enclosures
expirationDateback to summary
private Date expirationDate
foreignMarkupback to summary
private List<Element> foreignMarkup
guidback to summary
private Guid guid
modulesback to summary
private List<Module> modules
pubDateback to summary
private Date pubDate
serialVersionUIDback to summary
private static final long serialVersionUID
sourceback to summary
private Source source
titleback to summary
private String title
uriback to summary
private String uri

Constructor Detail

Itemback to summary
public Item()

Method Detail

cloneback to summary
public Object clone() throws CloneNotSupportedException

Overrides java.lang.Object.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.
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()

Returns the item author.

Returns:String

the item author, null if none.

getCategoriesback to summary
public List<Category> getCategories()

Returns the item categories.

Returns:List<Category>

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

getCommentsback to summary
public String getComments()

Returns the item comments.

Returns:String

the item comments, null if none.

getContentback to summary
public Content getContent()

Returns the item content.

Returns:Content

the item content, null if none.

getDescriptionback to summary
public Description getDescription()

Returns the item description.

Returns:Description

the item description, null if none.

getEnclosuresback to summary
public List<Enclosure> getEnclosures()

Returns the item enclosures.

Returns:List<Enclosure>

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

getExpirationDateback to summary
public Date getExpirationDate()

Returns the item expiration date.

Returns:Date

the item expiration date, null if none.

getForeignMarkupback to summary
public List<Element> getForeignMarkup()

Returns foreign markup found at item level.

Returns:List<Element>

Opaque object to discourage use

getGuidback to summary
public Guid getGuid()

Returns the item GUID.

Returns:Guid

the item GUID, null if none.

getModuleback to summary
public Module getModule(final String uri)

Implements 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()

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

Returns the item modules.

Returns:List<Module>

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

Annotations
@Override
getPubDateback to summary
public Date getPubDate()

Returns the item publishing date.

Returns:Date

the item publishing date, null if none.

getSourceback to summary
public Source getSource()

Returns the item source.

Returns:Source

the item source, null if none.

getTitleback to summary
public String getTitle()

Returns the item title.

Returns:String

the item title, null if none.

getUriback to summary
public String getUri()

Returns the item uri.

Returns:String

the item uri, null if none.

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)

Sets the item author.

Parameters
author:String

the item author to set, null if none.

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

Sets the item categories.

Parameters
categories:List<Category>

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

setCommentsback to summary
public void setComments(final String comments)

Sets the item comments.

Parameters
comments:String

the item comments to set, null if none.

setContentback to summary
public void setContent(final Content content)

Sets the item content.

Parameters
content:Content

the item content to set, null if none.

setDescriptionback to summary
public void setDescription(final Description description)

Sets the item description.

Parameters
description:Description

the item description to set, null if none.

setEnclosuresback to summary
public void setEnclosures(final List<Enclosure> enclosures)

Sets the item enclosures.

Parameters
enclosures:List<Enclosure>

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

setExpirationDateback to summary
public void setExpirationDate(final Date expirationDate)

Sets the item expiration date.

Parameters
expirationDate:Date

the item expiration date to set, null if none.

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

Sets foreign markup found at item level.

Parameters
foreignMarkup:List<Element>

Opaque object to discourage use

setGuidback to summary
public void setGuid(final Guid guid)

Sets the item GUID.

Parameters
guid:Guid

the item GUID to set, null if none.

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

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

Sets the item modules.

Parameters
modules:List<Module>

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

Annotations
@Override
setPubDateback to summary
public void setPubDate(final Date pubDate)

Sets the item publishing date.

Parameters
pubDate:Date

the item publishing date to set, null if none.

setSourceback to summary
public void setSource(final Source source)

Sets the item source.

Parameters
source:Source

the item source to set, null if none.

setTitleback to summary
public void setTitle(final String title)

Sets the item title.

Parameters
title:String

the item title to set, null if none.

setUriback to summary
public void setUri(final String uri)

Sets the item uri.

Parameters
uri:String

the item uri to set, null if none.

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