function tripal_analysis_add_cvterms

2.x tripal_analysis.install tripal_analysis_add_cvterms()
3.x tripal_analysis.install tripal_analysis_add_cvterms()
1.x tripal_analysis.install tripal_analysis_add_cvterms()

Adds controlled vocabulary terms needed by this module.

Related topics

1 call to tripal_analysis_add_cvterms()
tripal_analysis_install in tripal_analysis/tripal_analysis.install
Implementation of hook_install().

File

tripal_analysis/tripal_analysis.install, line 122
Implements hooks from the Schema API.

Code

function tripal_analysis_add_cvterms() {

  tripal_insert_cv(
  'tripal_analysis', 
  'Terms used for managing analyses in Tripal'
  );

  // add analysis_date.  This is no longer used (as far as we can tell) but we don't
  // get rid of it in case it is used, so just keep it in the Tripal CV
  tripal_insert_cvterm(
  array(
    'name' => 'analysis_date',
    'definition' => 'The date that an analysis was performed.',
    'cv_name' => 'tripal',
    'is_relationship' => 0,
    'db_name' => 'tripal'
  ), 
  array('update_existing' => TRUE)
  );

  // add analysis_short_name.  This is no longer used (as far as we can tell) but we don't
  // get rid of it in case it is used, so just keep it in the Tripal CV
  tripal_insert_cvterm(
  array(
    'name' => 'analysis_short_name',
    'definition' => 'A computer legible (no spaces or special characters) '
      . 'abbreviation for the analysis.',
    'cv_name' => 'tripal',
    'is_relationship' => 0,
    'db_name' => 'tripal'
  ), 
  array('update_existing' => TRUE)
  );


  // the 'analysis_property' vocabulary is for user definable properties wo we
  // will add an 'Analysis Type' to this vocubulary
  tripal_insert_cvterm(
  array(
    'name' => 'Analysis Type',
    'definition' => 'The type of analysis that was performed.',
    'cv_name' => 'analysis_property',
    'is_relationship' => 0,
    'db_name' => 'tripal'
  ), 
  array('update_existing' => TRUE)
  );
}