org.apache.wink.common.model.rss
Class RssItem

java.lang.Object
  extended by org.apache.wink.common.model.rss.RssItem

public class RssItem
extends java.lang.Object

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>
 

Elements of <item>

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

title

protected java.lang.String title

link

protected java.lang.String link

description

protected java.lang.String description

author

protected java.lang.String author

category

protected java.util.List<RssCategory> category

comments

protected java.lang.String comments

enclosure

protected RssEnclosure enclosure

guid

protected RssGuid guid

pubDate

protected java.lang.String pubDate

source

protected RssSource source

any

protected java.util.List<java.lang.Object> any
Constructor Detail

RssItem

public RssItem()
Creates an RssItem object


RssItem

public RssItem(SyndEntry syndEntry)
Creates an RssItem object out of a SyndEntry object. Used for mapping Syndication Object Model into RSS.

Parameters:
syndEntry - the SyndEntry object which has to be mapped into an RssItem object.
Method Detail

toSynd

public SyndEntry toSynd(SyndEntry syndEntry)
Maps an RssItem object into a SyndEntry object. Used for mapping RSS into Syndication Object Model.

Parameters:
syndEntry - the SyndEntry object into which the given RssItem object has to be mapped into
Returns:
the SyndEntry object into which the given RssItem object has been mapped into

getTitle

public java.lang.String getTitle()
Gets the value of the title property.

Returns:
possible object is String

setTitle

public void setTitle(java.lang.String value)
Sets the value of the title property.

Parameters:
value - allowed object is String

getLink

public java.lang.String getLink()
Gets the value of the link property.

Returns:
possible object is String

setLink

public void setLink(java.lang.String value)
Sets the value of the link property.

Parameters:
value - allowed object is String

getDescription

public java.lang.String getDescription()
Gets the value of the description property.

Returns:
possible object is String

setDescription

public void setDescription(java.lang.String value)
Sets the value of the description property.

Parameters:
value - allowed object is String

getAuthor

public java.lang.String getAuthor()
Gets the value of the author property.

Returns:
possible object is String

setAuthor

public void setAuthor(java.lang.String value)
Sets the value of the author property.

Parameters:
value - allowed object is String

getCategories

public java.util.List<RssCategory> getCategories()
Gets the value of the category property.

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


getComments

public java.lang.String getComments()
Gets the value of the comments property.

Returns:
possible object is String

setComments

public void setComments(java.lang.String value)
Sets the value of the comments property.

Parameters:
value - allowed object is String

getEnclosure

public RssEnclosure getEnclosure()
Gets the value of the enclosure property.

Returns:
possible object is RssEnclosure

setEnclosure

public void setEnclosure(RssEnclosure value)
Sets the value of the enclosure property.

Parameters:
value - allowed object is RssEnclosure

getGuid

public RssGuid getGuid()
Gets the value of the guid property.

Returns:
possible object is RssGuid

setGuid

public void setGuid(RssGuid value)
Sets the value of the guid property.

Parameters:
value - allowed object is RssGuid

getPubDate

public java.lang.String getPubDate()
Gets the value of the pubDate property.

Returns:
possible object is String

setPubDate

public void setPubDate(java.lang.String value)
Sets the value of the pubDate property.

Parameters:
value - allowed object is String

getSource

public RssSource getSource()
Gets the value of the source property.

Returns:
possible object is RssSource

setSource

public void setSource(RssSource value)
Sets the value of the source property.

Parameters:
value - allowed object is RssSource

getAny

public java.util.List<java.lang.Object> getAny()
Gets the value of the any property.

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



Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.