bug 2387
[bioperl-db.git] / Bio / DB / DBAdaptorI.pm
blob1b2c6280586bdd3cbd4dc23ef4aee883842fb4fe
1 # $Id$
3 # BioPerl module for Bio::DB::DBAdaptorI
5 # Cared for by Hilmar Lapp <hlapp at gmx.net>
7 # Copyright Hilmar Lapp
9 # You may distribute this module under the same terms as perl itself
12 # (c) Hilmar Lapp, hlapp at gmx.net, 2002.
13 # (c) GNF, Genomics Institute of the Novartis Research Foundation, 2002.
15 # You may distribute this module under the same terms as perl itself.
16 # Refer to the Perl Artistic License (see the license accompanying this
17 # software package, or see http://www.perl.com/language/misc/Artistic.html)
18 # for the terms under which you may use, modify, and redistribute this module.
20 # THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
21 # WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
22 # MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
25 # POD documentation - main docs before the code
27 =head1 NAME
29 Bio::DB::DBAdaptorI - DESCRIPTION of Interface
31 =head1 SYNOPSIS
33 Give standard usage here
35 =head1 DESCRIPTION
37 This interface describes the basic datastore adaptor that acts as a factory.
39 It allows one to obtain adaptors for specific classes or objects, as well as
40 objects that make a class or object peristent.
42 =head1 FEEDBACK
44 =head2 Mailing Lists
46 User feedback is an integral part of the evolution of this and other
47 Bioperl modules. Send your comments and suggestions preferably to
48 the Bioperl mailing list. Your participation is much appreciated.
50 bioperl-l@bioperl.org - General discussion
51 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
53 =head2 Reporting Bugs
55 Report bugs to the Bioperl bug tracking system to help us keep track
56 of the bugs and their resolution. Bug reports can be submitted via
57 the web:
59 http://bugzilla.open-bio.org/
61 =head1 AUTHOR - Hilmar Lapp
63 Email hlapp at gmx.net
65 Describe contact details here
67 =head1 CONTRIBUTORS
69 Additional contributors names and emails here
71 =head1 APPENDIX
73 The rest of the documentation details each of the object methods.
74 Internal methods are usually preceded with a _
76 =cut
79 # Let the code begin...
82 package Bio::DB::DBAdaptorI;
83 use vars qw(@ISA);
84 use strict;
85 use Carp;
86 use Bio::Root::RootI;
88 @ISA = qw( Bio::Root::RootI );
90 =head2 get_object_adaptor
92 Title : get_object_adaptor
93 Usage : $objadp = $adaptor->get_object_adaptor("Bio::SeqI");
94 Function: Obtain an PersistenceAdaptorI compliant object for the given class
95 or object.
96 Example :
97 Returns : The appropriate object adaptor, a Bio::DB::PersistenceAdaptorI
98 implementing object.
99 Args : The class (a string) or object for which the adaptor is to be
100 obtained. Optionally, a DBContextI implementing object to initialize
101 the adaptor with.
104 =cut
106 sub get_object_adaptor{
107 my ($self,@args) = @_;
109 $self->throw_not_implemented();
112 =head2 create_persistent
114 Title : create_persistent
115 Usage : $dbadaptor->create_persistent($obj)
116 Function: Creates a PersistentObjectI implementing object that adapts the
117 given object to the datastore.
118 Example :
119 Returns : A Bio::DB::PeristentObjectI implementing object
120 Args : An object of a type that can be stored in the datastore adapted
121 by this factory. Alternatively, the class name of such an object.
122 All remaining arguments should be passed to the constructor of the
123 class if the first argument is a class name.
126 =cut
128 sub create_persistent{
129 my ($self,@args) = @_;
131 $self->throw_not_implemented();