net.sourceforge.rssowl.util.archive
Class ArchiveIndex

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

public class ArchiveIndex
extends Object

The index of the archive contains of a simple Hashtable that holds keys and values: - Key: Unique feedurl - Value: Unique filename Any feedurl from the index points to the file that stores the archive item of the feedurl.

Version:
1.1.3
Author:
Benjamin Pasero

Field Summary
private  ArchiveManager archiveManager
           
private  Hashtable index
           
 
Constructor Summary
ArchiveIndex(ArchiveManager archiveManager)
          Instantiate a new ArchiveIndex
 
Method Summary
 void addIndex(String key, String value)
          Add a new item to the index
 Enumeration getKeys()
           
 String getValue(String key)
          Get the value for the given key
 void removeIndex(Object key)
          Remove an item from the index
 void syncFileName(ArchiveItem archiveItem)
          Synchronise the filename for the archiv item with the index.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

archiveManager

private ArchiveManager archiveManager

index

private Hashtable index
Constructor Detail

ArchiveIndex

public ArchiveIndex(ArchiveManager archiveManager)
Instantiate a new ArchiveIndex

Parameters:
archiveManager - The archiv manager
Method Detail

addIndex

public void addIndex(String key,
                     String value)
Add a new item to the index

Parameters:
key - The feedurl
value - The filename of the archive item

getKeys

public Enumeration getKeys()
Returns:
Enumeration Get the Keys of the index

getValue

public String getValue(String key)
Get the value for the given key

Parameters:
key - Any existing feedurl of the index
Returns:
String The filename of the archive item

removeIndex

public void removeIndex(Object key)
Remove an item from the index

Parameters:
key - The key identifier for the item

syncFileName

public void syncFileName(ArchiveItem archiveItem)
Synchronise the filename for the archiv item with the index. If the archiv item is new to the index, create a new unique file and tell the index.

Parameters:
archiveItem - An archive item

toString

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


RSSOwl - RSS / RDF / Atom Newsreader

SourceForge.net Logo