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 L<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://bioperl.org/wiki/Mailing_lists - 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 the
53 http://bugzilla.open-bio.org/
57 Steve Chervitz E<lt>sac@bioperl.orgE<gt>
59 See L<the FEEDBACK section | FEEDBACK> for where to send bug reports and comments.
63 Copyright (c) 2001 Steve Chervitz. All Rights Reserved.
67 This software is provided "as is" without warranty of any kind.
74 The rest of the documentation details each of the object methods.
78 # Let the code begin...
80 package Bio
::Search
::GenericDatabase
;
84 use base
qw(Bio::Root::Root Bio::Search::DatabaseI);
87 my ($class, @args) = @_;
88 my $self = $class->SUPER::new
(@args);
89 my ($name, $date, $length, $ents) =
90 $self->_rearrange( [qw(NAME DATE LENGTH ENTRIES)], @args);
92 $name && $self->name($name);
93 $date && $self->date($date);
94 $length && $self->letters($length);
95 $ents && $self->entries($ents);
102 See L<Bio::Search::DatabaseI::name>() for documentation
104 This implementation is a combined set/get accessor.
114 $name =~ s/(^\s+|\s+$)//g;
115 $self->{'_db'} = $name;
122 See L<Bio::Search::DatabaseI::date>() for documentation
124 This implementation is a combined set/get accessor.
128 #-----------------------
130 #-----------------------
132 if(@_) { $self->{'_dbDate'} = shift; }
139 See L<Bio::Search::DatabaseI::letters>() for documentation
141 This implementation is a combined set/get accessor.
145 #----------------------
147 #----------------------
149 if(@_) { $self->{'_dbLetters'} = shift; }
150 $self->{'_dbLetters'};
156 See L<Bio::Search::DatabaseI::entries>() for documentation
158 This implementation is a combined set/get accessor.
166 if(@_) { $self->{'_dbEntries'} = shift; }
167 $self->{'_dbEntries'};