sync w/ main trunk
[bioperl-live.git] / Bio / Biblio / PubmedBookArticle.pm
blob4a9f6d3af6e1ff5108e4987ae2028189c6c27793
1 # $Id$
3 # BioPerl module for Bio::Biblio::PubmedBookArticle
5 # Please direct questions and support issues to <bioperl-l@bioperl.org>
7 # Cared for by Martin Senger <senger@ebi.ac.uk>
8 # For copyright and disclaimer see below.
10 # POD documentation - main docs before the code
12 =head1 NAME
14 Bio::Biblio::PubmedBookArticle - Representation of a PUBMED book article
16 =head1 SYNOPSIS
18 $obj = Bio::Biblio::PubmedBookArticle->new
19 (-title => 'Still getting started'.
20 -book => Bio::Biblio::MedlineBook->new());
21 # note that there is no specialised class PubmedBook
23 #--- OR ---
25 $obj = Bio::Biblio::PubmedBookArticle->new();
26 $obj->title ('Still getting started');
28 =head1 DESCRIPTION
30 A storage object for a PUBMED book article.
31 See its place in the class hierarchy in
32 http://www.ebi.ac.uk/~senger/openbqs/images/bibobjects_perl.gif
34 =head2 Attributes
36 There are no specific attributes in this class
37 (however, you can set and get all attributes defined in the parent classes).
39 =head1 SEE ALSO
41 =over 4
43 =item *
45 OpenBQS home page: http://www.ebi.ac.uk/~senger/openbqs/
47 =item *
49 Comments to the Perl client: http://www.ebi.ac.uk/~senger/openbqs/Client_perl.html
51 =back
53 =head1 FEEDBACK
55 =head2 Mailing Lists
57 User feedback is an integral part of the evolution of this and other
58 Bioperl modules. Send your comments and suggestions preferably to
59 the Bioperl mailing list. Your participation is much appreciated.
61 bioperl-l@bioperl.org - General discussion
62 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
64 =head2 Support
66 Please direct usage questions or support issues to the mailing list:
68 L<bioperl-l@bioperl.org>
70 rather than to the module maintainer directly. Many experienced and
71 reponsive experts will be able look at the problem and quickly
72 address it. Please include a thorough description of the problem
73 with code and data examples if at all possible.
75 =head2 Reporting Bugs
77 Report bugs to the Bioperl bug tracking system to help us keep track
78 of the bugs and their resolution. Bug reports can be submitted via the
79 web:
81 http://bugzilla.open-bio.org/
83 =head1 AUTHOR
85 Martin Senger (senger@ebi.ac.uk)
87 =head1 COPYRIGHT
89 Copyright (c) 2002 European Bioinformatics Institute. All Rights Reserved.
91 This module is free software; you can redistribute it and/or modify
92 it under the same terms as Perl itself.
94 =head1 DISCLAIMER
96 This software is provided "as is" without warranty of any kind.
98 =cut
101 # Let the code begin...
104 package Bio::Biblio::PubmedBookArticle;
105 use strict;
106 use vars qw(@ISA);
108 use base qw(Bio::Biblio::PubmedArticle Bio::Biblio::MedlineBookArticle);
111 # a closure with a list of allowed attribute names (these names
112 # correspond with the allowed 'get' and 'set' methods); each name also
113 # keep what type the attribute should be (use 'undef' if it is a
114 # simple scalar)
117 my %_allowed =
121 # return 1 if $attr is allowed to be set/get in this class
122 sub _accessible {
123 my ($self, $attr) = @_;
124 return 1 if exists $_allowed{$attr};
125 foreach my $parent (@ISA) {
126 return 1 if $parent->_accessible ($attr);
130 # return an expected type of given $attr
131 sub _attr_type {
132 my ($self, $attr) = @_;
133 if (exists $_allowed{$attr}) {
134 return $_allowed{$attr};
135 } else {
136 foreach my $parent (@ISA) {
137 if ($parent->_accessible ($attr)) {
138 return $parent->_attr_type ($attr);
142 return 'unknown';
148 __END__