|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.sourceforge.java.feednread.backend.model.newstable.NewsFeedEntry
Wrapper class for Rome SyndEntry
news representation. It adds a marker flag for the read status and
converts the news description to valid HTML 4.01 if only a plain text
description is available.
| Field Summary | |
private String |
authors
The converted authors (comma separated list of authors) |
private String |
categories
The converted categories (comma separated list of categories) |
private String |
description
The HTML 4.01 converted news description |
private SyndEntry |
entry
The original Rome SyndEntry representation |
private NewsFeed |
newsFeed
The NewsFeed that the NewsFeedEntry is
associated to
|
private boolean |
read
The news read status whereas true indicates a read
and false an unread NewsFeedEntry<
|
private static long |
serialVersionUID
The serialVersionUID of this class |
private boolean |
tagged
The news tag status whereas true indicates a tagged
and false an untagged NewsFeedEntry<
|
private String |
title
The trimmed news title |
| Constructor Summary | |
NewsFeedEntry(NewsFeed newsFeed,
SyndEntry entry)
Creates a new NewsFeedEntry wrapper for the
specified Rome SyndEntry news representation.
|
|
| Method Summary | |
int |
compareTo(Object obj)
Compares this NewsFeedEntry to another
NewsFeedEntry object.
|
private String |
convertAuthors()
Converts the authors of the wrapped SyndEntry to
a single String that separates the
SyndPerson instances by commas.
|
private String |
convertCategories()
Converts the categories of the wrapped SyndEntry to
a single String that separates the
SyndCategory instances by commas.
|
private String |
convertDescription()
Converts the description of the wrapped SyndEntry to
valid HTML 4.01.
|
private static String |
convertToHTML(SyndEntry entry)
Converts the specified news entry to HTML. |
boolean |
equals(Object obj)
Returns true if this NewsFeedEntry equals
the specified obj, otherwise false.
|
String |
getAuthors()
Gets the news authors. |
String |
getCategories()
Get the news categories. |
String |
getDescription()
Gets the news description. |
String |
getLink()
Gets the url link to the news. |
NewsFeed |
getNewsFeed()
Gets the NewsFeed that this NewsFeedEntry
is related to.
|
Date |
getPublishedDate()
Gets the news publication date. |
SyndEntry |
getSyndEntry()
Gets the wrapped original Rome SyndEntry news
representation.
|
String |
getTitle()
Gets the news title. |
boolean |
hasEnclosures()
Returns true if this NewsFeedEntry holds
any enclosures.
|
boolean |
hasPodcastEnclosures()
Returns true if this NewsFeedEntry holds
any podcast enclosures.
|
boolean |
isRead()
Gets the read status of this news. |
boolean |
isTagged()
Gets the tagged status of this news. |
void |
setRead(boolean read)
Sets the read status of this news. |
void |
setTagged(boolean tagged)
Sets the tagged status of this news. |
String |
toString()
Returns the textual representation of this NewsFeedEntry.
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private static final long serialVersionUID
The serialVersionUID of this class
private SyndEntry entry
The original Rome SyndEntry representation
private String description
The HTML 4.01 converted news description
private String categories
The converted categories (comma separated list of categories)
private String authors
The converted authors (comma separated list of authors)
private String title
The trimmed news title
private boolean read
The news read status whereas true indicates a read
and false an unread NewsFeedEntry<
private boolean tagged
The news tag status whereas true indicates a tagged
and false an untagged NewsFeedEntry<
private NewsFeed newsFeed
The NewsFeed that the NewsFeedEntry is
associated to
| Constructor Detail |
public NewsFeedEntry(NewsFeed newsFeed,
SyndEntry entry)
Creates a new NewsFeedEntry wrapper for the
specified Rome SyndEntry news representation.
newsFeed - the NewsFeed that this
NewsFeedEntry is related toentry - the original Rome news entry representation| Method Detail |
public boolean equals(Object obj)
Returns true if this NewsFeedEntry equals
the specified obj, otherwise false.
Two NewsFeedEntry objects are considered equal if
their publishedDate, title and url match.
obj - the NewsFeedEntry instance to compare with
this NewsFeedEntry instance
true if this NewsFeedEntry equals
the specified obj, otherwise falsepublic int compareTo(Object obj)
Compares this NewsFeedEntry to another
NewsFeedEntry object.
compareTo in interface Comparableobj - a second NewsFeedEntry object to compare this
NewsFeedEntry to
NewsFeedEntry is less than, equal to, or greater than the
specified NewsFeedEntry object.public NewsFeed getNewsFeed()
Gets the NewsFeed that this NewsFeedEntry
is related to.
NewsFeed that this NewsFeedEntry
is related topublic SyndEntry getSyndEntry()
Gets the wrapped original Rome SyndEntry news
representation.
SyndEntry news
representationpublic String getTitle()
Gets the news title.
public String getLink()
Gets the url link to the news.
public String getDescription()
Gets the news description.
public String getAuthors()
Gets the news authors.
public Date getPublishedDate()
Gets the news publication date.
public String getCategories()
Get the news categories.
public void setRead(boolean read)
Sets the read status of this news.
read - true to mark this news as read,
false to mark it as unreadpublic boolean isRead()
Gets the read status of this news.
true if this news has been read,
false if unreadpublic void setTagged(boolean tagged)
Sets the tagged status of this news.
tagged - true to tag this news, false
to untagpublic boolean isTagged()
Gets the tagged status of this news.
true if this news has been tagged,
false if untaggedpublic boolean hasEnclosures()
Returns true if this NewsFeedEntry holds
any enclosures.
true if this NewsFeedEntry holds
any enclosures; false otherwisepublic boolean hasPodcastEnclosures()
Returns true if this NewsFeedEntry holds
any podcast enclosures.
true if this NewsFeedEntry holds
any podcast enclosures; false otherwisepublic String toString()
Returns the textual representation of this NewsFeedEntry.
NewsFeedEntryprivate String convertDescription()
Converts the description of the wrapped SyndEntry to
valid HTML 4.01.
private String convertCategories()
Converts the categories of the wrapped SyndEntry to
a single String that separates the
SyndCategory instances by commas.
private String convertAuthors()
Converts the authors of the wrapped SyndEntry to
a single String that separates the
SyndPerson instances by commas.
private static String convertToHTML(SyndEntry entry)
Converts the specified news entry to HTML. HTML 4.01 is being used.
entry - the news entry to convert
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||