|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jalios.util.RssChannel
public class RssChannel
This class implements a RSS Channel parser/container.
Field Summary | |
---|---|
static String |
REVISION
|
Constructor Summary | |
---|---|
RssChannel(File file)
Create a new RssChannel. |
|
RssChannel(File file,
List<RssEventListener> eventListeners)
Create a new RssChannel. |
|
RssChannel(String url,
long ufreq)
Create a new RssChannel. |
|
RssChannel(String url,
long ufreq,
int timeout)
Create a new RssChannel. |
|
RssChannel(String url,
long ufreq,
int timeout,
List<RssEventListener> eventListeners)
Create a new RssChannel. |
|
RssChannel(String url,
long ufreq,
List<RssEventListener> eventListeners)
Create a new RssChannel. |
Method Summary | |
---|---|
void |
addListener(RssEventListener listener)
Add RssEventListener |
void |
addListeners(List<RssEventListener> listeners)
Add RssEventListener list to existing listeners |
static Date |
convertDate(String date)
|
static String |
generateID(String id,
int maxLength)
compute a id from parameter. |
Date |
getBuildDate()
|
String |
getCopyright()
Get the value of copyright. |
String |
getDescription()
Get the value of description. |
String |
getDocs()
Get the value of docs. |
String |
getId()
|
String |
getImageDescription()
Get the value of imageDescription. |
int |
getImageHeight()
Get the value of imageHeight. |
String |
getImageLink()
Get the value of imageLink. |
String |
getImageTitle()
Get the value of imageTitle. |
String |
getImageUrl()
Get the value of imageUrl. |
int |
getImageWidth()
Get the value of imageWidth. |
List<RssItem> |
getItemList()
Retrieve the list of RssItem of this feed. |
String |
getLanguage()
Get the value of language. |
String |
getLastBuildDate()
Deprecated. |
Date |
getLastUpdate()
Retrieve the Date at which this RssChannel was last build and parsed. |
String |
getLink()
Get the value of link. |
List<RssEventListener> |
getListeners()
returns the RssEventListener list |
String |
getManagingEditor()
Get the value of managingEditor. |
Date |
getNextUpdate()
Retrieve the Date at which this RssChannel should be left and parsed again. |
String |
getPubDate()
Deprecated. |
Date |
getPublicationDate()
|
String |
getRating()
Get the value of rating. |
String |
getSource()
Retrieve the source of this RssChannel (used only for debugging purpose). |
String |
getTextinputDescription()
Get the value of textinputDescription. |
String |
getTextinputLink()
Get the value of textinputLink. |
String |
getTextinputName()
Get the value of textinputName. |
String |
getTextinputTitle()
Get the value of textinputTitle. |
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. |
String |
getVersion()
Retrieve the RSS version of this channel (such as 0.91, 1.0 for rdf, 2.0, ...). |
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(List<RssEventListener> listeners)
Remove RssEventListener from listener list |
void |
setBuildDate(Date buildDate)
|
void |
setCopyright(String v)
Set the value of copyright. |
void |
setDescription(String v)
Set the value of description. |
void |
setDocs(String v)
Set the value of docs. |
void |
setId(String id)
|
void |
setImageDescription(String v)
Set the value of imageDescription. |
void |
setImageHeight(int v)
Set the value of imageHeight. |
void |
setImageHeightStr(String heightStr)
Set the value of imageHeight. |
void |
setImageLink(String val)
Set the value of imageLink. |
void |
setImageTitle(String v)
Set the value of imageTitle. |
void |
setImageUrl(String v)
Set the value of imageUrl. |
void |
setImageWidth(int v)
Set the value of imageWidth. |
void |
setImageWidthStr(String widthStr)
Set the value of imageWidth. |
void |
setItemList(List<RssItem> list)
Set the list of RssItem of this feed. |
void |
setLanguage(String v)
Set the value of language. |
void |
setLastBuildDate(String v)
Deprecated. |
void |
setLink(String v)
Set the value of link. |
void |
setListeners(List<RssEventListener> listeners)
|
void |
setManagingEditor(String v)
Set the value of managingEditor. |
void |
setPubDate(String v)
Deprecated. |
void |
setPublicationDate(Date publicationDate)
|
void |
setRating(String v)
Set the value of rating. |
void |
setTextinputDescription(String v)
Set the value of textinputDescription. |
void |
setTextinputLink(String v)
Set the value of textinputLink. |
void |
setTextinputName(String v)
Set the value of textinputName. |
void |
setTextinputTitle(String v)
Set the value of textinputTitle. |
void |
setTitle(String title)
Set the title of this RSS. |
void |
setTtl(long ttl)
Set the time to live of this RssChannel |
void |
setTtl(String ttlStr)
Set the time to live of this RssChannel |
void |
setUfreq(long ufreq)
Set the update frequency of this RssChannel. |
void |
setVersion(String version)
Set the RSS version of this channel. |
void |
setWebMaster(String v)
Set the value of webMaster. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String REVISION
Constructor Detail |
---|
public RssChannel(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 minutes
RssException
- if an error occured while getting or parsing the RSSpublic RssChannel(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(File file) throws RssException
file
- the RSS XML file to read
RssException
- if an error occured while reading or parsing the RSSpublic RssChannel(String url, long ufreq, List<RssEventListener> eventListeners) throws RssException
url
- the URL of the RSS channel (a remote location using http or https)ufreq
- the update frequency, in minuteseventListeners
- list of RssEventListener
RssException
- if an error occured while getting or parsing the RSSpublic RssChannel(String url, long ufreq, int timeout, List<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
- list of RssEventListener
RssException
- if an error occured while getting or parsing the RSSpublic RssChannel(File file, List<RssEventListener> eventListeners) throws RssException
file
- the RSS XML file to readeventListeners
- list of RssEventListener
RssException
- if an error occured while reading or parsing the RSSMethod Detail |
---|
public boolean needToRefresh()
public Date getLastUpdate()
public Date getNextUpdate()
public String toString()
toString
in class Object
public String getVersion()
public void setVersion(String version)
version
- the rss version (such as 0.91, 1.0 for rdf, 2.0, ...)public String getTitle()
public void setTitle(String title)
title
- the new title valuepublic String getLink()
public void setLink(String v)
v
- Value to assign to link.public String getDescription()
public void setDescription(String v)
v
- Value to assign to description.public String getRating()
public void setRating(String v)
v
- Value to assign to rating.public String getLanguage()
public void setLanguage(String v)
v
- Value to assign to language.public String getCopyright()
public void setCopyright(String v)
v
- Value to assign to copyright.public String getManagingEditor()
public void setManagingEditor(String v)
v
- Value to assign to managingEditor.public String getWebMaster()
public void setWebMaster(String v)
v
- Value to assign to webMaster.public String getImageTitle()
public void setImageTitle(String v)
v
- Value to assign to imageTitle.public String getImageUrl()
public void setImageUrl(String v)
v
- Value to assign to imageUrl.public String getImageLink()
public void setImageLink(String val)
val
- Value to assign to imageLink.public void setImageWidthStr(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(String heightStr)
heightStr
- Value to assign to imageHeight.public int getImageHeight()
public void setImageHeight(int v)
v
- Value to assign to imageHeight.public String getImageDescription()
public void setImageDescription(String v)
v
- Value to assign to imageDescription.public String getTextinputTitle()
public void setTextinputTitle(String v)
v
- Value to assign to textinputTitle.public String getTextinputDescription()
public void setTextinputDescription(String v)
v
- Value to assign to textinputDescription.public String getTextinputName()
public void setTextinputName(String v)
v
- Value to assign to textinputName.public String getTextinputLink()
public void setTextinputLink(String v)
v
- Value to assign to textinputLink.@Deprecated public String getPubDate()
@Deprecated public void setPubDate(String v)
v
- Value to assign to pubDate.@Deprecated public String getLastBuildDate()
@Deprecated public void setLastBuildDate(String v)
v
- Value to assign to lastBuildDate.public Date getBuildDate()
public void setBuildDate(Date buildDate)
buildDate
- the buildDate to setpublic String getDocs()
public void setDocs(String v)
v
- Value to assign to docs.public List<RssItem> getItemList()
public void setItemList(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(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 String getSource()
public Date getPublicationDate()
public void setPublicationDate(Date publicationDate)
publicationDate
- the publicationDate to setpublic String getId()
public void setId(String id)
id
- the id to setpublic static Date convertDate(String date)
public List<RssEventListener> getListeners()
RssEventListener
list
public void setListeners(List<RssEventListener> listeners)
listeners
- the RssEventListener
list to setpublic void addListeners(List<RssEventListener> listeners)
RssEventListener
list to existing listeners
listeners
- the listpublic void removeListeners(List<RssEventListener> listeners)
RssEventListener
from listener list
listeners
- the RssEventListener
to removepublic void addListener(RssEventListener listener)
RssEventListener
listener
- the RssEventListener
public void removeListener(RssEventListener listener)
RssEventListener
from existing listener
listener
- the RssEventListener
public static String generateID(String id, int maxLength)
id
- the string which should be an idmaxLength
- the max length of the id
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |