3 See the NOTICE file distributed with
this work
for additional information
4 regarding copyright ownership.
6 Licensed under the Apache License, Version 2.0 (the
"License");
7 you may not use
this file except in compliance with the License.
8 You may obtain a copy of the License at
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an
"AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License
for the specific language governing permissions and
16 limitations under the License.
23 Please email comments or questions to the
public Ensembl
24 developers list at <http:
26 Questions may also be sent to the Ensembl help desk at
34 Object representing an alternatice name.
40 This
object holds information
about alternative name to
47 package Bio::EnsEMBL::SeqRegionSynonym;
51 no warnings qw(uninitialized);
54 use Bio::Annotation::DBLink;
62 Args [...] : list of named parameters
65 -synonym => $alt_name,
66 -external_db_id => 1234
67 -seq_region_id => 12);
71 Caller : Bio::EnsEMBL::SeqRegionSynonymAdaptor
76 my ($class, @args) = @_;
78 my $self = bless {},$class;
80 my ( $adaptor, $synonym, $ex_db, $seq_region_id, $dbid, $dbname, $db_display_name) =
81 rearrange ( [
'ADAPTOR',
'SYNONYM',
'EXTERNAL_DB_ID',
'SEQ_REGION_ID',
'DBID',
'DBNAME',
'DB_DISPLAY_NAME'], @args );
83 $self->adaptor($adaptor);
85 if( defined $ex_db ) { $self->external_db_id( $ex_db ) } ;
86 if( defined $seq_region_id ) { $self->seq_region_id( $seq_region_id ) } ;
87 if (defined $dbid) { $self->{
'dbID'} = $dbid} ;
88 if (defined $dbname) { $self->{
'dbname'} = $dbname };
89 if (defined $db_display_name) { $self->{
'db_display_name'} = $db_display_name };
91 if( defined $synonym ) {
92 $self->name( $synonym ) ;
94 warn
"No alternative name given\n";
103 $self->{
'name'} = shift
if(@_);
104 return $self->{
'name'};
109 $self->{
'ex_db'} = shift
if(@_);
110 return $self->{
'ex_db'};
115 $self->{
'seq_region_id'} = shift
if(@_);
116 return $self->{
'seq_region_id'};
121 $self->{
'dbname'} = shift
if(@_);
122 return $self->{
'dbname'};
125 sub db_display_name {
127 $self->{
'db_display_name'} = shift
if(@_);
128 return $self->{
'db_display_name'};
131 sub summary_as_hash {
134 $summary{name} = $self->name;
135 $summary{dbname} = $self->dbname;