Copyright (c) 2000-2002 ChurchillObjects.com

churchillobjects.rss4j
Class RssChannel

java.lang.Object
  |
  +--churchillobjects.rss4j.RssChannel
All Implemented Interfaces:
java.lang.Cloneable, IUsesDublinCore, IUsesSyndication, java.io.Serializable

public class RssChannel
extends java.lang.Object
implements IUsesSyndication, IUsesDublinCore, java.lang.Cloneable, java.io.Serializable

Encapsulates the data and some minor logic regarding a channel in the RSS object model. The channel contains all of the elements including items, images, etc. that pertain to a single channel. There may be more than one channel in a document. A channel may also have one syndication.

See Also:
Serialized Form

Field Summary
private  java.lang.String channelCopyright
          The channel copyright.
private  java.lang.String channelDescription
          The channel description.
private  java.lang.String channelDocs
          The channels docs.
private  churchillobjects.rss4j.RssChannelImage channelImage
          The channel's image.
private  java.lang.String channelLanguage
          The channel language.
private  java.lang.String channelLastBuildDate
          The channel's last build date.
private  java.lang.String channelLink
          The channel link.
private  java.lang.String channelManagingEditor
          The channel's managing editor.
private  java.lang.String channelPicsRating
          The channel's PICS rating.
private  java.lang.String channelPubDate
          The channel pub date.
private  churchillobjects.rss4j.RssSyndication channelSyndication
          The channel's syndication information.
private  churchillobjects.rss4j.RssChannelTextInput channelTextInput
          The channel's text input.
private  java.lang.String channelTitle
          The channel title.
private  java.lang.String channelUri
          The channel uri (where it came from).
private  java.lang.String channelWebmaster
          The channel's webmaster.
private  churchillobjects.rss4j.RssDublinCore dublinCore
          The channel's dublin core information.
private  java.util.Vector items
          A list of the channel's items.
private  java.util.Vector skipDays
          A list of the channel's skipdays.
static java.lang.String[] SKIPDAYS
          Permissible skipdays text items.
private  java.util.Vector skipHours
          A list of the channel's skiphours.
 
Constructor Summary
RssChannel()
           
 
Method Summary
 void addItem(churchillobjects.rss4j.RssChannelItem item)
          Adds the specified item object to the list of items for the channel.
 void addSkipDay(java.lang.String s)
          Adds a skip day to the channel.
 void addSkipHour(int i)
          Adds a skip hour to the channel's skip hours list.
 java.lang.Object clone()
          Public clone method to allow cloning.
 boolean equals(java.lang.Object obj)
          Canonical equals method.
 java.lang.String getChannelCopyright()
          Returns the channel copyright.
 java.lang.String getChannelDescription()
          Returns the channel description.
 java.lang.String getChannelDocs()
          Returns the channel docs (RSS 0.91 only).
 churchillobjects.rss4j.RssChannelImage getChannelImage()
          Returns the encapsulated channel image object.
 java.lang.String getChannelLanguage()
          Returns the channel language.
 java.lang.String getChannelLastBuildDate()
          Returns the channel last build date.
 java.lang.String getChannelLink()
          Returns the channel link.
 java.lang.String getChannelManagingEditor()
          Returns the channel managing editor.
 java.lang.String getChannelPicsRating()
          Returns the channel PICS rating.
 java.lang.String getChannelPubDate()
          Returns the channel publication date.
 churchillobjects.rss4j.RssSyndication getChannelSyndication()
          Returns the channel's syndication object.
 churchillobjects.rss4j.RssChannelTextInput getChannelTextInput()
          Returns the channel's text input object.
 java.lang.String getChannelTitle()
          Returns the channel title.
 java.lang.String getChannelUri()
          Returns the channel URI.
 java.lang.String getChannelWebmaster()
          Returns the channel webmaster.
 churchillobjects.rss4j.RssDublinCore getDublinCore()
          Returns the channel's dublin core object.
 int getItemCount()
          Returns the size of the channel items list.
 int hashCode()
          Computes the hashcode of this object based on the hashcodes of the objects it contains.
 java.util.Enumeration items()
          Returns an enumeration of the channel's items.
 void setChannelCopyright(java.lang.String cr)
          Sets the channel copyright.
 void setChannelDescription(java.lang.String cd)
          Sets the channel description.
 void setChannelDocs(java.lang.String s)
          Sets the channel docs (RSS 0.91 only).
 void setChannelImage(churchillobjects.rss4j.RssChannelImage image)
          Sets the channel image to the specified object.
 void setChannelLanguage(java.lang.String cl)
          Sets the channel language.
 void setChannelLastBuildDate(java.lang.String lbd)
          Sets the channel last build date.
 void setChannelLink(java.lang.String cl)
          Sets the channel link.
 void setChannelManagingEditor(java.lang.String me)
          Sets the channel managing editor.
 void setChannelPicsRating(java.lang.String r)
          Sets the channel PICS rating.
 void setChannelPubDate(java.lang.String pd)
          Sets the channel publication date.
 void setChannelSyndication(churchillobjects.rss4j.RssSyndication syn)
          Sets the channel's syndication object.
 void setChannelTextInput(churchillobjects.rss4j.RssChannelTextInput input)
          Sets the channel's text input object.
 void setChannelTitle(java.lang.String ct)
          Sets the channel title.
 void setChannelUri(java.lang.String uri)
          Sets the channel URI.
 void setChannelWebmaster(java.lang.String s)
          Sets the channel webmaster.
 void setDublinCore(churchillobjects.rss4j.RssDublinCore dc)
          Sets the channel's dublin core object.
 java.util.Enumeration skipDays()
          Returns an enumeration of the channel's skip days list.
 java.util.Enumeration skipHours()
          Returns an enumeration of the channel's skip hours.
 java.lang.String toString()
          Returns a string representation of this object.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

