org.stringer.rss
Class Channel

java.lang.Object
  |
  +--org.stringer.rss.RSSElement
        |
        +--org.stringer.rss.Channel
All Implemented Interfaces:
java.io.Serializable

public class Channel
extends RSSElement
implements java.io.Serializable

The channel element contains metadata describing the channel itself, including a title, brief description, and URL link to the described resource (the channel provider's home page, for instance). The {resource} URL of the channel element's rdf:about attribute must be unique with respect to any other rdf:about attributes in the RSS document and is a URI which identifies the channel. Most commonly, this is either the URL of the homepage being described or a URL where the RSS file can be found.

Author:
R. Kevin Cole kcole@users.sourceforge.net
See Also:
Serialized Form

Field Summary
protected  java.lang.String about
           
protected  java.lang.String category
          Specify one or more categories that the channel belongs to.
protected  java.util.LinkedList channels
           
protected  java.lang.String copyright
          Copyright notice for content in the channel (optional element).
(package private)  boolean dirty
           
protected  java.lang.String docs
          A URL that points to the documentation for the format used in the RSS file (optional element).
protected  java.util.LinkedList items
          An RDF table of contents, associating the document's items with this particular RSS channel.
protected  java.lang.String language
          The language the channel is written in.
protected  java.lang.String lastBuildDate
          The last time the content of the channel changed.
protected  java.lang.String managingEditorEmail
          address for person responsible for editorial content of this channel (optional element).
(package private)  Channel parent
          A channel may contain other channels
protected  java.lang.String pubDate
          The publication date for the content in the channel.
protected  java.lang.String rating
          The PICS rating for this channel (optional element).
protected  RSSImage rssImage
          An image to be associated with an HTML rendering of the channel.
protected  java.lang.String skipDays
          An element that contains up to seven day sub-elements whose value is Monday, Tuesday, Wednesday, Thursday, Friday, Saturday or Sunday (optional element).
protected  java.lang.String skipHours
          An element that contains up to 24 hour sub-elements whose value is a number between 1 and 24, representing a time in GMT, when aggregators, if they support the feature, may not read the channel on days listed in the skipHours element (optional element).
protected  java.lang.String updateBase
           
protected  java.lang.String updateFrequency
           
protected  java.lang.String updatePeriod
           
protected  java.lang.String webMaster
          address for person responsible for technical issues relating to channel (optional element).
 
Fields inherited from class org.stringer.rss.RSSElement
description, lastUpdateTime, link, linkURL, logger, title, userObject
 
Constructor Summary
Channel()
           
Channel(nu.xom.Element e, java.lang.String namespaceUri)
          Create a Channel from the parsed element in a given namespace.
Channel(java.lang.String title)
           
 
Method Summary
 void addChannel(Channel ch)
           
 void addItem(Item item)
          Add a new item to this channel
 java.lang.String getAbout()
           
 java.lang.String getCategory()
          accessor for the category element.
 java.util.List getChannels()
           
 java.lang.String getCopyright()
           
 boolean getDirty()
           
 RSSImage getImage()
           
 java.util.List getItems()
           
 java.lang.String getLanguage()
           
 java.lang.String getLastBuildDate()
          accessor for the lastBuildDate element.
 Channel getParent()
           
 java.lang.String getPubDate()
           
 java.lang.String getUpdateBase()
           
 java.lang.String getUpdateFrequency()
           
 java.lang.String getWebMaster()
           
 void removeItem(Item item)
          Remove an existing item from this channel
 void setDirty(boolean b)
           
 void setParent(Channel ch)
           
 void touch()
           
 java.lang.String toXML()
           
 
Methods inherited from class org.stringer.rss.RSSElement
buildId, decodeStringerElement, dump, getDescription, getId, getLastUpdateTime, getLink, getLinkAsURL, getTitle, getUserObject, makeId, setDescription, setLastUpdateTime, setLink, setTitle, setUserObject, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

docs

protected java.lang.String docs
A URL that points to the documentation for the format used in the RSS file (optional element). Maximum length is 500.


copyright

protected java.lang.String copyright
Copyright notice for content in the channel (optional element). Maximum length is 100 characters.


managingEditorEmail

protected java.lang.String managingEditorEmail
address for person responsible for editorial content of this channel (optional element). Maximum length is 100 characters.


webMaster

protected java.lang.String webMaster
address for person responsible for technical issues relating to channel (optional element). Maximum length is 100 characters.


skipDays

protected java.lang.String skipDays
An element that contains up to seven day sub-elements whose value is Monday, Tuesday, Wednesday, Thursday, Friday, Saturday or Sunday (optional element).

A list of s of the week, in English, indicating the days of the week when a channel will not be updated.

Aggregators may not read the channel during hours listed in the skipDays element. (Most aggregators seem to ignore this element.)


skipHours

protected java.lang.String skipHours
An element that contains up to 24 hour sub-elements whose value is a number between 1 and 24, representing a time in GMT, when aggregators, if they support the feature, may not read the channel on days listed in the skipHours element (optional element). (Most aggregators seem to ignore this element.)


rating

protected java.lang.String rating
The PICS rating for this channel (optional element). Maximum length is 500 characters.


pubDate

protected java.lang.String 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).


