Sync'ed RichSeqI with the implementation. RichSeq provides backward
[bioperl-live.git] / Bio / Biblio / Person.pm
blob6eff458bd4e3243676ea60f4a4db7da442b8d1b2
1 # $Id$
3 # BioPerl module for Bio::Biblio::Person
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::Person - Representation of a person
14 =head1 SYNOPSIS
16 $obj = new Bio::Biblio::Person (-lastname => 'Capek',
17 -firstname => 'Karel');
18 --- OR ---
20 $obj = new Bio::Biblio::Person;
21 $obj->firstname ('Karel');
22 $obj->lastname ('Capek');
24 =head1 DESCRIPTION
26 A storage object for a person related to a bibliographic resource.
28 =head2 Attributes
30 The following attributes are specific to this class
31 (however, you can also set and get all attributes defined in the parent classes):
33 affiliation
34 email
35 firstname
36 forename
37 initials
38 lastname
39 middlename
40 postal_address
41 suffix
43 =head1 SEE ALSO
45 =over
47 =item *
49 OpenBQS home page: http://industry.ebi.ac.uk/openBQS
51 =item *
53 Comments to the Perl client: http://industry.ebi.ac.uk/openBQS/Client_perl.html
55 =back
57 =head1 FEEDBACK
59 =head2 Mailing Lists
61 User feedback is an integral part of the evolution of this and other
62 Bioperl modules. Send your comments and suggestions preferably to
63 the Bioperl mailing list. Your participation is much appreciated.
65 bioperl-l@bioperl.org - General discussion
66 http://bioperl.org/MailList.shtml - About the mailing lists
68 =head2 Reporting Bugs
70 Report bugs to the Bioperl bug tracking system to help us keep track
71 of the bugs and their resolution. Bug reports can be submitted via
72 email or the web:
74 bioperl-bugs@bioperl.org
75 http://bugzilla.bioperl.org/
77 =head1 AUTHORS
79 Heikki Lehvaslaiho (heikki@ebi.ac.uk)
80 Martin Senger (senger@ebi.ac.uk)
82 =head1 COPYRIGHT
84 Copyright (c) 2002 European Bioinformatics Institute. All Rights Reserved.
86 This module is free software; you can redistribute it and/or modify
87 it under the same terms as Perl itself.
89 =head1 DISCLAIMER
91 This software is provided "as is" without warranty of any kind.
93 =cut
96 # Let the code begin...
99 package Bio::Biblio::Person;
100 use strict;
101 use vars qw(@ISA);
103 use Bio::Biblio::Provider;
105 @ISA = qw( Bio::Biblio::Provider);
108 # a closure with a list of allowed attribute names (these names
109 # correspond with the allowed 'get' and 'set' methods); each name also
110 # keep what type the attribute should be (use 'undef' if it is a
111 # simple scalar)
114 my %_allowed =
116 _affiliation => undef,
117 _email => undef,
118 _firstname => undef,
119 _forename => undef,
120 _initials => undef,
121 _lastname => undef,
122 _middlename => undef,
123 _postal_address => undef,
124 _suffix => undef,
127 # return 1 if $attr is allowed to be set/get in this class
128 sub _accessible {
129 my ($self, $attr) = @_;
130 exists $_allowed{$attr} or $self->SUPER::_accessible ($attr);
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 return $self->SUPER::_attr_type ($attr);
146 __END__