~ubuntu-branches/ubuntu/trusty/bioperl/trusty

« back to all changes in this revision

Viewing changes to Bio/Biblio/Provider.pm

  • Committer: Package Import Robot
  • Author(s): Charles Plessy
  • Date: 2013-09-22 13:39:48 UTC
  • mfrom: (3.1.11 sid)
  • Revision ID: package-import@ubuntu.com-20130922133948-c6z62zegjyp7ztou
Tags: 1.6.922-1
* New upstream release.
* Replaces and Breaks grinder (<< 0.5.3-3~) because of overlaping contents.
  Closes: #722910
* Stop Replacing and Breaking bioperl ( << 1.6.9 ): not needed anymore. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#
2
 
# BioPerl module for Bio::Biblio::Provider
3
 
#
4
 
# Please direct questions and support issues to <bioperl-l@bioperl.org> 
5
 
#
6
 
# Cared for by Martin Senger <senger@ebi.ac.uk>
7
 
# For copyright and disclaimer see below.
8
 
 
9
 
# POD documentation - main docs before the code
10
 
 
11
 
=head1 NAME
12
 
 
13
 
Bio::Biblio::Provider - Representation of a general provider
14
 
 
15
 
=head1 SYNOPSIS
16
 
 
17
 
    # usually this class is not instantiated but can be...
18
 
    $obj = Bio::Biblio::Provider->new(-type => 'Department');
19
 
 
20
 
  #--- OR ---
21
 
 
22
 
    $obj = Bio::Biblio::Provider->new();
23
 
    $obj->type ('Department');
24
 
 
25
 
=head1 DESCRIPTION
26
 
 
27
 
A storage object for a general bibliographic resource provider
28
 
(a rpovider can be a person, a organisation, or even a program).
29
 
 
30
 
=head2 Attributes
31
 
 
32
 
The following attributes are specific to this class, 
33
 
and they are inherited by all provider types.
34
 
 
35
 
  type
36
 
 
37
 
=head1 SEE ALSO
38
 
 
39
 
=over 4
40
 
 
41
 
=item *
42
 
 
43
 
OpenBQS home page: http://www.ebi.ac.uk/~senger/openbqs/
44
 
 
45
 
=item *
46
 
 
47
 
Comments to the Perl client: http://www.ebi.ac.uk/~senger/openbqs/Client_perl.html
48
 
 
49
 
=back
50
 
 
51
 
=head1 FEEDBACK
52
 
 
53
 
=head2 Mailing Lists
54
 
 
55
 
User feedback is an integral part of the evolution of this and other
56
 
Bioperl modules. Send your comments and suggestions preferably to
57
 
the Bioperl mailing list.  Your participation is much appreciated.
58
 
 
59
 
  bioperl-l@bioperl.org                  - General discussion
60
 
  http://bioperl.org/wiki/Mailing_lists  - About the mailing lists
61
 
 
62
 
=head2 Support 
63
 
 
64
 
Please direct usage questions or support issues to the mailing list:
65
 
 
66
 
I<bioperl-l@bioperl.org>
67
 
 
68
 
rather than to the module maintainer directly. Many experienced and 
69
 
reponsive experts will be able look at the problem and quickly 
70
 
address it. Please include a thorough description of the problem 
71
 
with code and data examples if at all possible.
72
 
 
73
 
=head2 Reporting Bugs
74
 
 
75
 
Report bugs to the Bioperl bug tracking system to help us keep track
76
 
of the bugs and their resolution. Bug reports can be submitted via the
77
 
web:
78
 
 
79
 
  https://redmine.open-bio.org/projects/bioperl/
80
 
 
81
 
=head1 AUTHORS
82
 
 
83
 
Heikki Lehvaslaiho (heikki-at-bioperl-dot-org),
84
 
Martin Senger (senger@ebi.ac.uk)
85
 
 
86
 
=head1 COPYRIGHT
87
 
 
88
 
Copyright (c) 2002 European Bioinformatics Institute. All Rights Reserved.
89
 
 
90
 
This module is free software; you can redistribute it and/or modify
91
 
it under the same terms as Perl itself.
92
 
 
93
 
=head1 DISCLAIMER
94
 
 
95
 
This software is provided "as is" without warranty of any kind.
96
 
 
97
 
=cut
98
 
 
99
 
 
100
 
# Let the code begin...
101
 
 
102
 
 
103
 
package Bio::Biblio::Provider;
104
 
use strict;
105
 
use vars qw($AUTOLOAD);
106
 
 
107
 
 
108
 
use base qw(Bio::Biblio::BiblioBase);
109
 
 
110
 
#
111
 
# a closure with a list of allowed attribute names (these names
112
 
# correspond with the allowed 'get' and 'set' methods); each name also
113
 
# keep what type the attribute should be (use 'undef' if it is a
114
 
# simple scalar)
115
 
#
116
 
{
117
 
    my %_allowed =
118
 
        (
119
 
         _type => undef,
120
 
         );
121
 
 
122
 
    # return 1 if $attr is allowed to be set/get in this class
123
 
    sub _accessible {
124
 
        my ($self, $attr) = @_;
125
 
        exists $_allowed{$attr};
126
 
    }
127
 
 
128
 
    # return an expected type of given $attr
129
 
    sub _attr_type {
130
 
        my ($self, $attr) = @_;
131
 
        $_allowed{$attr};
132
 
    }
133
 
}
134
 
 
135
 
1;
136
 
__END__