DBEntry.pm 14.4 KB
Newer Older
Patrick Meidl's avatar
Patrick Meidl committed
1
package Bio::EnsEMBL::DBEntry;
2

Patrick Meidl's avatar
Patrick Meidl committed
3
=head1 NAME
4

Patrick Meidl's avatar
Patrick Meidl committed
5
6
Bio::EnsEMBL::DBEntry -
Object representing an external reference (xref)
7
8
9

=head1 SYNOPSIS

Patrick Meidl's avatar
Patrick Meidl committed
10

11
12
=head1 DESCRIPTION

Patrick Meidl's avatar
Patrick Meidl committed
13
14
This object holds information about external references (xrefs) to Ensembl
objects.
Graham McVicker's avatar
PODs    
Graham McVicker committed
15

Patrick Meidl's avatar
Patrick Meidl committed
16
=head1 METHODS
17
18


Patrick Meidl's avatar
Patrick Meidl committed
19
=head1 LICENCE
20

Patrick Meidl's avatar
Patrick Meidl committed
21
22
This code is distributed under an Apache style licence. Please see
http://www.ensembl.org/info/about/code_licence.html for details.
23

Patrick Meidl's avatar
Patrick Meidl committed
24
=head1 AUTHOR
25

Patrick Meidl's avatar
Patrick Meidl committed
26
Arne Stabenau <stabenau@ebi.ac.uk>, Ensembl core API team
27

Patrick Meidl's avatar
Patrick Meidl committed
28
=head1 CONTACT
David Barnwell's avatar
David Barnwell committed
29

Patrick Meidl's avatar
Patrick Meidl committed
30
31
Please post comments/questions to the Ensembl development list
<ensembl-dev@ebi.ac.uk>
32

Patrick Meidl's avatar
Patrick Meidl committed
33
=cut
34

35
use strict;
Patrick Meidl's avatar
Patrick Meidl committed
36
use warnings;
Patrick Meidl's avatar
Patrick Meidl committed
37
no warnings qw(uninitialized);
38

Patrick Meidl's avatar
Patrick Meidl committed
39
40
41
42
43
use Bio::EnsEMBL::Storable;
use Bio::Annotation::DBLink;

use Bio::EnsEMBL::Utils::Argument qw(rearrange);
use Bio::EnsEMBL::Utils::Exception qw(deprecate);
44

Patrick Meidl's avatar
Patrick Meidl committed
45
our @ISA = qw(Bio::EnsEMBL::Storable Bio::Annotation::DBLink);
46

47

Graham McVicker's avatar
PODs    
Graham McVicker committed
48
49
=head2 new_fast

Patrick Meidl's avatar
Patrick Meidl committed
50
  Arg [1]    : Hashref $hashref - hash reference to bless as new DBEntry object
Graham McVicker's avatar
PODs    
Graham McVicker committed
51
52
53
54
55
  Description: A very quick constructor that requires internal knowledge of
               the class. This is used in speed critical sections of the code
               where many objects need to be created quickly.
  Returntype : Bio::EnsEMBL::DBEntry
  Exceptions : none
Patrick Meidl's avatar
Patrick Meidl committed
56
  Caller     : general
57
  Status     : Stable
Graham McVicker's avatar
PODs    
Graham McVicker committed
58
59
60

=cut

Graham McVicker's avatar
Graham McVicker committed
61
62
63
sub new_fast {
  my $class = shift;
  my $hashref = shift;
Patrick Meidl's avatar
Patrick Meidl committed
64

Brian Gibbins's avatar
Brian Gibbins committed
65
  bless $hashref, $class;
Patrick Meidl's avatar
Patrick Meidl committed
66

67
  return $hashref;
Graham McVicker's avatar
Graham McVicker committed
68
69
}

Graham McVicker's avatar
PODs    
Graham McVicker committed
70
71
72
73

=head2 new

  Args [...] : list of named parameters 
