[bug 2714]
[bioperl-live.git] / Bio / Biblio / PubmedJournalArticle.pm
blob97d6f8256cff44761445963c53b88561fd2459eb
1 # $Id$
3 # BioPerl module for Bio::Biblio::PubmedJournalArticle
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::PubmedJournalArticle - Representation of a PUBMED journal article
14 =head1 SYNOPSIS
16 $obj = Bio::Biblio::PubmedJournalArticle->new(
18 # some attributes from MedlineJournalArticle
19 -title => 'Thermal adaptation analyzed by comparison of protein sequences from mesophilic and extremely thermophilic Methanococcus species.',
20 -journal => Bio::Biblio::MedlineJournal->new(-issn => '0027-8424'),
21 -volume => 96,
22 -issue => 7,
24 # and some from PubmedArticle
25 -pubmed_history_list =>
26 [ { 'pub_status' => 'pubmed',
27 'date' => '2001-12-1T10:0:00Z' },
28 { 'pub_status' => 'medline',
29 'date' => '2002-1-5T10:1:00Z' } ],
30 -pubmed_status => 'ppublish');
31 #--- OR ---
33 $obj = Bio::Biblio::PubmedJournalArticle->new();
34 $obj->title ('...');
35 $obj->journal (Bio::Biblio::MedlineJournal->new(-issn => '0027-8424'));
36 $obj->pubmed_status ('ppublish');
39 =head1 DESCRIPTION
41 A storage object for a PUBMED journal article.
42 See its place in the class hierarchy in
43 http://www.ebi.ac.uk/~senger/openbqs/images/bibobjects_perl.gif
45 =head2 Attributes
47 There are no specific attributes in this class
48 (however, you can set and get all attributes defined in the parent classes).
50 =head1 SEE ALSO
52 =over 4
54 =item *
56 OpenBQS home page: http://www.ebi.ac.uk/~senger/openbqs/
58 =item *
60 Comments to the Perl client: http://www.ebi.ac.uk/~senger/openbqs/Client_perl.html
62 =back
64 =head1 FEEDBACK
66 =head2 Mailing Lists
68 User feedback is an integral part of the evolution of this and other
69 Bioperl modules. Send your comments and suggestions preferably to
70 the Bioperl mailing list. Your participation is much appreciated.
72 bioperl-l@bioperl.org - General discussion
73 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
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::PubmedJournalArticle;
105 use strict;
106 use vars qw(@ISA);
108 use base qw(Bio::Biblio::PubmedArticle Bio::Biblio::MedlineJournalArticle);
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__