com.revusky.niggle.data
Class AbstractDataSource

java.lang.Object
  |
  +--com.revusky.niggle.data.AbstractDataSource
All Implemented Interfaces:
DataSource, java.rmi.Remote
Direct Known Subclasses:
AbstractMutableDataSource, InMemoryIndex

public abstract class AbstractDataSource
extends java.lang.Object
implements DataSource

A convenient base class for DataSource implementations. Implements some methods that are likely to be used by most.

Author:
Jonathan Revusky

Constructor Summary
AbstractDataSource()
          Our constructor must throw the exception since the superclass's constructor does.
 
Method Summary
 Record get(java.lang.Object key)
          method that exists for backward compatibility This is equivalent to get(null, key);
 java.lang.String getName()
           
 void init(java.util.Properties props)
          TODO
 java.util.List keys()
          This is equivalent to calling keys(null) where no record type is specified.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.revusky.niggle.data.DataSource
close, get, getRecords, keys
 

Constructor Detail

AbstractDataSource

public AbstractDataSource()
                   throws java.io.IOException
Our constructor must throw the exception since the superclass's constructor does.
Method Detail

getName

public java.lang.String getName()
                         throws java.io.IOException
Specified by:
getName in interface DataSource
Following copied from interface: com.revusky.niggle.data.DataSource
Returns:
a unique string by which this DataSource will be known.

init

public void init(java.util.Properties props)
          throws java.io.IOException
TODO
Specified by:
init in interface DataSource

get

public final Record get(java.lang.Object key)
                 throws java.io.IOException
Description copied from interface: DataSource
method that exists for backward compatibility This is equivalent to get(null, key);
Specified by:
get in interface DataSource

keys

public final java.util.List keys()
                          throws java.io.IOException
Description copied from interface: DataSource
This is equivalent to calling keys(null) where no record type is specified.
Specified by:
keys in interface DataSource