DBEntry.pm 15 KB
Newer Older
1
=head1 LICENSE
2

3
4
  Copyright (c) 1999-2009 The European Bioinformatics Institute and
  Genome Research Limited.  All rights reserved.
5

6
7
  This software is distributed under a modified Apache license.
  For license details, please see
8

9
    http://www.ensembl.org/info/about/code_licence.html
Patrick Meidl's avatar
Patrick Meidl committed
10

11
=head1 CONTACT
12

13
14
  Please email comments or questions to the public Ensembl
  developers list at <ensembl-dev@ebi.ac.uk>.
Graham McVicker's avatar
PODs  
Graham McVicker committed
15

16
17
  Questions may also be sent to the Ensembl help desk at
  <helpdesk@ensembl.org>.
18

19
=cut
20

21
=head1 NAME
22

23
24
Bio::EnsEMBL::DBEntry -
Object representing an external reference (xref)
25

26
=head1 SYNOPSIS
27

28
=head1 DESCRIPTION
29

30
31
This object holds information about external references (xrefs) to
Ensembl objects.
David Barnwell's avatar
David Barnwell committed
32

33
=head1 METHODS
34

Patrick Meidl's avatar
Patrick Meidl committed
35
=cut
36

37
38
package Bio::EnsEMBL::DBEntry;

39
use strict;
Patrick Meidl's avatar
Patrick Meidl committed
40
use warnings;
Patrick Meidl's avatar
Patrick Meidl committed
41
no warnings qw(uninitialized);
42

Patrick Meidl's avatar
Patrick Meidl committed
43
44
45
46
47
use Bio::EnsEMBL::Storable;
use Bio::Annotation::DBLink;

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

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

51

Graham McVicker's avatar
PODs  
Graham McVicker committed
52
53
=head2 new_fast

Patrick Meidl's avatar
Patrick Meidl committed
54
  Arg [1]    : Hashref $hashref - hash reference to bless as new DBEntry object
Graham McVicker's avatar
PODs  
Graham McVicker committed
55
56
57
58
59
  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
60
  Caller     : general
61
  Status     : Stable
Graham McVicker's avatar
PODs  
Graham McVicker committed
62
63
64

=cut

Graham McVicker's avatar
Graham McVicker committed
65
66
67
sub new_fast {
  my $class = shift;
  my $hashref = shift;
Patrick Meidl's avatar
Patrick Meidl committed
68

Brian Gibbins's avatar
Brian Gibbins committed
69
  bless $hashref, $class;
Patrick Meidl's avatar
Patrick Meidl committed
70

71
  return $hashref;
Graham McVicker's avatar
Graham McVicker committed
72
73
}

Graham McVicker's avatar
PODs  
Graham McVicker committed
74
75
76
77

=head2 new

  Args [...] : list of named parameters 
Patrick Meidl's avatar
Patrick Meidl committed
78
79
80
81
82
83
84
85
86
87
88
89
90
  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
91
                    -info_text => $info_text,
92
93
                    -type => $type,
                    -secondary_db_name => $secondary_db_name,
94
                    -secondary_db_table => $secondary_db_table
95
		    -linkage_annotation => $object_xref_text);
Graham McVicker's avatar
PODs  
Graham McVicker committed
96
97
98
99
  Description: Creates a new DBEntry object
  Returntype : Bio::EnsEMBL::DBEntry
  Exceptions : none
  Caller     : Bio::EnsEMBL::DBEntryAdaptor
100
  Status     : At Risk
101
               Due to 'PRIMARY_ID_LINKABLE','DISPLAY_ID_LINKABLE','PRIORITY',
102
103
              'INFO_TYPE', 'INFO_TEXT', ''DB_DISPLAY_NAME', 'TYPE',
              'SECONDARY_DB_NAME', 'SECONDARY_DB_TABLE'
Patrick Meidl's avatar
Patrick Meidl committed
104
105
               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
106
107
108

=cut

109
110
sub new {
  my ($class, @args) = @_;
111
  
112
113
  my $self = bless {},$class;

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

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

128
  if( defined $primary_id ) { $self->primary_id( $primary_id ) }
Arne Stabenau's avatar
Arne Stabenau committed
129
130
  if( defined $version ) { $self->version( $version ) } else
    { $self->version( "" ); }
131
132
  if( defined $dbname ) { $self->dbname( $dbname ) }
  if( defined $release) { $self->release( $release ) }
133
  if( defined $display_id) { $self->display_id( $display_id ) }
134
  if( defined $description) { $self->description($description) }
135
136
137
  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
138
  if( defined $db_display_name) { $self->db_display_name($db_display_name) }
139
140
  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
141
  if( defined $type) { $self->type($type) }
142
143
  if( defined $secondary_db_name) { $self->secondary_db_name($secondary_db_name) }
  if( defined $secondary_db_table) { $self->secondary_db_table($secondary_db_table) }
144

145
  $self->linkage_annotation($link_annotation) if defined $link_annotation;
146
  $self->analysis($analysis) if defined $analysis;
147

148
149
150
151
152

  return $self;
}


