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

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

public class RssChannel
extends Object

Java class for "channel" element of RSS 2.0 Specification.

The following schema fragment specifies the expected content contained within this class.

 <complexType name="rssChannel">
   <complexContent>
     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
       <sequence>
         <element name="title" type="{http://www.w3.org/2001/XMLSchema}string"/>
         <element name="link" type="{http://www.w3.org/2001/XMLSchema}anyURI"/>
         <element name="description" type="{http://www.w3.org/2001/XMLSchema}string"/>
         <element name="language" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
         <element name="copyright" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
         <element name="managingEditor" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
         <element name="webMaster" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
         <element name="pubDate" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
         <element name="lastBuildDate" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
         <element name="category" type="{}rssCategory" maxOccurs="unbounded" minOccurs="0"/>
         <element name="generator" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
         <element name="docs" type="{http://www.w3.org/2001/XMLSchema}anyURI" minOccurs="0"/>
         <element name="cloud" type="{}rssCloud" minOccurs="0"/>
         <element name="ttl" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
         <element name="image" type="{}rssImage" minOccurs="0"/>
         <element name="rating" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
         <element name="textInput" type="{}rssTextInput" minOccurs="0"/>
         <element name="skipHours" type="{}rssSkipHours" minOccurs="0"/>
         <element name="skipDays" type="{}rssSkipDays" minOccurs="0"/>
         <any/>
         <element name="item" type="{}rssItem" maxOccurs="unbounded" minOccurs="0"/>
       </sequence>
     </restriction>
   </complexContent>
 </complexType>
 

Required channel elements

Here's a list of the required channel elements, each with a brief description, an example, and where available, a pointer to a more complete description.

Element Description Example
title The name of the channel. It's how people refer to your service. If you have an HTML website that contains the same information as your RSS file, the title of your channel should be the same as the title of your website. GoUpstate.com News Headlines
link The URL to the HTML website corresponding to the channel. http://www.goupstate.com/
description Phrase or sentence describing the channel. The latest news from GoUpstate.com, a Spartanburg Herald-Journal Web site.

Optional channel elements

Here's a list of optional channel elements.

Element Description Example
language The language the channel is written in. This allows aggregators to group all Italian language sites, for example, on a single page. A list of allowable values for this element, as provided by Netscape, is here. You may also use values defined by the W3C. en-us
copyright Copyright notice for content in the channel. Copyright 2002, Spartanburg Herald-Journal
managingEditor Email address for person responsible for editorial content. geo@herald.com (George Matesky)
webMaster Email address for person responsible for technical issues relating to channel. betty@herald.com (Betty Guernsey)
pubDate The publication date for the content in the channel. For example, the New York Times publishes on a daily basis, the publication date flips once every 24 hours. That's when the pubDate of the channel changes. All date-times in RSS conform to the Date and Time Specification of RFC 822, with the exception that the year may be expressed with two characters or four characters (four preferred). Sat, 07 Sep 2002 00:00:01 GMT
lastBuildDate The last time the content of the channel changed. Sat, 07 Sep 2002 09:42:31 GMT
category Specify one or more categories that the channel belongs to. Follows the same rules as the <item>-level category element. <category>Newspapers</category>
generator A string indicating the program used to generate the channel. MightyInHouse Content System v2.3
docs A URL that points to the documentation for the format used in the RSS file. It's probably a pointer to this page. It's for people who might stumble across an RSS file on a Web server 25 years from now and wonder what it is. http://www.rssboard.org/rss-specification
cloud Allows processes to register with a cloud to be notified of updates to the channel, implementing a lightweight publish-subscribe protocol for RSS feeds. More info here. <cloud domain="rpc.sys.com" port="80" path="/RPC2" registerProcedure="pingMe" protocol="soap"/>
ttl ttl stands for time to live. It's a number of minutes that indicates how long a channel can be cached before refreshing from the source. This makes it possible for RSS sources to be managed by a file-sharing network such as Gnutella. <ttl>60</ttl>
image Specifies a GIF, JPEG or PNG image that can be displayed with the channel. More info here.
rating The PICS rating for the channel.
textInput Specifies a text input box that can be displayed with the channel. More info here.
skipHours A hint for aggregators telling them which hours they can skip. More info here.
skipDays A hint for aggregators telling them which days they can skip. More info here.


Field Summary
protected  List<Object> any
           
protected  List<RssCategory> category
           
protected  RssCloud cloud
           
protected  String copyright
           
protected  String description
           
protected  String docs
           