Patrick Meidl's avatar
Patrick Meidl committed
74
75
76
77
78
79
80
81
82
83
84
85
86
  Example    : my $dbentry = new Bio::EnsEMBL::DBEntry(
                    -adaptor => $adaptor,
                    -primary_id => $pid,
                    -version => $version,
                    -dbname  => $dbname,
                    -release => $release,
                    -display_id => $did,
                    -description => $description,
                    -primary_id_linkable =>$primary_id_linkable,
                    -display_id_linkable =>$display_id_linkable,
                    -priority => $priority,
                    -db_display_name => $db_display_name,
                    -info_type => $info_type,
Glenn Proctor's avatar
Glenn Proctor committed
87
                    -info_text => $info_text,
88
89
                    -type => $type,
                    -secondary_db_name => $secondary_db_name,
90
                    -secondary_db_table => $secondary_db_table
91
		    -linkage_annotation => $object_xref_text);
Graham McVicker's avatar
PODs    
Graham McVicker committed
92
93
94
95
  Description: Creates a new DBEntry object
  Returntype : Bio::EnsEMBL::DBEntry
  Exceptions : none
  Caller     : Bio::EnsEMBL::DBEntryAdaptor
96
  Status     : At Risk
97
               Due to 'PRIMARY_ID_LINKABLE','DISPLAY_ID_LINKABLE','PRIORITY',
98
99
              'INFO_TYPE', 'INFO_TEXT', ''DB_DISPLAY_NAME', 'TYPE',
              'SECONDARY_DB_NAME', 'SECONDARY_DB_TABLE'
Patrick Meidl's avatar
Patrick Meidl committed
100
101
               being under development - if you don't use any of these the
               method can be considered Stable
Graham McVicker's avatar
PODs    
Graham McVicker committed
102
103
104

=cut

105
106
sub new {
  my ($class, @args) = @_;
107
  
108
109
  my $self = bless {},$class;

Arne Stabenau's avatar
Arne Stabenau committed
110
  my ( $adaptor, $dbID, $primary_id, $version,
111
       $dbname, $release, $display_id, $description,
112
       $primary_id_linkable, $display_id_linkable, $priority,
113
       $db_display_name, $info_type, $info_text, $type,
114
       $secondary_db_name, $secondary_db_table, $link_annotation) =
115
    rearrange ( ['ADAPTOR','DBID','PRIMARY_ID','VERSION',
116
                 'DBNAME','RELEASE','DISPLAY_ID','DESCRIPTION',
Glenn Proctor's avatar
Glenn Proctor committed
117
		 'PRIMARY_ID_LINKABLE','DISPLAY_ID_LINKABLE','PRIORITY',
118
		 'DB_DISPLAY_NAME', 'INFO_TYPE', 'INFO_TEXT', 'TYPE',
119
                 'SECONDARY_DB_NAME', 'SECONDARY_DB_TABLE', 'LINKAGE_ANNOTATION'], @args );
120
121
122
123

  $self->{'adaptor'} = $adaptor;
  $self->{'dbID'}    = $dbID;

124
  if( defined $primary_id ) { $self->primary_id( $primary_id ) }
Arne Stabenau's avatar
Arne Stabenau committed
125
126
  if( defined $version ) { $self->version( $version ) } else
    { $self->version( "" ); }
127
128
  if( defined $dbname ) { $self->dbname( $dbname ) }
  if( defined $release) { $self->release( $release ) }
129
  if( defined $display_id) { $self->display_id( $display_id ) }
130
  if( defined $description) { $self->description($description) }
131
132
133
  if( defined $primary_id_linkable) { $self->primary_id_linkable($primary_id_linkable) }
  if( defined $display_id_linkable) { $self->display_id_linkable($display_id_linkable) }
  if( defined $priority) { $self->priority($priority) }
Glenn Proctor's avatar
Glenn Proctor committed
134
  if( defined $db_display_name) { $self->db_display_name($db_display_name) }
135
136
  if( defined $info_type) { $self->info_type($info_type) }
  if( defined $info_text) { $self->info_text($info_text) }
Glenn Proctor's avatar
Glenn Proctor committed
137
  if( defined $type) { $self->type($type) }
138
139
  if( defined $secondary_db_name) { $self->secondary_db_name($secondary_db_name) }
  if( defined $secondary_db_table) { $self->secondary_db_table($secondary_db_table) }
140

141
142
  $self->linkage_annotation($link_annotation) if defined $link_annotation;

143
144
145
146
147

  return $self;
}


Arne Stabenau's avatar
Arne Stabenau committed
148
149
=head2 primary_id

Patrick Meidl's avatar
Patrick Meidl committed
150
  Arg [1]    : (optional) String $arg - value to set
Arne Stabenau's avatar
Arne Stabenau committed
151
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
152
153
154
  Description: Getter/setter for attribute 'primary_id'.
               This is the object's primary id in the external database.
  Returntype : String
Arne Stabenau's avatar
Arne Stabenau committed
155
156
  Exceptions : none
  Caller     : general
157
  Status     : Stable
Arne Stabenau's avatar
Arne Stabenau committed
158
159
160

=cut

161
162
163
sub primary_id {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
164
    $self->{primary_id} = $arg;
165
  } 
166
  return $self->{primary_id};
167
168
}

169

Arne Stabenau's avatar
Arne Stabenau committed
170
=head2 display_id
171

Patrick Meidl's avatar
Patrick Meidl committed
172
  Arg [1]    : (optional) String $arg - value to set
Arne Stabenau's avatar
Arne Stabenau committed
173
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
174
175
176
177
  Description: Getter/setter for attribute 'display_id'.
               The object's preferred display name. This can be the same
               as primary_id or ensembl-specific.
  Returntype : String
Arne Stabenau's avatar
Arne Stabenau committed
178
179
  Exceptions : none
  Caller     : general
180
  Status     : Stable
181
182
183
184
185
186

=cut

sub display_id{
   my ( $self, $arg ) = @_;
   if( defined $arg ) {
187
       $self->{display_id} = $arg;
188
   } 
189
   return $self->{display_id};
190
191
192
}


Patrick Meidl's avatar
Patrick Meidl committed
193
=head2 optional_id
Graham McVicker's avatar
PODs    
Graham McVicker committed
194

Patrick Meidl's avatar
Patrick Meidl committed
195
  Args       : none
Arne Stabenau's avatar
Arne Stabenau committed
196
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
197
198
199
200
201
  Description: Additional getter for attribute 'display_id'.
               The object's preferred display name.
               Only include for BioPerl interface compliance, please use
               $self->display_id().
  Returntype : String
Arne Stabenau's avatar
Arne Stabenau committed
202
203
  Exceptions : none
  Caller     : general
204
  Status     : Stable
Arne Stabenau's avatar
Arne Stabenau committed
205
206
207

=cut

Patrick Meidl's avatar
Patrick Meidl committed
208
209
210
sub optional_id {
  my $self = shift;
  return $self->display_id;
211
212
213
}


Patrick Meidl's avatar
Patrick Meidl committed
214
=head2 dbname
Graham McVicker's avatar
PODs    
Graham McVicker committed
215

Patrick Meidl's avatar
Patrick Meidl committed
216
  Arg [1]    : (optional) String $arg - value to set
Arne Stabenau's avatar
Arne Stabenau committed
217
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
218
219
220
  Description: Getter/setter for attribute 'dbname'.
               The name of the external database.
  Returntype : String
Arne Stabenau's avatar
Arne Stabenau committed
221
222
  Exceptions : none
  Caller     : general
223
  Status     : Stable
Arne Stabenau's avatar
Arne Stabenau committed
224
225
226

=cut

Patrick Meidl's avatar
Patrick Meidl committed
227
228
229
230
231
232
sub dbname {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
    $self->{dbname} = $arg;
  } 
  return $self->{dbname};
233
234
}

Arne Stabenau's avatar
Arne Stabenau committed
235

Patrick Meidl's avatar
Patrick Meidl committed
236
=head2 database
Arne Stabenau's avatar
Arne Stabenau committed
237
238
239

  Args       : none
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
240
241
242
243
244
  Description: Additional getter for attribute 'dbname'.
               The name of the external database.
               Only include for BioPerl interface compliance, please use
               $self->dbname().
  Returntype : String
