~ubuntu-branches/ubuntu/trusty/bioperl/trusty

« back to all changes in this revision

Viewing changes to Bio/Biblio/MedlineArticle.pm

  • Committer: Package Import Robot
  • Author(s): Charles Plessy
  • Date: 2013-09-22 13:39:48 UTC
  • mfrom: (3.1.11 sid)
  • Revision ID: package-import@ubuntu.com-20130922133948-c6z62zegjyp7ztou
Tags: 1.6.922-1
* New upstream release.
* Replaces and Breaks grinder (<< 0.5.3-3~) because of overlaping contents.
  Closes: #722910
* Stop Replacing and Breaking bioperl ( << 1.6.9 ): not needed anymore. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#
2
 
# BioPerl module for Bio::Biblio::MedlineArticle
3
 
#
4
 
# Please direct questions and support issues to <bioperl-l@bioperl.org> 
5
 
#
6
 
# Cared for by Martin Senger <senger@ebi.ac.uk>
7
 
# For copyright and disclaimer see below.
8
 
 
9
 
# POD documentation - main docs before the code
10
 
 
11
 
=head1 NAME
12
 
 
13
 
Bio::Biblio::MedlineArticle - Representation of a MEDLINE article
14
 
 
15
 
=head1 SYNOPSIS
16
 
 
17
 
  $obj = Bio::Biblio::MedlineArticle->new(-mesh_headings =>
18
 
                                            #array ref of hashes
19
 
                                         );
20
 
 
21
 
  # how are Mesh terms stored:
22
 
  use Data::Dumper;
23
 
  print Data::Dumper->Dump ( [$obj->mesh_headings], ['MeshHeadings']);
24
 
 
25
 
  #It produces (something like) this:
26
 
  #'MeshHeadings' => [
27
 
  #       { 'descriptorName' => 'Adult' },
28
 
  #       { 'descriptorName' => 'Cardiovascular Diseases',
29
 
  #         'subHeadings'    => [ { 'subHeading' => 'etiology' },
30
 
  #                               { 'majorTopic' => 'Y',
31
 
  #                                 'subHeading' => 'mortality' } ] },
32
 
  #       { 'descriptorName' => 'Child Development',
33
 
  #         'subHeadings'    => [ { 'majorTopic' => 'Y',
34
 
  #                                 'subHeading' => 'physiology' } ] },
35
 
  #       { 'descriptorName' => 'Human' },
36
 
  #      ]
37
 
 
38
 
=head1 DESCRIPTION
39
 
 
40
 
A storage object for a MEDLINE article.
41
 
See its place in the class hierarchy in
42
 
http://www.ebi.ac.uk/~senger/openbqs/images/bibobjects_perl.gif
43
 
 
44
 
=head2 Attributes
45
 
 
46
 
The following attributes are specific to this class
47
 
(however, you can also set and get all attributes defined in the parent classes):
48
 
 
49
 
  affiliation
50
 
  chemicals                      type: array ref of hashes
51
 
  citation_owner
52
 
  comment_ins                    type: array ref of hashes
53
 
  comment_ons                    type: array ref of hashes
54
 
  date_of_electronic_publication
55
 
  erratum_fors                   type: array ref of hashes
56
 
  erratum_in                     type: array ref of hashes
57
 
  gene_symbols
58
 
  general_notes                  type: array ref of hashes
59
 
  grant_list_complete
60
 
  grants                         type: array ref of hashes
61
 
  medline_date
62
 
  medline_id
63
 
  medline_page
64
 
  mesh_headings                  type: array ref of hashes
65
 
  number_of_references
66
 
  original_report_ins            type: array ref of hashes
67
 
  other_abstracts                type: array ref of hashes
68
 
  other_ids                      type: array ref of hashes
69
 
  other_languages
70
 
  pmid
71
 
  republished_froms              type: array ref of hashes
72
 
  republished_ins                type: array ref of hashes
73
 
  retraction_ins                 type: array ref of hashes
74
 
  retraction_ofs                 type: array ref of hashes
75
 
  season
76
 
  status
77
 
  summary_for_patients_ins       type: array ref of hashes
78
 
  update_ins                     type: array ref of hashes
79
 
  update_ofs                     type: array ref of hashes
80
 
  vernacular_title
81
 
 
82
 
=head1 SEE ALSO
83
 
 
84
 
=over 4
85
 
 
86
 
=item *
87
 
 
88
 
OpenBQS home page: http://www.ebi.ac.uk/~senger/openbqs/
89
 
 
90
 
=item *
91
 
 
92
 
Comments to the Perl client: http://www.ebi.ac.uk/~senger/openbqs/Client_perl.html
93
 
 
94
 
=back
95
 
 
96
 
