[bug 3148] switch default to "expasy" until we can work out REST service interface
[bioperl-live.git] / Bio / Biblio / Person.pm
blob36e5c6b370f5439ea4e9db394e57a96955181357
2 # BioPerl module for Bio::Biblio::Person
4 # Please direct questions and support issues to <bioperl-l@bioperl.org>
6 # Cared for by Martin Senger <senger@ebi.ac.uk>
7 # For copyright and disclaimer see below.
9 # POD documentation - main docs before the code
11 =head1 NAME
13 Bio::Biblio::Person - Representation of a person
15 =head1 SYNOPSIS
17 $obj = Bio::Biblio::Person->new(-lastname => 'Capek',
18 -firstname => 'Karel');
19 #--- OR ---
21 $obj = Bio::Biblio::Person->new();
22 $obj->firstname ('Karel');
23 $obj->lastname ('Capek');
25 =head1 DESCRIPTION
27 A storage object for a person related to a bibliographic resource.
29 =head2 Attributes
31 The following attributes are specific to this class
32 (however, you can also set and get all attributes defined in the parent classes):
34 affiliation
35 email
36 firstname
37 forename
38 initials
39 lastname
40 middlename
41 postal_address
42 suffix
44 =head1 SEE ALSO
46 =over 4
48 =item *
50 OpenBQS home page: http://www.ebi.ac.uk/~senger/openbqs/
52 =item *
54 Comments to the Perl client: http://www.ebi.ac.uk/~senger/openbqs/Client_perl.html
56 =back
58 =head1 FEEDBACK
60 =head2 Mailing Lists
62 User feedback is an integral part of the evolution of this and other
63 Bioperl modules. Send your comments and suggestions preferably to
64 the Bioperl mailing list. Your participation is much appreciated.
66 bioperl-l@bioperl.org - General discussion
67 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
69 =head2 Support
71 Please direct usage questions or support issues to the mailing list:
73 I<bioperl-l@bioperl.org>
75 rather than to the module maintainer directly. Many experienced and
76 reponsive experts will be able look at the problem and quickly
77 address it. Please include a thorough description of the problem
78 with code and data examples if at all possible.
80 =head2 Reporting Bugs
82 Report bugs to the Bioperl bug tracking system to help us keep track
83 of the bugs and their resolution. Bug reports can be submitted via the
84 web:
86 http://bugzilla.open-bio.org/
88 =head1 AUTHORS
90 Heikki Lehvaslaiho (heikki-at-bioperl-dot-org)
91 Martin Senger (senger@ebi.ac.uk)
93 =head1 COPYRIGHT
95 Copyright (c) 2002 European Bioinformatics Institute. All Rights Reserved.
97 This module is free software; you can redistribute it and/or modify
98 it under the same terms as Perl itself.
100 =head1 DISCLAIMER
102 This software is provided "as is" without warranty of any kind.
104 =cut
107 # Let the code begin...
110 package Bio::Biblio::Person;
111 use strict;
114 use base qw(Bio::Biblio::Provider);
117 # a closure with a list of allowed attribute names (these names
118 # correspond with the allowed 'get' and 'set' methods); each name also
119 # keep what type the attribute should be (use 'undef' if it is a
120 # simple scalar)
123 my %_allowed =
125 _affiliation => undef,
126 _email => undef,
127 _firstname => undef,
128 _forename => undef,
129 _initials => undef,
130 _lastname => undef,
131 _middlename => undef,
132 _postal_address => undef,
133 _suffix => undef,
136 # return 1 if $attr is allowed to be set/get in this class
137 sub _accessible {
138 my ($self, $attr) = @_;
139 exists $_allowed{$attr} or $self->SUPER::_accessible ($attr);
142 # return an expected type of given $attr
143 sub _attr_type {
144 my ($self, $attr) = @_;
145 if (exists $_allowed{$attr}) {
146 return $_allowed{$attr};
147 } else {
148 return $self->SUPER::_attr_type ($attr);
155 __END__