Interface semper.archive.Database
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface semper.archive.Database

public interface Database
extends Object
A Database defines the interface to a general database. It has methods to fetch, store, delete, update and traverse a database.
Version:
$Revision 1.5 $ $Date:
Author:
Peter Bosch, CWI

Method Index

 o Delete(String)
Delete an entry from the database
 o Modify(String, Date, String, String)
Update an entry with new data
 o ReadAttr(String)
Search the database for key and return the attr associated with the key
 o ReadData(String)
Search the database for key and return the data associated with the key
 o ReadDate(String)
Search the database for key and return the data associated with the key
 o Store(String, Date, String, String)
Stores a new entry in the database
 o Traverse(String, Date, Date)
Traverse the database, returns the next key

Methods

 o Store
  public abstract void Store(String key,
                             Date date,
                             String attr,
                             String data) throws DatabaseException
Stores a new entry in the database
Parameters:
key - Key to store
date - Date at which the field is stored
attr - Security attributes
data - User defined data
Throws: DatabaseException
Error while updating the database
 o Delete
  public abstract void Delete(String key) throws DatabaseException
Delete an entry from the database
Parameters:
key - Key reprenting entry to delete.
Throws: DatabaseException
Error while updating the database
 o ReadDate
  public abstract Date ReadDate(String key) throws DatabaseException
Search the database for key and return the data associated with the key
Parameters:
key - Key reprenting entry to delete.
Returns:
The date stored in the entry.
Throws: DatabaseException
Error while updating the database
 o ReadAttr
  public abstract String ReadAttr(String key) throws DatabaseException
Search the database for key and return the attr associated with the key
Parameters:
key - Key reprenting entry to delete.
Returns:
The attributes stored in the entry.
Throws: DatabaseException
Error while updating the database
 o ReadData
  public abstract String ReadData(String key) throws DatabaseException
Search the database for key and return the data associated with the key
Parameters:
key - Key reprenting entry to delete.
Returns:
The data stored in the entry.
Throws: DatabaseException
Error while updating the database
 o Modify
  public abstract void Modify(String key,
                              Date date,
                              String attr,
                              String data) throws DatabaseException
Update an entry with new data
Parameters:
key - Key to store
date - Date at which the field is stored
attr - Security attributes
data - User defined data
Throws: DatabaseException
Error while updating the database
 o Traverse
  public abstract String[] Traverse(String partialKey,
                                    Date startDate,
                                    Date endDate) throws DatabaseException
Traverse the database, returns the next key
Parameters:
partialKey - Substring of keys to match.
Entries - before startData are not selected
Entries - after endDate are not selected
Returns:
List of keys that match partialKey and are startDate <= d <= endDate
Throws: DatabaseException
Error while updating the database

All Packages  Class Hierarchy  This Package  Previous  Next  Index