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