|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.rssowl.model.NewsItem
Model for a NewsItem. A Channel may contain more than one item.
Field Summary | |
private String |
author
|
private String |
category
|
private Vector |
comments
|
private String |
description
|
private Vector |
enclosures
|
private String |
guid
|
private Vector |
highlightWords
Vector holding all words that should be highlighted |
private boolean |
isPartOfAggregation
|
private boolean |
isRead
TRUE if the user has read this news |
private String |
link
|
private Vector |
linkList
Vector holding all links from the text |
private static int |
MAX_TITLE_LENGTH
Max. number of characters for the title if description is used as title |
private String |
newsfeedTitle
Title of the feed this news is from |
private String |
newsfeedXmlUrl
URL of the RSS from where this news is |
private String |
origurl
Set by AmphetaRate for feed XML included in news |
private boolean |
permaLink
|
private String |
pubDate
|
private Date |
pubDateParsed
|
private String |
publisher
|
private String |
source
|
private String |
title
Attributes describing the news item |
private boolean |
updateNewsView
Flag to force an update when viewing |
Constructor Summary | |
NewsItem()
Instantiate a new NewsItem |
|
NewsItem(boolean isPartOfAggregation)
Instantiate a new NewsItem |
Method Summary | |
void |
addComment(String comment)
Add a comment to the NewsItem. |
void |
clearHighlightWords()
Clear the Vector that contains the highlight words for a search. |
void |
clone(NewsItem newsItem)
Clone settings from this newsitem into the given one |
String |
getAuthor()
Get the author |
String |
getCategory()
Get the category |
Vector |
getComments()
Get Vector holding all comments |
String |
getDescription()
Get the description |
Vector |
getEnclosures()
Get a Vector holding all enclosures |
String |
getGuid()
Get the GUID |
Vector |
getHighlightWords()
Get highlighted words |
String |
getLink()
Get the link |
Vector |
getLinkList()
Get the Link List |
String |
getNewsfeedTitle()
Get the news feed title |
String |
getNewsfeedXmlUrl()
Get the newsfeed XML URL |
String |
getOrigurl()
Get the feed XML url from the newstext |
String |
getPubDate()
Get the publish date |
Date |
getPubDateParsed()
Get the parsed publish Date |
String |
getPublisher()
Get the publisher |
boolean |
getRequiresViewUpdate()
Check if this newsitem was marked to require an update in the view. |
String |
getSafeXMLFeedUrl()
Get the URL of the XML feed this news item is in. |
String |
getSource()
Get the source |
String |
getTitle()
Get the title |
void |
insertEnclosure(Enclosure rssEnclosure)
Add an enclosure to the news item and parse for links |
void |
insertHighlightWord(String word)
Insert a word to highlight |
boolean |
isPartOfAggregation()
Check wether this NewsItem is part of an Category Aggregation. |
boolean |
isPermaLink()
This field is TRUE if the link set in the guid tag is a permanent link |
boolean |
isRead()
Get state of isRead |
private void |
parseForLinks(String text)
Parse the text for links |
boolean |
sameAs(NewsItem newsItem)
Lazy check if the given NewsItem is equal to the called one |
void |
setAuthor(String author)
Set the author |
void |
setCategory(String category)
Set the category |
void |
setDescription(String description)
Set the description and parse for links |
void |
setGuid(String guid)
Set the GUID |
void |
setLink(String link)
Set the link |
void |
setNewsfeedTitle(String newsfeedTitle)
Set the Title of the newsfeed where this item is in |
void |
setNewsfeedXmlUrl(String newsfeedXML)
Set the newsfeed XML URL |
void |
setOrigurl(String origurl)
Set the feed XML url of the newstext |
void |
setPermaLink(boolean permaLink)
Set to TRUE if the guid is a permanent link |
void |
setPubDate(String pubDate,
boolean parsePubDate)
Set the publish date |
void |
setPubDateParsed(Date pubDateParsed)
Set the parsed Publish Date |
void |
setPublisher(String publisher)
Set the publisher |
void |
setRead(boolean isRead)
Set state of isRead |
void |
setRequiresViewUpdate(boolean updateNewsView)
Set wether this newsitem requires an update in the view. |
void |
setSource(String source)
Set the source and parse for links |
void |
setTitle(String title)
Set the title to this Newsitem. |
void |
setTitle(String desiredTitle,
boolean trim)
Set the title to this Newsitem. |
String |
toAmphetaRateURL()
Create the AmphetaRate URL for this newsitem. |
String |
toHTML()
Create HTML from some of the informations of the news item. |
String |
toNewsTip()
Create a new "mailto:" URL from the newsitem |
String |
toPrintable()
Create a String of the informations in the newsitem with simple formatting to send to a printer. |
String |
toString()
Create a String from the newsitem (not complete, only used by the search). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final int MAX_TITLE_LENGTH
private String author
private String category
private Vector comments
private String description
private Vector enclosures
private String guid
private Vector highlightWords
private boolean isPartOfAggregation
private boolean isRead
private String link
private Vector linkList
private String newsfeedTitle
private String newsfeedXmlUrl
private String origurl
private boolean permaLink
private String pubDate
private Date pubDateParsed
private String publisher
private String source
private String title
private boolean updateNewsView
Constructor Detail |
public NewsItem()
public NewsItem(boolean isPartOfAggregation)
isPartOfAggregation
- If TRUE, this NewsItem is showing inside an
Category Aggregation.Method Detail |
public void addComment(String comment)
comment
- The comment as String.public void clearHighlightWords()
public void clone(NewsItem newsItem)
newsItem
- The newsitem to clone the settings intopublic String getAuthor()
public String getCategory()
public Vector getComments()
public String getDescription()
public Vector getEnclosures()
public String getGuid()
public Vector getHighlightWords()
public String getLink()
public Vector getLinkList()
public String getNewsfeedTitle()
public String getNewsfeedXmlUrl()
public String getOrigurl()
public String getPubDate()
public Date getPubDateParsed()
public String getPublisher()
public boolean getRequiresViewUpdate()
public String getSafeXMLFeedUrl()
public String getSource()
public String getTitle()
public void insertEnclosure(Enclosure rssEnclosure)
rssEnclosure
- public void insertHighlightWord(String word)
word
- The word to highlightpublic boolean isPartOfAggregation()
public boolean isPermaLink()
public boolean isRead()
public boolean sameAs(NewsItem newsItem)
newsItem
- The newsitem to check for equalness
public void setAuthor(String author)
author
- public void setCategory(String category)
category
- public void setDescription(String description)
description
- public void setGuid(String guid)
guid
- public void setLink(String link)
link
- public void setNewsfeedTitle(String newsfeedTitle)
newsfeedTitle
- public void setNewsfeedXmlUrl(String newsfeedXML)
newsfeedXML
- public void setOrigurl(String origurl)
origurl
- The origurl to set.public void setPermaLink(boolean permaLink)
permaLink
- TRUE if guid is permalinkpublic void setPubDate(String pubDate, boolean parsePubDate)
pubDate
- parsePubDate
- public void setPubDateParsed(Date pubDateParsed)
pubDateParsed
- The parsed publish Datepublic void setPublisher(String publisher)
publisher
- public void setRead(boolean isRead)
isRead
- public void setRequiresViewUpdate(boolean updateNewsView)
updateNewsView
- TRUE marks this news as required of an updatepublic void setSource(String source)
source
- The source informationpublic void setTitle(String title)
title
- The title of this newsitempublic void setTitle(String desiredTitle, boolean trim)
desiredTitle
- The title of this newsitemtrim
- If TRUE, trim the title to MAX_TITLE_LENGTHpublic String toAmphetaRateURL()
public String toHTML()
public String toNewsTip()
public String toPrintable()
public String toString()
private void parseForLinks(String text)
text
- Current Text
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |