edu.stanford.nlp.database
Interface SimpleDatabase

All Known Implementing Classes:
AbstractSimpleDatabase, DummyDB

public interface SimpleDatabase

Interface for databases which store and retrieve key-value pairs


Method Summary
 Object get(Object key)
          Gets Object from database
 Iterator keys()
          Returns an Iterator over keys in database
 void put(Object key, Object value)
          Inserts Object into database
 void remove(Object key)
          Removes Object from database
 int size()
          Returns number of elements in database
 String toString()
          Returns String representation of database.
 String toVerboseString()
          Returns Verbose String representation of database that enumerates the contents of the database
 String toVerboseXMLString()
          Returns a verbose XML reprentation of database that enumerates the contents of the database
 String toXMLString()
          Returns an XML representation of database.
 Iterator values()
          Returns an Iterator over values in database
 

Method Detail

size

public int size()
Returns number of elements in database


put

public void put(Object key,
                Object value)
         throws IOException
Inserts Object into database

IOException

get

public Object get(Object key)
           throws IOException
Gets Object from database

IOException

remove

public void remove(Object key)
            throws IOException
Removes Object from database

IOException

toString

public String toString()
Returns String representation of database. Often it will be of the form: filename: /nlp/sdkamvar/sample.db type: SLJDB

Overrides:
toString in class Object

toVerboseString

public String toVerboseString()
Returns Verbose String representation of database that enumerates the contents of the database


toXMLString

public String toXMLString()
Returns an XML representation of database. Often it will be of the form: /nlp/sdkamvar/sample.db SLJDB


toVerboseXMLString

public String toVerboseXMLString()
Returns a verbose XML reprentation of database that enumerates the contents of the database


keys

public Iterator keys()
Returns an Iterator over keys in database


values

public Iterator values()
Returns an Iterator over values in database



Stanford NLP Group