|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.rssowl.model.NewsItem
public class NewsItem
Model for a NewsItem. A Channel may contain more than one item.
| Field Summary | |
|---|---|
private java.lang.String |
author
|
private java.lang.String |
baseUri
|
private java.lang.String |
category
|
private java.util.Vector |
comments
|
private java.lang.String |
description
|
private java.util.Vector |
enclosures
|
private java.lang.String |
guid
|
private java.util.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 boolean |
isSearchCaseSensitive
|
private java.lang.String |
link
|
private java.util.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 java.lang.String |
newsFeedHomepage
Homepage of the Newsfeed this Item is From |
private java.lang.String |
newsfeedTitle
Title of the feed this news is from |
private java.lang.String |
newsfeedXmlUrl
URL of the RSS from where this news is |
private java.lang.String |
origurl
Set by AmphetaRate for feed XML included in news |
private java.lang.String |
pubDate
|
private java.util.Date |
pubDateParsed
|
private java.lang.String |
publisher
|
private java.lang.String |
source
|
private java.lang.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(java.lang.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 |
java.lang.String |
getAuthor()
Get the author |
java.lang.String |
getCategory()
Get the category |
java.util.Vector |
getComments()
Get Vector holding all comments |
java.lang.String |
getDescription()
Get the description |
java.util.Vector |
getEnclosures()
Get a Vector holding all enclosures |
java.lang.String |
getGuid()
Get the GUID |
java.util.Vector |
getHighlightWords()
Get highlighted words |
java.lang.String |
getLink()
Get the link |
java.util.Vector |
getLinkList()
Get the Link List |
java.lang.String |
getNewsfeedHomepage()
|
java.lang.String |
getNewsfeedTitle()
Get the news feed title |
java.lang.String |
getNewsfeedXmlUrl()
Get the newsfeed XML URL |
java.lang.String |
getOrigurl()
Get the feed XML url from the newstext |
java.lang.String |
getPubDate()
Get the publish date |
java.util.Date |
getPubDateParsed()
Get the parsed publish Date |
java.lang.String |
getPublisher()
Get the publisher |
boolean |
getRequiresViewUpdate()
Check if this newsitem was marked to require an update in the view. |
java.lang.String |
getSafeXMLFeedUrl()
Get the URL of the XML feed this news item is in. |
java.lang.String |
getSource()
Get the source |
java.lang.String |
getTitle()
Get the title |
void |
insertEnclosure(Enclosure rssEnclosure)
Add an enclosure to the news item and parse for links |
void |
insertHighlightWord(java.lang.String word)
Insert a word to highlight |
boolean |
isPartOfAggregation()
Check wether this NewsItem is part of an Category Aggregation. |
boolean |
isRead()
Get state of isRead |
boolean |
isSearchCaseSensitive()
Note: Field only used when a search was run on this item's Channel. |
private void |
parseForLinks(java.lang.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(java.lang.String author)
Set the author |
void |
setBaseUri(java.lang.String baseUri)
A Base URI may be set if required. |
void |
setCategory(java.lang.String category)
Set the category |
void |
setDescription(java.lang.String description)
Set the description and parse for links |
void |
setGuid(java.lang.String guid)
Set the GUID |
void |
setLink(java.lang.String link)
Set the link |
void |
setNewsfeedHomepage(java.lang.String newsFeedHomepage)
|
void |
setNewsfeedTitle(java.lang.String newsfeedTitle)
Set the Title of the newsfeed where this item is in |
void |
setNewsfeedXmlUrl(java.lang.String newsfeedXML)
Set the newsfeed XML URL |
void |
setOrigurl(java.lang.String origurl)
Set the feed XML url of the newstext |
void |
setPubDate(java.lang.String pubDate,
boolean parsePubDate)
Set the publish date |
void |
setPubDateParsed(java.util.Date pubDateParsed)
Set the parsed Publish Date |
void |
setPublisher(java.lang.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 |
setSearchCaseSensitive(boolean isSearchCaseSensitive)
Note: Field only used when a search was run on this item's Channel. |
void |
setSource(java.lang.String source)
Set the source and parse for links |
void |
setTitle(java.lang.String title)
Set the title to this Newsitem. |
void |
setTitle(java.lang.String desiredTitle,
boolean trim)
Set the title to this Newsitem. |
void |
setTitle(java.lang.String desiredTitle,
boolean trim,
boolean stripTags)
Set the title to this Newsitem. |
java.lang.String |
toAmphetaRateURL()
Create the AmphetaRate URL for this newsitem. |
java.lang.String |
toHTML()
Create HTML from some of the informations of the news item. |
java.lang.String |
toNewsTip()
Create a new "mailto:" URL from the newsitem |
java.lang.String |
toPrintable()
Create a String of the informations in the newsitem with simple formatting to send to a printer. |
java.lang.String |
toString(SearchDefinition searchDefinition)
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, toString, wait, wait, wait |
| Field Detail |
|---|
private static final int MAX_TITLE_LENGTH
private java.lang.String author
private java.lang.String baseUri
private java.lang.String category
private java.util.Vector comments
private java.lang.String description
private java.util.Vector enclosures
private java.lang.String guid
private java.util.Vector highlightWords
private boolean isPartOfAggregation
private boolean isRead
private boolean isSearchCaseSensitive
private java.lang.String link
private java.util.Vector linkList
private java.lang.String newsFeedHomepage
private java.lang.String newsfeedTitle
private java.lang.String newsfeedXmlUrl
private java.lang.String origurl
private java.lang.String pubDate
private java.util.Date pubDateParsed
private java.lang.String publisher
private java.lang.String source
private java.lang.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(java.lang.String comment)
comment - The comment as String.public void clearHighlightWords()
public void clone(NewsItem newsItem)
newsItem - The newsitem to clone the settings intopublic java.lang.String getAuthor()
public java.lang.String getCategory()
public java.util.Vector getComments()
public java.lang.String getDescription()
public java.util.Vector getEnclosures()
public java.lang.String getGuid()
public java.util.Vector getHighlightWords()
public java.lang.String getLink()
public java.util.Vector getLinkList()
public java.lang.String getNewsfeedHomepage()
public java.lang.String getNewsfeedTitle()
public java.lang.String getNewsfeedXmlUrl()
public java.lang.String getOrigurl()
public java.lang.String getPubDate()
public java.util.Date getPubDateParsed()
public java.lang.String getPublisher()
public boolean getRequiresViewUpdate()
public java.lang.String getSafeXMLFeedUrl()
public java.lang.String getSource()
public java.lang.String getTitle()
public void insertEnclosure(Enclosure rssEnclosure)
rssEnclosure - public void insertHighlightWord(java.lang.String word)
word - The word to highlightpublic boolean isPartOfAggregation()
public boolean isRead()
public boolean isSearchCaseSensitive()
public boolean sameAs(NewsItem newsItem)
newsItem - The newsitem to check for equalness
public void setAuthor(java.lang.String author)
author - public void setBaseUri(java.lang.String baseUri)
baseUri - The baseUri to set.public void setCategory(java.lang.String category)
category - public void setDescription(java.lang.String description)
description - public void setGuid(java.lang.String guid)
guid - public void setLink(java.lang.String link)
link - public void setNewsfeedHomepage(java.lang.String newsFeedHomepage)
newsFeedHomepage - The Homepage URL of the Newsfeed this item is in or
NULL.public void setNewsfeedTitle(java.lang.String newsfeedTitle)
newsfeedTitle - public void setNewsfeedXmlUrl(java.lang.String newsfeedXML)
newsfeedXML - public void setOrigurl(java.lang.String origurl)
origurl - The origurl to set.
public void setPubDate(java.lang.String pubDate,
boolean parsePubDate)
pubDate - parsePubDate - public void setPubDateParsed(java.util.Date pubDateParsed)
pubDateParsed - The parsed publish Datepublic void setPublisher(java.lang.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 setSearchCaseSensitive(boolean isSearchCaseSensitive)
isSearchCaseSensitive - TRUE if the search was Case Sensitive.public void setSource(java.lang.String source)
source - The source informationpublic void setTitle(java.lang.String title)
title - The title of this newsitem
public void setTitle(java.lang.String desiredTitle,
boolean trim)
desiredTitle - The title of this newsitemtrim - If TRUE, trim the title to MAX_TITLE_LENGTH
public void setTitle(java.lang.String desiredTitle,
boolean trim,
boolean stripTags)
stripTags flag.
desiredTitle - The title of this newsitemtrim - If TRUE, trim the title to MAX_TITLE_LENGTHstripTags - If TRUE, strip HTML Tagspublic java.lang.String toAmphetaRateURL()
public java.lang.String toHTML()
public java.lang.String toNewsTip()
public java.lang.String toPrintable()
public java.lang.String toString(SearchDefinition searchDefinition)
searchDefinition - The SearchDefinition including the Scope.
private void parseForLinks(java.lang.String text)
text - Current Text
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||