Mercurial > repos > mahtabm > ensembl
comparison variant_effect_predictor/Bio/Biblio/PubmedJournalArticle.pm @ 0:1f6dce3d34e0
Uploaded
author | mahtabm |
---|---|
date | Thu, 11 Apr 2013 02:01:53 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:1f6dce3d34e0 |
---|---|
1 # $Id: PubmedJournalArticle.pm,v 1.4 2002/10/22 07:45:11 lapp Exp $ | |
2 # | |
3 # BioPerl module for Bio::Biblio::PubmedJournalArticle | |
4 # | |
5 # Cared for by Martin Senger <senger@ebi.ac.uk> | |
6 # For copyright and disclaimer see below. | |
7 | |
8 # POD documentation - main docs before the code | |
9 | |
10 =head1 NAME | |
11 | |
12 Bio::Biblio::PubmedJournalArticle - Representation of a PUBMED journal article | |
13 | |
14 =head1 SYNOPSIS | |
15 | |
16 $obj = new Bio::Biblio::PubmedJournalArticle ( | |
17 | |
18 # some attributes from MedlineJournalArticle | |
19 -title => 'Thermal adaptation analyzed by comparison of protein sequences from mesophilic and extremely thermophilic Methanococcus species.', | |
20 -journal => new Bio::Biblio::MedlineJournal (-issn => '0027-8424'), | |
21 -volume => 96, | |
22 -issue => 7, | |
23 | |
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 --- | |
32 | |
33 $obj = new Bio::Biblio::PubmedJournalArticle; | |
34 $obj->title ('...'); | |
35 $obj->journal (new Bio::Biblio::MedlineJournal (-issn => '0027-8424')); | |
36 $obj->pubmed_status ('ppublish'); | |
37 | |
38 | |
39 =head1 DESCRIPTION | |
40 | |
41 A storage object for a PUBMED journal article. | |
42 See its place in the class hierarchy in | |
43 http://industry.ebi.ac.uk/openBQS/images/bibobjects_perl.gif | |
44 | |
45 =head2 Attributes | |
46 | |
47 There are no specific attributes in this class | |
48 (however, you can set and get all attributes defined in the parent classes). | |
49 | |
50 =head1 SEE ALSO | |
51 | |
52 =over | |
53 | |
54 =item * | |
55 | |
56 OpenBQS home page: http://industry.ebi.ac.uk/openBQS | |
57 | |
58 =item * | |
59 | |
60 Comments to the Perl client: http://industry.ebi.ac.uk/openBQS/Client_perl.html | |
61 | |
62 =back | |
63 | |
64 =head1 FEEDBACK | |
65 | |
66 =head2 Mailing Lists | |
67 | |
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. | |
71 | |
72 bioperl-l@bioperl.org - General discussion | |
73 http://bioperl.org/MailList.shtml - About the mailing lists | |
74 | |
75 =head2 Reporting Bugs | |
76 | |
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 | |
79 email or the web: | |
80 | |
81 bioperl-bugs@bioperl.org | |
82 http://bugzilla.bioperl.org/ | |
83 | |
84 =head1 AUTHOR | |
85 | |
86 Martin Senger (senger@ebi.ac.uk) | |
87 | |
88 =head1 COPYRIGHT | |
89 | |
90 Copyright (c) 2002 European Bioinformatics Institute. All Rights Reserved. | |
91 | |
92 This module is free software; you can redistribute it and/or modify | |
93 it under the same terms as Perl itself. | |
94 | |
95 =head1 DISCLAIMER | |
96 | |
97 This software is provided "as is" without warranty of any kind. | |
98 | |
99 =cut | |
100 | |
101 | |
102 # Let the code begin... | |
103 | |
104 | |
105 package Bio::Biblio::PubmedJournalArticle; | |
106 use strict; | |
107 use vars qw(@ISA); | |
108 | |
109 use Bio::Biblio::PubmedArticle; | |
110 use Bio::Biblio::MedlineJournalArticle; | |
111 @ISA = qw(Bio::Biblio::PubmedArticle Bio::Biblio::MedlineJournalArticle); | |
112 | |
113 # | |
114 # a closure with a list of allowed attribute names (these names | |
115 # correspond with the allowed 'get' and 'set' methods); each name also | |
116 # keep what type the attribute should be (use 'undef' if it is a | |
117 # simple scalar) | |
118 # | |
119 { | |
120 my %_allowed = | |
121 ( | |
122 ); | |
123 | |
124 # return 1 if $attr is allowed to be set/get in this class | |
125 sub _accessible { | |
126 my ($self, $attr) = @_; | |
127 return 1 if exists $_allowed{$attr}; | |
128 foreach my $parent (@ISA) { | |
129 return 1 if $parent->_accessible ($attr); | |
130 } | |
131 } | |
132 | |
133 # return an expected type of given $attr | |
134 sub _attr_type { | |
135 my ($self, $attr) = @_; | |
136 if (exists $_allowed{$attr}) { | |
137 return $_allowed{$attr}; | |
138 } else { | |
139 foreach my $parent (@ISA) { | |
140 if ($parent->_accessible ($attr)) { | |
141 return $parent->_attr_type ($attr); | |
142 } | |
143 } | |
144 } | |
145 return 'unknown'; | |
146 } | |
147 } | |
148 | |
149 | |
150 1; | |
151 __END__ |