Sync'ed RichSeqI with the implementation. RichSeq provides backward
[bioperl-live.git] / Bio / Biblio / Article.pm
blob709aad33c118e23766200cba81a6f91374d42a53
1 # $Id$
3 # BioPerl module for Bio::Biblio::Article
5 # Cared for by Martin Senger <senger@ebi.ac.uk>
6 # For copyright and disclaimer see below.
8 # POD documentation - main docs before the code
10 =head1 NAME
12 Bio::Biblio::Article - Representation of a general article
14 =head1 SYNOPSIS
16 $obj = new Bio::Biblio::Article (-identifier => '123abc',
17 -first_page => 23,
18 -last_page => 68);
19 --- OR ---
21 $obj = new Bio::Biblio::Article;
22 $obj->identifier ('123abc');
23 $obj->first_page (23);
24 $obj->last_page (68);
26 =head1 DESCRIPTION
28 A storage object for a general article.
29 See its place in the class hierarchy in
30 http://industry.ebi.ac.uk/openBQS/images/bibobjects_perl.gif
32 =head2 Attributes
34 The following attributes are specific to this class
35 (however, you can also set and get all attributes defined in the parent classes):
37 first_page
38 last_page
41 =head1 SEE ALSO
43 =over
45 =item *
47 OpenBQS home page: http://industry.ebi.ac.uk/openBQS
49 =item *
51 Comments to the Perl client: http://industry.ebi.ac.uk/openBQS/Client_perl.html
53 =back
55 =head1 FEEDBACK
57 =head2 Mailing Lists
59 User feedback is an integral part of the evolution of this and other
60 Bioperl modules. Send your comments and suggestions preferably to
61 the Bioperl mailing list. Your participation is much appreciated.
63 bioperl-l@bioperl.org - General discussion
64 http://bioperl.org/MailList.shtml - About the mailing lists
66 =head2 Reporting Bugs
68 Report bugs to the Bioperl bug tracking system to help us keep track
69 of the bugs and their resolution. Bug reports can be submitted via
70 email or the web:
72 bioperl-bugs@bioperl.org
73 http://bugzilla.bioperl.org/
75 =head1 AUTHORS
77 Heikki Lehvaslaiho (heikki@ebi.ac.uk),
78 Martin Senger (senger@ebi.ac.uk)
80 =head1 COPYRIGHT
82 Copyright (c) 2002 European Bioinformatics Institute. All Rights Reserved.
84 This module is free software; you can redistribute it and/or modify
85 it under the same terms as Perl itself.
87 =head1 DISCLAIMER
89 This software is provided "as is" without warranty of any kind.
91 =cut
94 # Let the code begin...
97 package Bio::Biblio::Article;
98 use strict;
99 use vars qw(@ISA);
101 use Bio::Biblio::Ref;
103 @ISA = qw( Bio::Biblio::Ref);
106 # a closure with a list of allowed attribute names (these names
107 # correspond with the allowed 'get' and 'set' methods); each name also
108 # keep what type the attribute should be (use 'undef' if it is a
109 # simple scalar)
112 my %_allowed =
114 _first_page => undef,
115 _last_page => undef,
118 # return 1 if $attr is allowed to be set/get in this class
119 sub _accessible {
120 my ($self, $attr) = @_;
121 exists $_allowed{$attr} or $self->SUPER::_accessible ($attr);
124 # return an expected type of given $attr
125 sub _attr_type {
126 my ($self, $attr) = @_;
127 if (exists $_allowed{$attr}) {
128 return $_allowed{$attr};
129 } else {
130 return $self->SUPER::_attr_type ($attr);
137 __END__