Arne Stabenau's avatar
Arne Stabenau committed
245
246
  Exceptions : none
  Caller     : general
247
  Status     : Stable
Arne Stabenau's avatar
Arne Stabenau committed
248
249
250

=cut

Patrick Meidl's avatar
Patrick Meidl committed
251
sub database {
252
  my $self = shift;
Patrick Meidl's avatar
Patrick Meidl committed
253
  return $self->dbname();
254
255
256
}


Arne Stabenau's avatar
Arne Stabenau committed
257
258
=head2 release

Patrick Meidl's avatar
Patrick Meidl committed
259
  Arg [1]    : (optional) String $arg - value to set
Arne Stabenau's avatar
Arne Stabenau committed
260
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
261
262
263
  Description: Getter/setter for attribute 'release'.
               The external database release name.
  Returntype : String
Arne Stabenau's avatar
Arne Stabenau committed
264
265
  Exceptions : none
  Caller     : general
266
  Status     : Stable
Arne Stabenau's avatar
Arne Stabenau committed
267
268
269

=cut

270
271
272
sub release {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
273
    $self->{release} = $arg;
274
  } 
275
  return $self->{release};
276
277
278
}


Arne Stabenau's avatar
Arne Stabenau committed
279
280
=head2 version

Patrick Meidl's avatar
Patrick Meidl committed
281
  Arg [1]    : (optional) String $arg - value to set
Arne Stabenau's avatar
Arne Stabenau committed
282
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
283
284
285
  Description: Getter/setter for attribute 'version'.
               The object's version in the external database.
  Returntype : String
Arne Stabenau's avatar
Arne Stabenau committed
286
287
  Exceptions : none
  Caller     : general
288
  Status     : Stable
Arne Stabenau's avatar
Arne Stabenau committed
289
290
291

=cut

292
293
294
sub version {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
295
    $self->{version} = $arg;
296
  } 
297
  return $self->{version};
298
299
300
}


Arne Stabenau's avatar
Arne Stabenau committed
301
302
=head2 description

Patrick Meidl's avatar
Patrick Meidl committed
303
  Arg [1]    : (optional) String $arg - value to set
Arne Stabenau's avatar
Arne Stabenau committed
304
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
305
  Description: Getter/setter for attribute 'description'.
306
               The object's description, from the external_db table
Patrick Meidl's avatar
Patrick Meidl committed
307
  Returntype : String
Arne Stabenau's avatar
Arne Stabenau committed
308
309
  Exceptions : none
  Caller     : general
310
  Status     : Stable
Arne Stabenau's avatar
Arne Stabenau committed
311
312
313

=cut

314
315
316
sub description {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
317
    $self->{description} = $arg;
318
  } 
319
  return $self->{description};
320
321
322
}


Patrick Meidl's avatar
Patrick Meidl committed
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
=head2 comment

  Args       : none
  Example    : none
  Description: Additional getter for attribute 'description'.
               The object's description.
               Only include for BioPerl interface compliance, please use
               $self->description().
  Returntype : String
  Exceptions : none
  Caller     : general
  Status     : Stable

=cut

sub comment {
  my $self = shift;
  return $self->description();
}


344
345
=head2 primary_id_linkable

Patrick Meidl's avatar
Patrick Meidl committed
346
  Arg [1]    : (optional) Boolean $arg - value to set
347
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
348
349
  Description: Getter/setter for attribute 'primary_id_linkable'.
  Returntype : String
350
351
  Exceptions : none
  Caller     : general
352
353
  Status     : At Risk
             : due to it being under development
354
355
356
357
358
359
360
361
362
363
364

=cut

sub primary_id_linkable {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
    $self->{primary_id_linkable} = $arg;
  } 
  return $self->{primary_id_linkable};
}

Patrick Meidl's avatar
Patrick Meidl committed
365

366
367
=head2 display_id_linkable

Patrick Meidl's avatar
Patrick Meidl committed
368
  Arg [1]    : (optional) Boolean $arg - value to set
369
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
370
371
  Description: Getter/setter for attribute 'display_id_linkable'.
  Returntype : String
