Sync'ed RichSeqI with the implementation. RichSeq provides backward
[bioperl-live.git] / Bio / Biblio / WebResource.pm
blob527343cf5c4686af2a20d2540c19354fa7eae799
1 # $Id$
3 # BioPerl module for Bio::Biblio::WebResource
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::WebResource - Representation of a web resource
14 =head1 SYNOPSIS
16 $obj = new Bio::Biblio::WebResource
17 (-url => 'http://resources/best.html',
18 -estimated_size => 45000);
19 --- OR ---
21 $obj = new Bio::Biblio::WebResource;
22 $obj->cost ('0.3 EURO');
24 =head1 DESCRIPTION
26 A storage object for a citation quoting a web resource.
27 See its place in the class hierarchy in
28 http://industry.ebi.ac.uk/openBQS/images/bibobjects_perl.gif
30 =head2 Attributes
32 The following attributes are specific to this class
33 (however, you can also set and get all attributes defined in the parent classes):
35 url
36 estimated_size
37 cost
39 =head1 SEE ALSO
41 =over
43 =item *
45 OpenBQS home page: http://industry.ebi.ac.uk/openBQS
47 =item *
49 Comments to the Perl client: http://industry.ebi.ac.uk/openBQS/Client_perl.html
51 =back
53 =head1 FEEDBACK
55 =head2 Mailing Lists
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.
61 bioperl-l@bioperl.org - General discussion
62 http://bioperl.org/MailList.shtml - About the mailing lists
64 =head2 Reporting Bugs
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:
70 bioperl-bugs@bioperl.org
71 http://bugzilla.bioperl.org/
73 =head1 AUTHORS
75 Heikki Lehvaslaiho (heikki@ebi.ac.uk),
76 Martin Senger (senger@ebi.ac.uk)
78 =head1 COPYRIGHT
80 Copyright (c) 2002 European Bioinformatics Institute. All Rights Reserved.
82 This module is free software; you can redistribute it and/or modify
83 it under the same terms as Perl itself.
85 =head1 DISCLAIMER
87 This software is provided "as is" without warranty of any kind.
89 =cut
92 # Let the code begin...
95 package Bio::Biblio::WebResource;
96 use strict;
97 use vars qw(@ISA);
99 use Bio::Biblio::Ref;
101 @ISA = qw( Bio::Biblio::Ref);
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)
110 my %_allowed = (
111 _url => undef,
112 _estimated_size => undef,
113 _cost => undef,
116 # return 1 if $attr is allowed to be set/get in this class
117 sub _accessible {
118 my ($self, $attr) = @_;
119 exists $_allowed{$attr} or $self->SUPER::_accessible ($attr);
122 # return an expected type of given $attr
123 sub _attr_type {
124 my ($self, $attr) = @_;
125 if (exists $_allowed{$attr}) {
126 return $_allowed{$attr};
127 } else {
128 return $self->SUPER::_attr_type ($attr);
135 __END__