3 # BioPerl module for Bio::BioEntry
5 # Please direct questions and support issues to <bioperl-l@bioperl.org>
7 # Cared for by Hilmar Lapp <hlapp at gmx.net>
9 # Copyright Hilmar Lapp
11 # You may distribute this module under the same terms as perl itself
13 # POD documentation - main docs before the code
17 Bio::BioEntry - DESCRIPTION of Object
21 Give standard usage here
25 Describe the object here
31 User feedback is an integral part of the evolution of this and other
32 Bioperl modules. Send your comments and suggestions preferably to
33 the Bioperl mailing list. Your participation is much appreciated.
35 bioperl-l@bioperl.org - General discussion
36 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
40 Please direct usage questions or support issues to the mailing list:
42 I<bioperl-l@bioperl.org>
44 rather than to the module maintainer directly. Many experienced and
45 reponsive experts will be able look at the problem and quickly
46 address it. Please include a thorough description of the problem
47 with code and data examples if at all possible.
51 Report bugs to the Bioperl bug tracking system to help us keep track
52 of the bugs and their resolution. Bug reports can be submitted via
55 http://redmine.open-bio.org/projects/bioperl/
57 =head1 AUTHOR - Hilmar Lapp
59 Email hlapp at gmx.net
61 Describe contact details here
65 Additional contributors names and emails here
69 The rest of the documentation details each of the object methods.
70 Internal methods are usually preceded with a _
75 # Let the code begin...
78 package Bio
::BioEntry
;
82 # Object preamble - inherits from Bio::Root::Root
85 use Bio::IdentifiableI;
86 use Bio::DescribableI;
88 @ISA = qw(Bio::Root::Root Bio::IdentifiableI Bio::DescribableI);
93 Usage : my $obj = Bio::BioEntry->new();
94 Function: Builds a new Bio::BioEntry object
95 Returns : an instance of Bio::BioEntry
102 my($class,@args) = @_;
104 my $self = $class->SUPER::new
(@args);
105 my ($objid, $ns, $auth, $v, $display_id, $desc) =
106 $self->_rearrange([qw(OBJECT_ID
115 $self->object_id($objid) if $objid;
116 $self->namespace($ns) if $ns;
117 $self->authority($auth) if $auth;
118 $self->version($v) if $v;
119 $self->display_name($display_id) if $display_id;
120 $self->description($desc) if $desc;
125 =head1 Methods for Bio::IdentifiableI compliance
130 Usage : $string = $obj->object_id()
131 Function: a string which represents the stable primary identifier
132 in this namespace of this object. For DNA sequences this
133 is its accession_number, similarly for protein sequences
135 This is aliased to accession_number().
142 my ($self, $value) = @_;
144 if( defined $value) {
145 $self->{'object_id'} = $value;
147 return $self->{'object_id'};
153 Usage : $version = $obj->version()
154 Function: a number which differentiates between versions of
155 the same object. Higher numbers are considered to be
156 later and more relevant, but a single object described
157 the same identifier should represent the same concept
164 my ($self,$value) = @_;
165 if( defined $value) {
166 $self->{'_version'} = $value;
168 return $self->{'_version'};
175 Usage : $authority = $obj->authority()
176 Function: a string which represents the organisation which
177 granted the namespace, written as the DNS name for
178 organisation (eg, wormbase.org)
185 my ($obj,$value) = @_;
186 if( defined $value) {
187 $obj->{'authority'} = $value;
189 return $obj->{'authority'};
195 Usage : $string = $obj->namespace()
196 Function: A string representing the name space this identifier
197 is valid in, often the database name or the name
198 describing the collection
206 my ($self,$value) = @_;
207 if( defined $value) {
208 $self->{'namespace'} = $value;
210 return $self->{'namespace'} || "";
213 =head1 Methods for Bio::DescribableI compliance
218 Usage : $string = $obj->display_name()
219 Function: A string which is what should be displayed to the user
220 the string should have no spaces (ideally, though a cautious
221 user of this interface would not assumme this) and should be
222 less than thirty characters (though again, double checking
225 This is aliased to display_id().
231 my ($self,$value) = @_;
232 if( defined $value) {
233 $self->{'_display_name'} = $value;
235 return $self->{'_display_name'};
241 Usage : $string = $obj->description()
242 Function: A text string suitable for displaying to the user a
243 description. This string is likely to have spaces, but
244 should not have any newlines or formatting - just plain
245 text. The string should not be greater than 255 characters
246 and clients can feel justified at truncating strings at 255
247 characters for the purposes of display
249 This is aliased to desc().
255 my ($self,$value) = @_;
257 if( defined $value) {
258 $self->{'_description'} = $value;
260 return $self->{'_description'};