Bio::Das::ProServer::SourceHydra - A runtime factory for B::D::P::SourceAdaptors


Bio-Das-ProServer documentation  | view source Contained in the Bio-Das-ProServer distribution.

Index


NAME

Top

Bio::Das::ProServer::SourceHydra - A runtime factory for B::D::P::SourceAdaptors

VERSION

Top

$Revision: 549 $

SYNOPSIS

Top

  Inherit and extend this class to provide hydra implementations

AUTHOR

Top

Roger Pettett <rmp@sanger.ac.uk>.

LICENSE AND COPYRIGHT

Top

DESCRIPTION

Top

The SourceHydra's role is to clone a series of SourceAdaptors of the same type but each configured in a (systematically) different way, but with only one configuration file section.

For example the hydra is pivotal in the Ensembl upload service where each data upload is of the same structure and loaded into a numbered table in a database. In order to provide a valid DSN for each uploaded source, the hydra then clones a series of dbi-based sources, pointing them all at the upload database but each one at a different table.

The hydra can also be useful in situations such as the provision of similar sources for different species where the data are in different databases but have the same structure in each.

SUBROUTINES/METHODS

Top

new : Constructor

  my $hydra = Bio::Das::ProServer::SourceHydra->new({
    'config' => $cfg, # The config section for this hydra
    'debug'  => $dbg, # Boolean debug flag
  });

init : Post-construction initialisation method

  Implemented in subclasses if necessary (not usually)

transport : Build the relevant transport configured for this adaptor

  my $transport = $hydra->transport();

config : Accessor for config section for this hydra (set at construction)

  my $cfg = $hydra->config();

sources : Implemented in subclasses - returns an of source names

  my @sources = $hydra->sources();

CONFIGURATION AND ENVIRONMENT

Top

 Configure in proserver.ini using:
   hydra = <impl>

DIAGNOSTICS

Top

Set $self->{'debug'} = 1; Or B::D::P::SourceHydra::impl->new({'debug'=>1});

DEPENDENCIES

Top

  Bio::Das::ProServer::SourceAdaptor

INCOMPATIBILITIES

Top

BUGS AND LIMITATIONS

Top


Bio-Das-ProServer documentation  | view source Contained in the Bio-Das-ProServer distribution.