Arne Stabenau's avatar
Arne Stabenau committed
153
154
=head2 primary_id

Patrick Meidl's avatar
Patrick Meidl committed
155
  Arg [1]    : (optional) String $arg - value to set
Arne Stabenau's avatar
Arne Stabenau committed
156
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
157
158
159
  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
160
161
  Exceptions : none
  Caller     : general
162
  Status     : Stable
Arne Stabenau's avatar
Arne Stabenau committed
163
164
165

=cut

166
167
168
sub primary_id {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
169
    $self->{primary_id} = $arg;
170
  } 
171
  return $self->{primary_id};
172
173
}

174

Arne Stabenau's avatar
Arne Stabenau committed
175
=head2 display_id
176

Patrick Meidl's avatar
Patrick Meidl committed
177
  Arg [1]    : (optional) String $arg - value to set
Arne Stabenau's avatar
Arne Stabenau committed
178
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
179
180
181
182
  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
183
184
  Exceptions : none
  Caller     : general
185
  Status     : Stable
186
187
188
189
190
191

=cut

sub display_id{
   my ( $self, $arg ) = @_;
   if( defined $arg ) {
192
       $self->{display_id} = $arg;
193
   } 
194
   return $self->{display_id};
195
196
197
}


Patrick Meidl's avatar
Patrick Meidl committed
198
=head2 optional_id
Graham McVicker's avatar
PODs  
Graham McVicker committed
199

Patrick Meidl's avatar
Patrick Meidl committed
200
  Args       : none
Arne Stabenau's avatar
Arne Stabenau committed
201
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
202
203
204
205
206
  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
207
208
  Exceptions : none
  Caller     : general
209
  Status     : Stable
Arne Stabenau's avatar
Arne Stabenau committed
210
211
212

=cut

Patrick Meidl's avatar
Patrick Meidl committed
213
214
215
sub optional_id {
  my $self = shift;
  return $self->display_id;
216
217
218
}


Patrick Meidl's avatar
Patrick Meidl committed
219
=head2 dbname
Graham McVicker's avatar
PODs  
Graham McVicker committed
220

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

=cut

Patrick Meidl's avatar
Patrick Meidl committed
232
233
234
235
236
237
sub dbname {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
    $self->{dbname} = $arg;
  } 
  return $self->{dbname};
238
239
}

Arne Stabenau's avatar
Arne Stabenau committed
240

Patrick Meidl's avatar
Patrick Meidl committed
241
=head2 database
Arne Stabenau's avatar
Arne Stabenau committed
242
243
244

  Args       : none
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
245
246
247
248
249
  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
250
251
  Exceptions : none
  Caller     : general
252
  Status     : Stable
Arne Stabenau's avatar
Arne Stabenau committed
253
254
255

=cut

Patrick Meidl's avatar
Patrick Meidl committed
256
sub database {
257
  my $self = shift;
Patrick Meidl's avatar
Patrick Meidl committed
258
  return $self->dbname();
259
260
261
}


Arne Stabenau's avatar
Arne Stabenau committed
262
263
=head2 release

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

=cut

275
276
277
sub release {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
278
    $self->{release} = $arg;
279
  } 
280
  return $self->{release};
281
282
283
}


Arne Stabenau's avatar
Arne Stabenau committed
284
285
=head2 version

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

=cut

297
298
299
sub version {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
300
    $self->{version} = $arg;
301
  } 
302
  return $self->{version};
303
304
305
}


Arne Stabenau's avatar
Arne Stabenau committed
306
307
=head2 description

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

=cut

319
320
321
sub description {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
322
    $self->{description} = $arg;
323
  } 
324
  return $self->{description};
325
326
}

327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
=head2 analysis

  Arg [1]    : Bio::EnsEMBL::Analysis $analysis
  Example    : none
  Description: get/set for attribute analysis
  Returntype : Bio::EnsEMBL::Analysis
  Exceptions : none
  Caller     : general
  Status     : Stable

=cut

sub analysis {
   my $self = shift;
  $self->{analysis} = shift if( @_ );
  return $self->{analysis};
}
344

Patrick Meidl's avatar
Patrick Meidl committed
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
=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();
}


366
367
=head2 primary_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 'primary_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

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

388
389
=head2 display_id_linkable

Patrick Meidl's avatar
Patrick Meidl committed
390
  Arg [1]    : (optional) Boolean $arg - value to set
391
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
392
393
  Description: Getter/setter for attribute 'display_id_linkable'.
  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
409
410
411
412
413

=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
414
  Priority   : Getter/setter for attribute 'priority'. Note this
Glenn Proctor's avatar
Glenn Proctor committed
415
               is the priority from the external_db table.
Patrick Meidl's avatar
Patrick Meidl committed
416
  Returntype : String
417
418
  Exceptions : none
  Caller     : general
419
420
  Status     : At Risk
             : due to it being under development
421
422
423
424
425
426
427
428
429
430
431

=cut

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

Glenn Proctor's avatar
Glenn Proctor committed
432
433
434
435
436

