Ensembl Model v1.09
© Roslin Institute 2010. GNU General Public License, version3
Ensembl Model
v1.09

uk.ac.roslin.ensembl.config
Class RegistryConfiguration

java.lang.Object
  extended by uk.ac.roslin.ensembl.config.RegistryConfiguration

public class RegistryConfiguration
extends Object


Constructor Summary
RegistryConfiguration()
          Constructor for a non-configured RegistryConfiguration object.
RegistryConfiguration(DBConnection.DataSource type)
          Constructs a RegistryConfiguration object after calling setType, which will set the DBConnection if DataSource is of a known valid type.
 
Method Summary
 DBConnection getDb()
          Returns the DBCOnnection object set on this RegistryConfigurationobject, or throws an ConfigurationException if there is no DBConnection set.
 SchemaVersion getSchema()
          Returns the SchemaVersionobject set on this RegistryConfiguration object.
 DBConnection.DataSource getType()
          Returns the current DataSource type of this RegistryConfiguration object.
 void setDBByFile(File dbProperties)
          Sets DBConnection on this RegistryConfiguration object from a given File of Properties.
 void setDBProperties(Properties dbProperties)
          Sets DBConnection on this RegistryConfiguration object from a given set of Properties.
 void setSchemaByFile(File schemaMappings)
          Sets the SchemaVersion object on this RegistryConfiguration object using a File with Properties values.
 void setSchemaProperties(Properties schemaProperties)
          Sets the SchemaVersion object on this RegistryConfiguration object using the given Properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegistryConfiguration

public RegistryConfiguration()
Constructor for a non-configured RegistryConfiguration object. This is not a valid Configuration until a DBConnection object is set.


RegistryConfiguration

public RegistryConfiguration(DBConnection.DataSource type)
                      throws ConfigurationException
Constructs a RegistryConfiguration object after calling setType, which will set the DBConnection if DataSource is of a known valid type. If no further setting of schemaProperties this object will return default configuration values read from properties files in ensembl-config jar.

Parameters:
type - DataSource
Throws:
ConfigurationException
Method Detail

setDBProperties

public void setDBProperties(Properties dbProperties)
                     throws ConfigurationException
Sets DBConnection on this RegistryConfiguration object from a given set of Properties.

Parameters:
dbProperties - Properties
Throws:
ConfigurationException

setSchemaProperties

public void setSchemaProperties(Properties schemaProperties)
                         throws ConfigurationException
Sets the SchemaVersion object on this RegistryConfiguration object using the given Properties.

Parameters:
schemaProperties - Properties
Throws:
ConfigurationException

setDBByFile

public void setDBByFile(File dbProperties)
                 throws ConfigurationException
Sets DBConnection on this RegistryConfiguration object from a given File of Properties.

Parameters:
dbProperties - File
Throws:
ConfigurationException

setSchemaByFile

public void setSchemaByFile(File schemaMappings)
                     throws ConfigurationException
Sets the SchemaVersion object on this RegistryConfiguration object using a File with Properties values.

Parameters:
schemaMappings - File
Throws:
ConfigurationException

getDb

public DBConnection getDb()
                   throws ConfigurationException
Returns the DBCOnnection object set on this RegistryConfigurationobject, or throws an ConfigurationException if there is no DBConnection set.

Returns:
DBConnection
Throws:
ConfigurationException

getSchema

public SchemaVersion getSchema()
                        throws ConfigurationException
Returns the SchemaVersionobject set on this RegistryConfiguration object. If SchemaVersion is unset, it is first initialized to a default version (read from properties file in ensembl-config artifact).

Returns:
SchemaVersion
Throws:
ConfigurationException

getType

public DBConnection.DataSource getType()
Returns the current DataSource type of this RegistryConfiguration object.

Returns:
DataSource

Ensembl Model
v1.09

Ensembl Model v1.09
© Roslin Institute 2010. GNU General Public License, version3