comparison variant_effect_predictor/Bio/Biblio/Service.pm @ 0:1f6dce3d34e0

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