0
|
1 # $Id: Provider.pm,v 1.4 2002/10/22 07:45:11 lapp Exp $
|
|
2 #
|
|
3 # BioPerl module for Bio::Biblio::Provider
|
|
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::Provider - Representation of a general provider
|
|
13
|
|
14 =head1 SYNOPSIS
|
|
15
|
|
16 # usually this class is not instantiated but can be...
|
|
17 $obj = new Bio::Biblio::Provider (-type => 'Department');
|
|
18
|
|
19 --- OR ---
|
|
20
|
|
21 $obj = new Bio::Biblio::Provider;
|
|
22 $obj->type ('Department');
|
|
23
|
|
24 =head1 DESCRIPTION
|
|
25
|
|
26 A storage object for a general bibliographic resource provider
|
|
27 (a rpovider can be a person, a organisation, or even a program).
|
|
28
|
|
29 =head2 Attributes
|
|
30
|
|
31 The following attributes are specific to this class,
|
|
32 and they are inherited by all provider types.
|
|
33
|
|
34 type
|
|
35
|
|
36 =head1 SEE ALSO
|
|
37
|
|
38 =over
|
|
39
|
|
40 =item *
|
|
41
|
|
42 OpenBQS home page: http://industry.ebi.ac.uk/openBQS
|
|
43
|
|
44 =item *
|
|
45
|
|
46 Comments to the Perl client: http://industry.ebi.ac.uk/openBQS/Client_perl.html
|
|
47
|
|
48 =back
|
|
49
|
|
50 =head1 FEEDBACK
|
|
51
|
|
52 =head2 Mailing Lists
|
|
53
|
|
54 User feedback is an integral part of the evolution of this and other
|
|
55 Bioperl modules. Send your comments and suggestions preferably to
|
|
56 the Bioperl mailing list. Your participation is much appreciated.
|
|
57
|
|
58 bioperl-l@bioperl.org - General discussion
|
|
59 http://bioperl.org/MailList.shtml - About the mailing lists
|
|
60
|
|
61 =head2 Reporting Bugs
|
|
62
|
|
63 Report bugs to the Bioperl bug tracking system to help us keep track
|
|
64 of the bugs and their resolution. Bug reports can be submitted via
|
|
65 email or the web:
|
|
66
|
|
67 bioperl-bugs@bioperl.org
|
|
68 http://bugzilla.bioperl.org/
|
|
69
|
|
70 =head1 AUTHORS
|
|
71
|
|
72 Heikki Lehvaslaiho (heikki@ebi.ac.uk),
|
|
73 Martin Senger (senger@ebi.ac.uk)
|
|
74
|
|
75 =head1 COPYRIGHT
|
|
76
|
|
77 Copyright (c) 2002 European Bioinformatics Institute. All Rights Reserved.
|
|
78
|
|
79 This module is free software; you can redistribute it and/or modify
|
|
80 it under the same terms as Perl itself.
|
|
81
|
|
82 =head1 DISCLAIMER
|
|
83
|
|
84 This software is provided "as is" without warranty of any kind.
|
|
85
|
|
86 =cut
|
|
87
|
|
88
|
|
89 # Let the code begin...
|
|
90
|
|
91
|
|
92 package Bio::Biblio::Provider;
|
|
93 use strict;
|
|
94 use vars qw(@ISA $AUTOLOAD);
|
|
95
|
|
96 use Bio::Biblio::BiblioBase;
|
|
97
|
|
98 @ISA = qw(Bio::Biblio::BiblioBase);
|
|
99
|
|
100 #
|
|
101 # a closure with a list of allowed attribute names (these names
|
|
102 # correspond with the allowed 'get' and 'set' methods); each name also
|
|
103 # keep what type the attribute should be (use 'undef' if it is a
|
|
104 # simple scalar)
|
|
105 #
|
|
106 {
|
|
107 my %_allowed =
|
|
108 (
|
|
109 _type => undef,
|
|
110 );
|
|
111
|
|
112 # return 1 if $attr is allowed to be set/get in this class
|
|
113 sub _accessible {
|
|
114 my ($self, $attr) = @_;
|
|
115 exists $_allowed{$attr};
|
|
116 }
|
|
117
|
|
118 # return an expected type of given $attr
|
|
119 sub _attr_type {
|
|
120 my ($self, $attr) = @_;
|
|
121 $_allowed{$attr};
|
|
122 }
|
|
123 }
|
|
124
|
|
125 1;
|
|
126 __END__
|