=head2 db_display_name

  Arg [1]    : String $db_display_name
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
437
438
439
440
  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
441
442
443
444
445
446
447
448
449
  Exceptions : none
  Caller     : general

=cut

sub db_display_name {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
    $self->{db_display_name} = $arg;
450
451
452
  }

  my $name;
453
  if ($self->{info_type} && $self->{info_type} eq "PROJECTION") {
454
455
456
457
458
459
460
461
462
463
464
465
466
    $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
467
468
  Description: Getter/setter for attribute 'info_type'.
  Returntype : String
469
470
471
472
473
474
475
476
477
  Exceptions : none
  Caller     : general

=cut

sub info_type {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
    $self->{info_type} = $arg;
478
  }
479
  return $self->{info_type};
Glenn Proctor's avatar
Glenn Proctor committed
480
 }
481
482
483
484
485
486


=head2 info_text

  Arg [1]    : String $info_text
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
487
488
  Description: Getter/setter for attribute 'info_text'.
  Returntype : String
489
490
491
492
493
494
495
496
497
  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
498
  } 
499
  return $self->{info_text};
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
519
520
521
=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
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
=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};
}

541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
=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};
}

580

Arne Stabenau's avatar
Arne Stabenau committed
581
582
=head2 add_synonym

Patrick Meidl's avatar
Patrick Meidl committed
583
  Arg [1]    : String $arg - synonym to add
Arne Stabenau's avatar
Arne Stabenau committed
584
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
585
  Description: Add a synonym for the external object.
Arne Stabenau's avatar
Arne Stabenau committed
586
587
588
  Returntype : none
  Exceptions : none
  Caller     : general
589
  Status     : Stable
Arne Stabenau's avatar
Arne Stabenau committed
590
591
592
593

=cut


594
595
596
sub add_synonym {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
597
    push( @{$self->{synonyms}}, $arg );
598
599
600
  }
}

Arne Stabenau's avatar
Arne Stabenau committed
601

Graham McVicker's avatar
Graham McVicker committed
602
=head2 get_all_synonyms
Arne Stabenau's avatar
Arne Stabenau committed
603
604

  Args       : none
Patrick Meidl's avatar
Patrick Meidl committed
605
606
  Example    : my @synonyms = @{ $db_entry->get_all_synonyms };
  Description: Get a list of synonyms known for this object.
607
608
               Synonyms are lazy-loaded if required.
  Returntype : listref of strings. May be empty.
Arne Stabenau's avatar
Arne Stabenau committed
609
610
  Exceptions : none
  Caller     : general
611
  Status     : Stable
Arne Stabenau's avatar
Arne Stabenau committed
612
613
614

=cut

Graham McVicker's avatar
Graham McVicker committed
615
sub get_all_synonyms {
616

617
  my $self = shift;
618
619

  # lazy-load synonyms if required
Ian Longden's avatar
Ian Longden committed
620
  if (!$self->{synonyms} && $self->{adaptor}) {
621
622
623
    $self->{synonyms} = $self->{adaptor}->fetch_all_synonyms($self->dbID());
  }

624
  return $self->{synonyms};
625
626
}

Arne Stabenau's avatar
Arne Stabenau committed
627
628
629
630
631

=head2 flush_synonyms

  Args       : none
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
632
  Description: Remove all synonyms from this object.
Arne Stabenau's avatar
Arne Stabenau committed
633
634
635
  Returntype : none
  Exceptions : none
  Caller     : general
636
  Status     : Stable
Arne Stabenau's avatar
Arne Stabenau committed
637
638
639

=cut

640
641
sub flush_synonyms {
  my $self = shift;
642
  $self->{synonyms} = [];
643
644
}

Arne Stabenau's avatar
Arne Stabenau committed
645

646
647
=head2 status

Patrick Meidl's avatar
Patrick Meidl committed
648
  Arg [1]    : (optional) String $arg - value to set
Arne Stabenau's avatar
Arne Stabenau committed
649
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
650
651
  Description: Getter/setter for attribute 'status'.
  Returntype : String
Arne Stabenau's avatar
Arne Stabenau committed
652
653
  Exceptions : none
  Caller     : general
654
  Status     : Stable
655
656
657

=cut

Arne Stabenau's avatar
Arne Stabenau committed
658

659
sub status{
Patrick Meidl's avatar
Patrick Meidl committed
660
661
662
663
664
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
     $self->{status} = $arg;
  } 
  return $self->{status};
665
666
}

Graham McVicker's avatar
Graham McVicker committed
667
668
669
=head1 DEPRECATED METHODS

=cut
Graham McVicker's avatar
Graham McVicker committed
670
671
672
673
674
675
676
677
678
679

=head2 get_synonyms

  Description: DEPRECATED use get_all_synonyms instead

=cut

sub get_synonyms {
  my $self = shift;

680
  deprecate("get_synonyms has been renamed get_all_synonyms.");
Graham McVicker's avatar
Graham McVicker committed
681
682
683
  return $self->get_all_synonyms;
}

684
1;
Patrick Meidl's avatar
Patrick Meidl committed
685