Sync'ed RichSeqI with the implementation. RichSeq provides backward
[bioperl-live.git] / Bio / Biblio / PubmedBookArticle.pm
blob3063a628eca1edb0ca7017d30802137351435f3f
1 # $Id$
3 # BioPerl module for Bio::Biblio::PubmedBookArticle
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::PubmedBookArticle - Representation of a PUBMED book article
14 =head1 SYNOPSIS
16 $obj = new Bio::Biblio::PubmedBookArticle
17 (-title => 'Still getting started'.
18 -book => new Bio::Biblio::MedlineBook);
19 # note that there is no specialised class PubmedBook
21 --- OR ---
23 $obj = new Bio::Biblio::PubmedBookArticle;
24 $obj->title ('Still getting started');
26 =head1 DESCRIPTION
28 A storage object for a PUBMED book 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 There are no specific attributes in this class
35 (however, you can set and get all attributes defined in the parent classes).
37 =head1 SEE ALSO
39 =over
41 =item *
43 OpenBQS home page: http://industry.ebi.ac.uk/openBQS
45 =item *
47 Comments to the Perl client: http://industry.ebi.ac.uk/openBQS/Client_perl.html
49 =back
51 =head1 FEEDBACK
53 =head2 Mailing Lists
55 User feedback is an integral part of the evolution of this and other
56 Bioperl modules. Send your comments and suggestions preferably to
57 the Bioperl mailing list. Your participation is much appreciated.
59 bioperl-l@bioperl.org - General discussion
60 http://bioperl.org/MailList.shtml - About the mailing lists
62 =head2 Reporting Bugs
64 Report bugs to the Bioperl bug tracking system to help us keep track
65 of the bugs and their resolution. Bug reports can be submitted via
66 email or the web:
68 bioperl-bugs@bioperl.org
69 http://bugzilla.bioperl.org/
71 =head1 AUTHOR
73 Martin Senger (senger@ebi.ac.uk)
75 =head1 COPYRIGHT
77 Copyright (c) 2002 European Bioinformatics Institute. All Rights Reserved.
79 This module is free software; you can redistribute it and/or modify
80 it under the same terms as Perl itself.
82 =head1 DISCLAIMER
84 This software is provided "as is" without warranty of any kind.
86 =cut
89 # Let the code begin...
92 package Bio::Biblio::PubmedBookArticle;
93 use strict;
94 use vars qw(@ISA);
96 use Bio::Biblio::PubmedArticle;
97 use Bio::Biblio::MedlineBookArticle;
98 @ISA = qw(Bio::Biblio::PubmedArticle Bio::Biblio::MedlineBookArticle);
101 # a closure with a list of allowed attribute names (these names
102 # correspond with the allowed 'get' and 'set' methods); each name also
103 # keep what type the attribute should be (use 'undef' if it is a
104 # simple scalar)
107 my %_allowed =
111 # return 1 if $attr is allowed to be set/get in this class
112 sub _accessible {
113 my ($self, $attr) = @_;
114 return 1 if exists $_allowed{$attr};
115 foreach my $parent (@ISA) {
116 return 1 if $parent->_accessible ($attr);
120 # return an expected type of given $attr
121 sub _attr_type {
122 my ($self, $attr) = @_;
123 if (exists $_allowed{$attr}) {
124 return $_allowed{$attr};
125 } else {
126 foreach my $parent (@ISA) {
127 if ($parent->_accessible ($attr)) {
128 return $parent->_attr_type ($attr);
132 return 'unknown';
138 __END__