* sync with trunk
[bioperl-live.git] / Bio / Biblio / JournalArticle.pm
blob975d7c3a9ea0081027b1723024c6a5ceda807198
1 # $Id$
3 # BioPerl module for Bio::Biblio::JournalArticle
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::JournalArticle - Representation of a journal article
14 =head1 SYNOPSIS
16 $obj = Bio::Biblio::JournalArticle->new(-title => 'Come to grief',
17 -journal => Bio::Biblio::Journal->new());
18 #--- OR ---
20 $obj = Bio::Biblio::JournalArticle->new();
21 $obj->title ('Come to grief');
22 $obj->journal (Bio::Biblio::Journal->new(-name => 'English Mysteries'));
24 =head1 DESCRIPTION
26 A storage object for a journal article.
27 See its place in the class hierarchy in
28 http://www.ebi.ac.uk/~senger/openbqs/images/bibobjects_perl.gif
30 =head2 Attributes
32 The following attributes are specific to this class
33 (however, you can also set and get all attributes defined in the parent classes):
35 issue
36 issue_supplement
37 journal type: Bio::Biblio::Journal
38 volume
40 =head1 SEE ALSO
42 =over 4
44 =item *
46 OpenBQS home page: http://www.ebi.ac.uk/~senger/openbqs/
48 =item *
50 Comments to the Perl client: http://www.ebi.ac.uk/~senger/openbqs/Client_perl.html
52 =back
54 =head1 FEEDBACK
56 =head2 Mailing Lists
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.
62 bioperl-l@bioperl.org - General discussion
63 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
65 =head2 Reporting Bugs
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 the
69 web:
71 http://bugzilla.open-bio.org/
73 =head1 AUTHORS
75 Heikki Lehvaslaiho (heikki-at-bioperl-dot-org),
76 Martin Senger (senger@ebi.ac.uk)
78 =head1 COPYRIGHT
80 Copyright (c) 2002 European Bioinformatics Institute. All Rights Reserved.
82 This module is free software; you can redistribute it and/or modify
83 it under the same terms as Perl itself.
85 =head1 DISCLAIMER
87 This software is provided "as is" without warranty of any kind.
89 =cut
92 # Let the code begin...
95 package Bio::Biblio::JournalArticle;
96 use strict;
99 use base qw(Bio::Biblio::Article);
102 # a closure with a list of allowed attribute names (these names
103 # correspond with the allowed 'get' and 'set' methods); each name also
104 # keep what type the attribute should be (use 'undef' if it is a
105 # simple scalar)
108 my %_allowed =
110 _issue => undef,
111 _issue_supplement => undef,
112 _journal => 'Bio::Biblio::Journal',
113 _volume => undef,
116 # return 1 if $attr is allowed to be set/get in this class
117 sub _accessible {
118 my ($self, $attr) = @_;
119 exists $_allowed{$attr} or $self->SUPER::_accessible ($attr);
122 # return an expected type of given $attr
123 sub _attr_type {
124 my ($self, $attr) = @_;
125 if (exists $_allowed{$attr}) {
126 return $_allowed{$attr};
127 } else {
128 return $self->SUPER::_attr_type ($attr);
135 __END__