|
||||||||||
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.RssChannel
public class RssChannel
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>
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. |
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 |
---|
protected String title
protected String link
protected String description
protected String language
protected String copyright
protected String managingEditor
protected String webMaster
protected String pubDate
protected String lastBuildDate
protected List<RssCategory> category
protected String generator
protected String docs
protected RssCloud cloud
protected Integer ttl
protected RssImage image
protected String rating
protected RssTextInput textInput
protected RssSkipHours skipHours
protected RssSkipDays skipDays
protected List<Object> any
protected List<RssItem> item
Constructor Detail |
---|
public RssChannel()
public RssChannel(SyndFeed syndFeed)
syndFeed
- the SyndFeed object which has to be mapped into an
RssChannel objectMethod Detail |
---|
public SyndFeed toSynd(SyndFeed syndFeed)
syndFeed
- the syndFeed object into which the given RssChannel
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 getLanguage()
String
public void setLanguage(String value)
value
- allowed object is String
public String getCopyright()
String
public void setCopyright(String value)
value
- allowed object is String
public String getManagingEditor()
String
public void setManagingEditor(String value)
value
- allowed object is String
public String getWebMaster()
String
public void setWebMaster(String value)
value
- allowed object is String
public String getPubDate()
String
public void setPubDate(String value)
value
- allowed object is String
public String getLastBuildDate()
String
public void setLastBuildDate(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:
getCategory().add(newItem);
Objects of the following type(s) are allowed in the list
RssCategory
public String getGenerator()
String
public void setGenerator(String value)
value
- allowed object is String
public String getDocs()
String
public void setDocs(String value)
value
- allowed object is String
public RssCloud getCloud()
RssCloud
public void setCloud(RssCloud value)
value
- allowed object is RssCloud
public Integer getTtl()
Integer
public void setTtl(Integer value)
value
- allowed object is Integer
public RssImage getImage()
RssImage
public void setImage(RssImage value)
value
- allowed object is RssImage
public String getRating()
String
public void setRating(String value)
value
- allowed object is String
public RssTextInput getTextInput()
RssTextInput
public void setTextInput(RssTextInput value)
value
- allowed object is RssTextInput
public RssSkipHours getSkipHours()
RssSkipHours
public void setSkipHours(RssSkipHours value)
value
- allowed object is RssSkipHours
public RssSkipDays getSkipDays()
RssSkipDays
public void setSkipDays(RssSkipDays value)
value
- allowed object is RssSkipDays
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
public List<RssItem> getItems()
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
public static String convertJavaDateToRssDate(Date javaDate)
public static Date convertRssDateToJavaDate(String rssDate)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |