00001 00002 =head1 LICENSE 00003 00004 Copyright [2009-2014] EMBL-European Bioinformatics Institute 00005 00006 Licensed under the Apache License, Version 2.0 (the "License"); 00007 you may not use this file except in compliance with the License. 00008 You may obtain a copy of the License at 00009 00010 http://www.apache.org/licenses/LICENSE-2.0 00011 00012 Unless required by applicable law or agreed to in writing, software 00013 distributed under the License is distributed on an "AS IS" BASIS, 00014 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00015 See the License for the specific language governing permissions and 00016 limitations under the License. 00017 00018 =cut 00019 00020 =head1 CONTACT 00021 00022 Please email comments or questions to the public Ensembl 00023 developers list at <dev@ensembl.org>. 00024 00025 Questions may also be sent to the Ensembl help desk at 00026 <helpdesk@ensembl.org>. 00027 00028 =cut 00029 00030 =head1 NAME 00031 00032 Bio::EnsEMBL::DBSQL::MetaDataDBAdaptor 00033 00034 =head1 DESCRIPTION 00035 00036 Specialised DBAdaptor for connecting to the ensembl_metadata MySQL database 00037 00038 =head1 SYNOPSIS 00039 00040 # instantiate directly 00041 my $dba = Bio::EnsEMBL::DBSQL::MetaDataDBAdaptor->new(); 00042 00043 # retrieve from Registry 00044 my $dba = Bio::EnsEMBL::Registry->get_DBAdaptor("multi", "metadata"); 00045 00046 # retrieve adaptors 00047 my $adaptor = $dba->get_GenomeInfoAdaptor(); 00048 00049 =head DESCRIPTION 00050 00051 A specialised DBAdaptor allowing connection to a metadata database. 00052 Can be used to retrieve instances of: 00053 Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor 00054 Bio::EnsEMBL::MetaData::DBSQL::DataReleaseInfoAdaptor 00055 Bio::EnsEMBL::MetaData::DBSQL::GenomeComparaInfoAdaptor 00056 Bio::EnsEMBL::MetaData::DBSQL::GenomeOrganismInfoAdaptor 00057 Bio::EnsEMBL::MetaData::DBSQL::GenomeAssemblyInfoAdaptor 00058 Bio::EnsEMBL::MetaData::DBSQL::DatabaseInfoAdaptor 00059 00060 00061 =head1 SEE ALSO 00062 00063 Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor 00064 Bio::EnsEMBL::MetaData::DBSQL::DataReleaseInfoAdaptor 00065 Bio::EnsEMBL::MetaData::DBSQL::GenomeComparaInfoAdaptor 00066 Bio::EnsEMBL::MetaData::DBSQL::GenomeOrganismInfoAdaptor 00067 Bio::EnsEMBL::MetaData::DBSQL::GenomeAssemblyInfoAdaptor 00068 Bio::EnsEMBL::MetaData::DBSQL::DatabaseInfoAdaptor 00069 00070 =head1 AUTHOR 00071 00072 Dan Staines 00073 00074 =cut 00075 00076 package Bio::EnsEMBL::MetaData::DBSQL::MetaDataDBAdaptor; 00077 00078 use strict; 00079 use warnings; 00080 00081 use base qw ( Bio::EnsEMBL::DBSQL::DBAdaptor ); 00082 use Data::Dumper; 00083 00084 use Bio::EnsEMBL::Utils::Exception qw(throw); 00085 00086 =head1 SUBROUTINES/METHODS 00087 00088 =head2 get_available_adaptors 00089 00090 Description : Retrieve all adaptors supported by this database 00091 Returns : Hash of adaptor modules by name 00092 =cut 00093 00094 sub get_available_adaptors { 00095 return { 00096 GenomeInfo => 'Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor', 00097 DataReleaseInfo => 'Bio::EnsEMBL::MetaData::DBSQL::DataReleaseInfoAdaptor', 00098 GenomeComparaInfo => 00099 'Bio::EnsEMBL::MetaData::DBSQL::GenomeComparaInfoAdaptor', 00100 GenomeOrganismInfo => 00101 'Bio::EnsEMBL::MetaData::DBSQL::GenomeOrganismInfoAdaptor', 00102 GenomeAssemblyInfo => 00103 'Bio::EnsEMBL::MetaData::DBSQL::GenomeAssemblyInfoAdaptor', 00104 DatabaseInfo => 00105 'Bio::EnsEMBL::MetaData::DBSQL::DatabaseInfoAdaptor', 00106 EventInfo => 'Bio::EnsEMBL::MetaData::DBSQL::EventInfoAdaptor' }; 00107 } 00108 00109 1; 00110