protected  String generator
           
protected  RssImage image
           
protected  List<RssItem> item
           
protected  String language
           
protected  String lastBuildDate
           
protected  String link
           
protected  String managingEditor
           
protected  String pubDate
           
protected  String rating
           
protected  RssSkipDays skipDays
           
protected  RssSkipHours skipHours
           
protected  RssTextInput textInput
           
protected  String title
           
protected  Integer ttl
           
protected  String webMaster
           
 
Constructor Summary
RssChannel()
          Creates an RssChannel object.
RssChannel(SyndFeed syndFeed)
          Creates an RssChannel object out of a SyndFeed object.
 
Method Summary
static String convertJavaDateToRssDate(Date javaDate)
           
static Date convertRssDateToJavaDate(String rssDate)
           
 List<Object> getAny()
          Gets the value of the any property.
 List<RssCategory> getCategories()
          Gets the value of the category property.
 RssCloud getCloud()
          Gets the value of the cloud property.
 String getCopyright()
          Gets the value of the copyright property.
 String getDescription()
          Gets the value of the description property.
 String getDocs()
          Gets the value of the docs property.
 String getGenerator()
          Gets the value of the generator property.
 RssImage getImage()
          Gets the value of the image property.
 List<RssItem> getItems()
          Gets the value of the item property.
 String getLanguage()
          Gets the value of the language property.
 String getLastBuildDate()
          Gets the value of the lastBuildDate property.
 String getLink()
          Gets the value of the link property.
 String getManagingEditor()
          Gets the value of the managingEditor property.
 String getPubDate()
          Gets the value of the pubDate property.
 String getRating()
          Gets the value of the rating property.
 RssSkipDays getSkipDays()
          Gets the value of the skipDays property.
 RssSkipHours getSkipHours()
          Gets the value of the skipHours property.
 RssTextInput getTextInput()
          Gets the value of the textInput property.
 String getTitle()
          Gets the value of the title property.
 Integer getTtl()
          Gets the value of the ttl property.
 String getWebMaster()
          Gets the value of the webMaster property.
 void setCloud(RssCloud value)
          Sets the value of the cloud property.
 void setCopyright(String value)
          Sets the value of the copyright property.
 void setDescription(String value)
          Sets the value of the description property.
 void setDocs(String value)
          Sets the value of the docs property.
 void setGenerator(String value)
          Sets the value of the generator property.
 void setImage(RssImage value)
          Sets the value of the image property.
 void setLanguage(String value)
          Sets the value of the language property.
 void setLastBuildDate(String value)
          Sets the value of the lastBuildDate property.
 void setLink(String value)
          Sets the value of the link property.
 void setManagingEditor(String value)
          Sets the value of the managingEditor property.
 void setPubDate(String value)
          Sets the value of the pubDate property.
 void setRating(String value)
          Sets the value of the rating property.
 void setSkipDays(RssSkipDays value)
          Sets the value of the skipDays property.
 void setSkipHours(RssSkipHours value)
          Sets the value of the skipHours property.
 void setTextInput(RssTextInput value)
          Sets the value of the textInput property.
 void setTitle(String value)
          Sets the value of the title property.
 void setTtl(Integer value)
          Sets the value of the ttl property.
 void setWebMaster(String value)
          Sets the value of the webMaster property.
 SyndFeed toSynd(SyndFeed syndFeed)
          Maps an RssChannel object into a SyndFeed object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

title

protected String title

link

protected String link

description

protected String description

language

protected String language

copyright

protected String copyright

managingEditor

protected String managingEditor

webMaster

protected String webMaster

pubDate

protected String pubDate

lastBuildDate

protected String lastBuildDate

category

protected List<RssCategory> category

generator

protected String generator

docs

protected String docs

cloud

protected RssCloud cloud

ttl

protected Integer ttl

image

protected RssImage image

rating

protected String rating

textInput

protected RssTextInput textInput

skipHours

protected RssSkipHours skipHours

skipDays

protected RssSkipDays skipDays

any

protected List<Object> any

item

protected List<RssItem> item
Constructor Detail

RssChannel

public RssChannel()
Creates an RssChannel object.


RssChannel

public RssChannel(SyndFeed syndFeed)
Creates an RssChannel object out of a SyndFeed object. Used for mapping Syndication Object Model into RSS.

Parameters:
syndFeed - the SyndFeed object which has to be mapped into an RssChannel object
Method Detail

toSynd

