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
91
                    -secondary_db_table => $secondary_db_table
                    -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
  $self->linkage_annotation($link_annotation) if defined $link_annotation;

142
143
144
145
146

  return $self;
}


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

Patrick Meidl's avatar
Patrick Meidl committed
149
  Arg [1]    : (optional) String $arg - value to set
Arne Stabenau's avatar
Arne Stabenau committed
150
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
151
152
153
  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
154
155
  Exceptions : none
  Caller     : general
156
  Status     : Stable
Arne Stabenau's avatar
Arne Stabenau committed
157
158
159

=cut

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

168

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

Patrick Meidl's avatar
Patrick Meidl committed
171
  Arg [1]    : (optional) String $arg - value to set
Arne Stabenau's avatar
Arne Stabenau committed
172
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
173
174
175
176
  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
177
178
  Exceptions : none
  Caller     : general
179
  Status     : Stable
180
181
182
183
184
185

=cut

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


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

Patrick Meidl's avatar
Patrick Meidl committed
194
  Args       : none
Arne Stabenau's avatar
Arne Stabenau committed
195
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
196
197
198
199
200
  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
201
202
  Exceptions : none
  Caller     : general
203
  Status     : Stable
Arne Stabenau's avatar
Arne Stabenau committed
204
205
206

=cut

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


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

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

=cut

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

Arne Stabenau's avatar
Arne Stabenau committed
234

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

  Args       : none
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
239
240
241
242
243
  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
244
245
  Exceptions : none
  Caller     : general
246
  Status     : Stable
Arne Stabenau's avatar
Arne Stabenau committed
247
248
249

=cut

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


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

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

=cut

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


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

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

=cut

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


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

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

=cut

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


Patrick Meidl's avatar
Patrick Meidl committed
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
=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();
}


343
344
=head2 primary_id_linkable

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

=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
364

365
366
=head2 display_id_linkable

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

=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
391
  Priority   : Getter/setter for attribute 'priority'. Note this
Glenn Proctor's avatar
Glenn Proctor committed
392
               is the priority from the external_db table.
Patrick Meidl's avatar
Patrick Meidl committed
393
  Returntype : String
394
395
  Exceptions : none
  Caller     : general
396
397
  Status     : At Risk
             : due to it being under development
398
399
400
401
402
403
404
405
406
407
408

=cut

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

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

=head2 db_display_name

  Arg [1]    : String $db_display_name
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
414
415
416
417
  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
418
419
420
421
422
423
424
425
426
  Exceptions : none
  Caller     : general

=cut

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

  my $name;
430
  if ($self->{info_type} && $self->{info_type} eq "PROJECTION") {
431
432
433
434
435
436
437
438
439
440
441
442
443
    $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
444
445
  Description: Getter/setter for attribute 'info_type'.
  Returntype : String
446
447
448
449
450
451
452
453
454
  Exceptions : none
  Caller     : general

=cut

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


=head2 info_text

  Arg [1]    : String $info_text
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
464
465
  Description: Getter/setter for attribute 'info_text'.
  Returntype : String
466
467
468
469
470
471
472
473
474
  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
475
  } 
476
  return $self->{info_text};
Glenn Proctor's avatar
Glenn Proctor committed
477
478
}

479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
=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
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
=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};
}

518
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
=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};
}

557

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

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

=cut


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

Arne Stabenau's avatar
Arne Stabenau committed
578

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

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

=cut

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

594
  my $self = shift;
595
596

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

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

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

=head2 flush_synonyms

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

=cut

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

Arne Stabenau's avatar
Arne Stabenau committed
622

623
624
=head2 status

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

=cut

Arne Stabenau's avatar
Arne Stabenau committed
635

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

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

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

=head2 get_synonyms

  Description: DEPRECATED use get_all_synonyms instead

=cut

sub get_synonyms {
  my $self = shift;

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

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