edu.stanford.nlp.database
Class DummyDB

java.lang.Object
  |
  +--edu.stanford.nlp.database.DummyDB
All Implemented Interfaces:
SimpleDatabase

public class DummyDB
extends Object
implements SimpleDatabase

Database class which does nothing


Constructor Summary
DummyDB()
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DummyDB

public DummyDB()
Method Detail

size

public int size()
Returns number of elements in database

Specified by:
size in interface SimpleDatabase

put

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

Specified by:
put in interface SimpleDatabase
IOException

get

public Object get(Object key)
Gets Object from database

Specified by:
get in interface SimpleDatabase

remove

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

Specified by:
remove in interface SimpleDatabase
IOException

toString

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

Specified by:
toString in interface SimpleDatabase
Overrides:
toString in class Object

toVerboseString

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

Specified by:
toVerboseString in interface SimpleDatabase

toXMLString

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

Specified by:
toXMLString in interface SimpleDatabase

toVerboseXMLString

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

Specified by:
toVerboseXMLString in interface SimpleDatabase

keys

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

Specified by:
keys in interface SimpleDatabase

values

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

Specified by:
values in interface SimpleDatabase


Stanford NLP Group