3 # BioPerl module for Bio::Biblio::PubmedArticle
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
12 Bio::Biblio::PubmedArticle - Representation of a PUBMED article
16 $obj = new Bio::Biblio::PubmedArticle
17 (-pubmed_history_list =>
18 [ { 'pub_status' => 'pubmed',
19 'date' => '2001-12-1T10:0:00Z' },
20 { 'pub_status' => 'medline',
21 'date' => '2002-1-5T10:1:00Z' } ],
22 -pubmed_status => 'ppublish');
25 $obj = new Bio::Biblio::PubmedArticle;
26 $obj->pubmed_status ('ppublish');
30 A storage object for a general PUBMED article.
31 See its place in the class hierarchy in
32 http://industry.ebi.ac.uk/openBQS/images/bibobjects_perl.gif
36 The following attributes are specific to this class
37 (however, you can also set and get all attributes defined in the parent classes):
41 pubmed_history_list type: array ref of hashes
42 pubmed_article_id_list type: array ref of hashes
43 pubmed_url_list type: array ref of hashes
51 OpenBQS home page: http://industry.ebi.ac.uk/openBQS
55 Comments to the Perl client: http://industry.ebi.ac.uk/openBQS/Client_perl.html
63 User feedback is an integral part of the evolution of this and other
64 Bioperl modules. Send your comments and suggestions preferably to
65 the Bioperl mailing list. Your participation is much appreciated.
67 bioperl-l@bioperl.org - General discussion
68 http://bioperl.org/MailList.shtml - About the mailing lists
72 Report bugs to the Bioperl bug tracking system to help us keep track
73 of the bugs and their resolution. Bug reports can be submitted via
76 bioperl-bugs@bioperl.org
77 http://bugzilla.bioperl.org/
81 Martin Senger (senger@ebi.ac.uk)
85 Copyright (c) 2002 European Bioinformatics Institute. All Rights Reserved.
87 This module is free software; you can redistribute it and/or modify
88 it under the same terms as Perl itself.
92 This software is provided "as is" without warranty of any kind.
97 # Let the code begin...
100 package Bio
::Biblio
::PubmedArticle
;
104 use Bio::Biblio::MedlineArticle;
105 @ISA = qw(Bio::Biblio::MedlineArticle);
108 # a closure with a list of allowed attribute names (these names
109 # correspond with the allowed 'get' and 'set' methods); each name also
110 # keep what type the attribute should be (use 'undef' if it is a
116 _pubmed_status
=> undef,
117 _pubmed_provider_id
=> undef,
118 _pubmed_history_list
=> 'ARRAY',
119 _pubmed_article_id_list
=> 'ARRAY',
120 _pubmed_url_list
=> 'ARRAY',
123 # return 1 if $attr is allowed to be set/get in this class
125 my ($self, $attr) = @_;
126 return 1 if exists $_allowed{$attr};
127 foreach my $parent (@ISA) {
128 return 1 if $parent->_accessible ($attr);
132 # return an expected type of given $attr
134 my ($self, $attr) = @_;
135 if (exists $_allowed{$attr}) {
136 return $_allowed{$attr};
138 foreach my $parent (@ISA) {
139 if ($parent->_accessible ($attr)) {
140 return $parent->_attr_type ($attr);