Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.fm.rss
Class rssChannelCategory  view rssChannelCategory download rssChannelCategory.java

java.lang.Object
  extended bycom.fm.rss.rssAbstractEntry
      extended bycom.fm.rss.rssChannelCategory
All Implemented Interfaces:
ItemContainer, com.fm.update.Updateable

public class rssChannelCategory
extends rssAbstractEntry
implements ItemContainer, com.fm.update.Updateable

Container for RSS channel entities. Channel categories are intended for the user defined grouping of RSS channels (e.g. Developer's news,XML news)


Field Summary
private  java.util.HashMap channels
           
private  java.util.HashMap subCategories
           
private  java.lang.String version
           
 
Fields inherited from class com.fm.rss.rssAbstractEntry
dateCreated, description, docAdapter, idHash, title
 
Constructor Summary
rssChannelCategory()
          Default constructor
rssChannelCategory(java.lang.String t, java.lang.String d)
          Constructs category using given title and description and ID
 
Method Summary
 boolean addChannel(rssChannel ch)
          Adds new channel to the channel list
 boolean addSubCategory(rssChannelCategory cat)
          Adds new category to the sub categories list
 void filterItems(com.fm.rss.filter.RssItemFilter f)
          Filter items using specified filter
 java.util.Map getChannels()
          Returns channels as a list
 java.util.Map getItems()
          Returns list of the container items
 java.util.Map getSubCategories()
          Returns sub categories as a list
 void parse(org.w3c.dom.Element el)
          Parse Element object and initialize category properties and channel list.
 boolean removeChannel(rssChannel channel)
          Removes channel specified by ID from channels
 boolean removeSubCategory(rssChannelCategory category)
          Removes sub category specified by ID from sub categories
 boolean replaceChannel(int channelID, rssChannel ch)
          Replaces channel specified by ID with given one
 boolean replaceSubCategory(int catID, rssChannelCategory cat)
          Replaces sub category specified by ID with given one
 org.w3c.dom.Element toDomElement()
          Return item container as element of XML document
 void update()
          Update category channels.
 
Methods inherited from class com.fm.rss.rssAbstractEntry
equals, generateID, getDateCreated, getDescription, getID, getTitle, hashCode, parse, parse, setDateCreated, setDescription, setID, setTitle, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

subCategories

private java.util.HashMap subCategories

channels

private java.util.HashMap channels

version

private java.lang.String version
Constructor Detail

rssChannelCategory

public rssChannelCategory()
Default constructor


rssChannelCategory

public rssChannelCategory(java.lang.String t,
                          java.lang.String d)
Constructs category using given title and description and ID

Method Detail

addSubCategory

public boolean addSubCategory(rssChannelCategory cat)
Adds new category to the sub categories list


removeSubCategory

public boolean removeSubCategory(rssChannelCategory category)
Removes sub category specified by ID from sub categories


replaceSubCategory

public boolean replaceSubCategory(int catID,
                                  rssChannelCategory cat)
Replaces sub category specified by ID with given one


addChannel

public boolean addChannel(rssChannel ch)
Adds new channel to the channel list


removeChannel

public boolean removeChannel(rssChannel channel)
Removes channel specified by ID from channels


replaceChannel

public boolean replaceChannel(int channelID,
                              rssChannel ch)
Replaces channel specified by ID with given one


getSubCategories

public java.util.Map getSubCategories()
Returns sub categories as a list


getChannels

public java.util.Map getChannels()
Returns channels as a list


parse

public void parse(org.w3c.dom.Element el)
           throws rssParseException
Parse Element object and initialize category properties and channel list.

The parse() method for the channel categories works only with proprietary JNR format

Specified by:
parse in class rssAbstractEntry

toDomElement

public org.w3c.dom.Element toDomElement()
Return item container as element of XML document

Specified by:
toDomElement in class rssAbstractEntry

update

public void update()
            throws com.fm.update.updateException
Update category channels. This method will subsequently update all channels and sub categories associated with the category.

Specified by:
update in interface com.fm.update.Updateable

getItems

public java.util.Map getItems()
Returns list of the container items

Specified by:
getItems in interface ItemContainer

filterItems

public void filterItems(com.fm.rss.filter.RssItemFilter f)
Filter items using specified filter

Specified by:
filterItems in interface ItemContainer