SKIPDAYS

public static final java.lang.String[] SKIPDAYS
Permissible skipdays text items. Any skipdays settings is checked against this list for accuracy (i.e. spelling). Only used for RSS 0.91.


channelTitle

private java.lang.String channelTitle
The channel title.


channelDescription

private java.lang.String channelDescription
The channel description.


channelLink

private java.lang.String channelLink
The channel link.


channelUri

private java.lang.String channelUri
The channel uri (where it came from).


channelLanguage

private java.lang.String channelLanguage
The channel language.


channelCopyright

private java.lang.String channelCopyright
The channel copyright.


channelPubDate

private java.lang.String channelPubDate
The channel pub date.


channelLastBuildDate

private java.lang.String channelLastBuildDate
The channel's last build date.


channelManagingEditor

private java.lang.String channelManagingEditor
The channel's managing editor.


channelWebmaster

private java.lang.String channelWebmaster
The channel's webmaster.


channelPicsRating

private java.lang.String channelPicsRating
The channel's PICS rating.


channelDocs

private java.lang.String channelDocs
The channels docs.


channelSyndication

private churchillobjects.rss4j.RssSyndication channelSyndication
The channel's syndication information.


dublinCore

private churchillobjects.rss4j.RssDublinCore dublinCore
The channel's dublin core information.


skipDays

private java.util.Vector skipDays
A list of the channel's skipdays.


skipHours

private java.util.Vector skipHours
A list of the channel's skiphours.


channelImage

private churchillobjects.rss4j.RssChannelImage channelImage
The channel's image.


channelTextInput

private churchillobjects.rss4j.RssChannelTextInput channelTextInput
The channel's text input.


items

private java.util.Vector items
A list of the channel's items.

Constructor Detail

RssChannel

public RssChannel()
Method Detail

setChannelDocs

public final void setChannelDocs(java.lang.String s)
Sets the channel docs (RSS 0.91 only).

Parameters:
s -

getChannelDocs

public final java.lang.String getChannelDocs()
Returns the channel docs (RSS 0.91 only).

Returns:

setChannelTextInput

public final void setChannelTextInput(churchillobjects.rss4j.RssChannelTextInput input)
Sets the channel's text input object.

Parameters:
input -

getChannelTextInput

public final churchillobjects.rss4j.RssChannelTextInput getChannelTextInput()
Returns the channel's text input object.

Returns:

setChannelImage

public final void setChannelImage(churchillobjects.rss4j.RssChannelImage image)
Sets the channel image to the specified object.

Parameters:
image -

getChannelImage

public final churchillobjects.rss4j.RssChannelImage getChannelImage()
Returns the encapsulated channel image object.

Returns:

getChannelTitle

public final java.lang.String getChannelTitle()
Returns the channel title.

Returns:

setChannelTitle

public final void setChannelTitle(java.lang.String ct)
Sets the channel title.

Parameters:
ct -

getChannelDescription

public final java.lang.String getChannelDescription()
Returns the channel description.

Returns:

setChannelDescription

public final void setChannelDescription(java.lang.String cd)
Sets the channel description.

Parameters:
cd -

getChannelLink

public final java.lang.String getChannelLink()
Returns the channel link.

Returns:

setChannelLink

public final void setChannelLink(java.lang.String cl)
Sets the channel link.