=head1 FEEDBACK
97
 
 
98
 
=head2 Mailing Lists
99
 
 
100
 
User feedback is an integral part of the evolution of this and other
101
 
Bioperl modules. Send your comments and suggestions preferably to
102
 
the Bioperl mailing list.  Your participation is much appreciated.
103
 
 
104
 
  bioperl-l@bioperl.org                  - General discussion
105
 
  http://bioperl.org/wiki/Mailing_lists  - About the mailing lists
106
 
 
107
 
=head2 Support 
108
 
 
109
 
Please direct usage questions or support issues to the mailing list:
110
 
 
111
 
I<bioperl-l@bioperl.org>
112
 
 
113
 
rather than to the module maintainer directly. Many experienced and 
114
 
reponsive experts will be able look at the problem and quickly 
115
 
address it. Please include a thorough description of the problem 
116
 
with code and data examples if at all possible.
117
 
 
118
 
=head2 Reporting Bugs
119
 
 
120
 
Report bugs to the Bioperl bug tracking system to help us keep track
121
 
of the bugs and their resolution. Bug reports can be submitted via the
122
 
web:
123
 
 
124
 
  https://redmine.open-bio.org/projects/bioperl/
125
 
 
126
 
=head1 AUTHORS
127
 
 
128
 
Heikki Lehvaslaiho (heikki-at-bioperl-dot-org),
129
 
Martin Senger (senger@ebi.ac.uk)
130
 
 
131
 
=head1 COPYRIGHT
132
 
 
133
 
Copyright (c) 2002 European Bioinformatics Institute. All Rights Reserved.
134
 
 
135
 
This module is free software; you can redistribute it and/or modify
136
 
it under the same terms as Perl itself.
137
 
 
138
 
=head1 DISCLAIMER
139
 
 
140
 
This software is provided "as is" without warranty of any kind.
141
 
 
142
 
=cut
143
 
 
144
 
 
145
 
# Let the code begin...
146
 
 
147
 
 
148
 
package Bio::Biblio::MedlineArticle;
149
 
use strict;
150
 
 
151
 
 
152
 
use base qw(Bio::Biblio::Article);
153
 
 
154
 
#
155
 
# a closure with a list of allowed attribute names (these names
156
 
# correspond with the allowed 'get' and 'set' methods); each name also
157
 
# keep what type the attribute should be (use 'undef' if it is a
158
 
# simple scalar)
159
 
#
160
 
{
161
 
    my %_allowed =
162
 
        (
163
 
         _affiliation => undef,
164
 
         _chemicals => 'ARRAY',
165
 
         _citation_owner => undef,
166
 
         _comment_ins => 'ARRAY',
167
 
         _comment_ons => 'ARRAY',
168
 
         _date_of_electronic_publication => undef,
169
 
         _erratum_fors => 'ARRAY',
170
 
         _erratum_ins => 'ARRAY',
171
 
         _gene_symbols => undef,
172
 
         _general_notes => 'ARRAY',
173
 
         _grant_list_complete => undef,
174
 
         _grants => 'ARRAY',
175
 
         _medline_date => undef,
176
 
         _medline_id => undef,
177
 
         _medline_page => undef,
178
 
         _mesh_headings => 'ARRAY',
179
 
         _number_of_references => undef,
180
 
         _original_report_ins => 'ARRAY',
181
 
         _other_abstracts => 'ARRAY',
182
 
         _other_ids => 'ARRAY',
183
 
         _other_languages => undef,
184
 
         _pmid => undef,
185
 
         _republished_froms => 'ARRAY',
186
 
         _republished_ins => 'ARRAY',
187
 
         _retraction_ins => 'ARRAY',
188
 
         _retraction_ofs => 'ARRAY',
189
 
         _season => undef,
190
 
         _status => undef,
191
 
         _summary_for_patients_ins => 'ARRAY',
192
 
         _update_ins => 'ARRAY',
193
 
         _update_ofs => 'ARRAY',
194
 
         _vernacular_title => undef,
195
 
         );
196
 
 
197
 
    # return 1 if $attr is allowed to be set/get in this class
198
 
    sub _accessible {
199
 
        my ($self, $attr) = @_;
200
 
        exists $_allowed{$attr} or $self->SUPER::_accessible ($attr);
201
 
    }
202
 
 
203
 
    # return an expected type of given $attr
204
 
    sub _attr_type {
205
 
        my ($self, $attr) = @_;
206
 
        if (exists $_allowed{$attr}) {
207
 
            return $_allowed{$attr};
208
 
        } else {
209
 
            return $self->SUPER::_attr_type ($attr);
210
 
        }
211
 
    }
212
 
}
213
 
 
214
 
 
215
 
1;
216
 
__END__