public class Channel extends BaseMedia
| Constructor and Description |
|---|
Channel() |
| Modifier and Type | Method and Description |
|---|---|
void |
addCategory(Category category)
Specifies a category that the channel belongs to.
|
void |
addItem(Item item)
Adds an
item to this channel. |
void |
addSkipDay(String skipDay)
Adds a "day" sub-element which value is Monday, Tuesday, Wednesday, Thursday, Friday, Saturday or Sunday.
|
void |
addSkipHour(Integer skipHour)
Adds an "hour" sub-element which value is a number between 0 and 23, representing a time in GMT.
|
List<Category> |
getCategories()
Returns a list of one or more categories that the channel belongs to.
|
Cloud |
getCloud()
Returns a RSS cloud descriptor.
|
String |
getCopyright()
Returns the copyright notice for content in the channel.
|
String |
getDescription()
Returns the phrase or sentence describing the channel.
|
String |
getDocs()
Returns an URL that points to the documentation for the format used in the RSS file.
|
String |
getGenerator()
Returns a string indicating the program used to generate the channel.
|
Image |
getImage()
Returns a GIF, JPEG or PNG image that can be displayed with the channel.
|
List<Item> |
getItems()
Returns the list of channel's
items. |
String |
getLanguage()
Returns the language the channel is written in.
|
Date |
getLastBuildDate()
Returns the last time the content of the channel changed.
|
String |
getLastBuildDateString()
Returns the last time the content of the channel changed.
|
URI |
getLink()
Returns the URL to the HTML website corresponding to the channel.
|
String |
getLinkString()
Returns the URL to the HTML website corresponding to the channel.
|
String |
getManagingEditor()
Returns the email address for person responsible for editorial content.
|
Date |
getPubDate()
Returns the publication date for the content in the channel.
|
String |
getPubDateString()
Returns the publication date for the content in the channel.
|
String |
getRating()
Returns the PICS rating for the channel.
|
RSS |
getRSS()
Returns the parent RSS document, if any.
|
List<String> |
getSkipDays()
Returns a hint for aggregators telling them which days they can skip.
|
List<Integer> |
getSkipHours()
Returns a hint for aggregators telling them which hours they can skip.
|
TextInput |
getTextInput()
Returns a text input box that can be displayed with the channel.
|
String |
getTitle()
Returns the name of the channel.
|
Integer |
getTTL()
Returns a number of minutes that indicates how long a channel can be cached before refreshing from the source.
|
String |
getWebMaster()
Returns the email address for person responsible for technical issues relating to channel.
|
void |
setCloud(Cloud cloud)
Initializes the RSS cloud descriptor.
|
void |
setCopyright(String copyright)
Initializes the copyright notice for content in the channel.
|
void |
setDescription(String description)
Initializes the phrase or sentence describing the channel.
|
void |
setDocs(String docs)
Initializes the URL that points to the documentation for the format used in the RSS file.
|
void |
setGenerator(String generator)
Initializes the string indicating the program used to generate the channel.
|
void |
setImage(Image image)
Initializes a GIF, JPEG or PNG image that can be displayed with the channel.
|
void |
setLanguage(String language)
Initializes the language the channel is written in.
|
void |
setLastBuildDate(Date lastBuildDate)
Initializes the last time the content of the channel changed.
|
void |
setLastBuildDateString(String lastBuildDate)
Initializes the last time the content of the channel changed.
|
void |
setLink(URI link)
Initializes the URL to the HTML website corresponding to the channel.
|
void |
setLinkString(String link)
Initializes the URL to the HTML website corresponding to the channel.
|
void |
setManagingEditor(String managingEditor)
Initializes the email address for person responsible for editorial content.
|
void |
setPubDate(Date pubDate)
Initializes the publication date for the content in the channel.
|
void |
setPubDateString(String pubDate)
Initializes the publication date for the content in the channel.
|
void |
setRating(String rating)
Initializes the PICS rating for the channel.
|
void |
setTextInput(TextInput textInput)
Initializes a text input box that can be displayed with the channel.
|
void |
setTitle(String title)
Initializes the name of the channel.
|
void |
setTTL(Integer ttl)
Initializes the number of minutes that indicates how long a channel can be cached before refreshing from the source.
|
void |
setWebMaster(String webMaster)
Initializes the email address for person responsible for technical issues relating to channel.
|
addMediaCategory, addMediaCredit, addMediaHash, addMediaRating, addMediaRestriction, addMediaText, addMediaThumbnail, getMediaAdult, getMediaCategories, getMediaCopyright, getMediaCredits, getMediaDescription, getMediaHashes, getMediaKeywords, getMediaPlayer, getMediaRatings, getMediaRestrictions, getMediaTexts, getMediaThumbnails, getMediaTitle, isMediaAdult, setMediaAdult, setMediaAdult, setMediaCopyright, setMediaDescription, setMediaKeywords, setMediaPlayer, setMediaTitlepublic String getTitle()
null if not yet initialized.setTitle(java.lang.String)public void setTitle(String title)
title - the channel's title. Shall not be null.NullPointerException - if title is null.getTitle()public void setLinkString(String link) throws URISyntaxException
link - an URL as a string. Shall not be null.NullPointerException - if link is null.URISyntaxException - if the given string violates RFC 2396, as augmented by the URI deviations.getLinkString(),
setLink(java.net.URI)public String getLinkString()
null.NullPointerException - if no URL has been defined for this channel.setLinkString(java.lang.String),
getLink()public void setLink(URI link)
link - an URL. Shall not be null.NullPointerException - if link is null.getLink(),
setLinkString(java.lang.String)public URI getLink()
null if not yet initialized.setLink(java.net.URI),
getLinkString()public String getDescription()
null if not yet initialized.setDescription(java.lang.String)public void setDescription(String description)
description - the channel's description. Shall not be null.NullPointerException - if description is null.getDescription()public String getLanguage()
null.setLanguage(java.lang.String)public void setLanguage(String language)
language - a language. May be null.getLanguage()public String getCopyright()
null.setCopyright(java.lang.String)public void setCopyright(String copyright)
copyright - a copyright notice. May be null.getCopyright()public String getManagingEditor()
null.setManagingEditor(java.lang.String)public void setManagingEditor(String managingEditor)
managingEditor - the managing editor email. May be null.getManagingEditor()public String getWebMaster()
null.setWebMaster(java.lang.String)public void setWebMaster(String webMaster)
webMaster - the Web master email. May be null.getWebMaster()public void setPubDateString(String pubDate)
pubDate - a date as a string. Shall not be null.NullPointerException - if pubDate is null.getPubDateString(),
setPubDate(java.util.Date)public String getPubDateString()
null.setPubDateString(java.lang.String),
getPubDate()public void setPubDate(Date pubDate)
pubDate - a date. May be null.getPubDate(),
setPubDateString(java.lang.String)public Date getPubDate()
null.setPubDate(java.util.Date),
getPubDateString()public void setLastBuildDateString(String lastBuildDate)
lastBuildDate - a date as a string. Shall not be null.NullPointerException - if lastBuildDate is null.getLastBuildDateString(),
setLastBuildDate(java.util.Date)public String getLastBuildDateString()
null.setLastBuildDateString(java.lang.String),
getLastBuildDate()public void setLastBuildDate(Date lastBuildDate)
lastBuildDate - a date. May be null.getLastBuildDate(),
setLastBuildDateString(java.lang.String)public Date getLastBuildDate()
null.setLastBuildDate(java.util.Date),
getLastBuildDateString()public List<Category> getCategories()
Channel, with domain "Syndic8",
and value the identifier for your channel in the Syndic8 database.
The appropriate category element for Scripting News would be <category domain="Syndic8">1765</category>.
Example: "Newspapers".
The list is initially empty.null.addCategory(chameleon.rss.Category)public void addCategory(Category category)
category - a category. Shall not be null.NullPointerException - if category is null.getCategories()public void setGenerator(String generator)
generator - the channel's generator. May be null.getGenerator()public String getGenerator()
null.setGenerator(java.lang.String)public void setDocs(String docs)
docs - an URL as a string. May be null.getDocs()public String getDocs()
null.setDocs(java.lang.String)public void setCloud(Cloud cloud)
cloud - a cloud descriptor. May be null.getCloud()public Cloud getCloud()
null.setCloud(chameleon.rss.Cloud)public void setTTL(Integer ttl)
ttl - the channel's TTL. May be null.getTTL()public Integer getTTL()
null.setTTL(java.lang.Integer)public void setImage(Image image)
image - an image descriptor. May be null.getImage()public Image getImage()
null.setImage(chameleon.rss.Image)public void setRating(String rating)
rating - a PICS rating. May be null.getRating()public String getRating()
null.setRating(java.lang.String)public void setTextInput(TextInput textInput)
textInput - the text input descriptor. May be null.getTextInput()public TextInput getTextInput()
null.setTextInput(chameleon.rss.TextInput)public List<Integer> getSkipHours()
null.addSkipHour(java.lang.Integer)public void addSkipHour(Integer skipHour)
skipHour - an "hour" element. Shall not be null.NullPointerException - if skipHour is null.getSkipHours()public List<String> getSkipDays()
null.addSkipDay(java.lang.String)public void addSkipDay(String skipDay)
skipDay - a "day" element. Shall not be null.NullPointerException - if skipDay is null.getSkipDays()public List<Item> getItems()
items.
There can be no more than 15 items in a 0.91 channel (not checked).
There are no XML-level limits in RSS 0.92 and greater.
Processors may impose their own limits, and generators may have preferences that say no more than a certain number of items can appear in a channel.
The list is initially empty.null.addItem(chameleon.rss.Item)public void addItem(Item item)
item to this channel.item - a channel's item. Shall not be null.NullPointerException - if item is null.getItems()public RSS getRSS()
null.Copyright © 2008–2017. All rights reserved.