These documents are For the HEAD of the CVS repository on July 19, 2007 Api docs for previous releases

Modware

Constant

Summary Package variables Synopsis Description General documentation Methods

Summary
   Modware::Constant - Retrieves and caches commonly used ids and records from the database.
Package variables top
Privates (from my definitions)
($global_db) = Chado::Db->get_single_row( name => 'DB:'.$ENV{'DATABASE_NAME'} )
$auto_cv = Chado::Cv->get_single_row( name => 'autocreated' )
$fp_cv = Chado::Cv->get_single_row( name => 'feature_property' )
($sequence_ontology) = Chado::Cv->get_single_row( name => 'sequence' )
$rel_cv = Chado::Cv->get_single_row( name => 'relationship' )
$null_cv = Chado::Cv->get_single_row( name => 'null' )
($organism) = Chado::Organism->get_single_row( common_name => $ENV{'ORGANISM_COMMON_NAME'})
Included modulestop
Chado::AutoDBI
Modware::Config
Synopsistop
   #USE CASE: use the Auto_cv_id to retrieve the ID
# of the autocreated cv created by GMOD
my $auto_cv_id = Modware::Constant->Auto_cv_id();

Some_db_object->create({ cv_id => $auto_cv_id,
some_other_field => 'some value' });
Descriptiontop
  This class provides a convenient interface for retrieving commonly used ids

The methods provided are:

Modware::Constant->Auto_cv_id() # the id of the autocreated cv use by GMOD
Modware::Constant->Application_db_id() # the id of the entry in the DB
# table for your application
Modware::Constant->Organism_id() # the organism_id for your application
Modware::Constant->Sequence_ontology_id() # the id of sequence ontology
Modware::Constant->Relationship_cv_id() # the id of relationship ontology
Modware::Constant->Feature_property_cv_id() # the id of feature_property cv
Modware::Constant->Null_cv_id() # the id of the Null cv (inserted by GMOD for use when cv is required
# but no cv yet exists
Methodstop
Application_db_idNo descriptionCode
Auto_cv_idNo descriptionCode
Feature_property_cv_idNo descriptionCode
Null_cv_idNo descriptionCode
Organism_idNo descriptionCode
Relationship_cv_idNo descriptionCode
Sequence_ontology_idNo descriptionCode

Methods description


Methods code

Application_db_iddescriptiontopprevnext
sub Application_db_id {
   return $global_db->db_id();
}
Auto_cv_iddescriptiontopprevnext
sub Auto_cv_id {
   return $auto_cv->cv_id();
}
Feature_property_cv_iddescriptiontopprevnext
sub Feature_property_cv_id {
   return $fp_cv->cv_id();
}
Null_cv_iddescriptiontopprevnext
sub Null_cv_id {
   return $null_cv->cv_id();
}
Organism_iddescriptiontopprevnext
sub Organism_id {
   return $organism->organism_id();;
}
Relationship_cv_iddescriptiontopprevnext
sub Relationship_cv_id {
   return $rel_cv->cv_id();
}
Sequence_ontology_iddescriptiontopprevnext
sub Sequence_ontology_id {
   return $sequence_ontology->cv_id();
}

General documentation

AUTHOR - Eric Just top
   Eric Just e-just@northwestern.edu
APPENDIX top
   The rest of the documentation details each of the object
methods. Internal methods are usually preceded with a _