public SyndFeed toSynd(SyndFeed syndFeed)
Maps an RssChannel object into a SyndFeed object. Used for mapping RSS into Syndication Object Model.

Parameters:
syndFeed - the syndFeed object into which the given RssChannel object has to be mapped into
Returns:
the SyndFeed object into which the given RssChannel object has been mapped into

getTitle

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

Returns:
possible object is String

setTitle

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

Parameters:
value - allowed object is String

getLink

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

Returns:
possible object is String

setLink

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

Parameters:
value - allowed object is String

getDescription

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

Returns:
possible object is String

setDescription

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

Parameters:
value - allowed object is String

getLanguage

public String getLanguage()
Gets the value of the language property.

Returns:
possible object is String

setLanguage

public void setLanguage(String value)
Sets the value of the language property.

Parameters:
value - allowed object is String

getCopyright

public String getCopyright()
Gets the value of the copyright property.

Returns:
possible object is String

setCopyright

public void setCopyright(String value)
Sets the value of the copyright property.

Parameters:
value - allowed object is String

getManagingEditor

public String getManagingEditor()
Gets the value of the managingEditor property.

Returns:
possible object is String

setManagingEditor

public void setManagingEditor(String value)
Sets the value of the managingEditor property.

Parameters:
value - allowed object is String

getWebMaster

public String getWebMaster()
Gets the value of the webMaster property.

Returns:
possible object is String

setWebMaster

public void setWebMaster(String value)
Sets the value of the webMaster property.

Parameters:
value - allowed object is String

getPubDate

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

Returns:
possible object is String

setPubDate

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

Parameters:
value - allowed object is String

getLastBuildDate

public String getLastBuildDate()
Gets the value of the lastBuildDate property.

Returns:
possible object is String

setLastBuildDate

public void setLastBuildDate(String value)
Sets the value of the lastBuildDate property.

Parameters:
value - allowed object is String

getCategories

public 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:

 getCategory().add(newItem);
 

Objects of the following type(s) are allowed in the list RssCategory


getGenerator

public String getGenerator()
Gets the value of the generator property.

Returns:
possible object is String

setGenerator

public void setGenerator(String value)
Sets the value of the generator property.

Parameters:
value - allowed object is String

getDocs

public String getDocs()
Gets the value of the docs property.

Returns:
possible object is String

setDocs

public void setDocs(String value)
Sets the value of the docs property.

Parameters:
value - allowed object is String

getCloud

public RssCloud getCloud()
Gets the value of the cloud property.

Returns:
possible object is RssCloud

setCloud

public void setCloud(RssCloud value)
Sets the value of the cloud property.

Parameters:
value - allowed object is RssCloud

getTtl

public Integer getTtl()
Gets the value of the ttl property.

Returns:
possible object is Integer

setTtl

public void setTtl(Integer value)
Sets the value of the ttl property.

Parameters:
value - allowed object is Integer

getImage

public RssImage getImage()
Gets the value of the image property.

Returns:
possible object is RssImage

setImage

public void setImage(RssImage value)
Sets the value of the image property.

Parameters:
value - allowed object is RssImage

getRating

public String getRating()
Gets the value of the rating property.

Returns:
possible object is String

setRating

public void setRating(String value)
Sets the value of the rating property.

Parameters:
value - allowed object is String

getTextInput

public RssTextInput getTextInput()
Gets the value of the textInput property.

Returns:
possible object is RssTextInput

setTextInput

public void setTextInput(RssTextInput value)
Sets the value of the textInput property.

Parameters:
value - allowed object is RssTextInput

getSkipHours

public RssSkipHours getSkipHours()
Gets the value of the skipHours property.

Returns:
possible object is RssSkipHours

setSkipHours

public void setSkipHours(RssSkipHours value)
Sets the value of the skipHours property.

Parameters:
value - allowed object is RssSkipHours

getSkipDays

public RssSkipDays getSkipDays()
Gets the value of the skipDays property.

Returns:
possible object is RssSkipDays

setSkipDays

public void setSkipDays(RssSkipDays value)
Sets the value of the skipDays property.

Parameters:
value - allowed object is RssSkipDays

getAny

public List<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


getItems

public List<RssItem> getItems()
Gets the value of the item 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 item property.

For example, to add a new item, do as follows:

 getItem().add(newItem);
 

Objects of the following type(s) are allowed in the list RssItem


convertJavaDateToRssDate

public static String convertJavaDateToRssDate(Date javaDate)

convertRssDateToJavaDate

public static Date convertRssDateToJavaDate(String rssDate)


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