lastBuildDate

protected java.lang.String lastBuildDate
The last time the content of the channel changed.


category

protected java.lang.String category
Specify one or more categories that the channel belongs to.


updatePeriod

protected java.lang.String updatePeriod

updateFrequency

protected java.lang.String updateFrequency

updateBase

protected java.lang.String updateBase

about

protected java.lang.String about

rssImage

protected RSSImage rssImage
An image to be associated with an HTML rendering of the channel. This image should be of a format supported by the majority of Web browsers. While the later 0.91 specification allowed for a width of 1-144 and height of 1-400, convention (and the 0.9 specification) dictate 88x31.


items

protected java.util.LinkedList items
An RDF table of contents, associating the document's items with this particular RSS channel. Each item's rdf:resource {item_uri} must be the same as the associated item element's rdf:about {item_uri}.


parent

Channel parent
A channel may contain other channels


channels

protected java.util.LinkedList channels

language

protected java.lang.String language
The language the channel is written in. This allows aggregators to group all Italian language sites, for example, on a single page.


dirty

transient boolean dirty
Constructor Detail

Channel

public Channel()

Channel

public Channel(java.lang.String title)

Channel

public Channel(nu.xom.Element e,
               java.lang.String namespaceUri)
Create a Channel from the parsed element in a given namespace.

Method Detail

getPubDate

public java.lang.String getPubDate()

setParent

public void setParent(Channel ch)

getParent

public Channel getParent()

touch

public void touch()

getChannels

public java.util.List getChannels()
Returns:
a list of channels contained in this channel

addChannel

public void addChannel(Channel ch)

getCopyright

public java.lang.String getCopyright()

getWebMaster

public java.lang.String getWebMaster()

getAbout

public java.lang.String getAbout()

getImage

public RSSImage getImage()

getItems

public java.util.List getItems()
Returns:
a list of items contained in this channel

addItem

public void addItem(Item item)
Add a new item to this channel


removeItem

public void removeItem(Item item)
Remove an existing item from this channel


getCategory

public java.lang.String getCategory()
accessor for the category element.


getLanguage

public java.lang.String getLanguage()

getLastBuildDate

public java.lang.String getLastBuildDate()
accessor for the lastBuildDate element.


getUpdateFrequency

public java.lang.String getUpdateFrequency()

getUpdateBase

public java.lang.String getUpdateBase()

getDirty

public boolean getDirty()

setDirty

public void setDirty(boolean b)

toXML

public java.lang.String toXML()
Returns:
this channel rendered as XML


Copyright © R. Kevin Cole. All Rights Reserved.