net.sourceforge.rssowl.util.archive
Class ArchiveItem

java.lang.Object
  extended bynet.sourceforge.rssowl.util.archive.ArchiveItem

public class ArchiveItem
extends Object

An archive item is a Model Object that stores archive entries. Each archive entry consists of a newstitle, newslink and newsdate. These are used later, to determine which news of the item were read and which are unread. The archive item has a unique identifier: Its feedurl. The file attribute is set to a unique file to save the item later.

Version:
1.1.3
Author:
Benjamin Pasero

Field Summary
private  Vector entries
           
private  Vector entryIDs
           
private  String feedurl
           
private  File file
           
 
Constructor Summary
ArchiveItem(String feedurl)
          Instantiate a new ArchiveItem
 
Method Summary
 void addEntry(ArchiveEntry rssOwlArchiveEntry)
          Add a new archive entry to this archive item
 Vector getEntries()
           
 String getFeedurl()
           
 File getFile()
           
 boolean isNewsRead(String newstitle, String newslink, String newsdate)
          Check if the given newsitem is read or not.
 void removeEntry(ArchiveEntry entry)
          Remove an archive entry from this archive item.
 void removeEntry(String newstitle, String newslink, String newsdate)
          Remove an archive entry from this archive item.
 void setFile(File file)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

entries

private Vector entries

entryIDs

private Vector entryIDs

feedurl

private String feedurl

file

private File file
Constructor Detail

ArchiveItem

public ArchiveItem(String feedurl)
Instantiate a new ArchiveItem

Parameters:
feedurl - The URL of the newsfeed
Method Detail

addEntry

public void addEntry(ArchiveEntry rssOwlArchiveEntry)
Add a new archive entry to this archive item

Parameters:
rssOwlArchiveEntry - The archive entry consists of a newstitle and newslink

getEntries

public Vector getEntries()
Returns:
Returns the entries.

getFeedurl

public String getFeedurl()
Returns:
Returns the feedurl.

getFile

public File getFile()
Returns:
Returns the file.

isNewsRead

public boolean isNewsRead(String newstitle,
                          String newslink,
                          String newsdate)
Check if the given newsitem is read or not. This is simply done by checking, if the newsitem exists as entry in the connected archive item.

Parameters:
newstitle - Title of the news
newslink - Link of the news
newsdate - The publish date of the news
Returns:
TRUE if the news was read

removeEntry

public void removeEntry(ArchiveEntry entry)
Remove an archive entry from this archive item.

Parameters:
entry - The archive entry

removeEntry

public void removeEntry(String newstitle,
                        String newslink,
                        String newsdate)
Remove an archive entry from this archive item.

Parameters:
newstitle - Title of the news
newslink - Link of the news
newsdate - The publish date of the news

setFile

public void setFile(File file)
Parameters:
file - The file to set.

toString

public String toString()
See Also:
Object.toString()


RSSOwl - RSS / RDF / Atom Newsreader

SourceForge.net Logo