public class Item extends java.lang.Object implements java.lang.Cloneable, java.io.Serializable, Extendable
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.
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
author |
private java.util.List<Category> |
categories |
private java.lang.String |
comments |
private Content |
content |
private Description |
description |
private java.util.List<Enclosure> |
enclosures |
private java.util.Date |
expirationDate |
private java.util.List<org.jdom2.Element> |
foreignMarkup |
private Guid |
guid |
private java.lang.String |
link |
private java.util.List<Module> |
modules |
private ObjectBean |
objBean |
private java.util.Date |
pubDate |
private static long |
serialVersionUID |
private Source |
source |
private java.lang.String |
title |
private java.lang.String |
uri |
Constructor and Description |
---|
Item() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Creates a deep 'bean' clone of the object.
|
boolean |
equals(java.lang.Object other)
Indicates whether some other object is "equal to" this one as defined by the Object equals()
method.
|
java.lang.String |
getAuthor()
Returns the item author.
|
java.util.List<Category> |
getCategories()
Returns the item categories.
|
java.lang.String |
getComments()
Returns the item comments.
|
Content |
getContent()
Returns the item content.
|
Description |
getDescription()
Returns the item description.
|
java.util.List<Enclosure> |
getEnclosures()
Returns the item enclosures.
|
java.util.Date |
getExpirationDate()
Returns the item expiration date.
|
java.util.List<org.jdom2.Element> |
getForeignMarkup()
Returns foreign markup found at item level.
|
Guid |
getGuid()
Returns the item GUID.
|
java.lang.String |
getLink()
Returns the item link.
|
Module |
getModule(java.lang.String uri)
Returns the module identified by a given URI.
|
java.util.List<Module> |
getModules()
Returns the item modules.
|
java.util.Date |
getPubDate()
Returns the item publishing date.
|
Source |
getSource()
Returns the item source.
|
java.lang.String |
getTitle()
Returns the item title.
|
java.lang.String |
getUri()
Returns the item uri.
|
int |
hashCode()
Returns a hashcode value for the object.
|
void |
setAuthor(java.lang.String author)
Sets the item author.
|
void |
setCategories(java.util.List<Category> categories)
Sets the item categories.
|
void |
setComments(java.lang.String comments)
Sets the item comments.
|
void |
setContent(Content content)
Sets the item content.
|
void |
setDescription(Description description)
Sets the item description.
|
void |
setEnclosures(java.util.List<Enclosure> enclosures)
Sets the item enclosures.
|
void |
setExpirationDate(java.util.Date expirationDate)
Sets the item expiration date.
|
void |
setForeignMarkup(java.util.List<org.jdom2.Element> foreignMarkup)
Sets foreign markup found at item level.
|
void |
setGuid(Guid guid)
Sets the item GUID.
|
void |
setLink(java.lang.String link)
Sets the item link.
|
void |
setModules(java.util.List<Module> modules)
Sets the item modules.
|
void |
setPubDate(java.util.Date pubDate)
Sets the item publishing date.
|
void |
setSource(Source source)
Sets the item source.
|
void |
setTitle(java.lang.String title)
Sets the item title.
|
void |
setUri(java.lang.String uri)
Sets the item uri.
|
java.lang.String |
toString()
Returns the String representation for the object.
|
private static final long serialVersionUID
private final ObjectBean objBean
private java.lang.String title
private java.lang.String link
private java.lang.String uri
private Description description
private Content content
private Source source
private java.util.List<Enclosure> enclosures
private java.util.List<Category> categories
private Guid guid
private java.lang.String comments
private java.lang.String author
private java.util.Date pubDate
private java.util.Date expirationDate
private java.util.List<Module> modules
private java.util.List<org.jdom2.Element> foreignMarkup
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- thrown if an element of the object cannot be cloned.public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
other
- he reference object with which to compare.public int hashCode()
It follows the contract defined by the Object hashCode() method.
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getTitle()
public void setTitle(java.lang.String title)
title
- the item title to set, null if none.public java.lang.String getLink()
public void setLink(java.lang.String link)
link
- the item link to set, null if none.public java.lang.String getUri()
public void setUri(java.lang.String uri)
uri
- the item uri to set, null if none.public Description getDescription()
public void setDescription(Description description)
description
- the item description to set, null if none.public Content getContent()
public void setContent(Content content)
content
- the item content to set, null if none.public Source getSource()
public void setSource(Source source)
source
- the item source to set, null if none.public java.util.List<Enclosure> getEnclosures()
public void setEnclosures(java.util.List<Enclosure> enclosures)
enclosures
- the list of Enclosure elements with the item enclosures to set, an empty
list or null if none.public java.util.List<Category> getCategories()
public void setCategories(java.util.List<Category> categories)
categories
- the list of Categories elements with the item categories to set, an empty
list or null if none.public Guid getGuid()
public void setGuid(Guid guid)
guid
- the item GUID to set, null if none.public java.lang.String getComments()
public void setComments(java.lang.String comments)
comments
- the item comments to set, null if none.public java.lang.String getAuthor()
public void setAuthor(java.lang.String author)
author
- the item author to set, null if none.public java.util.List<Module> getModules()
getModules
in interface Extendable
public void setModules(java.util.List<Module> modules)
setModules
in interface Extendable
modules
- the list of ModuleImpl elements with the item modules to set, an empty list or
null if none.public Module getModule(java.lang.String uri)
getModule
in interface Extendable
uri
- the URI of the ModuleImpl.public java.util.Date getPubDate()
public void setPubDate(java.util.Date pubDate)
pubDate
- the item publishing date to set, null if none.public java.util.Date getExpirationDate()
public void setExpirationDate(java.util.Date expirationDate)
expirationDate
- the item expiration date to set, null if none.public java.util.List<org.jdom2.Element> getForeignMarkup()
public void setForeignMarkup(java.util.List<org.jdom2.Element> foreignMarkup)
foreignMarkup
- Opaque object to discourage use