Mercurial > repos > mahtabm > ensemb_rep_gvl
comparison variant_effect_predictor/Bio/Biblio/MedlineJournalArticle.pm @ 0:2bc9b66ada89 draft default tip
Uploaded
author | mahtabm |
---|---|
date | Thu, 11 Apr 2013 06:29:17 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:2bc9b66ada89 |
---|---|
1 # $Id: MedlineJournalArticle.pm,v 1.3 2002/10/22 07:45:11 lapp Exp $ | |
2 # | |
3 # BioPerl module for Bio::Biblio::MedlineJournalArticle | |
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::MedlineJournalArticle - Representation of a MEDLINE journal article | |
13 | |
14 =head1 SYNOPSIS | |
15 | |
16 $obj = new Bio::Biblio::MedlineJournalArticle ( | |
17 -title => 'Thermal adaptation analyzed by comparison of protein sequences from mesophilic and extremely thermophilic Methanococcus species.', | |
18 -journal => new Bio::Biblio::MedlineJournal (-issn => '0027-8424'), | |
19 -volume => 96, | |
20 -issue => 7); | |
21 --- OR --- | |
22 | |
23 $obj = new Bio::Biblio::MedlineJournalArticle; | |
24 $obj->title ('...'); | |
25 $obj->journal (new Bio::Biblio::MedlineJournal (-issn => '0027-8424')); | |
26 | |
27 =head1 DESCRIPTION | |
28 | |
29 A storage object for a MEDLINE journal article. | |
30 See its place in the class hierarchy in | |
31 http://industry.ebi.ac.uk/openBQS/images/bibobjects_perl.gif | |
32 | |
33 =head2 Attributes | |
34 | |
35 The following attributes are specific to this class | |
36 (however, you can also set and get all attributes defined in the parent classes): | |
37 | |
38 journal type: Bio::Biblio::MedlineJournal | |
39 | |
40 =head1 SEE ALSO | |
41 | |
42 =over | |
43 | |
44 =item * | |
45 | |
46 OpenBQS home page: http://industry.ebi.ac.uk/openBQS | |
47 | |
48 =item * | |
49 | |
50 Comments to the Perl client: http://industry.ebi.ac.uk/openBQS/Client_perl.html | |
51 | |
52 =back | |
53 | |
54 =head1 FEEDBACK | |
55 | |
56 =head2 Mailing Lists | |
57 | |
58 User feedback is an integral part of the evolution of this and other | |
59 Bioperl modules. Send your comments and suggestions preferably to | |
60 the Bioperl mailing list. Your participation is much appreciated. | |
61 | |
62 bioperl-l@bioperl.org - General discussion | |
63 http://bioperl.org/MailList.shtml - About the mailing lists | |
64 | |
65 =head2 Reporting Bugs | |
66 | |
67 Report bugs to the Bioperl bug tracking system to help us keep track | |
68 of the bugs and their resolution. Bug reports can be submitted via | |
69 email or the web: | |
70 | |
71 bioperl-bugs@bioperl.org | |
72 http://bugzilla.bioperl.org/ | |
73 | |
74 =head1 AUTHORS | |
75 | |
76 Heikki Lehvaslaiho (heikki@ebi.ac.uk), | |
77 Martin Senger (senger@ebi.ac.uk) | |
78 | |
79 =head1 COPYRIGHT | |
80 | |
81 Copyright (c) 2002 European Bioinformatics Institute. All Rights Reserved. | |
82 | |
83 This module is free software; you can redistribute it and/or modify | |
84 it under the same terms as Perl itself. | |
85 | |
86 =head1 DISCLAIMER | |
87 | |
88 This software is provided "as is" without warranty of any kind. | |
89 | |
90 =cut | |
91 | |
92 | |
93 # Let the code begin... | |
94 | |
95 | |
96 package Bio::Biblio::MedlineJournalArticle; | |
97 use strict; | |
98 use vars qw(@ISA); | |
99 | |
100 use Bio::Biblio::JournalArticle; | |
101 use Bio::Biblio::MedlineArticle; | |
102 | |
103 @ISA = qw(Bio::Biblio::MedlineArticle Bio::Biblio::JournalArticle); | |
104 | |
105 # | |
106 # a closure with a list of allowed attribute names (these names | |
107 # correspond with the allowed 'get' and 'set' methods); each name also | |
108 # keep what type the attribute should be (use 'undef' if it is a | |
109 # simple scalar) | |
110 # | |
111 { | |
112 my %_allowed = | |
113 ( | |
114 _journal => 'Bio::Biblio::MedlineJournal', | |
115 ); | |
116 | |
117 # return 1 if $attr is allowed to be set/get in this class | |
118 sub _accessible { | |
119 my ($self, $attr) = @_; | |
120 return 1 if exists $_allowed{$attr}; | |
121 foreach my $parent (@ISA) { | |
122 return 1 if $parent->_accessible ($attr); | |
123 } | |
124 } | |
125 | |
126 # return an expected type of given $attr | |
127 sub _attr_type { | |
128 my ($self, $attr) = @_; | |
129 if (exists $_allowed{$attr}) { | |
130 return $_allowed{$attr}; | |
131 } else { | |
132 foreach my $parent (@ISA) { | |
133 if ($parent->_accessible ($attr)) { | |
134 return $parent->_attr_type ($attr); | |
135 } | |
136 } | |
137 } | |
138 return 'unknown'; | |
139 } | |
140 } | |
141 | |
142 | |
143 1; | |
144 __END__ |