|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.rssowl.model.Channel
Model for a Channel
Field Summary | |
private Category |
aggregatedCategory
If this is an aggregation, the aggregated category |
private TreeSet |
aggregatedFavorites
If the Channel was built from an aggregated category, this field will remember which favorites where aggregated. |
private String |
category
|
private String |
copyright
|
private String |
creator
|
private String |
description
|
private String |
docs
This tag should contain a URL that references a description of the channel |
private org.jdom.Document |
document
Save the Document (rss xml) |
private String |
generator
A string indicating the program used to generate the channel. |
private String |
homepage
URL of this feed's homepage |
private ChannelImage |
image
May Attributes |
private int |
itemCount
Number of items (= news) in this RSS |
private Hashtable |
items
Newsitems |
private String |
language
|
private String |
lastBuildDate
The last time the channel was modified |
private Date |
lastBuildDateParsed
The parsed lastBuildDate |
private String |
link
|
private String |
managingEditor
The email address of the managing editor of the site |
private Vector |
newsChannelInfos
Save what channel infos are available |
private Vector |
newsItemInfos
Save what newsitem infos are available |
private Vector |
newsItemOrder
Save order of the news from the XML |
private String |
pubDate
Date when channel was published. |
private Date |
pubDateParsed
The parsed publish date |
private String |
publisher
|
private String |
rssFormat
Format of this Newsfeed |
private Vector |
searchResultsItemOrder
Sorted items that match the search |
private Hashtable |
searchResultsItems
Items that match the search |
private String |
title
|
private String |
ttl
ttl stands for time to live. |
private String |
updateFrequency
|
private String |
updatePeriod
|
private String |
webmaster
The email address of the webmaster for the site, the person to contact if there are technical problems with the channel |
Constructor Summary | |
Channel()
Default constructor |
|
Channel(String title,
Category aggregatedCategory,
Vector rssChannels,
TreeSet aggregatedFavorites,
boolean generateUniqueTitles)
This constructor is used to aggregate a Vector of RSSChannels into one channel. |
|
Channel(String title,
String description,
String link,
String language)
Instantiates a news Channel |
Method Summary | |
void |
addAvailableNewsChannelInfo(String i18nName)
Add an available news channel info |
void |
addAvailableNewsItemInfo(String i18nName)
Add an available news item info |
private void |
aggregateChannels(Vector rssChannels,
boolean generateUniqueTitles)
Aggregate a Vector of RSS channels into this channel |
boolean |
containsUnreadNews()
Get wether this Channel contains unread news |
static Channel |
createErrorChannel(String url,
NewsfeedFactoryException e)
Create a fake Channel that displays an warning message given from the Exception. |
Category |
getAggregatedCategory()
|
TreeSet |
getAggregatedFavorites()
|
Vector |
getAvailableNewsChannelInfos()
Get available news channel infos |
Vector |
getAvailableNewsItemInfos()
Get available news item infos |
String |
getCategory()
Get the category |
String |
getCopyright()
Get the copyright |
String |
getCreator()
Get the creator |
String |
getDescription()
Get the description |
String |
getDocs()
Get the docs |
org.jdom.Document |
getDocument()
Get the document |
String |
getGenerator()
Get the generator |
String |
getHomepage()
Get the Feeds Homepage |
ChannelImage |
getImage()
Get the ChannelImage |
int |
getItemCount()
Get count of items |
Hashtable |
getItems()
Get all items |
String |
getLanguage()
Get the language |
String |
getLastBuildDate()
Get the last build date |
Date |
getLastBuildDateParsed()
Get the parsed last build Date |
String |
getLink()
Get the link |
String |
getManagingEditor()
Get the managing editor |
Vector |
getNewsItemOrder()
Get news item order |
String |
getPubDate()
Get the publish date |
Date |
getPubDateParsed()
Get the parsed publish Date |
String |
getPublisher()
Get the publisher |
String |
getRSSFormat()
Get the RSS Version |
Vector |
getSearchResultsItemOrder()
Get the search results item order |
Hashtable |
getSearchResultsItems()
Get the search result items |
String |
getTitle()
Get the title |
String |
getTtl()
Get the time to live |
int |
getUnreadNewsCount()
Get the number of unread news for this channel |
int |
getUnreadNewsCount(String feedXMLUrl)
Get the number of unread news for the given feed. |
String |
getUpdateFrequency()
Get update frequency |
String |
getUpdatePeriod()
Get the update period |
String |
getWebmaster()
Get the webmaster |
void |
insertItem(NewsItem item)
Insert a newsitem into the Channel and generate a unique title |
void |
insertItem(NewsItem item,
boolean generateUniqueTitle)
Insert a newsitem into the Channel. |
boolean |
isAggregatedCat()
|
void |
setCategory(String category)
Set the category |
void |
setCopyright(String copyright)
Set the copyright |
void |
setCreator(String creator)
Set the creator |
void |
setDescription(String description)
Set the description |
void |
setDocs(String docs)
Set the docs |
void |
setDocument(org.jdom.Document document)
Set the document |
void |
setGenerator(String generator)
Set the generator |
void |
setHomepage(String homepage)
Set the Feeds Homepage |
void |
setImage(ChannelImage image)
Set the RSS channel image |
void |
setItemCount(int itemCount)
Set the item count |
void |
setLanguage(String language)
Set the language |
void |
setLastBuildDate(String lastBuildDate)
Set the last build date |
void |
setLink(String link)
Set the link |
void |
setManagingEditor(String managingEditor)
Set the managing editor |
void |
setNewsThatMatchSearch(Hashtable parsedPattern,
Vector regEx)
Perform the search and add the NewsItems that match the pattern to the searchResultsItems Hashtable |
void |
setNewsThatMatchSearch(String patternStr)
Perform the search and add the NewsItems that match the pattern to the searchResultsItems Hashtable |
void |
setPubDate(String pubDate)
Set the publish date |
void |
setPublisher(String publisher)
Set the publisher |
void |
setRSSFormat(String rssFormat)
Set the RSS Version |
void |
setTitle(String title)
Set the title |
void |
setTtl(String ttl)
Set the time to live |
void |
setUpdateFrequency(String updateFrequency)
Set the update frequency |
void |
setUpdatePeriod(String updatePeriod)
Set the update period |
void |
setWebmaster(String webmaster)
Set the webmaster |
org.jdom.Document |
toDocument()
Create a RSS 0.91 XML document from the Channel. |
void |
updateReadStatusOnNews()
Check for each NewsItem of the given Channel if the news was read before or is unread. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private Category aggregatedCategory
private TreeSet aggregatedFavorites
private String category
private String copyright
private String creator
private String description
private String docs
private org.jdom.Document document
private String generator
private String homepage
private ChannelImage image
private int itemCount
private Hashtable items
private String language
private String lastBuildDate
private Date lastBuildDateParsed
private String link
private String managingEditor
private Vector newsChannelInfos
private Vector newsItemInfos
private Vector newsItemOrder
private String pubDate
private Date pubDateParsed
private String publisher
private String rssFormat
private Vector searchResultsItemOrder
private Hashtable searchResultsItems
private String title
private String ttl
private String updateFrequency
private String updatePeriod
private String webmaster
Constructor Detail |
public Channel()
public Channel(String title, Category aggregatedCategory, Vector rssChannels, TreeSet aggregatedFavorites, boolean generateUniqueTitles)
title
- Title of the channelaggregatedCategory
- The category that is aggregatedrssChannels
- Vector holding some rss channelsaggregatedFavorites
- The favorites that have been aggregatedgenerateUniqueTitles
- Set to TRUE if the news-titles have to be
uniquepublic Channel(String title, String description, String link, String language)
title
- Title of the channeldescription
- Description of the channellink
- Link of the channellanguage
- Language of the channelMethod Detail |
public static Channel createErrorChannel(String url, NewsfeedFactoryException e)
url
- The URL where the warning occurede
- The exception
public void addAvailableNewsChannelInfo(String i18nName)
i18nName
- The i18n key for the infopublic void addAvailableNewsItemInfo(String i18nName)
i18nName
- The i18n key for the infopublic boolean containsUnreadNews()
public Category getAggregatedCategory()
public TreeSet getAggregatedFavorites()
public Vector getAvailableNewsChannelInfos()
public Vector getAvailableNewsItemInfos()
public String getCategory()
public String getCopyright()
public String getCreator()
public String getDescription()
public String getDocs()
public org.jdom.Document getDocument()
public String getGenerator()
public String getHomepage()
public ChannelImage getImage()
public int getItemCount()
public Hashtable getItems()
public String getLanguage()
public String getLastBuildDate()
public Date getLastBuildDateParsed()
public String getLink()
public String getManagingEditor()
public Vector getNewsItemOrder()
public String getPubDate()
public Date getPubDateParsed()
public String getPublisher()
public String getRSSFormat()
public Vector getSearchResultsItemOrder()
public Hashtable getSearchResultsItems()
public String getTitle()
public String getTtl()
public int getUnreadNewsCount()
public int getUnreadNewsCount(String feedXMLUrl)
feedXMLUrl
- The URL of the newsfeed
public String getUpdateFrequency()
public String getUpdatePeriod()
public String getWebmaster()
public void insertItem(NewsItem item)
item
- The NewsItem to insertpublic void insertItem(NewsItem item, boolean generateUniqueTitle)
item
- The newsitem to addgenerateUniqueTitle
- TRUE if the title must be uniquepublic boolean isAggregatedCat()
public void setCategory(String category)
category
- public void setCopyright(String copyright)
copyright
- public void setCreator(String creator)
creator
- public void setDescription(String description)
description
- public void setDocs(String docs)
docs
- public void setDocument(org.jdom.Document document)
document
- public void setGenerator(String generator)
generator
- public void setHomepage(String homepage)
homepage
- public void setImage(ChannelImage image)
image
- public void setItemCount(int itemCount)
itemCount
- public void setLanguage(String language)
language
- public void setLastBuildDate(String lastBuildDate)
lastBuildDate
- public void setLink(String link)
link
- public void setManagingEditor(String managingEditor)
managingEditor
- public void setNewsThatMatchSearch(Hashtable parsedPattern, Vector regEx)
parsedPattern
- The parsed patternregEx
- Vector with regular expressionspublic void setNewsThatMatchSearch(String patternStr)
patternStr
- The RegEx pattern as Stringpublic void setPubDate(String pubDate)
pubDate
- public void setPublisher(String publisher)
publisher
- public void setRSSFormat(String rssFormat)
rssFormat
- public void setTitle(String title)
title
- public void setTtl(String ttl)
ttl
- public void setUpdateFrequency(String updateFrequency)
updateFrequency
- public void setUpdatePeriod(String updatePeriod)
updatePeriod
- public void setWebmaster(String webmaster)
webmaster
- public org.jdom.Document toDocument()
public void updateReadStatusOnNews()
private void aggregateChannels(Vector rssChannels, boolean generateUniqueTitles)
rssChannels
- Vector holding some rss channelsgenerateUniqueTitles
- Set to TRUE if news-titles have to be unique
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |