[bug 3148] switch default to "expasy" until we can work out REST service interface
[bioperl-live.git] / Bio / Biblio / PubmedJournalArticle.pm
blob74005ab31427f50dd80913ab37e4747a10ccfb7c
2 # BioPerl module for Bio::Biblio::PubmedJournalArticle
4 # Please direct questions and support issues to <bioperl-l@bioperl.org>
6 # Cared for by Martin Senger <senger@ebi.ac.uk>
7 # For copyright and disclaimer see below.
9 # POD documentation - main docs before the code
11 =head1 NAME
13 Bio::Biblio::PubmedJournalArticle - Representation of a PUBMED journal article
15 =head1 SYNOPSIS
17 $obj = Bio::Biblio::PubmedJournalArticle->new(
19 # some attributes from MedlineJournalArticle
20 -title => 'Thermal adaptation analyzed by comparison of protein sequences from mesophilic and extremely thermophilic Methanococcus species.',
21 -journal => Bio::Biblio::MedlineJournal->new(-issn => '0027-8424'),
22 -volume => 96,
23 -issue => 7,
25 # and some from PubmedArticle
26 -pubmed_history_list =>
27 [ { 'pub_status' => 'pubmed',
28 'date' => '2001-12-1T10:0:00Z' },
29 { 'pub_status' => 'medline',
30 'date' => '2002-1-5T10:1:00Z' } ],
31 -pubmed_status => 'ppublish');
32 #--- OR ---
34 $obj = Bio::Biblio::PubmedJournalArticle->new();
35 $obj->title ('...');
36 $obj->journal (Bio::Biblio::MedlineJournal->new(-issn => '0027-8424'));
37 $obj->pubmed_status ('ppublish');
40 =head1 DESCRIPTION
42 A storage object for a PUBMED journal article.
43 See its place in the class hierarchy in
44 http://www.ebi.ac.uk/~senger/openbqs/images/bibobjects_perl.gif
46 =head2 Attributes
48 There are no specific attributes in this class
49 (however, you can set and get all attributes defined in the parent classes).
51 =head1 SEE ALSO
53 =over 4
55 =item *
57 OpenBQS home page: http://www.ebi.ac.uk/~senger/openbqs/
59 =item *
61 Comments to the Perl client: http://www.ebi.ac.uk/~senger/openbqs/Client_perl.html
63 =back
65 =head1 FEEDBACK
67 =head2 Mailing Lists
69 User feedback is an integral part of the evolution of this and other
70 Bioperl modules. Send your comments and suggestions preferably to
71 the Bioperl mailing list. Your participation is much appreciated.
73 bioperl-l@bioperl.org - General discussion
74 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
76 =head2 Support
78 Please direct usage questions or support issues to the mailing list:
80 I<bioperl-l@bioperl.org>
82 rather than to the module maintainer directly. Many experienced and
83 reponsive experts will be able look at the problem and quickly
84 address it. Please include a thorough description of the problem
85 with code and data examples if at all possible.
87 =head2 Reporting Bugs
89 Report bugs to the Bioperl bug tracking system to help us keep track
90 of the bugs and their resolution. Bug reports can be submitted via the
91 web:
93 http://bugzilla.open-bio.org/
95 =head1 AUTHOR
97 Martin Senger (senger@ebi.ac.uk)
99 =head1 COPYRIGHT
101 Copyright (c) 2002 European Bioinformatics Institute. All Rights Reserved.
103 This module is free software; you can redistribute it and/or modify
104 it under the same terms as Perl itself.
106 =head1 DISCLAIMER
108 This software is provided "as is" without warranty of any kind.
110 =cut
113 # Let the code begin...
116 package Bio::Biblio::PubmedJournalArticle;
117 use strict;
118 use vars qw(@ISA);
120 use base qw(Bio::Biblio::PubmedArticle Bio::Biblio::MedlineJournalArticle);
123 # a closure with a list of allowed attribute names (these names
124 # correspond with the allowed 'get' and 'set' methods); each name also
125 # keep what type the attribute should be (use 'undef' if it is a
126 # simple scalar)
129 my %_allowed =
133 # return 1 if $attr is allowed to be set/get in this class
134 sub _accessible {
135 my ($self, $attr) = @_;
136 return 1 if exists $_allowed{$attr};
137 foreach my $parent (@ISA) {
138 return 1 if $parent->_accessible ($attr);
142 # return an expected type of given $attr
143 sub _attr_type {
144 my ($self, $attr) = @_;
145 if (exists $_allowed{$attr}) {
146 return $_allowed{$attr};
147 } else {
148 foreach my $parent (@ISA) {
149 if ($parent->_accessible ($attr)) {
150 return $parent->_attr_type ($attr);
154 return 'unknown';
160 __END__