org.jperdian.rss2.dom
Class RssChannel

java.lang.Object
  |
  +--org.jperdian.rss2.dom.RssChannel
All Implemented Interfaces:
java.io.Serializable

public class RssChannel
extends java.lang.Object
implements java.io.Serializable

Implementatino of a channel element as described in the RSS specification

Author:
Christian Robert
See Also:
Serialized Form

Constructor Summary
RssChannel(RssClient client)
           
 
Method Summary
 void addCategory(java.lang.String category)
           
 void addItem(RssItem item)
           
 void addSkipDay(java.lang.String day)
           
 void addSkipHour(int hour)
           
 void addUpdateListener(RssChannelUpdateListener listener)
          Adds the listener
protected  void fireChannelUpdate()
          Notifies all listeners, that the current channel has been update
 java.util.List getCategoryList()
           
 RssClient getClient()
          Gets the receiver from which this channel has been received
 RssCloud getCloud()
           
 java.lang.String getCopyright()
           
 java.lang.String getDescription()
           
 java.net.URL getDocs()
           
 java.lang.String getGenerator()
           
 RssImage getImage()
           
 java.util.List getItemList()
           
 java.lang.String getLanguage()
           
 java.util.Date getLastBuildDate()
           
 long getLastUpdate()
          Gets the time when the channel was updated at last
 java.net.URL getLink()
           
 java.lang.String getManagingEditor()
           
 java.util.Date getPubDate()
           
 java.lang.String getRating()
           
 java.util.Set getSkipDays()
           
 java.util.Set getSkipHours()
           
 RssTextInput getTextInput()
           
 java.lang.String getTitle()
           
 int getTtl()
           
protected  java.util.List getUpdateListenerList()
          Gets the List in which all the registred RssChannelUpdateListener objects are stored
 java.lang.String getWebmaster()
           
 boolean isDataLoaded()
          Checks whether the data in the current channel has already been loaded
 boolean isDataLoadFailed()
          Checks whether the loading process failed for the current channel
 void removeUpdateListener(RssChannelUpdateListener listener)
          Removes the listener
 void setCategoryList(java.util.List categoryList)
           
 void setClient(RssClient client)
          Sets the receiver from which this channel has been received
 void setCloud(RssCloud cloud)
           
 void setCopyright(java.lang.String copyright)
           
 void setDataLoaded(boolean state)
          Sets whether the data in the current channel has already been loaded
 void setDataLoadFailed(boolean state)
          Sets whether the loading process failed for the current channel
 void setDescription(java.lang.String description)
           
 void setDocs(java.net.URL docs)
           
 void setGenerator(java.lang.String generator)
           
 void setImage(RssImage image)
           
 void setItemList(java.util.List itemList)
           
 void setLanguage(java.lang.String language)
           
 void setLastBuildDate(java.util.Date lastBuildDate)
           
 void setLastUpdate(long time)
          Sets the time when the channel was updated at last
 void setLink(java.net.URL link)
           
 void setManagingEditor(java.lang.String managingEditor)
           
 void setPubDate(java.util.Date pubDate)
           
 void setRating(java.lang.String rating)
           
 void setSkipDays(java.util.Set skipDays)
           
 void setSkipHours(java.util.Set skipHours)
           
 void setTextInput(RssTextInput textInput)
           
 void setTitle(java.lang.String title)
           
 void setTtl(int ttl)
           
 void setWebmaster(java.lang.String webmaster)
           
 java.lang.String toString()
           
 void update()
          Updates the data in the current channel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RssChannel

public RssChannel(RssClient client)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

update

public void update()
            throws RssException
Updates the data in the current channel

RssException

addCategory

public void addCategory(java.lang.String category)

getCategoryList

public java.util.List getCategoryList()

setCategoryList

public void setCategoryList(java.util.List categoryList)

getCloud

public RssCloud getCloud()

setCloud

public void setCloud(RssCloud cloud)

getCopyright

public java.lang.String getCopyright()

setCopyright

public void setCopyright(java.lang.String copyright)

getDescription

public java.lang.String getDescription()

setDescription

public void setDescription(java.lang.String description)

getDocs

public java.net.URL getDocs()

setDocs

public void setDocs(java.net.URL docs)

getGenerator

public java.lang.String getGenerator()

setGenerator

public void setGenerator(java.lang.String generator)

getImage

public RssImage getImage()

setImage

public void setImage(RssImage image)

addItem

public void addItem(RssItem item)

getItemList

public java.util.List getItemList()

setItemList

public void setItemList(java.util.List itemList)

getLanguage

public java.lang.String getLanguage()

setLanguage

public void setLanguage(java.lang.String language)

getLastBuildDate

public java.util.Date getLastBuildDate()

setLastBuildDate

public void setLastBuildDate(java.util.Date lastBuildDate)

getLink

public java.net.URL getLink()

setLink

public void setLink(java.net.URL link)

getManagingEditor

public java.lang.String getManagingEditor()

setManagingEditor

public void setManagingEditor(java.lang.String managingEditor)

getPubDate

public java.util.Date getPubDate()

setPubDate

public void setPubDate(java.util.Date pubDate)

getRating

public java.lang.String getRating()

setRating

public void setRating(java.lang.String rating)

addSkipDay

public void addSkipDay(java.lang.String day)

getSkipDays

public java.util.Set getSkipDays()

setSkipDays

public void setSkipDays(java.util.Set skipDays)

addSkipHour

public void addSkipHour(int hour)

getSkipHours

public java.util.Set getSkipHours()

setSkipHours

public void setSkipHours(java.util.Set skipHours)

getTitle

public java.lang.String getTitle()

setTitle

public void setTitle(java.lang.String title)

getTtl

public int getTtl()

setTtl

public void setTtl(int ttl)

getWebmaster

public java.lang.String getWebmaster()

setWebmaster

public void setWebmaster(java.lang.String webmaster)

getTextInput

public RssTextInput getTextInput()

setTextInput

public void setTextInput(RssTextInput textInput)

setDataLoaded

public void setDataLoaded(boolean state)
Sets whether the data in the current channel has already been loaded


isDataLoaded

public boolean isDataLoaded()
Checks whether the data in the current channel has already been loaded


setDataLoadFailed

public void setDataLoadFailed(boolean state)
Sets whether the loading process failed for the current channel


isDataLoadFailed

public boolean isDataLoadFailed()
Checks whether the loading process failed for the current channel


setClient

public void setClient(RssClient client)
Sets the receiver from which this channel has been received


getClient

public RssClient getClient()
Gets the receiver from which this channel has been received


setLastUpdate

public void setLastUpdate(long time)
Sets the time when the channel was updated at last


getLastUpdate

public long getLastUpdate()
Gets the time when the channel was updated at last


getUpdateListenerList

protected java.util.List getUpdateListenerList()
Gets the List in which all the registred RssChannelUpdateListener objects are stored


fireChannelUpdate

protected void fireChannelUpdate()
Notifies all listeners, that the current channel has been update


addUpdateListener

public void addUpdateListener(RssChannelUpdateListener listener)
Adds the listener


removeUpdateListener

public void removeUpdateListener(RssChannelUpdateListener listener)
Removes the listener