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

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

public class RssChannel
extends java.lang.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  java.util.List<java.lang.Object> any
           
protected  java.util.List<RssCategory> category
           
protected  RssCloud cloud
           
protected  java.lang.String copyright
           
protected  java.lang.String description
           
protected  java.lang.String docs
           
protected  java.lang.String generator
           
protected  RssImage image
           
protected  java.util.List<RssItem> item
           
protected  java.lang.String language
           
protected  java.lang.String lastBuildDate
           
protected  java.lang.String link
           
protected  java.lang.String managingEditor
           
protected  java.lang.String pubDate
           
protected  java.lang.String rating
           
protected  RssSkipDays skipDays
           
protected  RssSkipHours skipHours
           
protected  RssTextInput textInput
           
protected  java.lang.String title
           
protected  java.lang.Integer ttl
           
protected  java.lang.String webMaster
           
 
Constructor Summary
RssChannel()
          Creates an RssChannel object.
RssChannel(SyndFeed syndFeed)
          Creates an RssChannel object out of a SyndFeed object.
 
Method Summary
static java.lang.String convertJavaDateToRssDate(java.util.Date javaDate)
           
static java.util.Date convertRssDateToJavaDate(java.lang.String rssDate)
           
 java.util.List<java.lang.Object> getAny()
          Gets the value of the any property.
 java.util.List<RssCategory> getCategories()
          Gets the value of the category property.
 RssCloud getCloud()
          Gets the value of the cloud property.
 java.lang.String getCopyright()
          Gets the value of the copyright property.
 java.lang.String getDescription()
          Gets the value of the description property.
 java.lang.String getDocs()
          Gets the value of the docs property.
 java.lang.String getGenerator()
          Gets the value of the generator property.
 RssImage getImage()
          Gets the value of the image property.
 java.util.List<RssItem> getItems()
          Gets the value of the item property.
 java.lang.String getLanguage()
          Gets the value of the language property.
 java.lang.String getLastBuildDate()
          Gets the value of the lastBuildDate property.
 java.lang.String getLink()
          Gets the value of the link property.
 java.lang.String getManagingEditor()
          Gets the value of the managingEditor property.
 java.lang.String getPubDate()
          Gets the value of the pubDate property.
 java.lang.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.
 java.lang.String getTitle()
          Gets the value of the title property.
 java.lang.Integer getTtl()
          Gets the value of the ttl property.
 java.lang.String getWebMaster()
          Gets the value of the webMaster property.
 void setCloud(RssCloud value)
          Sets the value of the cloud property.
 void setCopyright(java.lang.String value)
          Sets the value of the copyright property.
 void setDescription(java.lang.String value)
          Sets the value of the description property.
 void setDocs(java.lang.String value)
          Sets the value of the docs property.
 void setGenerator(java.lang.String value)
          Sets the value of the generator property.
 void setImage(RssImage value)
          Sets the value of the image property.
 void setLanguage(java.lang.String value)
          Sets the value of the language property.
 void setLastBuildDate(java.lang.String value)
          Sets the value of the lastBuildDate property.
 void setLink(java.lang.String value)
          Sets the value of the link property.
 void setManagingEditor(java.lang.String value)
          Sets the value of the managingEditor property.
 void setPubDate(java.lang.String value)
          Sets the value of the pubDate property.
 void setRating(java.lang.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(java.lang.String value)
          Sets the value of the title property.
 void setTtl(java.lang.Integer value)
          Sets the value of the ttl property.
 void setWebMaster(java.lang.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 java.lang.String title

link

protected java.lang.String link

description

protected java.lang.String description

language

protected java.lang.String language

copyright

protected java.lang.String copyright

managingEditor

protected java.lang.String managingEditor

webMaster

protected java.lang.String webMaster

pubDate

protected java.lang.String pubDate

lastBuildDate

protected java.lang.String lastBuildDate

category

protected java.util.List<RssCategory> category

generator

protected java.lang.String generator

docs

protected java.lang.String docs

cloud

protected RssCloud cloud

ttl

protected java.lang.Integer ttl

image

protected RssImage image

rating

protected java.lang.String rating

textInput

protected RssTextInput textInput

skipHours

protected RssSkipHours skipHours

skipDays

protected RssSkipDays skipDays

any

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

item

protected java.util.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 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

getLanguage

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

Returns:
possible object is String

setLanguage

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

Parameters:
value - allowed object is String

getCopyright

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

Returns:
possible object is String

setCopyright

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

Parameters:
value - allowed object is String

getManagingEditor

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

Returns:
possible object is String

setManagingEditor

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

Parameters:
value - allowed object is String

getWebMaster

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

Returns:
possible object is String

setWebMaster

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

Parameters:
value - allowed object is String

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

getLastBuildDate

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

Returns:
possible object is String

setLastBuildDate

public void setLastBuildDate(java.lang.String value)
Sets the value of the lastBuildDate 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:

 getCategory().add(newItem);
 

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


getGenerator

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

Returns:
possible object is String

setGenerator

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

Parameters:
value - allowed object is String

getDocs

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

Returns:
possible object is String

setDocs

public void setDocs(java.lang.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 java.lang.Integer getTtl()
Gets the value of the ttl property.

Returns:
possible object is Integer

setTtl

public void setTtl(java.lang.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 java.lang.String getRating()
Gets the value of the rating property.

Returns:
possible object is String

setRating

public void setRating(java.lang.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 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


getItems

public java.util.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 java.lang.String convertJavaDateToRssDate(java.util.Date javaDate)

convertRssDateToJavaDate

public static java.util.Date convertRssDateToJavaDate(java.lang.String rssDate)


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