public class RssChannel
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
REVISION |
| Constructor and Description |
|---|
RssChannel(java.io.File file)
Create a new RssChannel.
|
RssChannel(java.io.File file,
java.util.Set<RssEventListener> eventListeners)
Create a new RssChannel.
|
RssChannel(java.lang.String url,
long ufreq)
Create a new RssChannel.
|
RssChannel(java.lang.String url,
long ufreq,
int timeout)
Create a new RssChannel.
|
RssChannel(java.lang.String url,
long ufreq,
int timeout,
java.util.Set<RssEventListener> eventListeners)
Create a new RssChannel.
|
RssChannel(java.lang.String url,
long ufreq,
java.util.Set<RssEventListener> eventListeners)
Create a new RssChannel.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(RssEventListener listener)
Add
RssEventListener |
void |
addListeners(java.util.Set<RssEventListener> listeners)
Add
RssEventListener list to existing listeners |
static java.util.Date |
convertDate(java.lang.String date) |
static java.lang.String |
generateID(java.lang.String id,
int maxLength)
compute a id from parameter.
|
java.util.Date |
getBuildDate() |
java.lang.String |
getCopyright()
Get the value of copyright.
|
java.lang.String |
getDescription()
Get the value of description.
|
java.lang.String |
getDocs()
Get the value of docs.
|
java.lang.String |
getId() |
java.lang.String |
getImageDescription()
Get the value of imageDescription.
|
int |
getImageHeight()
Get the value of imageHeight.
|
java.lang.String |
getImageLink()
Get the value of imageLink.
|
java.lang.String |
getImageTitle()
Get the value of imageTitle.
|
java.lang.String |
getImageUrl()
Get the value of imageUrl.
|
int |
getImageWidth()
Get the value of imageWidth.
|
java.util.List<RssItem> |
getItemList()
Retrieve the list of RssItem of this feed.
|
java.lang.String |
getLanguage()
Get the value of language.
|
java.lang.String |
getLastBuildDate()
Deprecated.
|
java.util.Date |
getLastUpdate()
Retrieve the Date at which this RssChannel was last build and parsed.
|
java.lang.String |
getLink()
Get the value of link.
|
java.util.Set<RssEventListener> |
getListeners()
returns the
RssEventListener Set |
java.lang.String |
getManagingEditor()
Get the value of managingEditor.
|
java.util.Date |
getNextUpdate()
Retrieve the Date at which this RssChannel should be left and parsed again.
|
java.lang.String |
getPubDate()
Deprecated.
|
java.util.Date |
getPublicationDate() |
java.lang.String |
getRating()
Get the value of rating.
|
java.lang.String |
getSource()
Retrieve the source of this RssChannel (used only for debugging purpose).
|
java.lang.String |
getTextinputDescription()
Get the value of textinputDescription.
|
java.lang.String |
getTextinputLink()
Get the value of textinputLink.
|
java.lang.String |
getTextinputName()
Get the value of textinputName.
|
java.lang.String |
getTextinputTitle()
Get the value of textinputTitle.
|
java.lang.String |
getTitle()
Retrieve the title of this RSS.
|
long |
getTtl()
Retrieve the number of minutes indicating how long this channel can be
cached before being refreshed from the source.
|
long |
getUfreq()
Retrieve the update frequency of this RssChannel.
|
java.lang.String |
getVersion()
Retrieve the RSS version of this channel (such as 0.91, 1.0 for rdf, 2.0,
...).
|
java.lang.String |
getWebMaster()
Get the value of webMaster.
|
boolean |
needToRefresh()
Determine if the channel must be refreshed
|
void |
removeListener(RssEventListener listener)
Remove
RssEventListener from existing listener |
void |
removeListeners(java.util.List<RssEventListener> listeners)
Remove
RssEventListener from listener list |
void |
setBuildDate(java.util.Date buildDate) |
void |
setCopyright(java.lang.String v)
Set the value of copyright.
|
void |
setDescription(java.lang.String v)
Set the value of description.
|
void |
setDocs(java.lang.String v)
Set the value of docs.
|
void |
setId(java.lang.String id) |
void |
setImageDescription(java.lang.String v)
Set the value of imageDescription.
|
void |
setImageHeight(int v)
Set the value of imageHeight.
|
void |
setImageHeightStr(java.lang.String heightStr)
Set the value of imageHeight.
|
void |
setImageLink(java.lang.String val)
Set the value of imageLink.
|
void |
setImageTitle(java.lang.String v)
Set the value of imageTitle.
|
void |
setImageUrl(java.lang.String v)
Set the value of imageUrl.
|
void |
setImageWidth(int v)
Set the value of imageWidth.
|
void |
setImageWidthStr(java.lang.String widthStr)
Set the value of imageWidth.
|
void |
setItemList(java.util.List<RssItem> list)
Set the list of RssItem of this feed.
|
void |
setLanguage(java.lang.String v)
Set the value of language.
|
void |
setLastBuildDate(java.lang.String v)
Deprecated.
|
void |
setLink(java.lang.String v)
Set the value of link.
|
void |
setListeners(java.util.Set<RssEventListener> listeners) |
void |
setManagingEditor(java.lang.String v)
Set the value of managingEditor.
|
void |
setPubDate(java.lang.String v)
Deprecated.
|
void |
setPublicationDate(java.util.Date publicationDate) |
void |
setRating(java.lang.String v)
Set the value of rating.
|
void |
setTextinputDescription(java.lang.String v)
Set the value of textinputDescription.
|
void |
setTextinputLink(java.lang.String v)
Set the value of textinputLink.
|
void |
setTextinputName(java.lang.String v)
Set the value of textinputName.
|
void |
setTextinputTitle(java.lang.String v)
Set the value of textinputTitle.
|
void |
setTitle(java.lang.String title)
Set the title of this RSS.
|
void |
setTtl(long ttl)
Set the time to live of this RssChannel
|
void |
setTtl(java.lang.String ttlStr)
Set the time to live of this RssChannel
|
void |
setUfreq(long ufreq)
Set the update frequency of this RssChannel.
|
void |
setVersion(java.lang.String version)
Set the RSS version of this channel.
|
void |
setWebMaster(java.lang.String v)
Set the value of webMaster.
|
java.lang.String |
toString() |
public static final java.lang.String REVISION
public RssChannel(java.lang.String url,
long ufreq)
throws RssException
url - the URL of the RSS channel (a remote location using http or https)ufreq - the update frequency, in minutesRssException - if an error occured while getting or parsing the RSSpublic RssChannel(java.lang.String url,
long ufreq,
int timeout)
throws RssException
url - the URL of the RSS channel (a remote location using http or https)ufreq - the update frequency, in minutestimeout - the time (in milliseconds) to wait for a connection to become
available. Default value is 3000 (3 seconds). Default value will
be used if zero or a negative value is specified.RssException - if an error occured while getting or parsing the RSSpublic RssChannel(java.io.File file)
throws RssException
file - the RSS XML file to readRssException - if an error occured while reading or parsing the RSSpublic RssChannel(java.lang.String url,
long ufreq,
java.util.Set<RssEventListener> eventListeners)
throws RssException
url - the URL of the RSS channel (a remote location using http or https)ufreq - the update frequency, in minuteseventListeners - Set of RssEventListenerRssException - if an error occured while getting or parsing the RSSpublic RssChannel(java.lang.String url,
long ufreq,
int timeout,
java.util.Set<RssEventListener> eventListeners)
throws RssException
url - the URL of the RSS channel (a remote location using http or https)ufreq - the update frequency, in minutestimeout - the time (in milliseconds) to wait for a connection to become
available. Default value is 3000 (3 seconds). Default value will
be used if zero or a negative value is specified.eventListeners - Set of RssEventListenerRssException - if an error occured while getting or parsing the RSSpublic RssChannel(java.io.File file,
java.util.Set<RssEventListener> eventListeners)
throws RssException
file - the RSS XML file to readeventListeners - Set of RssEventListenerRssException - if an error occured while reading or parsing the RSSpublic boolean needToRefresh()
public java.util.Date getLastUpdate()
public java.util.Date getNextUpdate()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getVersion()
public void setVersion(java.lang.String version)
version - the rss version (such as 0.91, 1.0 for rdf, 2.0, ...)public java.lang.String getTitle()
public void setTitle(java.lang.String title)
title - the new title valuepublic java.lang.String getLink()
public void setLink(java.lang.String v)
v - Value to assign to link.public java.lang.String getDescription()
public void setDescription(java.lang.String v)
v - Value to assign to description.public java.lang.String getRating()
public void setRating(java.lang.String v)
v - Value to assign to rating.public java.lang.String getLanguage()
public void setLanguage(java.lang.String v)
v - Value to assign to language.public java.lang.String getCopyright()
public void setCopyright(java.lang.String v)
v - Value to assign to copyright.public java.lang.String getManagingEditor()
public void setManagingEditor(java.lang.String v)
v - Value to assign to managingEditor.public java.lang.String getWebMaster()
public void setWebMaster(java.lang.String v)
v - Value to assign to webMaster.public java.lang.String getImageTitle()
public void setImageTitle(java.lang.String v)
v - Value to assign to imageTitle.public java.lang.String getImageUrl()
public void setImageUrl(java.lang.String v)
v - Value to assign to imageUrl.public java.lang.String getImageLink()
public void setImageLink(java.lang.String val)
val - Value to assign to imageLink.public void setImageWidthStr(java.lang.String widthStr)
widthStr - Value to assign to imageWidth.public int getImageWidth()
public void setImageWidth(int v)
v - Value to assign to imageWidth.public void setImageHeightStr(java.lang.String heightStr)
heightStr - Value to assign to imageHeight.public int getImageHeight()
public void setImageHeight(int v)
v - Value to assign to imageHeight.public java.lang.String getImageDescription()
public void setImageDescription(java.lang.String v)
v - Value to assign to imageDescription.public java.lang.String getTextinputTitle()
public void setTextinputTitle(java.lang.String v)
v - Value to assign to textinputTitle.public java.lang.String getTextinputDescription()
public void setTextinputDescription(java.lang.String v)
v - Value to assign to textinputDescription.public java.lang.String getTextinputName()
public void setTextinputName(java.lang.String v)
v - Value to assign to textinputName.public java.lang.String getTextinputLink()
public void setTextinputLink(java.lang.String v)
v - Value to assign to textinputLink.@Deprecated public java.lang.String getPubDate()
@Deprecated public void setPubDate(java.lang.String v)
v - Value to assign to pubDate.@Deprecated public java.lang.String getLastBuildDate()
@Deprecated public void setLastBuildDate(java.lang.String v)
v - Value to assign to lastBuildDate.public java.util.Date getBuildDate()
public void setBuildDate(java.util.Date buildDate)
buildDate - the buildDate to setpublic java.lang.String getDocs()
public void setDocs(java.lang.String v)
v - Value to assign to docs.public java.util.List<RssItem> getItemList()
public void setItemList(java.util.List<RssItem> list)
list - a list list of RssItem, must not be nullpublic long getTtl()
public void setTtl(long ttl)
ttl - time to live in minutes.public void setTtl(java.lang.String ttlStr)
ttlStr - time to live in minutes.public long getUfreq()
public void setUfreq(long ufreq)
ufreq - the new update frequency value, in minutes.public java.lang.String getSource()
public java.util.Date getPublicationDate()
public void setPublicationDate(java.util.Date publicationDate)
publicationDate - the publicationDate to setpublic java.lang.String getId()
public void setId(java.lang.String id)
id - the id to setpublic static java.util.Date convertDate(java.lang.String date)
public java.util.Set<RssEventListener> getListeners()
RssEventListener Setpublic void setListeners(java.util.Set<RssEventListener> listeners)
listeners - the RssEventListener Set to setpublic void addListeners(java.util.Set<RssEventListener> listeners)
RssEventListener list to existing listenerslisteners - the Setpublic void removeListeners(java.util.List<RssEventListener> listeners)
RssEventListener from listener listlisteners - the RssEventListener to removepublic void addListener(RssEventListener listener)
RssEventListenerlistener - the RssEventListenerpublic void removeListener(RssEventListener listener)
RssEventListener from existing listenerlistener - the RssEventListenerpublic static java.lang.String generateID(java.lang.String id,
int maxLength)
id - the string which should be an idmaxLength - the max length of the idCopyright © 2001-2017 Jalios SA. All Rights Reserved.