Sync'ed RichSeqI with the implementation. RichSeq provides backward
[bioperl-live.git] / Bio / Biblio / MedlineArticle.pm
blobfdf383f39bbfa2ce694eae9071baad8ac65d21d0
1 # $Id$
3 # BioPerl module for Bio::Biblio::MedlineArticle
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::MedlineArticle - Representation of a MEDLINE article
14 =head1 SYNOPSIS
16 $obj = new Bio::Biblio::MedlineArticle (-mesh_headings => ...);
18 # how are Mesh terms stored:
19 use Data::Dumper;
20 print Data::Dumper->Dump ( [$obj->mesh_headings], ['MeshHeadings']);
22 It produces (something like) this:
23 'MeshHeadings' => [
24 { 'descriptorName' => 'Adult' },
25 { 'descriptorName' => 'Cardiovascular Diseases',
26 'subHeadings' => [ { 'subHeading' => 'etiology' },
27 { 'majorTopic' => 'Y',
28 'subHeading' => 'mortality' } ] },
29 { 'descriptorName' => 'Child Development',
30 'subHeadings' => [ { 'majorTopic' => 'Y',
31 'subHeading' => 'physiology' } ] },
32 { 'descriptorName' => 'Human' },
35 =head1 DESCRIPTION
37 A storage object for a MEDLINE article.
38 See its place in the class hierarchy in
39 http://industry.ebi.ac.uk/openBQS/images/bibobjects_perl.gif
41 =head2 Attributes
43 The following attributes are specific to this class
44 (however, you can also set and get all attributes defined in the parent classes):
46 affiliation
47 chemicals type: array ref of hashes
48 citation_owner
49 comment_ins type: array ref of hashes
50 comment_ons type: array ref of hashes
51 date_of_electronic_publication
52 erratum_fors type: array ref of hashes
53 erratum_in type: array ref of hashes
54 gene_symbols
55 general_notes type: array ref of hashes
56 grant_list_complete
57 grants type: array ref of hashes
58 medline_date
59 medline_id
60 medline_page
61 mesh_headings type: array ref of hashes
62 number_of_references
63 original_report_ins type: array ref of hashes
64 other_abstracts type: array ref of hashes
65 other_ids type: array ref of hashes
66 other_languages
67 pmid
68 republished_froms type: array ref of hashes
69 republished_ins type: array ref of hashes
70 retraction_ins type: array ref of hashes
71 retraction_ofs type: array ref of hashes
72 season
73 status
74 summary_for_patients_ins type: array ref of hashes
75 update_ins type: array ref of hashes
76 update_ofs type: array ref of hashes
77 vernacular_title
79 =head1 SEE ALSO
81 =over
83 =item *
85 OpenBQS home page: http://industry.ebi.ac.uk/openBQS
87 =item *
89 Comments to the Perl client: http://industry.ebi.ac.uk/openBQS/Client_perl.html
91 =back
93 =head1 FEEDBACK
95 =head2 Mailing Lists
97 User feedback is an integral part of the evolution of this and other
98 Bioperl modules. Send your comments and suggestions preferably to
99 the Bioperl mailing list. Your participation is much appreciated.
101 bioperl-l@bioperl.org - General discussion
102 http://bioperl.org/MailList.shtml - About the mailing lists
104 =head2 Reporting Bugs
106 Report bugs to the Bioperl bug tracking system to help us keep track
107 of the bugs and their resolution. Bug reports can be submitted via
108 email or the web:
110 bioperl-bugs@bioperl.org
111 http://bugzilla.bioperl.org/
113 =head1 AUTHORS
115 Heikki Lehvaslaiho (heikki@ebi.ac.uk),
116 Martin Senger (senger@ebi.ac.uk)
118 =head1 COPYRIGHT
120 Copyright (c) 2002 European Bioinformatics Institute. All Rights Reserved.
122 This module is free software; you can redistribute it and/or modify
123 it under the same terms as Perl itself.
125 =head1 DISCLAIMER
127 This software is provided "as is" without warranty of any kind.
129 =cut
132 # Let the code begin...
135 package Bio::Biblio::MedlineArticle;
136 use strict;
137 use vars qw(@ISA);
139 use Bio::Biblio::Article;
141 @ISA = qw(Bio::Biblio::Article);
144 # a closure with a list of allowed attribute names (these names
145 # correspond with the allowed 'get' and 'set' methods); each name also
146 # keep what type the attribute should be (use 'undef' if it is a
147 # simple scalar)
150 my %_allowed =
152 _affiliation => undef,
153 _chemicals => 'ARRAY',
154 _citation_owner => undef,
155 _comment_ins => 'ARRAY',
156 _comment_ons => 'ARRAY',
157 _date_of_electronic_publication => undef,
158 _erratum_fors => 'ARRAY',
159 _erratum_ins => 'ARRAY',
160 _gene_symbols => undef,
161 _general_notes => 'ARRAY',
162 _grant_list_complete => undef,
163 _grants => 'ARRAY',
164 _medline_date => undef,
165 _medline_id => undef,
166 _medline_page => undef,
167 _mesh_headings => 'ARRAY',
168 _number_of_references => undef,
169 _original_report_ins => 'ARRAY',
170 _other_abstracts => 'ARRAY',
171 _other_ids => 'ARRAY',
172 _other_languages => undef,
173 _pmid => undef,
174 _republished_froms => 'ARRAY',
175 _republished_ins => 'ARRAY',
176 _retraction_ins => 'ARRAY',
177 _retraction_ofs => 'ARRAY',
178 _season => undef,
179 _status => undef,
180 _summary_for_patients_ins => 'ARRAY',
181 _update_ins => 'ARRAY',
182 _update_ofs => 'ARRAY',
183 _vernacular_title => undef,
186 # return 1 if $attr is allowed to be set/get in this class
187 sub _accessible {
188 my ($self, $attr) = @_;
189 exists $_allowed{$attr} or $self->SUPER::_accessible ($attr);
192 # return an expected type of given $attr
193 sub _attr_type {
194 my ($self, $attr) = @_;
195 if (exists $_allowed{$attr}) {
196 return $_allowed{$attr};
197 } else {
198 return $self->SUPER::_attr_type ($attr);
205 __END__