org.oreodata
Interface DataRegistry

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
DataRegistryImpl

public interface DataRegistry
extends java.rmi.Remote

The interface implemented by objects that vend "virgin" instances of a Record. A virgin instance is "vended" based on the type passed in as an arguments to the getExemplar() method. This is a creational pattern called the exemplar or canonical object pattern IIRC.

Author:
Jonathan Revusky

Method Summary
 OreoDataSource getDataSource(java.lang.String name)
           
 java.util.List getDataSourceNames()
           
 Record getExemplar(java.lang.String type)
           
 RecordDescriptor getMetadata(java.lang.String type)
          get record Metadata for the type
 java.util.List getRecordNames()
           
 void registerDataSource(DataSourceMetadata dsm)
          register the metadata for a DataSource by its unique name.
 void registerDataSource(OreoDataSource dataSource)
          register a DataSource by its unique name
 void registerDataSourceAlias(java.lang.String alias, DataSourceMetadata dsm)
           
 void registerRecordType(RecordDescriptor descriptor)
          Register the metadata for a record type.
 

Method Detail

registerRecordType

public void registerRecordType(RecordDescriptor descriptor)
                        throws java.io.IOException
Register the metadata for a record type.

java.io.IOException

getExemplar

public Record getExemplar(java.lang.String type)
                   throws java.io.IOException
Returns:
a "virgin" record of the given type
java.io.IOException

getDataSource

public OreoDataSource getDataSource(java.lang.String name)
                             throws java.io.IOException
Returns:
a DataSource by its unique name
java.io.IOException

registerDataSource

public void registerDataSource(OreoDataSource dataSource)
                        throws java.io.IOException
register a DataSource by its unique name

java.io.IOException

registerDataSource

public void registerDataSource(DataSourceMetadata dsm)
                        throws java.io.IOException
register the metadata for a DataSource by its unique name.

java.io.IOException

getMetadata

public RecordDescriptor getMetadata(java.lang.String type)
                             throws java.io.IOException
get record Metadata for the type

java.io.IOException

getRecordNames

public java.util.List getRecordNames()
                              throws java.io.IOException
Returns:
a List of the names of all of the record types that this data registry knows about.
java.io.IOException

getDataSourceNames

public java.util.List getDataSourceNames()
                                  throws java.io.IOException
Returns:
a List of the names of all of the data sources that this data registry knows about.
java.io.IOException

registerDataSourceAlias

public void registerDataSourceAlias(java.lang.String alias,
                                    DataSourceMetadata dsm)
                             throws java.io.IOException
java.io.IOException