|
|||||||||||
| 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.NewsFeed
net.sourceforge.java.feednread.backend.model.newstable.AggregatedNewsFeed
Container for NewsFeeds to model an aggregation.
| Field Summary | |
private List |
newsFeeds
The List of aggregated NewsFeeds |
static long |
serialVersionUID
The serialVersionUID of this class |
| Fields inherited from class net.sourceforge.java.feednread.backend.model.newstable.NewsFeed |
newsFeedEntries, originalFeed, url |
| Constructor Summary | |
AggregatedNewsFeed()
Creates a new empty AggregatedNewsFeed with an
unique url.
|
|
| Method Summary | |
void |
add(List entries)
Adds the list of NewsFeedEntry feed entries to
this AggregatedNewsFeed.
|
void |
add(NewsFeed newsFeed)
Adds a NewsFeed to this AggregatedNewsFeed.
|
void |
addToArchive(NewsFeedArchive archive)
Adds this AggregatedNewsFeed to the specified
NewsFeedArchive. |
boolean |
contains(NewsFeed newsFeed)
Returns true if the specified NewsFeed is
aggregated in this AggregatedNewsFeed.
|
private String |
createUniqueUrl()
Creates an unique url for this AggregatedNewsFeed.
|
boolean |
equals(Object obj)
Tests if this AggregatedNewsFeed is equal to the specified
obj. |
NewsFeed[] |
getNewsFeeds()
Get all NewsFeeds aggregated in this
AggregatedNewsFeed.
|
int |
hashCode()
Calculates the hashcode of this AggregatedNewsFeed.
|
void |
remove(NewsFeed newsFeed)
Removes the specified NewsFeed from this
AggregatedNewsFeed.
|
private void |
replace(NewsFeed replacedFeed,
NewsFeed replacementFeed)
Replaces replacedFeed with the specified
replacementFeed.
|
void |
synchronizeWithArchive(NewsFeedArchive archive)
Synchronizes this AggregatedNewsFeed with the specified
NewsFeedArchive. |
| Methods inherited from class net.sourceforge.java.feednread.backend.model.newstable.NewsFeed |
compareTo, getAuthors, getCopyright, getDescription, getEncoding, getEntries, getFeedType, getImage, getLanguage, getLink, getOriginalEntries, getOriginalFeed, getPublishedDate, getReadCount, getReadNews, getTitle, getUnreadCount, getUnreadNews, getUrl, isUnread, markAllRead, markAllUnread, setAuthors, setCopyright, setDescription, setEncoding, setEntries, setFeedType, setImage, setLanguage, setLink, setOriginalEntries, setPublishedDate, setTitle, setUrl |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final long serialVersionUID
The serialVersionUID of this class
private List newsFeeds
The List of aggregated NewsFeeds
| Constructor Detail |
public AggregatedNewsFeed()
Creates a new empty AggregatedNewsFeed with an
unique url.
| Method Detail |
public boolean equals(Object obj)
Tests if this AggregatedNewsFeed is equal to the specified
obj. Two AggregatedNewsFeed instances are
considered equal if they are both instances of the
AggregatedNewsFeed class and if all embedded
NewsFeed instances are equal, i.e. all point to the same
urls as returned by the NewsFeed.getUrl() method.
equals in class NewsFeedobj - the Object to be tested against this
AggregatedNewsFeed for equality
true if this AggregatedNewsFeed is
equal to the specified obj; false
otherwisepublic int hashCode()
Calculates the hashcode of this AggregatedNewsFeed.
hashCode in class NewsFeedAggregatedNewsFeedpublic void add(NewsFeed newsFeed)
Adds a NewsFeed to this AggregatedNewsFeed.
newsFeed - the NewsFeed to addpublic boolean contains(NewsFeed newsFeed)
Returns true if the specified NewsFeed is
aggregated in this AggregatedNewsFeed.
newsFeed - the NewsFeed to test
true if the specified NewsFeed is
aggregated in this AggregatedNewsFeed; false
otherwisepublic NewsFeed[] getNewsFeeds()
Get all NewsFeeds aggregated in this
AggregatedNewsFeed.
NewsFeeds aggregated in this
AggregatedNewsFeedpublic void add(List entries)
Adds the list of NewsFeedEntry feed entries to
this AggregatedNewsFeed.
entries - the list of NewsFeedEntry elements
with the feed entries to addpublic void remove(NewsFeed newsFeed)
Removes the specified NewsFeed from this
AggregatedNewsFeed.
newsFeed - the NewsFeed to removepublic void addToArchive(NewsFeedArchive archive)
Adds this AggregatedNewsFeed to the specified
NewsFeedArchive. This is done by querying a potential
existing ArchivedNewsFeed and adding all
NewsFeedEntry objects to it. If no
ArchivedNewsFeed yet exists in the specified
NewsFeedArchive a new one has to be created and filled
with thisAggregatedNewsFeed's entries.
addToArchive in interface IArchivableaddToArchive in class NewsFeedarchive - the NewsFeedArchive to use for
synchronizationNewsFeedArchivepublic void synchronizeWithArchive(NewsFeedArchive archive)
Synchronizes this AggregatedNewsFeed with the specified
NewsFeedArchive. This is done by reconciling each
embedded NewsFeedEntry with the entries in an archived
ArchivedNewsFeed.
synchronizeWithArchive in interface IArchivablesynchronizeWithArchive in class NewsFeedarchive - the NewsFeedArchive to use for
synchronizationNewsFeedArchive
private void replace(NewsFeed replacedFeed,
NewsFeed replacementFeed)
Replaces replacedFeed with the specified
replacementFeed.
replacedFeed - the NewsFeed to be replacedreplacementFeed - the NewsFeed to act as replacementprivate String createUniqueUrl()
Creates an unique url for this AggregatedNewsFeed.
AggregatedNewsFeed
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||