Parameters:
cl -

getChannelLanguage

public final java.lang.String getChannelLanguage()
Returns the channel language.

Returns:

setChannelLanguage

public final void setChannelLanguage(java.lang.String cl)
Sets the channel language.

Parameters:
cl -

getChannelCopyright

public final java.lang.String getChannelCopyright()
Returns the channel copyright.

Returns:

setChannelCopyright

public final void setChannelCopyright(java.lang.String cr)
Sets the channel copyright.

Parameters:
cr -

getChannelPubDate

public final java.lang.String getChannelPubDate()
Returns the channel publication date.

Returns:

setChannelPubDate

public final void setChannelPubDate(java.lang.String pd)
Sets the channel publication date.

Parameters:
pd -

getChannelLastBuildDate

public final java.lang.String getChannelLastBuildDate()
Returns the channel last build date.

Returns:

setChannelLastBuildDate

public final void setChannelLastBuildDate(java.lang.String lbd)
Sets the channel last build date.

Parameters:
lbd -

getChannelManagingEditor

public final java.lang.String getChannelManagingEditor()
Returns the channel managing editor.

Returns:

setChannelManagingEditor

public final void setChannelManagingEditor(java.lang.String me)
Sets the channel managing editor.

Parameters:
me -

getChannelWebmaster

public final java.lang.String getChannelWebmaster()
Returns the channel webmaster.

Returns:

setChannelWebmaster

public final void setChannelWebmaster(java.lang.String s)
Sets the channel webmaster.

Parameters:
s -

setChannelPicsRating

public final void setChannelPicsRating(java.lang.String r)
Sets the channel PICS rating.

Parameters:
r -

getChannelPicsRating

public final java.lang.String getChannelPicsRating()
Returns the channel PICS rating.

Returns:

addItem

public final void addItem(churchillobjects.rss4j.RssChannelItem item)
Adds the specified item object to the list of items for the channel.

Parameters:
item -

getChannelUri

public final java.lang.String getChannelUri()
Returns the channel URI.

Returns:

setChannelUri

public final void setChannelUri(java.lang.String uri)
Sets the channel URI.

Parameters:
uri -

items

public final java.util.Enumeration items()
Returns an enumeration of the channel's items.

Returns:

getItemCount

public final int getItemCount()
Returns the size of the channel items list.

Returns:

addSkipDay

public final void addSkipDay(java.lang.String s)
Adds a skip day to the channel.

Parameters:
s -

skipDays

public final java.util.Enumeration skipDays()
Returns an enumeration of the channel's skip days list.

Returns:

addSkipHour

public final void addSkipHour(int i)
Adds a skip hour to the channel's skip hours list.

Parameters:
i -

skipHours

public final java.util.Enumeration skipHours()
Returns an enumeration of the channel's skip hours.

Returns:

setChannelSyndication

public final void setChannelSyndication(churchillobjects.rss4j.RssSyndication syn)
Sets the channel's syndication object.

Specified by:
setChannelSyndication in interface IUsesSyndication
Parameters:
syn -

getChannelSyndication

public final churchillobjects.rss4j.RssSyndication getChannelSyndication()
Returns the channel's syndication object.

Specified by:
getChannelSyndication in interface IUsesSyndication
Returns:

setDublinCore

public final void setDublinCore(churchillobjects.rss4j.RssDublinCore dc)
Sets the channel's dublin core object.

Specified by:
setDublinCore in interface IUsesDublinCore
Parameters:
dc -

getDublinCore

public final churchillobjects.rss4j.RssDublinCore getDublinCore()
Returns the channel's dublin core object.

Specified by:
getDublinCore in interface IUsesDublinCore
Returns:

toString

public final java.lang.String toString()
Returns a string representation of this object.

Overrides:
toString in class java.lang.Object
Returns:

hashCode

public final int hashCode()
Computes the hashcode of this object based on the hashcodes of the objects it contains. For semantic reasons, an object with all null values returns 0, the same as if it were null within another object.

Overrides:
hashCode in class java.lang.Object
Returns:
The object's hashcode

equals

public final boolean equals(java.lang.Object obj)
Canonical equals method. Two RssChannel objects will be equal if their hashcodes (and thus their contents) are equal.

Overrides:
equals in class java.lang.Object
Parameters:
obj - The other object
Returns:
If the two objects are canonically equal

clone

public java.lang.Object clone()
Public clone method to allow cloning.

Overrides:
clone in class java.lang.Object
Returns:
This object's clone

Copyright (c) 2000-2002 ChurchillObjects.com