|
||||||||||
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 java.util.List<java.lang.Object> |
any
|
protected java.lang.String |
author
|
protected java.util.List<RssCategory> |
category
|
protected java.lang.String |
comments
|
protected java.lang.String |
description
|
protected RssEnclosure |
enclosure
|
protected RssGuid |
guid
|
protected java.lang.String |
link
|
protected java.lang.String |
pubDate
|
protected RssSource |
source
|
protected java.lang.String |
title
|
Constructor Summary | |
---|---|
RssItem()
Creates an RssItem object |
|
RssItem(SyndEntry syndEntry)
Creates an RssItem object out of a SyndEntry object. |
Method Summary | |
---|---|
java.util.List<java.lang.Object> |
getAny()
Gets the value of the any property. |
java.lang.String |
getAuthor()
Gets the value of the author property. |
java.util.List<RssCategory> |
getCategories()
Gets the value of the category property. |
java.lang.String |
getComments()
Gets the value of the comments property. |
java.lang.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. |
java.lang.String |
getLink()
Gets the value of the link property. |
java.lang.String |
getPubDate()
Gets the value of the pubDate property. |
RssSource |
getSource()
Gets the value of the source property. |
java.lang.String |
getTitle()
Gets the value of the title property. |
void |
setAuthor(java.lang.String value)
Sets the value of the author property. |
void |
setComments(java.lang.String value)
Sets the value of the comments property. |
void |
setDescription(java.lang.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(java.lang.String value)
Sets the value of the link property. |
void |
setPubDate(java.lang.String value)
Sets the value of the pubDate property. |
void |
setSource(RssSource value)
Sets the value of the source property. |
void |
setTitle(java.lang.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 java.lang.String title
protected java.lang.String link
protected java.lang.String description
protected java.lang.String author
protected java.util.List<RssCategory> category
protected java.lang.String comments
protected RssEnclosure enclosure
protected RssGuid guid
protected java.lang.String pubDate
protected RssSource source
protected java.util.List<java.lang.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 java.lang.String getTitle()
String
public void setTitle(java.lang.String value)
value
- allowed object is String
public java.lang.String getLink()
String
public void setLink(java.lang.String value)
value
- allowed object is String
public java.lang.String getDescription()
String
public void setDescription(java.lang.String value)
value
- allowed object is String
public java.lang.String getAuthor()
String
public void setAuthor(java.lang.String value)
value
- allowed object is String
public java.util.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 java.lang.String getComments()
String
public void setComments(java.lang.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 java.lang.String getPubDate()
String
public void setPubDate(java.lang.String value)
value
- allowed object is String
public RssSource getSource()
RssSource
public void setSource(RssSource value)
value
- allowed object is RssSource
public java.util.List<java.lang.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 |