tag fourth (and hopefully last) alpha
[bioperl-live.git] / branch-1-6 / Bio / IdCollectionI.pm
blob0def69c72507d392bcedc9be3fac8a1720e6ac93
1 # $Id$
4 # This module is licensed under the same terms as Perl itself. You use,
5 # modify, and redistribute it under the terms of the Perl Artistic License.
8 =head1 NAME
10 Bio::IdCollectionI - interface for objects with multiple identifiers
12 =head1 SYNOPSIS
15 # to test this is an identifiable collection object
17 $obj->isa("Bio::IdCollectionI") ||
18 $obj->throw("$obj does not implement the Bio::IdCollectionI interface");
20 # accessors
21 @authorities = $obj->id_authorities();
22 @ids = $obj->ids();
23 $id = $obj->ids($authority);
25 =head1 DESCRIPTION
27 This interface describes methods expected on objects that have
28 multiple identifiers, each of which is controlled by a different
29 authority.
31 =head1 FEEDBACK
33 =head2 Mailing Lists
35 User feedback is an integral part of the evolution of this and other
36 Bioperl modules. Send your comments and suggestions preferably to one
37 of the Bioperl mailing lists. Your participation is much appreciated.
39 bioperl-l@bioperl.org - General discussion
40 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
42 =head2 Support
44 Please direct usage questions or support issues to the mailing list:
46 I<bioperl-l@bioperl.org>
48 rather than to the module maintainer directly. Many experienced and
49 reponsive experts will be able look at the problem and quickly
50 address it. Please include a thorough description of the problem
51 with code and data examples if at all possible.
53 =head2 Reporting Bugs
55 Report bugs to the Bioperl bug tracking system to help us keep track
56 the bugs and their resolution. Bug reports can be submitted via the
57 web:
59 http://bugzilla.open-bio.org/
61 =head1 AUTHOR - Lincoln Stein
63 Email lstein@cshl.org
65 =cut
67 package Bio::IdCollectionI;
68 use strict;
71 use base qw(Bio::Root::RootI);
73 =head1 Implementation Specific Functions
75 These functions are the ones that a specific implementation must
76 define.
78 =head2 id_authorities
80 Title : id_authorities
81 Usage : @array = $obj->id_authorities()
82 Function: Return the authorities which have names for this object.
83 The authorities can then be used to select ids.
85 Returns : An array
86 Status : Virtual
88 =cut
90 sub id_authorities {
91 my ($self) = @_;
92 $self->throw_not_implemented();
95 =head2 ids
97 Title : ids
98 Usage : @ids = $obj->ids([$authority1,$authority2...])
99 Function: return a list of Bio::IdentifiableI objects, optionally
100 filtered by the list of authorities.
102 Returns : A list of Bio::IdentifiableI objects.
103 Status : Virtual
105 =cut
107 sub ids {
108 my ($self) = @_;
109 my @authorities = @_;
110 $self->throw_not_implemented();