372
373
  Exceptions : none
  Caller     : general
374
375
  Status     : At Risk
             : due to it being under development
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391

=cut

sub display_id_linkable {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
    $self->{display_id_linkable} = $arg;
  } 
  return $self->{display_id_linkable};
}


=head2 priority

  Arg [1]    : int $priority
  Example    : none
392
  Priority   : Getter/setter for attribute 'priority'. Note this
Glenn Proctor's avatar
Glenn Proctor committed
393
               is the priority from the external_db table.
Patrick Meidl's avatar
Patrick Meidl committed
394
  Returntype : String
395
396
  Exceptions : none
  Caller     : general
397
398
  Status     : At Risk
             : due to it being under development
399
400
401
402
403
404
405
406
407
408
409

=cut

sub priority {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
    $self->{priority} = $arg;
  } 
  return $self->{priority};
}

Glenn Proctor's avatar
Glenn Proctor committed
410
411
412
413
414

=head2 db_display_name

  Arg [1]    : String $db_display_name
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
415
416
417
418
  Description: Getter/setter for attribute 'db_display_name'.
               The preferred display name for the external database. Has
               "Projected " prepended if info_type='PROJECTION'.
  Returntype : String
Glenn Proctor's avatar
Glenn Proctor committed
419
420
421
422
423
424
425
426
427
  Exceptions : none
  Caller     : general

=cut

sub db_display_name {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
    $self->{db_display_name} = $arg;
428
429
430
  }

  my $name;
431
  if ($self->{info_type} && $self->{info_type} eq "PROJECTION") {
432
433
434
435
436
437
438
439
440
441
442
443
444
    $name = "Projected " . $self->{db_display_name};
  } else {
    $name =  $self->{db_display_name};
  }

  return $name;
}


=head2 info_type

  Arg [1]    : String $info_type
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
445
446
  Description: Getter/setter for attribute 'info_type'.
  Returntype : String
447
448
449
450
451
452
453
454
455
  Exceptions : none
  Caller     : general

=cut

sub info_type {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
    $self->{info_type} = $arg;
456
  }
457
  return $self->{info_type};
Glenn Proctor's avatar
Glenn Proctor committed
458
 }
459
460
461
462
463
464


=head2 info_text

  Arg [1]    : String $info_text
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
465
466
  Description: Getter/setter for attribute 'info_text'.
  Returntype : String
467
468
469
470
471
472
473
474
475
  Exceptions : none
  Caller     : general

=cut

sub info_text {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
    $self->{info_text} = $arg;
Glenn Proctor's avatar
Glenn Proctor committed
476
  } 
477
  return $self->{info_text};
Glenn Proctor's avatar
Glenn Proctor committed
478
479
}

480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
=head2 linkage_annotation

  Arg [1]    : String $object_xref_text
  Example    : none
  Description: Getter/setter for attribute 'linkage_annotation'.
  Returntype : String
  Exceptions : none
  Caller     : general

=cut

sub linkage_annotation {
  my ( $self, $arg ) = @_;

  $self->{linkage_annotation} = $arg if defined $arg;
  
  return $self->{linkage_annotation};
}


Glenn Proctor's avatar
Glenn Proctor committed
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
=head2 type

  Arg [1]    : String $type
  Example    : none
  Description: Getter/setter for attribute 'type'.
  Returntype : String
  Exceptions : none
  Caller     : general

=cut

sub type {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
    $self->{type} = $arg;
  }
  return $self->{type};
}

519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
=head2 secondary_db_name

  Arg [1]    : String $secondary_db_name
  Example    : none
  Description: Getter/setter for attribute 'secondary_db_name'.
  Returnsecondary_db_name : String
  Exceptions : none
  Caller     : general

=cut

sub secondary_db_name {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
    $self->{secondary_db_name} = $arg;
  }
  return $self->{secondary_db_name};
}


=head2 secondary_db_table

  Arg [1]    : String $secondary_db_table
  Example    : none
  Description: Getter/setter for attribute 'secondary_db_table'.
  Returnsecondary_db_table : String
  Exceptions : none
  Caller     : general

