small update
[bioperl-live.git] / Bio / AnnotatableI.pm
blob95a6ca4f839930e0a44dd400f98b452c3bd16934
1 # $Id$
3 # BioPerl module for Bio::AnnotatableI
5 # Cared for by Hilmar Lapp <hlapp at gmx.net>
7 # Copyright Hilmar Lapp
9 # You may distribute this module under the same terms as perl itself
11 # POD documentation - main docs before the code
13 =head1 NAME
15 Bio::AnnotatableI - the base interface an annotatable object must implement
17 =head1 SYNOPSIS
19 use Bio::SeqIO;
20 # get an annotatable object somehow: for example, Bio::SeqI objects
21 # are annotatable
22 my $seqio = Bio::SeqIO->new(-fh => \*STDIN, -format => 'genbank');
23 while (my $seq = $seqio->next_seq()) {
24 # $seq is-a Bio::AnnotatableI, hence:
25 my $ann_coll = $seq->annotation();
26 # $ann_coll is-a Bio::AnnotationCollectionI, hence:
27 my @all_anns = $ann_coll->get_Annotations();
28 # do something with the annotation objects
31 =head1 DESCRIPTION
33 This is the base interface that all annotatable objects must implement. A
34 good example is Bio::Seq which is an AnnotableI object.
36 =head1 FEEDBACK
38 =head2 Mailing Lists
40 User feedback is an integral part of the evolution of this and other
41 Bioperl modules. Send your comments and suggestions preferably to
42 the Bioperl mailing list. Your participation is much appreciated.
44 bioperl-l@bioperl.org - General discussion
45 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
47 =head2 Reporting Bugs
49 Report bugs to the Bioperl bug tracking system to help us keep track
50 of the bugs and their resolution. Bug reports can be submitted via the
51 web:
53 http://bugzilla.open-bio.org/
55 =head1 AUTHOR
57 Hilmar Lapp E<lt>hlapp@gmx.netE<gt>
58 Allen Day E<lt>allenday@ucla.eduE<gt>
60 =head1 APPENDIX
62 The rest of the documentation details each of the object methods.
63 Internal methods are usually preceded with a _
65 =cut
68 # Let the code begin...
71 package Bio::AnnotatableI;
72 use strict;
74 use Bio::Annotation::Comment;
75 use Bio::Annotation::DBLink;
76 #use Bio::Annotation::OntologyTerm;
77 use Bio::Annotation::Reference;
78 use Bio::Annotation::SimpleValue;
80 use base qw(Bio::Root::RootI);
82 =head2 annotation
84 Title : annotation
85 Usage : $obj->annotation($newval)
86 Function: Get the annotation collection for this annotatable object.
87 Example :
88 Returns : a Bio::AnnotationCollectionI implementing object, or undef
89 Args : on set, new value (a Bio::AnnotationCollectionI
90 implementing object, optional) (an implementation may not
91 support changing the annotation collection)
93 See L<Bio::AnnotationCollectionI>
95 =cut
97 sub annotation{
98 shift->throw_not_implemented();