Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.ensembl.registry
Class DriverGroup

    java.lang.Object
      org.ensembl.registry.DriverGroup

public class DriverGroup
extends java.lang.Object

All the EnsemblDrivers for a species-release or a compara driver for a release. Configurations for EnsemblDrivers are set via the setXXXConfig() methods. The drivers they define are lazy loaded on demand and then cached. DriverGroups can be retrieved from Registry instances.

Author:
  Craig Melsopp
See Also:
  `Registry`

Constructor Summary
`DriverGroup()` Create a DriverGroup.

Method Summary
`void` | `closeAllConnections()` Closes open database connections on all drivers.
`DriverGroup` | `copy()` Creates a deep copy of this DriverGroup.
`boolean` | `equals(java.lang.Object obj)` Checks if _obj_ is equal to this instance.
`java.util.Properties` | `getComparaConfig()` Configuration for the compara driver.
`ComparaDriver` | `getComparaDriver()` Returns the compara driver if a compara configuration is set.
`java.util.Properties` | `getCoreConfig()` Configuration for the core driver.
`CoreDriver` | `getCoreDriver()` Returns the core driver if a core configuration is set.
`java.util.List` | `getDrivers()` Convenience method returning all drivers in the group.
`java.util.Properties` | `getVariationConfig()` Configuration for the variation driver.
`VariationDriver` | `getVariationDriver()` Returns the variation driver if available.
`boolean` | `hasConfigs()` Convenience method that returns whether at least one of the _configs_ is set.
`int` | `hashCode()` Hash code for this instance.
`void` | `setComparaConfig(java.util.Properties comparaConfig)` Configuration for the compara driver.
`void` | `setCoreConfig(java.util.Properties coreConfig)` Configuration for the core driver.
`void` | `setVariationConfig(java.util.Properties variationConfig)` Configuration for the variation driver.
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### DriverGroup

    public DriverGroup()

  Create a DriverGroup.

Method Detail

### getCoreDriver

    public CoreDriver getCoreDriver()
                             throws AdaptorException

  Returns the core driver if a core configuration is set. Delegates to `CoreDriverFactory.createCoreDriver(coreConfig)` and caches the result.

  Returns:
    core driver if available, otherwise null.
  Throws:
    `AdaptorException` - if a CoreDriver cannot be created from _coreConfig_.
  See Also:
    `CoreDriverFactory`

### getVariationDriver

    public VariationDriver getVariationDriver()
                                       throws AdaptorException

  Returns the variation driver if available. Lazy creates via `VariationDriverFactory.createVariationDriver(variationConfig)` and caches the result. Also sets variationDriver.coreDriver = getCoreDriver().

  Returns:
    variation driver if available, otherwise null.
  Throws:
    `AdaptorException` - if a VariationDriver cannot be created from _variationConfig_.

### getComparaDriver

    public ComparaDriver getComparaDriver()
                                   throws AdaptorException

  Returns the compara driver if a compara configuration is set. Delegates to `ComparaDriverFactory.createComparaDriver(comparaConfig)` and caches the result.

  Returns:
    compara driver if available, otherwise null.
  Throws:
    `AdaptorException` - if a ComparaDriver cannot be created from _comparaConfig_.

### toString

    public java.lang.String toString()

### getComparaConfig

    public java.util.Properties getComparaConfig()

  Configuration for the compara driver.

  Returns:
    Returns the compara driver configuration.

### setComparaConfig

    public void setComparaConfig(java.util.Properties comparaConfig)

  Configuration for the compara driver.

  Parameters:
    `comparaConfig` - new compara configuration.

### getCoreConfig

    public java.util.Properties getCoreConfig()

  Configuration for the core driver.

  Returns:
    Returns the core driver configuration.

### setCoreConfig

    public void setCoreConfig(java.util.Properties coreConfig)

  Configuration for the core driver.

  Parameters:
    `coreConfig` - The core driver configuration to set.

### getVariationConfig

    public java.util.Properties getVariationConfig()

  Configuration for the variation driver.

  Returns:
    Returns the variation configuration.

### setVariationConfig

    public void setVariationConfig(java.util.Properties variationConfig)

  Configuration for the variation driver.

  Parameters:
    `variationConfig` - The variation configuration to set.

### closeAllConnections

    public void closeAllConnections()
                             throws AdaptorException

  Closes open database connections on all drivers.

  Throws:
    `AdaptorException`

### hasConfigs

    public boolean hasConfigs()

  Convenience method that returns whether at least one of the _configs_ is set.

  Returns:
    true if at least one of the _configs_ is not null.

### copy

    public DriverGroup copy()

  Creates a deep copy of this DriverGroup.

  See Also:
    `Object.clone()`

### equals

    public boolean equals(java.lang.Object obj)

  Checks if _obj_ is equal to this instance.

  Returns:
    true if _obj_ is a DriverGroup and has the same configurations.

### hashCode

    public int hashCode()

  Hash code for this instance. The hashcode takes into account the configs.

### getDrivers

    public java.util.List getDrivers()
                              throws AdaptorException

  Convenience method returning all drivers in the group.

  Returns:
    zero or more EnsemblDrivers.
  Throws:
    `AdaptorException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD