| java.lang.Object org.clapper.curn.parser.RSSElement org.clapper.curn.parser.RSSChannel
All known Subclasses: org.clapper.curn.parser.rome.RSSChannelAdapter,
RSSChannel | abstract public class RSSChannel extends RSSElement implements Cloneable(Code) | | This abstract class defines a simplified view of an RSS channel,
providing only the methods necessary for curn to work.
curn uses the
RSSParserFactory class to get a specific
implementation of RSSParser, which returns an object that is a
subclass of this class. This strategy isolates the bulk of the code from
the underlying RSS parser, making it easier to substitute different
parsers as more of them become available.
See Also: RSSParserFactory See Also: RSSParser See Also: RSSItem version: $Revision: 7041 $ |
Constructor Summary | |
protected | RSSChannel() Default constructor. |
RSSChannel | protected RSSChannel()(Code) | | Default constructor.
|
getItems | abstract public Collection<RSSItem> getItems()(Code) | | Get a Collection of the items in this channel. All objects
in the collection are of type RSSItem.
a (new) Collection of RSSItem objects.The collection will be empty (never null) if there are noitems. This Collection is expected to be a copy ofwhatever the channel is really storing. (That is, if theunderlying implementation is using a Collection tostore its RSSItem objects, it should not returnthat Collection directly; instead, it should returna copy.) The order of items in the returned collectionis arbitrary and not guaranteed to be sorted, unless sortedby a plug-in. |
makeCopy | public RSSChannel makeCopy()(Code) | | Make a deep copy of this RSSChannel object.
the copy |
newInstance | abstract public RSSChannel newInstance()(Code) | | Create a new, empty instance of the underlying concrete
class.
the new instance |
removeItem | abstract public boolean removeItem(RSSItem item)(Code) | | Remove an item from the set of items.
Parameters: item - the item to remove true if removed, false if not found |
setCopyright | abstract public void setCopyright(String copyright)(Code) | | Set the channel's copyright string
Parameters: copyright - the copyright string, or null if not available See Also: RSSChannel.getCopyright |
setDescription | abstract public void setDescription(String desc)(Code) | | Set the channel's description
Parameters: desc - the channel's description, or null if there isn't one See Also: RSSChannel.getDescription |
setItems | abstract public void setItems(Collection<? extends RSSItem> newItems)(Code) | | Change the items the channel the ones in the specified collection.
If the collection is empty, the items are cleared. The items are
copied from the supplied collection. (A reference to the supplied
collection is not saved in this object.)
Parameters: newItems - new collection of RSSItem items. |
setPublicationDate | abstract public void setPublicationDate(Date date)(Code) | | Set the channel's publication date.
Parameters: date - the publication date, or null if not available See Also: RSSChannel.getPublicationDate |
setTitle | abstract public void setTitle(String newTitle)(Code) | | Set the channel's title
Parameters: newTitle - the channel's title, or null if there isn't one See Also: RSSChannel.getTitle() |
stripHTML | public synchronized void stripHTML()(Code) | | Strip all HTML and weird plain text from the channel and its items.
Intended primarily for output handlers and plug-ins that produce
plain text. This method edits the channel data directly; it does not
produce a copy.
|
toString | public String toString()(Code) | | Return a string representation of this channel.
the string |
|
|