1 #-----------------------------------------------------------------
4 # BioPerl module Bio::Search::GenericDatabase
6 # Cared for by Steve Chervitz <sac@bioperl.org>
8 # You may distribute this module under the same terms as perl itself
9 #-----------------------------------------------------------------
11 # POD documentation - main docs before the code
15 Bio::Search::GenericDatabase - Generic implementation of Bio::Search::DatabaseI
19 use Bio::Search::GenericDatabase;
21 $db = Bio::Search::GenericDatabase->new( -name => 'my Blast db',
22 -date => '2001-03-13',
28 $num_letters = $db->letters();
29 $num_entries = $db->entries();
33 This module provides a basic implementation of B<Bio::Search::DatabaseI>.
34 See documentation in that module for more information.
40 User feedback is an integral part of the evolution of this and other
41 Bioperl modules. Send your comments and suggestions preferably to one
42 of the Bioperl mailing lists. Your participation is much appreciated.
44 bioperl-l@bioperl.org - General discussion
45 http://bio.perl.org/MailList.html - About the mailing lists
49 Report bugs to the Bioperl bug tracking system to help us keep track
50 the bugs and their resolution. Bug reports can be submitted via email
53 bioperl-bugs@bio.perl.org
54 http://bugzilla.bioperl.org/
58 Steve Chervitz E<lt>sac@bioperl.orgE<gt>
60 See L<the FEEDBACK section | FEEDBACK> for where to send bug reports and comments.
64 Copyright (c) 2001 Steve Chervitz. All Rights Reserved.
68 This software is provided "as is" without warranty of any kind.
75 The rest of the documentation details each of the object methods.
79 # Let the code begin...
81 package Bio
::Search
::GenericDatabase
;
84 use Bio
::Search
::DatabaseI
;
88 @ISA = qw( Bio::Root::Root Bio::Search::DatabaseI);
91 my ($class, @args) = @_;
92 my $self = $class->SUPER::new
(@args);
93 my ($name, $date, $length, $ents) =
94 $self->_rearrange( [qw(NAME DATE LENGTH ENTRIES)], @args);
96 $name && $self->name($name);
97 $date && $self->date($date);
98 $length && $self->letters($length);
99 $ents && $self->entries($ents);
106 See L<Bio::Search::DatabaseI::name>() for documentation
108 This implementation is a combined set/get accessor.
118 $name =~ s/(^\s+|\s+$)//g;
119 $self->{'_db'} = $name;
126 See L<Bio::Search::DatabaseI::date>() for documentation
128 This implementation is a combined set/get accessor.
132 #-----------------------
134 #-----------------------
136 if(@_) { $self->{'_dbDate'} = shift; }
143 See L<Bio::Search::DatabaseI::letters>() for documentation
145 This implementation is a combined set/get accessor.
149 #----------------------
151 #----------------------
153 if(@_) { $self->{'_dbLetters'} = shift; }
154 $self->{'_dbLetters'};
160 See L<Bio::Search::DatabaseI::entries>() for documentation
162 This implementation is a combined set/get accessor.
170 if(@_) { $self->{'_dbEntries'} = shift; }
171 $self->{'_dbEntries'};