=cut

sub secondary_db_table {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
    $self->{secondary_db_table} = $arg;
  }
  return $self->{secondary_db_table};
}

558

Arne Stabenau's avatar
Arne Stabenau committed
559
560
=head2 add_synonym

Patrick Meidl's avatar
Patrick Meidl committed
561
  Arg [1]    : String $arg - synonym to add
Arne Stabenau's avatar
Arne Stabenau committed
562
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
563
  Description: Add a synonym for the external object.
Arne Stabenau's avatar
Arne Stabenau committed
564
565
566
  Returntype : none
  Exceptions : none
  Caller     : general
567
  Status     : Stable
Arne Stabenau's avatar
Arne Stabenau committed
568
569
570
571

=cut


572
573
574
sub add_synonym {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
575
    push( @{$self->{synonyms}}, $arg );
576
577
578
  }
}

Arne Stabenau's avatar
Arne Stabenau committed
579

Graham McVicker's avatar
Graham McVicker committed
580
=head2 get_all_synonyms
Arne Stabenau's avatar
Arne Stabenau committed
581
582

  Args       : none
Patrick Meidl's avatar
Patrick Meidl committed
583
584
  Example    : my @synonyms = @{ $db_entry->get_all_synonyms };
  Description: Get a list of synonyms known for this object.
585
586
               Synonyms are lazy-loaded if required.
  Returntype : listref of strings. May be empty.
Arne Stabenau's avatar
Arne Stabenau committed
587
588
  Exceptions : none
  Caller     : general
589
  Status     : Stable
Arne Stabenau's avatar
Arne Stabenau committed
590
591
592

=cut

Graham McVicker's avatar
Graham McVicker committed
593
sub get_all_synonyms {
594

595
  my $self = shift;
596
597

  # lazy-load synonyms if required
Ian Longden's avatar
Ian Longden committed
598
  if (!$self->{synonyms} && $self->{adaptor}) {
599
600
601
    $self->{synonyms} = $self->{adaptor}->fetch_all_synonyms($self->dbID());
  }

602
  return $self->{synonyms};
603
604
}

Arne Stabenau's avatar
Arne Stabenau committed
605
606
607
608
609

=head2 flush_synonyms

  Args       : none
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
610
  Description: Remove all synonyms from this object.
Arne Stabenau's avatar
Arne Stabenau committed
611
612
613
  Returntype : none
  Exceptions : none
  Caller     : general
614
  Status     : Stable
Arne Stabenau's avatar
Arne Stabenau committed
615
616
617

=cut

618
619
sub flush_synonyms {
  my $self = shift;
620
  $self->{synonyms} = [];
621
622
}

Arne Stabenau's avatar
Arne Stabenau committed
623

624
625
=head2 status

Patrick Meidl's avatar
Patrick Meidl committed
626
  Arg [1]    : (optional) String $arg - value to set
Arne Stabenau's avatar
Arne Stabenau committed
627
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
628
629
  Description: Getter/setter for attribute 'status'.
  Returntype : String
Arne Stabenau's avatar
Arne Stabenau committed
630
631
  Exceptions : none
  Caller     : general
632
  Status     : Stable
633
634
635

=cut

Arne Stabenau's avatar
Arne Stabenau committed
636

637
sub status{
Patrick Meidl's avatar
Patrick Meidl committed
638
639
640
641
642
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
     $self->{status} = $arg;
  } 
  return $self->{status};
643
644
}

Graham McVicker's avatar
Graham McVicker committed
645
646
647
=head1 DEPRECATED METHODS

=cut
Graham McVicker's avatar
Graham McVicker committed
648
649
650
651
652
653
654
655
656
657

=head2 get_synonyms

  Description: DEPRECATED use get_all_synonyms instead

=cut

sub get_synonyms {
  my $self = shift;

658
  deprecate("get_synonyms has been renamed get_all_synonyms.");
Graham McVicker's avatar
Graham McVicker committed
659
660
661
  return $self->get_all_synonyms;
}

662
1;
Patrick Meidl's avatar
Patrick Meidl committed
663