1 #-----------------------------------------------------------------
3 # BioPerl module Bio::Search::GenericDatabase
5 # Please direct questions and support issues to <bioperl-l@bioperl.org>
7 # Cared for by Steve Chervitz <sac@bioperl.org>
9 # You may distribute this module under the same terms as perl itself
10 #-----------------------------------------------------------------
12 # POD documentation - main docs before the code
16 Bio::Search::GenericDatabase - Generic implementation of Bio::Search::DatabaseI
20 use Bio::Search::GenericDatabase;
22 $db = Bio::Search::GenericDatabase->new( -name => 'my Blast db',
23 -date => '2001-03-13',
29 $num_letters = $db->letters();
30 $num_entries = $db->entries();
34 This module provides a basic implementation of L<Bio::Search::DatabaseI>.
35 See documentation in that module for more information.
41 User feedback is an integral part of the evolution of this and other
42 Bioperl modules. Send your comments and suggestions preferably to one
43 of the Bioperl mailing lists. Your participation is much appreciated.
45 bioperl-l@bioperl.org - General discussion
46 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
50 Please direct usage questions or support issues to the mailing list:
52 I<bioperl-l@bioperl.org>
54 rather than to the module maintainer directly. Many experienced and
55 reponsive experts will be able look at the problem and quickly
56 address it. Please include a thorough description of the problem
57 with code and data examples if at all possible.
61 Report bugs to the Bioperl bug tracking system to help us keep track
62 the bugs and their resolution. Bug reports can be submitted via the
65 https://github.com/bioperl/bioperl-live/issues
69 Steve Chervitz E<lt>sac@bioperl.orgE<gt>
71 See L<the FEEDBACK section | FEEDBACK> for where to send bug reports and comments.
75 Copyright (c) 2001 Steve Chervitz. All Rights Reserved.
79 This software is provided "as is" without warranty of any kind.
86 The rest of the documentation details each of the object methods.
90 # Let the code begin...
92 package Bio
::Search
::GenericDatabase
;
96 use base
qw(Bio::Root::Root Bio::Search::DatabaseI);
99 my ($class, @args) = @_;
100 my $self = $class->SUPER::new
(@args);
101 my ($name, $date, $length, $ents) =
102 $self->_rearrange( [qw(NAME DATE LENGTH ENTRIES)], @args);
104 $name && $self->name($name);
105 $date && $self->date($date);
106 $length && $self->letters($length);
107 $ents && $self->entries($ents);
114 See L<Bio::Search::DatabaseI::name>() for documentation
116 This implementation is a combined set/get accessor.
126 $name =~ s/(^\s+|\s+$)//g;
127 $self->{'_db'} = $name;
134 See L<Bio::Search::DatabaseI::date>() for documentation
136 This implementation is a combined set/get accessor.
140 #-----------------------
142 #-----------------------
144 if(@_) { $self->{'_dbDate'} = shift; }
151 See L<Bio::Search::DatabaseI::letters>() for documentation
153 This implementation is a combined set/get accessor.
157 #----------------------
159 #----------------------
161 if(@_) { $self->{'_dbLetters'} = shift; }
162 $self->{'_dbLetters'};
168 See L<Bio::Search::DatabaseI::entries>() for documentation
170 This implementation is a combined set/get accessor.
178 if(@_) { $self->{'_dbEntries'} = shift; }
179 $self->{'_dbEntries'};