|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wink.common.model.rss.RssItem
public class RssItem
Java class for "item" element of RSS 2.0 Specification.
The following schema fragment specifies the expected content contained within this class.
<complexType name="rssItem"> <complexContent> <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> <sequence> <element name="title" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> <element name="link" type="{http://www.w3.org/2001/XMLSchema}anyURI" minOccurs="0"/> <element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> <element name="author" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> <element name="category" type="{}rssCategory" maxOccurs="unbounded" minOccurs="0"/> <element name="comments" type="{http://www.w3.org/2001/XMLSchema}anyURI" minOccurs="0"/> <element name="enclosure" type="{}rssEnclosure" minOccurs="0"/> <element name="guid" type="{}rssGuid" minOccurs="0"/> <element name="pubDate" type="{http://www.w3.org/2001/XMLSchema}string"/> <element name="source" type="{}rssSource" minOccurs="0"/> <any/> </sequence> </restriction> </complexContent> </complexType>
A channel may contain any number of <item>s. An item may represent a "story" -- much like a story in a newspaper or magazine; if so its description is a synopsis of the story, and the link points to the full story. An item may also be complete in itself, if so, the description contains the text (entity-encoded HTML is allowed; see examples), and the link and title may be omitted. All elements of an item are optional, however at least one of title or description must be present.
Element | Description | Example |
title | The title of the item. | Venice Film Festival Tries to Quit Sinking |
link | The URL of the item. | http://nytimes.com/2004/12/07FEST.html |
description | The item synopsis. | <description>Some of the most heated chatter at the Venice Film Festival this week was about the way that the arrival of the stars at the Palazzo del Cinema was being staged.</description> |
author | Email address of the author of the item. For newspapers and magazines syndicating via RSS, the author is the person who wrote the article that the <item> describes. For collaborative weblogs, the author of the item might be different from the managing editor or webmaster. For a weblog authored by a single individual it would make sense to omit the <author> element. | <author>lawyer@boyer.net (Lawyer Boyer)</author> |
category | Includes the item in one or more categories. More here. | |
comments | URL of a page for comments relating to the item. More here.. | <comments>http://ekzemplo.com/entry/4403/comments</comments> |
enclosure | Describes a media object that is attached to the item. More here. | |
guid | A string that uniquely identifies the item. More here. | |
pubDate | Indicates when the item was published. If it's a date in the future, aggregators may choose to not display the item until that date. | <pubDate>Sun, 19 May 2002 15:21:36 GMT</pubDate> |
source | The RSS channel that the item came from. More here . |
Field Summary | |
---|---|
protected List<Object> |
any
|
protected String |
author
|
protected List<RssCategory> |
category
|
protected String |
comments
|
protected String |
description
|
protected RssEnclosure |
enclosure
|
protected RssGuid |
guid
|
protected String |
link
|
protected String |
pubDate
|
protected RssSource |
source
|
protected String |
title
|
Constructor Summary | |
---|---|
RssItem()
Creates an RssItem object |
|
RssItem(SyndEntry syndEntry)
Creates an RssItem object out of a SyndEntry object. |
Method Summary | |
---|---|
List<Object> |
getAny()
Gets the value of the any property. |
String |
getAuthor()
Gets the value of the author property. |
List<RssCategory> |
getCategories()
Gets the value of the category property. |
String |
getComments()
Gets the value of the comments property. |
String |
getDescription()
Gets the value of the description property. |
RssEnclosure |
getEnclosure()
Gets the value of the enclosure property. |
RssGuid |
getGuid()
Gets the value of the guid property. |
String |
getLink()
Gets the value of the link property. |
String |
getPubDate()
Gets the value of the pubDate property. |
RssSource |
getSource()
Gets the value of the source property. |
String |
getTitle()
Gets the value of the title property. |
void |
setAuthor(String value)
Sets the value of the author property. |
void |
setComments(String value)
Sets the value of the comments property. |
void |
setDescription(String value)
Sets the value of the description property. |
void |
setEnclosure(RssEnclosure value)
Sets the value of the enclosure property. |
void |
setGuid(RssGuid value)
Sets the value of the guid property. |
void |
setLink(String value)
Sets the value of the link property. |
void |
setPubDate(String value)
Sets the value of the pubDate property. |
void |
setSource(RssSource value)
Sets the value of the source property. |
void |
setTitle(String value)
Sets the value of the title property. |
SyndEntry |
toSynd(SyndEntry syndEntry)
Maps an RssItem object into a SyndEntry object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String title
protected String link
protected String description
protected String author
protected List<RssCategory> category
protected String comments
protected RssEnclosure enclosure
protected RssGuid guid
protected String pubDate
protected RssSource source
protected List<Object> any
Constructor Detail |
---|
public RssItem()
public RssItem(SyndEntry syndEntry)
syndEntry
- the SyndEntry object which has to be mapped into an
RssItem object.Method Detail |
---|
public SyndEntry toSynd(SyndEntry syndEntry)
syndEntry
- the SyndEntry object into which the given RssItem object
has to be mapped into
public String getTitle()
String
public void setTitle(String value)
value
- allowed object is String
public String getLink()
String
public void setLink(String value)
value
- allowed object is String
public String getDescription()
String
public void setDescription(String value)
value
- allowed object is String
public String getAuthor()
String
public void setAuthor(String value)
value
- allowed object is String
public List<RssCategory> getCategories()
This accessor method returns a reference to the live list, not a
snapshot. Therefore any modification you make to the returned list will
be present inside the JAXB object. This is why there is not a
set
method for the category property.
For example, to add a new item, do as follows:
getCategories().add(newItem);
Objects of the following type(s) are allowed in the list
RssCategory
public String getComments()
String
public void setComments(String value)
value
- allowed object is String
public RssEnclosure getEnclosure()
RssEnclosure
public void setEnclosure(RssEnclosure value)
value
- allowed object is RssEnclosure
public RssGuid getGuid()
RssGuid
public void setGuid(RssGuid value)
value
- allowed object is RssGuid
public String getPubDate()
String
public void setPubDate(String value)
value
- allowed object is String
public RssSource getSource()
RssSource
public void setSource(RssSource value)
value
- allowed object is RssSource
public List<Object> getAny()
This accessor method returns a reference to the live list, not a
snapshot. Therefore any modification you make to the returned list will
be present inside the JAXB object. This is why there is not a
set
method for the any property.
For example, to add a new item, do as follows:
getAny().add(newItem);
Objects of the following type(s) are allowed in the list Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |