fixed recursive_children cvterm function, and added tests for parents and children
[cxgn-corelibs.git] / lib / CXGN / Chado / Main.pm
blob5c87ddd8f813639fe3d2cf009acc740d86c06d67
2 =head1 NAME
4 CXGN::Chado::Main
5 package for the main methods used by Chado objects (CV, Db.. )
7 =head1 SYNOPSIS
9 =head1 AUTHOR
11 Naama Menda (nm249@cornell.edu)
13 =cut
15 package CXGN::Chado::Main;
17 use base qw / CXGN::DB::Object / ;
19 =head2 new
21 Usage: CXGN::Chado::Main->new($dbh)
22 Desc: a new Chado::Main class
23 Ret: $self
24 Args: database handle
25 Side Effects: sets dbh
26 Example:
28 =cut
30 sub new {
31 my $class=shift;
32 my $dbh= shift;
34 my $args = {};
35 my $self = $class->SUPER::new($dbh); #bless $args, $class;
37 $self->set_dbh($dbh);
39 return $self;
42 =head2 Class properties
44 The following class properties have accessors :
46 get_dbh/set_dbh
49 =cut
52 sub get_dbh {
53 my $self=shift;
54 return $self->{dbh};
57 sub set_dbh {
58 my $self=shift;
59 $self->{dbh}=shift;
63 ###
64 1;# do not remove
65 ###