Browse Source

found deprecated terms that needed to be swapped out

Shawna Spoor 6 years ago
parent
commit
9096723c9a
37 changed files with 340 additions and 341 deletions
  1. 3 3
      tests/tripal_chado/api/TripalChadoAPITest.php
  2. 2 2
      tripal/includes/tripal.extensions.inc
  3. 2 3
      tripal_chado/api/tripal_chado.DEPRECATED.api.inc
  4. 4 4
      tripal_chado/api/tripal_chado.custom_tables.api.inc
  5. 2 2
      tripal_chado/includes/TripalFields/ChadoField.inc
  6. 12 12
      tripal_chado/includes/TripalFields/chado_linker__contact/chado_linker__contact.inc
  7. 3 3
      tripal_chado/includes/TripalFields/chado_linker__contact/chado_linker__contact_formatter.inc
  8. 1 1
      tripal_chado/includes/TripalFields/chado_linker__contact/chado_linker__contact_widget.inc
  9. 2 2
      tripal_chado/includes/TripalFields/data__accession/data__accession.inc
  10. 16 16
      tripal_chado/includes/TripalFields/data__sequence_coordinates/data__sequence_coordinates.inc
  11. 4 4
      tripal_chado/includes/TripalFields/data__sequence_coordinates/data__sequence_coordinates_formatter.inc
  12. 12 12
      tripal_chado/includes/TripalFields/local__contact/local__contact.inc
  13. 3 3
      tripal_chado/includes/TripalFields/local__contact/local__contact_formatter.inc
  14. 1 1
      tripal_chado/includes/TripalFields/local__contact/local__contact_widget.inc
  15. 12 12
      tripal_chado/includes/TripalFields/local__source_data/local__source_data.inc
  16. 3 3
      tripal_chado/includes/TripalFields/local__source_data/local__source_data_formatter.inc
  17. 19 19
      tripal_chado/includes/TripalFields/obi__organism/obi__organism.inc
  18. 24 24
      tripal_chado/includes/TripalFields/ogi__location_on_map/ogi__location_on_map.inc
  19. 12 12
      tripal_chado/includes/TripalFields/sbo__database_cross_reference/sbo__database_cross_reference.inc
  20. 3 3
      tripal_chado/includes/TripalFields/sbo__database_cross_reference/sbo__database_cross_reference_formatter.inc
  21. 16 16
      tripal_chado/includes/TripalFields/sio__annotation/sio__annotation.inc
  22. 4 4
      tripal_chado/includes/TripalFields/sio__annotation/sio__annotation_formatter.inc
  23. 8 8
      tripal_chado/includes/TripalFields/sio__annotation/sio__annotation_widget.inc
  24. 8 8
      tripal_chado/includes/TripalFields/taxrank__infraspecific_taxon/taxrank__infraspecific_taxon.inc
  25. 2 2
      tripal_chado/includes/TripalFields/taxrank__infraspecific_taxon/taxrank__infraspecific_taxon_formatter.inc
  26. 4 4
      tripal_chado/includes/TripalImporter/OBOImporter.inc
  27. 6 6
      tripal_chado/includes/setup/tripal_chado.chado_vx_x.inc
  28. 4 4
      tripal_chado/includes/setup/tripal_chado.setup.inc
  29. 2 2
      tripal_chado/includes/tripal_chado.field_storage.inc
  30. 2 2
      tripal_chado/includes/tripal_chado.fields.inc
  31. 1 1
      tripal_chado/includes/tripal_chado.migrate.inc
  32. 4 4
      tripal_chado/includes/tripal_chado.mviews.inc
  33. 1 1
      tripal_chado/includes/tripal_chado.publish.inc
  34. 95 95
      tripal_chado/includes/tripal_chado.semweb.inc
  35. 1 1
      tripal_chado/tripal_chado.drush.inc
  36. 40 40
      tripal_chado/tripal_chado.install
  37. 2 2
      tripal_chado/tripal_chado.module

+ 3 - 3
tests/tripal_chado/api/TripalChadoAPITest.php

@@ -57,12 +57,12 @@ class TripalChadoAPITest extends TripalTestCase {
   }
 
   /**
-   * calls tripal_get_chado_tokens.
+   * calls chado_get_tokens.
    *
    * @group api
    */
-  public function test_tripal_get_chado_tokens() {
-    $tokens = tripal_get_chado_tokens('organism');
+  public function test_chado_get_tokens() {
+    $tokens = chado_get_tokens('organism');
     $this->assertNotEmpty($tokens);
     $this->assertArrayHasKey('[organism.organism_id]', $tokens);
   }

+ 2 - 2
tripal/includes/tripal.extensions.inc

@@ -361,7 +361,7 @@ function tripal_extension_form_add_extensions(&$form, $form_state, $extensions,
           }
           break;
         case 'Materialized View':
-          $mview_id = tripal_get_mview_id($extension[$namespace]['mview_name']);
+          $mview_id = chado_get_mview_id($extension[$namespace]['mview_name']);
           if ($mview_id) {
             $is_installed = '<li>A materialized view with this name is already installed.</li>';
           }
@@ -570,7 +570,7 @@ function tripal_extensions_form_submit($form, &$form_state) {
         if ($error) {
           drupal_set_message("Cannot import Materialized View: $error", "error");
         }
-        tripal_add_mview($mview_name, $module_name, $schema_array, $mview_sql);
+        chado_add_mview($mview_name, $module_name, $schema_array, $mview_sql);
         break;
       case 'Extension Module':
         if (array_key_exists('drupal_project', $extension[$namespace])) {

+ 2 - 3
tripal_chado/api/tripal_chado.DEPRECATED.api.inc

@@ -366,8 +366,7 @@ function tripal_associate_chado_semweb_term(
     $chado_table,
     $chado_column,
     $term,
-    $update = false
-  );
+    $update);
 }
 
 
@@ -392,7 +391,7 @@ function tripal_associate_chado_semweb_term(
  */
 function tripal_get_chado_semweb_term($chado_table, $chado_column, $options = array())
 {
-  chado_get_semweb_term($chado_table, $chado_column, $options = array());
+  chado_get_semweb_term($chado_table, $chado_column, $options);
 }
 
 /**

+ 4 - 4
tripal_chado/api/tripal_chado.custom_tables.api.inc

@@ -96,11 +96,11 @@ function chado_edit_custom_table($table_id, $table_name, $schema, $skip_if_exist
  * added to the tripal_custom_tables and no table is created in Chado.
  *
  * If you are creating a materialized view do not use this function, but rather
- * use the tripal_add_mview(). A materialized view is also considered a custom 
+ * use the chado_add_mview(). A materialized view is also considered a custom 
  * table and an entry for it will be added to both the tripal_mviews and
- * tripal_custom_tables tables, but only if the tripal_add_mview() function is
+ * tripal_custom_tables tables, but only if the chado_add_mview() function is
  * used. The optional $mview_id parameters in this function is intended
- * for use by the tripal_add_mview() function when it calls this function
+ * for use by the chado_add_mview() function when it calls this function
  * to create the table.
  *
  * @param $table
@@ -115,7 +115,7 @@ function chado_edit_custom_table($table_id, $table_name, $schema, $skip_if_exist
  * @param $mview_id
  *   Optional. If this custom table is also a materialized view then provide
  *   it's mview_id. This paramter is intended only when this function
- *   is called by the tripal_add_mview() function. When creating a custom
+ *   is called by the chado_add_mview() function. When creating a custom
  *   table you shouldn't need to use this parameter.
  * @param $redirect
  *   Optional (default: TRUE). By default this function redirects back to

+ 2 - 2
tripal_chado/includes/TripalFields/ChadoField.inc

@@ -78,7 +78,7 @@ class ChadoField extends TripalField {
     if ($chado_table == $base_table) {
       // Get the base table column that is associated with the term
       // passed as $condition['column'].
-      $base_field = tripal_get_chado_semweb_column($chado_table, $condition['column']);
+      $base_field = chado_get_semweb_column($chado_table, $condition['column']);
       $query->condition('base.' . $base_field , $condition['value'], $operator);
     }
     else {
@@ -106,7 +106,7 @@ class ChadoField extends TripalField {
     if ($chado_table == $base_table) {
       // Get the base table column that is associated with the term
       // passed as $condition['column'].
-      $base_field = tripal_get_chado_semweb_column($chado_table, $order['column']);
+      $base_field = chado_get_semweb_column($chado_table, $order['column']);
       $query->orderBy('base.' . $base_field, $order['direction']);
     }
     else {

+ 12 - 12
tripal_chado/includes/TripalFields/chado_linker__contact/chado_linker__contact.inc

@@ -62,9 +62,9 @@ class chado_linker__contact extends ChadoField {
   public function elementInfo() {
 
     $field_term = $this->getFieldTermID();
-    $type_term = tripal_get_chado_semweb_term('contact', 'type_id');
-    $name_term = tripal_get_chado_semweb_term('contact', 'name');
-    $description_term = tripal_get_chado_semweb_term('contact', 'description');
+    $type_term = chado_get_semweb_term('contact', 'type_id');
+    $name_term = chado_get_semweb_term('contact', 'name');
+    $description_term = chado_get_semweb_term('contact', 'description');
 
     return array(
       $field_term => array(
@@ -124,9 +124,9 @@ class chado_linker__contact extends ChadoField {
     $field_column = $this->instance['settings']['chado_column'];
     $base_table = $this->instance['settings']['base_table'];
 
-    $type_term = tripal_get_chado_semweb_term('contact', 'type_id');
-    $name_term = tripal_get_chado_semweb_term('contact', 'name');
-    $description_term = tripal_get_chado_semweb_term('contact', 'description');
+    $type_term = chado_get_semweb_term('contact', 'type_id');
+    $name_term = chado_get_semweb_term('contact', 'name');
+    $description_term = chado_get_semweb_term('contact', 'description');
 
     // Get the FK that links to the base record.
     $schema = chado_get_schema($field_table);
@@ -193,9 +193,9 @@ class chado_linker__contact extends ChadoField {
     $operator = $condition['operator'];
 
     $field_term_id = $this->getFieldTermID();
-    $type_term = tripal_get_chado_semweb_term('contact', 'type_id');
-    $name_term = tripal_get_chado_semweb_term('contact', 'name');
-    $description_term = tripal_get_chado_semweb_term('contact', 'description');
+    $type_term = chado_get_semweb_term('contact', 'type_id');
+    $name_term = chado_get_semweb_term('contact', 'name');
+    $description_term = chado_get_semweb_term('contact', 'description');
 
     $contact_linker = $this->instance['settings']['chado_table'];
     $base_table = $this->instance['settings']['base_table'];
@@ -234,9 +234,9 @@ class chado_linker__contact extends ChadoField {
   public function queryOrder($query, $order) {
     $alias = $this->field['field_name'];
     $field_term_id = $this->getFieldTermID();
-    $type_term = tripal_get_chado_semweb_term('contact', 'type_id');
-    $name_term = tripal_get_chado_semweb_term('contact', 'name');
-    $description_term = tripal_get_chado_semweb_term('contact', 'description');
+    $type_term = chado_get_semweb_term('contact', 'type_id');
+    $name_term = chado_get_semweb_term('contact', 'name');
+    $description_term = chado_get_semweb_term('contact', 'description');
 
     $contact_linker = $this->instance['settings']['chado_table'];
     $base_table = $this->instance['settings']['base_table'];

+ 3 - 3
tripal_chado/includes/TripalFields/chado_linker__contact/chado_linker__contact_formatter.inc

@@ -24,9 +24,9 @@ class chado_linker__contact_formatter extends ChadoFieldFormatter {
     // Get the settings
     $settings = $display['settings'];
 
-    $type_term = tripal_get_chado_semweb_term('contact', 'type_id');
-    $name_term = tripal_get_chado_semweb_term('contact', 'name');
-    $description_term = tripal_get_chado_semweb_term('contact', 'description');
+    $type_term = chado_get_semweb_term('contact', 'type_id');
+    $name_term = chado_get_semweb_term('contact', 'name');
+    $description_term = chado_get_semweb_term('contact', 'description');
 
     $headers = array('Name', 'Description', 'Type');
     $rows = array();

+ 1 - 1
tripal_chado/includes/TripalFields/chado_linker__contact/chado_linker__contact_widget.inc

@@ -37,7 +37,7 @@ class chado_linker__contact_widget extends ChadoFieldWidget {
     $name = '';
     $value = '';
 
-    $name_term = tripal_get_chado_semweb_term('contact', 'name');
+    $name_term = chado_get_semweb_term('contact', 'name');
 
     // If the field already has a value then it will come through the $items
     // array.  This happens when editing an existing record.

+ 2 - 2
tripal_chado/includes/TripalFields/data__accession/data__accession.inc

@@ -91,7 +91,7 @@ class data__accession extends ChadoField {
     $field_column = $this->instance['settings']['chado_column'];
 
     $field_term_id = $this->getFieldTermID();
-    $accession_term = tripal_get_chado_semweb_term($field_table, $field_column);
+    $accession_term = chado_get_semweb_term($field_table, $field_column);
 
     // We don't offer any sub elements so the value coming in should
     // always be the field_name.
@@ -108,7 +108,7 @@ class data__accession extends ChadoField {
     $field_column = $this->instance['settings']['chado_column'];
 
     $field_term_id = $this->getFieldTermID();
-    $accession_term = tripal_get_chado_semweb_term($field_table, $field_column);
+    $accession_term = chado_get_semweb_term($field_table, $field_column);
 
     // We don't offer any sub elements so the value coming in should
     // always be the field_name.

+ 16 - 16
tripal_chado/includes/TripalFields/data__sequence_coordinates/data__sequence_coordinates.inc

@@ -62,10 +62,10 @@ class data__sequence_coordinates extends ChadoField {
     $field_term = $this->getFieldTermID();
 
     $reference_term = 'data:3002';
-    $fmin_term = tripal_get_chado_semweb_term('featureloc', 'fmin');
-    $fmax_term = tripal_get_chado_semweb_term('featureloc', 'fmax');
-    $strand_term = tripal_get_chado_semweb_term('featureloc', 'strand');
-    $phase_term = tripal_get_chado_semweb_term('featureloc', 'phase');
+    $fmin_term = chado_get_semweb_term('featureloc', 'fmin');
+    $fmax_term = chado_get_semweb_term('featureloc', 'fmax');
+    $strand_term = chado_get_semweb_term('featureloc', 'strand');
+    $phase_term = chado_get_semweb_term('featureloc', 'phase');
 
     return array(
       $field_term => array(
@@ -144,10 +144,10 @@ class data__sequence_coordinates extends ChadoField {
 
     $field_term_id = $this->getFieldTermID();
     $reference_term = $field_term_id . ',' . 'data:3002';
-    $fmin_term = $field_term_id . ',' . tripal_get_chado_semweb_term('featureloc', 'fmin');
-    $fmax_term = $field_term_id . ',' . tripal_get_chado_semweb_term('featureloc', 'fmax');
-    $strand_term = $field_term_id . ',' . tripal_get_chado_semweb_term('featureloc', 'strand');
-    $phase_term = $field_term_id . ',' . tripal_get_chado_semweb_term('featureloc', 'phase');
+    $fmin_term = $field_term_id . ',' . chado_get_semweb_term('featureloc', 'fmin');
+    $fmax_term = $field_term_id . ',' . chado_get_semweb_term('featureloc', 'fmax');
+    $strand_term = $field_term_id . ',' . chado_get_semweb_term('featureloc', 'strand');
+    $phase_term = $field_term_id . ',' . chado_get_semweb_term('featureloc', 'phase');
 
     // Join to the organism table for this field.
     $this->queryJoinOnce($query, 'featureloc', $alias, "base.feature_id = $alias.feature_id");
@@ -185,10 +185,10 @@ class data__sequence_coordinates extends ChadoField {
 
     $field_term_id = $this->getFieldTermID();
     $reference_term = $field_term_id . ',' . 'data:3002';
-    $fmin_term = $field_term_id . ',' . tripal_get_chado_semweb_term('featureloc', 'fmin');
-    $fmax_term = $field_term_id . ',' . tripal_get_chado_semweb_term('featureloc', 'fmax');
-    $strand_term = $field_term_id . ',' . tripal_get_chado_semweb_term('featureloc', 'strand');
-    $phase_term = $field_term_id . ',' . tripal_get_chado_semweb_term('featureloc', 'phase');
+    $fmin_term = $field_term_id . ',' . chado_get_semweb_term('featureloc', 'fmin');
+    $fmax_term = $field_term_id . ',' . chado_get_semweb_term('featureloc', 'fmax');
+    $strand_term = $field_term_id . ',' . chado_get_semweb_term('featureloc', 'strand');
+    $phase_term = $field_term_id . ',' . chado_get_semweb_term('featureloc', 'phase');
 
     $this->queryJoinOnce($query, 'featureloc', $alias, "base.feature_id = $alias.feature_id", "LEFT OUTER");
     if ($order['column'] == $reference_term) {
@@ -218,10 +218,10 @@ class data__sequence_coordinates extends ChadoField {
 
     $description = 'schema:description';
     $reference_term = 'data:3002';
-    $fmin_term = tripal_get_chado_semweb_term('featureloc', 'fmin');
-    $fmax_term = tripal_get_chado_semweb_term('featureloc', 'fmax');
-    $strand_term = tripal_get_chado_semweb_term('featureloc', 'strand');
-    $phase_term = tripal_get_chado_semweb_term('featureloc', 'phase');
+    $fmin_term = chado_get_semweb_term('featureloc', 'fmin');
+    $fmax_term = chado_get_semweb_term('featureloc', 'fmax');
+    $strand_term = chado_get_semweb_term('featureloc', 'strand');
+    $phase_term = chado_get_semweb_term('featureloc', 'phase');
 
     $options = array(
       'return_array' => TRUE,

+ 4 - 4
tripal_chado/includes/TripalFields/data__sequence_coordinates/data__sequence_coordinates_formatter.inc

@@ -15,10 +15,10 @@ class data__sequence_coordinates_formatter extends ChadoFieldFormatter {
   public function view(&$element, $entity_type, $entity, $langcode, $items, $display) {
 
     $reference_term = 'data:3002';
-    $fmin_term = tripal_get_chado_semweb_term('featureloc', 'fmin');
-    $fmax_term = tripal_get_chado_semweb_term('featureloc', 'fmax');
-    $strand_term = tripal_get_chado_semweb_term('featureloc', 'strand');
-    $phase_term = tripal_get_chado_semweb_term('featureloc', 'phase');
+    $fmin_term = chado_get_semweb_term('featureloc', 'fmin');
+    $fmax_term = chado_get_semweb_term('featureloc', 'fmax');
+    $strand_term = chado_get_semweb_term('featureloc', 'strand');
+    $phase_term = chado_get_semweb_term('featureloc', 'phase');
 
     $content = '';
     foreach ($items as $item) {

+ 12 - 12
tripal_chado/includes/TripalFields/local__contact/local__contact.inc

@@ -61,9 +61,9 @@ class local__contact extends ChadoField {
    */
   public function elementInfo() {
     $field_term = $this->getFieldTermID();
-    $type_term = tripal_get_chado_semweb_term('contact', 'type_id');
-    $name_term = tripal_get_chado_semweb_term('contact', 'name');
-    $description_term = tripal_get_chado_semweb_term('contact', 'description');
+    $type_term = chado_get_semweb_term('contact', 'type_id');
+    $name_term = chado_get_semweb_term('contact', 'name');
+    $description_term = chado_get_semweb_term('contact', 'description');
 
     return array(
       $field_term => array(
@@ -123,9 +123,9 @@ class local__contact extends ChadoField {
     $field_column = $this->instance['settings']['chado_column'];
     $base_table = $this->instance['settings']['base_table'];
 
-    $type_term = tripal_get_chado_semweb_term('contact', 'type_id');
-    $name_term = tripal_get_chado_semweb_term('contact', 'name');
-    $description_term = tripal_get_chado_semweb_term('contact', 'description');
+    $type_term = chado_get_semweb_term('contact', 'type_id');
+    $name_term = chado_get_semweb_term('contact', 'name');
+    $description_term = chado_get_semweb_term('contact', 'description');
 
 
     // Set some defaults for the empty record.
@@ -163,9 +163,9 @@ class local__contact extends ChadoField {
     $operator = $condition['operator'];
 
     $field_term_id = $this->getFieldTermID();
-    $type_term = tripal_get_chado_semweb_term('contact', 'type_id');
-    $name_term = tripal_get_chado_semweb_term('contact', 'name');
-    $description_term = tripal_get_chado_semweb_term('contact', 'description');
+    $type_term = chado_get_semweb_term('contact', 'type_id');
+    $name_term = chado_get_semweb_term('contact', 'name');
+    $description_term = chado_get_semweb_term('contact', 'description');
 
     if ($field_table == 'biomaterial') {
       if ($record) {
@@ -200,9 +200,9 @@ class local__contact extends ChadoField {
   public function queryOrder($query, $order) {
     $alias = $this->field['field_name'];
     $field_term_id = $this->getFieldTermID();
-    $type_term = tripal_get_chado_semweb_term('contact', 'type_id');
-    $name_term = tripal_get_chado_semweb_term('contact', 'name');
-    $description_term = tripal_get_chado_semweb_term('contact', 'description');
+    $type_term = chado_get_semweb_term('contact', 'type_id');
+    $name_term = chado_get_semweb_term('contact', 'name');
+    $description_term = chado_get_semweb_term('contact', 'description');
 
     if ($field_table == 'biomaterial') {
       if ($record) {

+ 3 - 3
tripal_chado/includes/TripalFields/local__contact/local__contact_formatter.inc

@@ -24,9 +24,9 @@ class local__contact_formatter extends ChadoFieldFormatter {
     // Get the settings
     $settings = $display['settings'];
 
-    $type_term = tripal_get_chado_semweb_term('contact', 'type_id');
-    $name_term = tripal_get_chado_semweb_term('contact', 'name');
-    $description_term = tripal_get_chado_semweb_term('contact', 'description');
+    $type_term = chado_get_semweb_term('contact', 'type_id');
+    $name_term = chado_get_semweb_term('contact', 'name');
+    $description_term = chado_get_semweb_term('contact', 'description');
 
     $headers = array('Name', 'Description', 'Type');
     $rows = array();

+ 1 - 1
tripal_chado/includes/TripalFields/local__contact/local__contact_widget.inc

@@ -29,7 +29,7 @@ class local__contact_widget extends ChadoFieldWidget {
     $name = '';
     $value = '';
 
-    $name_term = tripal_get_chado_semweb_term('contact', 'name');
+    $name_term = chado_get_semweb_term('contact', 'name');
 
     // Set the linker field appropriately.
     if ($field_table == 'biomaterial') {

+ 12 - 12
tripal_chado/includes/TripalFields/local__source_data/local__source_data.inc

@@ -61,9 +61,9 @@ class local__source_data extends ChadoField {
   public function elementInfo() {
     $field_term = $this->getFieldTermID();
 
-    $sourcename_term = tripal_get_chado_semweb_term('analysis', 'sourcename');
-    $sourceversion_term = tripal_get_chado_semweb_term('analysis', 'sourceversion');
-    $sourceuri_term = tripal_get_chado_semweb_term('analysis', 'sourceuri');
+    $sourcename_term = chado_get_semweb_term('analysis', 'sourcename');
+    $sourceversion_term = chado_get_semweb_term('analysis', 'sourceversion');
+    $sourceuri_term = chado_get_semweb_term('analysis', 'sourceuri');
 
     return array(
       $field_term => array(
@@ -112,9 +112,9 @@ class local__source_data extends ChadoField {
     $operator = $condition['operator'];
 
     $field_term_id = $this->getFieldTermID();
-    $sourcename_term = $field_term_id . ',' . tripal_get_chado_semweb_term('analysis', 'sourcename');
-    $sourceversion_term = $field_term_id . ',' . tripal_get_chado_semweb_term('analysis', 'sourceversion');
-    $sourceuri_term = $field_term_id . ',' . tripal_get_chado_semweb_term('analysis', 'sourceuri');
+    $sourcename_term = $field_term_id . ',' . chado_get_semweb_term('analysis', 'sourcename');
+    $sourceversion_term = $field_term_id . ',' . chado_get_semweb_term('analysis', 'sourceversion');
+    $sourceuri_term = $field_term_id . ',' . chado_get_semweb_term('analysis', 'sourceuri');
 
     if ($condition['column'] == $sourcename_term) {
       $query->condition("base.sourcename", $condition['value'], $operator);
@@ -128,9 +128,9 @@ class local__source_data extends ChadoField {
    */
   public function queryOrder($query, $order) {
     $field_term_id = $this->getFieldTermID();
-    $sourcename_term = $field_term_id . ',' . tripal_get_chado_semweb_term('analysis', 'sourcename');
-    $sourceversion_term = $field_term_id . ',' . tripal_get_chado_semweb_term('analysis', 'sourceversion');
-    $sourceuri_term = $field_term_id . ',' . tripal_get_chado_semweb_term('analysis', 'sourceuri');
+    $sourcename_term = $field_term_id . ',' . chado_get_semweb_term('analysis', 'sourcename');
+    $sourceversion_term = $field_term_id . ',' . chado_get_semweb_term('analysis', 'sourceversion');
+    $sourceuri_term = $field_term_id . ',' . chado_get_semweb_term('analysis', 'sourceuri');
 
     if ($order['column'] == $sourcename_term) {
       $query->orderBy("base.sourcename", $order['direction']);
@@ -151,9 +151,9 @@ class local__source_data extends ChadoField {
     $field_table = $this->instance['settings']['chado_table'];
     $field_column = $this->instance['settings']['chado_column'];
 
-    $sourcename_term = tripal_get_chado_semweb_term('analysis', 'sourcename');
-    $sourceversion_term = tripal_get_chado_semweb_term('analysis', 'sourceversion');
-    $sourceuri_term = tripal_get_chado_semweb_term('analysis', 'sourceuri');
+    $sourcename_term = chado_get_semweb_term('analysis', 'sourcename');
+    $sourceversion_term = chado_get_semweb_term('analysis', 'sourceversion');
+    $sourceuri_term = chado_get_semweb_term('analysis', 'sourceuri');
 
     $entity->{$field_name}['und'][0] = array(
       'value' => array(

+ 3 - 3
tripal_chado/includes/TripalFields/local__source_data/local__source_data_formatter.inc

@@ -13,9 +13,9 @@ class local__source_data_formatter extends ChadoFieldFormatter {
    */
   public function view(&$element, $entity_type, $entity, $langcode, $items, $display) {
 
-    $sourcename_term = tripal_get_chado_semweb_term('analysis', 'sourcename');
-    $sourceversion_term = tripal_get_chado_semweb_term('analysis', 'sourceversion');
-    $sourceuri_term = tripal_get_chado_semweb_term('analysis', 'sourceuri');
+    $sourcename_term = chado_get_semweb_term('analysis', 'sourcename');
+    $sourceversion_term = chado_get_semweb_term('analysis', 'sourceversion');
+    $sourceuri_term = chado_get_semweb_term('analysis', 'sourceuri');
 
     $content = 'The data source is not provided.';
     if ($items[0]['value']) {

+ 19 - 19
tripal_chado/includes/TripalFields/obi__organism/obi__organism.inc

@@ -93,10 +93,10 @@ class obi__organism extends ChadoField {
 
     // Get the terms for each of the keys for the 'values' property.
     $label_term = 'rdfs:label';
-    $genus_term = tripal_get_chado_semweb_term('organism', 'genus');
-    $species_term = tripal_get_chado_semweb_term('organism', 'species');
-    $infraspecific_name_term = tripal_get_chado_semweb_term('organism', 'infraspecific_name');
-    $infraspecific_type_term = tripal_get_chado_semweb_term('organism', 'type_id');
+    $genus_term = chado_get_semweb_term('organism', 'genus');
+    $species_term = chado_get_semweb_term('organism', 'species');
+    $infraspecific_name_term = chado_get_semweb_term('organism', 'infraspecific_name');
+    $infraspecific_type_term = chado_get_semweb_term('organism', 'type_id');
 
 
     // Set the linker field appropriately.
@@ -120,7 +120,7 @@ class obi__organism extends ChadoField {
         $organism = $record->organism_id;
       }
       $string = $settings['field_display_string'];
-      $label = tripal_replace_chado_tokens($string, $organism);
+      $label = chado_replace_tokens($string, $organism);
       $entity->{$field_name}['und'][0]['value'] = array(
         $label_term => $label,
         $genus_term => $organism->genus,
@@ -177,10 +177,10 @@ class obi__organism extends ChadoField {
     $headers = array('Token', 'Description');
     $rows = array();
 
-    // Here we use the tripal_get_chado_tokens rather than the
+    // Here we use the chado_get_tokens rather than the
     // tripal_get_entity_tokens because we can't gurantee that all organisms
     // have entities.
-    $tokens = tripal_get_chado_tokens('organism');
+    $tokens = chado_get_tokens('organism');
     foreach ($tokens as $token) {
       $rows[] = array(
         $token['token'],
@@ -211,10 +211,10 @@ class obi__organism extends ChadoField {
   public function elementInfo() {
     $field_term = $this->getFieldTermID();
 
-    $genus_term = tripal_get_chado_semweb_term('organism', 'genus');
-    $species_term = tripal_get_chado_semweb_term('organism', 'species');
-    $infraspecific_name_term = tripal_get_chado_semweb_term('organism', 'infraspecific_name');
-    $infraspecific_type_term = tripal_get_chado_semweb_term('organism', 'type_id');
+    $genus_term = chado_get_semweb_term('organism', 'genus');
+    $species_term = chado_get_semweb_term('organism', 'species');
+    $infraspecific_name_term = chado_get_semweb_term('organism', 'infraspecific_name');
+    $infraspecific_type_term = chado_get_semweb_term('organism', 'type_id');
 
     return array(
       $field_term => array(
@@ -285,10 +285,10 @@ class obi__organism extends ChadoField {
     $operator = $condition['operator'];
 
     $field_term_id = $this->getFieldTermID();
-    $genus_term = $field_term_id . ',' . tripal_get_chado_semweb_term('organism', 'genus');
-    $species_term = $field_term_id . ',' . tripal_get_chado_semweb_term('organism', 'species');
-    $infraspecific_name_term = $field_term_id . ',' . tripal_get_chado_semweb_term('organism', 'infraspecific_name');
-    $infraspecific_type_term = $field_term_id . ',' . tripal_get_chado_semweb_term('organism', 'type_id');
+    $genus_term = $field_term_id . ',' . chado_get_semweb_term('organism', 'genus');
+    $species_term = $field_term_id . ',' . chado_get_semweb_term('organism', 'species');
+    $infraspecific_name_term = $field_term_id . ',' . chado_get_semweb_term('organism', 'infraspecific_name');
+    $infraspecific_type_term = $field_term_id . ',' . chado_get_semweb_term('organism', 'type_id');
 
     // Join to the organism table for this field.
     $this->queryJoinOnce($query, 'organism', $alias, "base.organism_id = $alias.organism_id");
@@ -329,10 +329,10 @@ class obi__organism extends ChadoField {
     $alias = $this->field['field_name'];
 
     $field_term_id = $this->getFieldTermID();
-    $genus_term = $field_term_id . ',' . tripal_get_chado_semweb_term('organism', 'genus');
-    $species_term = $field_term_id . ',' . tripal_get_chado_semweb_term('organism', 'species');
-    $infraspecific_name_term = $field_term_id . ',' . tripal_get_chado_semweb_term('organism', 'infraspecific_name');
-    $infraspecific_type_term = $field_term_id . ',' . tripal_get_chado_semweb_term('organism', 'type_id');
+    $genus_term = $field_term_id . ',' . chado_get_semweb_term('organism', 'genus');
+    $species_term = $field_term_id . ',' . chado_get_semweb_term('organism', 'species');
+    $infraspecific_name_term = $field_term_id . ',' . chado_get_semweb_term('organism', 'infraspecific_name');
+    $infraspecific_type_term = $field_term_id . ',' . chado_get_semweb_term('organism', 'type_id');
 
     // Join to the organism table for this field.
     $this->queryJoinOnce($query, 'organism', $alias, "base.organism_id = $alias.organism_id");

+ 24 - 24
tripal_chado/includes/TripalFields/ogi__location_on_map/ogi__location_on_map.inc

@@ -61,12 +61,12 @@ class ogi__location_on_map extends ChadoField {
     $field_term = $this->getFieldTermID();
 
     $map_term = 'data:1274';
-    $name_term = tripal_get_chado_semweb_term('featuremap', 'name');
-    $description_term = tripal_get_chado_semweb_term('featuremap', 'description');
-    $mappos_term = tripal_get_chado_semweb_term('featurepos', 'mappos');
-    $ref_feature_term = tripal_get_chado_semweb_term('featurepos', 'map_feature_id');
-    $ref_feature_name = tripal_get_chado_semweb_term('feature', 'name');
-    $ref_feature_id = tripal_get_chado_semweb_term('feature', 'uniquename');
+    $name_term = chado_get_semweb_term('featuremap', 'name');
+    $description_term = chado_get_semweb_term('featuremap', 'description');
+    $mappos_term = chado_get_semweb_term('featurepos', 'mappos');
+    $ref_feature_term = chado_get_semweb_term('featurepos', 'map_feature_id');
+    $ref_feature_name = chado_get_semweb_term('feature', 'name');
+    $ref_feature_id = chado_get_semweb_term('feature', 'uniquename');
     $ref_feature_type = 'rdfs:type';
 
     return array(
@@ -167,14 +167,14 @@ class ogi__location_on_map extends ChadoField {
     // Map details.
     $field_term_id = $this->getFieldTermID();
     $map_term = 'data:1274';
-    $name_term = $field_term_id . ',' . $map_term . ',' . tripal_get_chado_semweb_term('featuremap', 'name');
-    $description_term = $field_term_id . ',' . $map_term . ',' . tripal_get_chado_semweb_term('featuremap', 'description');
-    $mappos_term = $field_term_id . ',' . tripal_get_chado_semweb_term('featurepos', 'mappos');
+    $name_term = $field_term_id . ',' . $map_term . ',' . chado_get_semweb_term('featuremap', 'name');
+    $description_term = $field_term_id . ',' . $map_term . ',' . chado_get_semweb_term('featuremap', 'description');
+    $mappos_term = $field_term_id . ',' . chado_get_semweb_term('featurepos', 'mappos');
 
     // Reference sequence details.
-    $ref_feature_term = tripal_get_chado_semweb_term('featurepos', 'map_feature_id');
-    $ref_feature_name = $field_term_id . ',' . $ref_feature_term . ',' .tripal_get_chado_semweb_term('feature', 'name');
-    $ref_feature_id = $field_term_id . ',' . $ref_feature_term . ',' .tripal_get_chado_semweb_term('feature', 'uniquename');
+    $ref_feature_term = chado_get_semweb_term('featurepos', 'map_feature_id');
+    $ref_feature_name = $field_term_id . ',' . $ref_feature_term . ',' .chado_get_semweb_term('feature', 'name');
+    $ref_feature_id = $field_term_id . ',' . $ref_feature_term . ',' .chado_get_semweb_term('feature', 'uniquename');
     $ref_feature_type = $field_term_id . ',' . $ref_feature_term . ',' .'rdfs:type';
 
     $this->queryJoinOnce($query, 'featurepos', $alias, "base.feature_id = $alias.feature_id");
@@ -214,14 +214,14 @@ class ogi__location_on_map extends ChadoField {
     // Map details.
     $field_term_id = $this->getFieldTermID();
     $map_term = 'data:1274';
-    $name_term = $field_term_id . ',' . $map_term . ',' . tripal_get_chado_semweb_term('featuremap', 'name');
-    $description_term = $field_term_id . ',' . $map_term . ',' . tripal_get_chado_semweb_term('featuremap', 'description');
-    $mappos_term = $field_term_id . ',' . tripal_get_chado_semweb_term('featurepos', 'mappos');
+    $name_term = $field_term_id . ',' . $map_term . ',' . chado_get_semweb_term('featuremap', 'name');
+    $description_term = $field_term_id . ',' . $map_term . ',' . chado_get_semweb_term('featuremap', 'description');
+    $mappos_term = $field_term_id . ',' . chado_get_semweb_term('featurepos', 'mappos');
 
     // Reference sequence details.
-    $ref_feature_term = tripal_get_chado_semweb_term('featurepos', 'map_feature_id');
-    $ref_feature_name = $field_term_id . ',' . $ref_feature_term . ',' .tripal_get_chado_semweb_term('feature', 'name');
-    $ref_feature_id = $field_term_id . ',' . $ref_feature_term . ',' .tripal_get_chado_semweb_term('feature', 'uniquename');
+    $ref_feature_term = chado_get_semweb_term('featurepos', 'map_feature_id');
+    $ref_feature_name = $field_term_id . ',' . $ref_feature_term . ',' .chado_get_semweb_term('feature', 'name');
+    $ref_feature_id = $field_term_id . ',' . $ref_feature_term . ',' .chado_get_semweb_term('feature', 'uniquename');
     $ref_feature_type = $field_term_id . ',' . $ref_feature_term . ',' .'rdfs:type';
 
     $this->queryJoinOnce($query, 'featurepos', $alias, "base.feature_id = $alias.feature_id", 'LEFT OUTER');
@@ -265,14 +265,14 @@ class ogi__location_on_map extends ChadoField {
 
     // Map details
     $map_term = 'data:1274';
-    $name_term = tripal_get_chado_semweb_term('featuremap', 'name');
-    $description_term = tripal_get_chado_semweb_term('featuremap', 'description');
-    $mappos_term = tripal_get_chado_semweb_term('featurepos', 'mappos');
+    $name_term = chado_get_semweb_term('featuremap', 'name');
+    $description_term = chado_get_semweb_term('featuremap', 'description');
+    $mappos_term = chado_get_semweb_term('featurepos', 'mappos');
 
     // Reference sequence details.
-    $ref_feature_term = tripal_get_chado_semweb_term('featurepos', 'map_feature_id');
-    $ref_feature_name = tripal_get_chado_semweb_term('feature', 'name');
-    $ref_feature_id = tripal_get_chado_semweb_term('feature', 'uniquename');
+    $ref_feature_term = chado_get_semweb_term('featurepos', 'map_feature_id');
+    $ref_feature_name = chado_get_semweb_term('feature', 'name');
+    $ref_feature_id = chado_get_semweb_term('feature', 'uniquename');
     $ref_feature_type = 'rdfs:type';
 
     // Set some defaults for the empty record.

+ 12 - 12
tripal_chado/includes/TripalFields/sbo__database_cross_reference/sbo__database_cross_reference.inc

@@ -63,9 +63,9 @@ class sbo__database_cross_reference extends ChadoField {
   public function elementInfo() {
 
     $field_term = $this->getFieldTermID();
-    $dbname_term = tripal_get_chado_semweb_term('db', 'name');
-    $accession_term = tripal_get_chado_semweb_term('dbxref', 'accession');
-    $dburl_term = tripal_get_chado_semweb_term('db', 'url');
+    $dbname_term = chado_get_semweb_term('db', 'name');
+    $accession_term = chado_get_semweb_term('dbxref', 'accession');
+    $dburl_term = chado_get_semweb_term('db', 'url');
 
     return array(
       $field_term => array(
@@ -125,9 +125,9 @@ class sbo__database_cross_reference extends ChadoField {
     $fkey_lcolumn = key($schema['foreign keys'][$base_table]['columns']);
     $fkey_rcolumn = $schema['foreign keys'][$base_table]['columns'][$fkey_lcolumn];
 
-    $dbname_term = tripal_get_chado_semweb_term('db', 'name');
-    $accession_term = tripal_get_chado_semweb_term('dbxref', 'accession');
-    $dburl_term = tripal_get_chado_semweb_term('db', 'url');
+    $dbname_term = chado_get_semweb_term('db', 'name');
+    $accession_term = chado_get_semweb_term('dbxref', 'accession');
+    $dburl_term = chado_get_semweb_term('db', 'url');
 
     // Set some defaults for the empty record.
     $entity->{$field_name}['und'][0] = array(
@@ -186,9 +186,9 @@ class sbo__database_cross_reference extends ChadoField {
     $operator = $condition['operator'];
 
     $field_term_id = $this->getFieldTermID();
-    $dbname_term = $field_term_id . ',' . tripal_get_chado_semweb_term('db', 'name');
-    $accession_term = $field_term_id . ',' . tripal_get_chado_semweb_term('dbxref', 'accession');
-    $dburl_term = $field_term_id . ',' . tripal_get_chado_semweb_term('db', 'url');
+    $dbname_term = $field_term_id . ',' . chado_get_semweb_term('db', 'name');
+    $accession_term = $field_term_id . ',' . chado_get_semweb_term('dbxref', 'accession');
+    $dburl_term = $field_term_id . ',' . chado_get_semweb_term('db', 'url');
 
     $this->queryJoinOnce($query, $field_table, $alias, "base.$bpkey = $alias.$bpkey");
     $this->queryJoinOnce($query, 'dbxref', $alias . '_DBX', $alias . "_DBX.dbxref_id = $alias.dbxref_id");
@@ -216,9 +216,9 @@ class sbo__database_cross_reference extends ChadoField {
     $alias = $this->field['field_name'];
 
     $field_term_id = $this->getFieldTermID();
-    $dbname_term = $field_term_id . ',' . tripal_get_chado_semweb_term('db', 'name');
-    $accession_term = $field_term_id . ',' . tripal_get_chado_semweb_term('dbxref', 'accession');
-    $dburl_term = $field_term_id . ',' . tripal_get_chado_semweb_term('db', 'url');
+    $dbname_term = $field_term_id . ',' . chado_get_semweb_term('db', 'name');
+    $accession_term = $field_term_id . ',' . chado_get_semweb_term('dbxref', 'accession');
+    $dburl_term = $field_term_id . ',' . chado_get_semweb_term('db', 'url');
 
     $this->queryJoinOnce($query, $field_table, $alias, "base.$bpkey = $alias.$bpkey", "LEFT OUTER");
     $this->queryJoinOnce($query, 'dbxref', $alias . '_DBX', $alias . "_DBX.dbxref_id = $alias.dbxref_id", "LEFT OUTER");

+ 3 - 3
tripal_chado/includes/TripalFields/sbo__database_cross_reference/sbo__database_cross_reference_formatter.inc

@@ -21,9 +21,9 @@ class sbo__database_cross_reference_formatter extends ChadoFieldFormatter {
     $base_table = $this->instance['settings']['base_table'];
     $linker_table = $base_table . '_dbxref';
 
-    $dbname_term = tripal_get_chado_semweb_term('db', 'name');
-    $accession_term = tripal_get_chado_semweb_term('dbxref', 'accession');
-    $dburl_term = tripal_get_chado_semweb_term('db', 'url');
+    $dbname_term = chado_get_semweb_term('db', 'name');
+    $accession_term = chado_get_semweb_term('dbxref', 'accession');
+    $dburl_term = chado_get_semweb_term('db', 'url');
 
     foreach ($items as $delta => $item) {
       if (!$item['value']) {

+ 16 - 16
tripal_chado/includes/TripalFields/sio__annotation/sio__annotation.inc

@@ -92,9 +92,9 @@ class sio__annotation extends ChadoField {
     $field_table = $this->instance['settings']['chado_table'];
     $schema = chado_get_schema($field_table);
 
-    $vocabulary_term = tripal_get_chado_semweb_term('cvterm', 'cv_id');
-    $accession_term = tripal_get_chado_semweb_term('dbxref', 'accession');
-    $definition_term = tripal_get_chado_semweb_term('cvterm', 'definition');
+    $vocabulary_term = chado_get_semweb_term('cvterm', 'cv_id');
+    $accession_term = chado_get_semweb_term('dbxref', 'accession');
+    $definition_term = chado_get_semweb_term('cvterm', 'definition');
 
     $field_term = $this->getFieldTermID();
     $info = array(
@@ -134,7 +134,7 @@ class sio__annotation extends ChadoField {
     );
 
     if (array_key_exists('is_not', $schema['fields'])) {
-      $negation_term = tripal_get_chado_semweb_term($field_table, 'is_not');
+      $negation_term = chado_get_semweb_term($field_table, 'is_not');
       $info[$field_term]['elements'][$negation_term] = array(
         'sortable' => FALSE,
         'searchable' => FALSE,
@@ -145,7 +145,7 @@ class sio__annotation extends ChadoField {
       );
     }
     if (array_key_exists('rank', $schema['fields'])) {
-      $rank_term = tripal_get_chado_semweb_term($field_table, 'rank');
+      $rank_term = chado_get_semweb_term($field_table, 'rank');
       $info[$field_term]['elements'][$rank_term] = array(
         'sortable' => FALSE,
         'searchable' => FALSE,
@@ -177,9 +177,9 @@ class sio__annotation extends ChadoField {
 
     $field_term_id = $this->getFieldTermID();
 
-    $vocabulary_term = $field_term_id . ',' . tripal_get_chado_semweb_term('cvterm', 'cv_id');
-    $accession_term = $field_term_id . ',' . tripal_get_chado_semweb_term('dbxref', 'accession');
-    $definition_term = $field_term_id . ',' . tripal_get_chado_semweb_term('cvterm', 'definition');
+    $vocabulary_term = $field_term_id . ',' . chado_get_semweb_term('cvterm', 'cv_id');
+    $accession_term = $field_term_id . ',' . chado_get_semweb_term('dbxref', 'accession');
+    $definition_term = $field_term_id . ',' . chado_get_semweb_term('cvterm', 'definition');
 
 
     // Join to the xxx_cvterm table for this field.
@@ -218,9 +218,9 @@ class sio__annotation extends ChadoField {
 
     $field_term_id = $this->getFieldTermID();
 
-    $vocabulary_term = $field_term_id . ',' . tripal_get_chado_semweb_term('cvterm', 'cv_id');
-    $accession_term = $field_term_id . ',' . tripal_get_chado_semweb_term('dbxref', 'accession');
-    $definition_term = $field_term_id . ',' . tripal_get_chado_semweb_term('cvterm', 'definition');
+    $vocabulary_term = $field_term_id . ',' . chado_get_semweb_term('cvterm', 'cv_id');
+    $accession_term = $field_term_id . ',' . chado_get_semweb_term('dbxref', 'accession');
+    $definition_term = $field_term_id . ',' . chado_get_semweb_term('cvterm', 'definition');
 
     // Join to the xxx_cvterm table for this field.
     $this->queryJoinOnce($query, $field_table, $alias, "base.$fkey_rcolumn = $alias.$fkey_lcolumn");
@@ -258,14 +258,14 @@ class sio__annotation extends ChadoField {
     $fkey_lcolumn = key($schema['foreign keys'][$base_table]['columns']);
     $fkey_rcolumn = $schema['foreign keys'][$base_table]['columns'][$fkey_lcolumn];
 
-    $vocabulary = tripal_get_chado_semweb_term('cvterm', 'cv_id');
-    $accession = tripal_get_chado_semweb_term('dbxref', 'accession');
-    $definition = tripal_get_chado_semweb_term('cvterm', 'definition');
+    $vocabulary = chado_get_semweb_term('cvterm', 'cv_id');
+    $accession = chado_get_semweb_term('dbxref', 'accession');
+    $definition = chado_get_semweb_term('cvterm', 'definition');
     if (array_key_exists('is_not', $schema['fields'])) {
-      $negation = tripal_get_chado_semweb_term($field_table, 'is_not');
+      $negation = chado_get_semweb_term($field_table, 'is_not');
     }
     if (array_key_exists('rank', $schema['fields'])) {
-      $rank_term = tripal_get_chado_semweb_term($field_table, 'rank');
+      $rank_term = chado_get_semweb_term($field_table, 'rank');
     }
 
     // Set some defaults for the empty record.

+ 4 - 4
tripal_chado/includes/TripalFields/sio__annotation/sio__annotation_formatter.inc

@@ -18,11 +18,11 @@ class sio__annotation_formatter extends ChadoFieldFormatter {
     $field_table = $this->instance['settings']['chado_table'];
     $schema = chado_get_schema($field_table);
 
-    $vocabulary_term = tripal_get_chado_semweb_term('cvterm', 'cv_id');
-    $accession_term = tripal_get_chado_semweb_term('dbxref', 'accession');
-    $definition_term = tripal_get_chado_semweb_term('cvterm', 'definition');
+    $vocabulary_term = chado_get_semweb_term('cvterm', 'cv_id');
+    $accession_term = chado_get_semweb_term('dbxref', 'accession');
+    $definition_term = chado_get_semweb_term('cvterm', 'definition');
     if (array_key_exists('is_not', $schema['fields'])) {
-      $negation_term = tripal_get_chado_semweb_term($field_table, 'is_not');
+      $negation_term = chado_get_semweb_term($field_table, 'is_not');
     }
 
     $chado_table = $this->instance['settings']['chado_table'];

+ 8 - 8
tripal_chado/includes/TripalFields/sio__annotation/sio__annotation_widget.inc

@@ -27,11 +27,11 @@ class sio__annotation_widget extends ChadoFieldWidget {
     $fkey_lcolumn = key($schema['foreign keys'][$base_table]['columns']);
     $fkey_rcolumn = $schema['foreign keys'][$base_table]['columns'][$fkey_lcolumn];
 
-    $vocabulary = tripal_get_chado_semweb_term('cvterm', 'cv_id');
-    $accession = tripal_get_chado_semweb_term('dbxref', 'accession');
-    $definition = tripal_get_chado_semweb_term('cvterm', 'definition');
+    $vocabulary = chado_get_semweb_term('cvterm', 'cv_id');
+    $accession = chado_get_semweb_term('dbxref', 'accession');
+    $definition = chado_get_semweb_term('cvterm', 'definition');
     if (array_key_exists('is_not', $schema['fields'])) {
-      $negation = tripal_get_chado_semweb_term($field_table, 'is_not');
+      $negation = chado_get_semweb_term($field_table, 'is_not');
     }
 
     // Get the field defaults.
@@ -192,11 +192,11 @@ class sio__annotation_widget extends ChadoFieldWidget {
     $fkey_lcolumn = key($schema['foreign keys'][$base_table]['columns']);
     $fkey_rcolumn = $schema['foreign keys'][$base_table]['columns'][$fkey_lcolumn];
 
-    $vocabulary = tripal_get_chado_semweb_term('cvterm', 'cv_id');
-    $accession = tripal_get_chado_semweb_term('dbxref', 'accession');
-    $definition = tripal_get_chado_semweb_term('cvterm', 'definition');
+    $vocabulary = chado_get_semweb_term('cvterm', 'cv_id');
+    $accession = chado_get_semweb_term('dbxref', 'accession');
+    $definition = chado_get_semweb_term('cvterm', 'definition');
     if (array_key_exists('is_not', $schema['fields'])) {
-      $negation = tripal_get_chado_semweb_term($field_table, 'is_not');
+      $negation = chado_get_semweb_term($field_table, 'is_not');
     }
 
     $record_id = $form_state['values'][$field_name]['und'][$delta]['chado-' . $field_table . '__' . $pkey];

+ 8 - 8
tripal_chado/includes/TripalFields/taxrank__infraspecific_taxon/taxrank__infraspecific_taxon.inc

@@ -61,8 +61,8 @@ class taxrank__infraspecific_taxon extends ChadoField {
     $field_term = $this->getFieldTermID();
 
     $label_term = 'rdfs:label';
-    $infraspecific_name_term = tripal_get_chado_semweb_term('organism', 'infraspecific_name');
-    $infraspecific_type_term = tripal_get_chado_semweb_term('organism', 'type_id');
+    $infraspecific_name_term = chado_get_semweb_term('organism', 'infraspecific_name');
+    $infraspecific_type_term = chado_get_semweb_term('organism', 'type_id');
 
     return array(
       $field_term => array(
@@ -115,8 +115,8 @@ class taxrank__infraspecific_taxon extends ChadoField {
 
     $field_term_id = $this->getFieldTermID();
     $label_term = $field_term_id . ',' . 'rdfs:label';
-    $infraspecific_name_term = $field_term_id . ',' . tripal_get_chado_semweb_term('organism', 'infraspecific_name');
-    $infraspecific_type_term = $field_term_id . ',' . tripal_get_chado_semweb_term('organism', 'type_id');
+    $infraspecific_name_term = $field_term_id . ',' . chado_get_semweb_term('organism', 'infraspecific_name');
+    $infraspecific_type_term = $field_term_id . ',' . chado_get_semweb_term('organism', 'type_id');
 
     if ($condition['column'] == $label_term or $condition['column'] == $field_term_id) {
       $this->queryJoinOnce($query, 'cvterm', $alias . '_cvterm', $alias . "_cvterm.cvterm_id = base.type_id");
@@ -138,8 +138,8 @@ class taxrank__infraspecific_taxon extends ChadoField {
 
     $field_term_id = $this->getFieldTermID();
     $label_term = $field_term_id . ',' . 'rdfs:label';
-    $infraspecific_name_term = $field_term_id . ',' . tripal_get_chado_semweb_term('organism', 'infraspecific_name');
-    $infraspecific_type_term = $field_term_id . ',' . tripal_get_chado_semweb_term('organism', 'type_id');
+    $infraspecific_name_term = $field_term_id . ',' . chado_get_semweb_term('organism', 'infraspecific_name');
+    $infraspecific_type_term = $field_term_id . ',' . chado_get_semweb_term('organism', 'type_id');
 
     if ($order['column'] == $infraspecific_name_term) {
       $query->orderBy('base.infraspecific_name', $order['direction']);
@@ -170,8 +170,8 @@ class taxrank__infraspecific_taxon extends ChadoField {
     }
 
     $label_term = 'rdfs:label';
-    $infraspecific_name_term = tripal_get_chado_semweb_term('organism', 'infraspecific_name');
-    $infraspecific_type_term = tripal_get_chado_semweb_term('organism', 'type_id');
+    $infraspecific_name_term = chado_get_semweb_term('organism', 'infraspecific_name');
+    $infraspecific_type_term = chado_get_semweb_term('organism', 'type_id');
 
     // Set some defaults for the empty record.
     $entity->{$field_name}['und'][0] = array(

+ 2 - 2
tripal_chado/includes/TripalFields/taxrank__infraspecific_taxon/taxrank__infraspecific_taxon_formatter.inc

@@ -14,8 +14,8 @@ class taxrank__infraspecific_taxon_formatter extends ChadoFieldFormatter {
   public function view(&$element, $entity_type, $entity, $langcode, $items, $display) {
 
     $label_term = 'rdfs:label';
-    $infraspecific_name_term = tripal_get_chado_semweb_term('organism', 'infraspecific_name');
-    $infraspecific_type_term = tripal_get_chado_semweb_term('organism', 'type_id');
+    $infraspecific_name_term = chado_get_semweb_term('organism', 'infraspecific_name');
+    $infraspecific_type_term = chado_get_semweb_term('organism', 'type_id');
 
     if (is_array($items[0]['value']) and array_key_exists($infraspecific_name_term, $items[0]['value'])) {
       $infraspecific_name = $items[0]['value'][$infraspecific_name_term];

+ 4 - 4
tripal_chado/includes/TripalImporter/OBOImporter.inc

@@ -409,12 +409,12 @@ class OBOImporter extends TripalImporter {
 
     // Update the cv_root_mview materiailzed view.
     $this->logMessage("Updating the cv_root_mview materialized view...");
-    $mview_id = tripal_get_mview_id('cv_root_mview');
-    tripal_populate_mview($mview_id);
+    $mview_id = chado_get_mview_id('cv_root_mview');
+    chado_populate_mview($mview_id);
 
     $this->logMessage("Updating the db2cv_mview materialized view...");
-    $mview_id = tripal_get_mview_id('db2cv_mview');
-    tripal_populate_mview($mview_id);
+    $mview_id = chado_get_mview_id('db2cv_mview');
+    chado_populate_mview($mview_id);
 
     // Upate the cvtermpath table for each newly added CV.
     $this->logMessage("Updating cvtermpath table.  This may take a while...");

+ 6 - 6
tripal_chado/includes/setup/tripal_chado.chado_vx_x.inc

@@ -205,7 +205,7 @@ function tripal_chado_add_organism_stock_count_mview() {
         O.Organism_id, O.genus, O.species, O.common_name, CVT.cvterm_id, CVT.name
   ";
 
-  tripal_add_mview($view_name, 'tripal_stock', $schema, $sql, $comment, FALSE);
+  chado_add_mview($view_name, 'tripal_stock', $schema, $sql, $comment, FALSE);
 }
 
 
@@ -261,7 +261,7 @@ function tripal_chado_add_library_feature_count_mview(){
     GROUP BY L.library_id, L.name, CVT.name
   ";
 
-  tripal_add_mview($view_name, 'tripal_library', $schema, $sql, $comment, FALSE);
+  chado_add_mview($view_name, 'tripal_library', $schema, $sql, $comment, FALSE);
 }
 
 
@@ -344,7 +344,7 @@ function tripal_chado_add_organism_feature_count_mview() {
         O.Organism_id, O.genus, O.species, O.common_name, CVT.cvterm_id, CVT.name
   ";
 
-  tripal_add_mview($view_name, 'tripal_feature', $schema, $sql, $comment, FALSE);
+  chado_add_mview($view_name, 'tripal_feature', $schema, $sql, $comment, FALSE);
 }
 
 
@@ -404,7 +404,7 @@ function tripal_chado_add_analysis_organism_mview() {
   );
 
   // add the view
-  tripal_add_mview($view_name, 'tripal_analysis', $schema, $sql, $comment, FALSE);
+  chado_add_mview($view_name, 'tripal_analysis', $schema, $sql, $comment, FALSE);
 }
 
 /**
@@ -463,7 +463,7 @@ function tripal_chado_add_db2cv_mview_mview() {
   ";
 
   // Create the MView
-  tripal_add_mview($mv_name, 'tripal_chado', $schema, $sql, $comment, FALSE);
+  chado_add_mview($mv_name, 'tripal_chado', $schema, $sql, $comment, FALSE);
 }
 /**
  * Add a materialized view of root terms for all chado cvs.
@@ -515,6 +515,6 @@ function tripal_chado_add_cv_root_mview_mview() {
   ";
 
   // Create the MView
-  tripal_add_mview($mv_name, 'tripal_chado', $schema, $sql, $comment, FALSE);
+  chado_add_mview($mv_name, 'tripal_chado', $schema, $sql, $comment, FALSE);
 }
 

+ 4 - 4
tripal_chado/includes/setup/tripal_chado.setup.inc

@@ -207,12 +207,12 @@ function tripal_chado_prepare_chado($job = NULL) {
 
     // Populate the mviews based on controlled vocabularies.
     drush_print('Populating materialized view db2cv_mview...');
-    $mview_id = tripal_get_mview_id('db2cv_mview');
-    tripal_populate_mview($mview_id);
+    $mview_id = chado_get_mview_id('db2cv_mview');
+    chado_populate_mview($mview_id);
 
     drush_print('Populating materialized view cv_root_mview...');
-    $mview_id = tripal_get_mview_id('cv_root_mview');
-    tripal_populate_mview($mview_id);
+    $mview_id = chado_get_mview_id('cv_root_mview');
+    chado_populate_mview($mview_id);
 
     if ($report_progress) {
       $job->setProgress(50);

+ 2 - 2
tripal_chado/includes/tripal_chado.field_storage.inc

@@ -533,7 +533,7 @@ function tripal_chado_field_storage_query($query) {
         if ($chado_table == $base_table) {
           // Get the base table column that is associated with the term
           // passed as $condition['column'].
-          $base_field = tripal_get_chado_semweb_column($chado_table, $condition['column']);
+          $base_field = chado_get_semweb_column($chado_table, $condition['column']);
 
           $matches = array();
           $key = $condition['value'];
@@ -699,7 +699,7 @@ function tripal_chado_field_storage_query($query) {
         else {
           $base_table = $instance['settings']['base_table'];
           $chado_table = $instance['settings']['chado_table'];
-          $table_column = tripal_get_chado_semweb_column($chado_table, $column);
+          $table_column = chado_get_semweb_column($chado_table, $column);
           if ($table_column) {
              if ($chado_table == $base_table) {
                $cquery->orderBy('base.' . $table_column, $direction);

+ 2 - 2
tripal_chado/includes/tripal_chado.fields.inc

@@ -92,7 +92,7 @@ function tripal_chado_bundle_fields_info_base(&$info, $details, $entity_type, $b
     if ($column_name == $pkey or $column_name == $type_column) {
       continue;
     }
-    $cvterm = tripal_get_chado_semweb_term($table_name, $column_name, array('return_object' => TRUE));
+    $cvterm = chado_get_semweb_term($table_name, $column_name, array('return_object' => TRUE));
     if (!$cvterm) {
       tripal_report_error('tripal', TRIPAL_ERROR,
         'Cannot create field for "%table_name.%column_name". Missing an appropriate vocabulary term',
@@ -822,7 +822,7 @@ function tripal_chado_bundle_instances_info_base(&$info, $entity_type, $bundle,
       continue;
     }
 
-    $cvterm = tripal_get_chado_semweb_term($table_name, $column_name, array('return_object' => TRUE));
+    $cvterm = chado_get_semweb_term($table_name, $column_name, array('return_object' => TRUE));
     if (!$cvterm) {
       // We already provided an error when creating the base field.  So
       // don't create another one here.

+ 1 - 1
tripal_chado/includes/tripal_chado.migrate.inc

@@ -746,7 +746,7 @@ function tripal_chado_migrate_selected_types($tv3_content_types) {
       'sync_node' => 1,
       'bundle_name' => $bundle_name
     );
-    tripal_chado_publish_records($value);
+    chado_publish_records($value);
 
     // Migrate Resource Titles/Blocks or Resource Links if available
     tripal_chado_migrate_resource_blocks($bundle_name);

+ 4 - 4
tripal_chado/includes/tripal_chado.mviews.inc

@@ -572,7 +572,7 @@ function tripal_mviews_form_submit($form, &$form_state) {
 
   // if this is an edit action
   if (strcmp($action, 'Edit') == 0) {
-    tripal_edit_mview($mview_id, $name, $modulename, $mv_table, $mv_specs,
+    chado_edit_mview($mview_id, $name, $modulename, $mv_table, $mv_specs,
       $indexed, $query, $special_index, $comment, $schema);
   }
   // else an add action
@@ -633,7 +633,7 @@ function tripal_mviews_delete_form_submit($form, &$form_state) {
   $mview_id = $form_state['values']['mview_id'];
 
   if (strcmp($action, 'Delete') == 0) {
-    tripal_delete_mview($mview_id);
+    chado_delete_mview($mview_id);
   }
   else {
     drupal_set_message(t("No action performed."));
@@ -642,13 +642,13 @@ function tripal_mviews_delete_form_submit($form, &$form_state) {
 }
 
 /**
- * A wrapper for the tripal_refresh_mview() API function, which
+ * A wrapper for the chado_refresh_mview() API function, which
  * then redirects back to the admin page for mviews.
  *
  * @param $mview_id
  */
 function tripal_mviews_add_populate_job($mview_id) {
 
-  tripal_refresh_mview($mview_id);
+  chado_refresh_mview($mview_id);
   drupal_goto("admin/tripal/storage/chado/mviews");
 }

+ 1 - 1
tripal_chado/includes/tripal_chado.publish.inc

@@ -170,7 +170,7 @@ function tripal_chado_publish_form_submit($form, &$form_state) {
       module_load_include('inc', 'tripal_chado', 'includes/tripal_chado.publish'),
     );
     return tripal_add_job("Publish " . $bundle->label . " records.",
-       'tripal_chado', 'tripal_chado_publish_records', $args,
+       'tripal_chado', 'chado_publish_records', $args,
        $user->uid, 10, $includes);
   }
 }

+ 95 - 95
tripal_chado/includes/tripal_chado.semweb.inc

@@ -176,8 +176,8 @@ function tripal_chado_populate_vocab_SCHEMA() {
     'cv_name' => 'schema',
     'definition' => 'The name of the item.',
   ));
-  tripal_associate_chado_semweb_term(NULL, 'name', $term);
-  tripal_associate_chado_semweb_term('analysis', 'sourcename', $term);
+  chado_associate_semweb_term(NULL, 'name', $term);
+  chado_associate_semweb_term('analysis', 'sourcename', $term);
 
   $term = chado_insert_cvterm(array(
     'id' => 'schema:alternateName',
@@ -192,7 +192,7 @@ function tripal_chado_populate_vocab_SCHEMA() {
     'cv_name' => 'schema',
     'definition' => 'Comments, typically from users.',
   ));
-  tripal_associate_chado_semweb_term(NULL, 'comment', $term);
+  chado_associate_semweb_term(NULL, 'comment', $term);
 
   $term = chado_insert_cvterm(array(
     'id' => 'schema:description',
@@ -200,8 +200,8 @@ function tripal_chado_populate_vocab_SCHEMA() {
     'cv_name' => 'schema',
     'definition' => 'A description of the item.',
   ));
-  tripal_associate_chado_semweb_term(NULL, 'description', $term);
-  tripal_associate_chado_semweb_term('organism', 'comment', $term);
+  chado_associate_semweb_term(NULL, 'description', $term);
+  chado_associate_semweb_term('organism', 'comment', $term);
 
   $term = chado_insert_cvterm(array(
     'id' => 'schema:publication',
@@ -209,7 +209,7 @@ function tripal_chado_populate_vocab_SCHEMA() {
     'cv_name' => 'schema',
     'definition' => 'A publication event associated with the item.',
   ));
-  tripal_associate_chado_semweb_term(NULL, 'pub_id', $term);
+  chado_associate_semweb_term(NULL, 'pub_id', $term);
 
   $term = chado_insert_cvterm(array(
     'id' => 'schema:url',
@@ -217,7 +217,7 @@ function tripal_chado_populate_vocab_SCHEMA() {
     'cv_name' => 'schema',
     'definition' => 'URL of the item.',
   ));
-  tripal_associate_chado_semweb_term('db', 'url', $term);
+  chado_associate_semweb_term('db', 'url', $term);
 
   // Typically the type_id field is used for distinguishing between records
   // but in the case that it isn't then we need to associate a term with it
@@ -240,7 +240,7 @@ function tripal_chado_populate_vocab_SCHEMA() {
       continue;
     }
     if (in_array("type_id", array_keys($schema['fields']))) {
-      tripal_associate_chado_semweb_term($table, 'type_id', $term);
+      chado_associate_semweb_term($table, 'type_id', $term);
     }
   }
 
@@ -302,7 +302,7 @@ function tripal_chado_populate_vocab_SIO() {
     'cv_name' => 'SIO',
     'definition' => 'A measurement of a spatial location relative to a frame of reference or other objects.',
   ));
-  tripal_associate_chado_semweb_term('featurepos', 'mappos', $term);
+  chado_associate_semweb_term('featurepos', 'mappos', $term);
 
   $term = chado_insert_cvterm(array(
     'id' => 'SIO:001166',
@@ -310,16 +310,16 @@ function tripal_chado_populate_vocab_SIO() {
     'cv_name' => 'SIO',
     'definition' => 'An annotation is a written explanatory or critical description, or other in-context information (e.g., pattern, motif, link), that has been associated with data or other types of information.',
   ));
-  tripal_associate_chado_semweb_term('feature_cvterm', 'cvterm_id', $term);
-  tripal_associate_chado_semweb_term('analysis_cvterm', 'cvterm_id', $term);
-  tripal_associate_chado_semweb_term('cell_line_cvterm', 'cvterm_id', $term);
-  tripal_associate_chado_semweb_term('environment_cvterm', 'cvterm_id', $term);
-  tripal_associate_chado_semweb_term('expression_cvterm', 'cvterm_id', $term);
-  tripal_associate_chado_semweb_term('library_cvterm', 'cvterm_id', $term);
-  tripal_associate_chado_semweb_term('organism_cvterm', 'cvterm_id', $term);
-  tripal_associate_chado_semweb_term('phenotype_cvterm', 'cvterm_id', $term);
-  tripal_associate_chado_semweb_term('stock_cvterm', 'cvterm_id', $term);
-  tripal_associate_chado_semweb_term('stock_relationship_cvterm', 'cvterm_id', $term);
+  chado_associate_semweb_term('feature_cvterm', 'cvterm_id', $term);
+  chado_associate_semweb_term('analysis_cvterm', 'cvterm_id', $term);
+  chado_associate_semweb_term('cell_line_cvterm', 'cvterm_id', $term);
+  chado_associate_semweb_term('environment_cvterm', 'cvterm_id', $term);
+  chado_associate_semweb_term('expression_cvterm', 'cvterm_id', $term);
+  chado_associate_semweb_term('library_cvterm', 'cvterm_id', $term);
+  chado_associate_semweb_term('organism_cvterm', 'cvterm_id', $term);
+  chado_associate_semweb_term('phenotype_cvterm', 'cvterm_id', $term);
+  chado_associate_semweb_term('stock_cvterm', 'cvterm_id', $term);
+  chado_associate_semweb_term('stock_relationship_cvterm', 'cvterm_id', $term);
 
 
   $term = chado_insert_cvterm(array(
@@ -328,10 +328,10 @@ function tripal_chado_populate_vocab_SIO() {
     'cv_name' => 'SIO',
     'definition' => 'NOT is a logical operator in that has the value true if its operand is false.',
   ));
-  tripal_associate_chado_semweb_term('feature_cvterm', 'is_not', $term);
-  tripal_associate_chado_semweb_term('analysis_cvterm', 'is_not', $term);
-  tripal_associate_chado_semweb_term('organism_cvterm', 'is_not', $term);
-  tripal_associate_chado_semweb_term('stock_cvterm', 'is_not', $term);
+  chado_associate_semweb_term('feature_cvterm', 'is_not', $term);
+  chado_associate_semweb_term('analysis_cvterm', 'is_not', $term);
+  chado_associate_semweb_term('organism_cvterm', 'is_not', $term);
+  chado_associate_semweb_term('stock_cvterm', 'is_not', $term);
 
   $term = chado_insert_cvterm(array(
     'id' => 'SIO:001080',
@@ -339,7 +339,7 @@ function tripal_chado_populate_vocab_SIO() {
     'cv_name' => 'SIO',
     'definition' => 'A vocabulary is a collection of terms.',
   ));
-  tripal_associate_chado_semweb_term('cvterm', 'cv_id', $term);
+  chado_associate_semweb_term('cvterm', 'cv_id', $term);
 
   $term = chado_insert_cvterm(array(
     'id' => 'SIO:001323',
@@ -429,7 +429,7 @@ function tripal_chado_populate_vocab_EDAM() {
     'cv_name' => 'EDAM',
     'definition' => 'The size (length) of a sequence, subsequence or region in a sequence, or range(s) of lengths.',
   ));
-  tripal_associate_chado_semweb_term('feature', 'seqlen', $term);
+  chado_associate_semweb_term('feature', 'seqlen', $term);
 
   $term = chado_insert_cvterm(array(
     'id' => 'data:2190',
@@ -437,7 +437,7 @@ function tripal_chado_populate_vocab_EDAM() {
     'cv_name' => 'EDAM',
     'definition' => 'A fixed-size datum calculated (by using a hash function) for a molecular sequence, typically for purposes of error detection or indexing.',
   ));
-  tripal_associate_chado_semweb_term('feature', 'md5checksum', $term);
+  chado_associate_semweb_term('feature', 'md5checksum', $term);
 
   $term = chado_insert_cvterm(array(
     'id' => 'data:2091',
@@ -445,8 +445,8 @@ function tripal_chado_populate_vocab_EDAM() {
     'cv_name' => 'EDAM',
     'definition' => 'A persistent (stable) and unique identifier, typically identifying an object (entry) from a database.',
   ));
-  tripal_associate_chado_semweb_term(NULL, 'dbxref_id', $term);
-  tripal_associate_chado_semweb_term('dbxref', 'accession', $term);
+  chado_associate_semweb_term(NULL, 'dbxref_id', $term);
+  chado_associate_semweb_term('dbxref', 'accession', $term);
 
   $term = chado_insert_cvterm(array(
     'id' => 'data:2044',
@@ -454,7 +454,7 @@ function tripal_chado_populate_vocab_EDAM() {
     'cv_name' => 'EDAM',
     'definition' => 'One or more molecular sequences, possibly with associated annotation..',
   ));
-  tripal_associate_chado_semweb_term('feature', 'residues', $term);
+  chado_associate_semweb_term('feature', 'residues', $term);
 
   $term = chado_insert_cvterm(array(
     'id' => 'data:0842',
@@ -462,7 +462,7 @@ function tripal_chado_populate_vocab_EDAM() {
     'cv_name' => 'EDAM',
     'definition' => 'A text token, number or something else which identifies an entity, but which may not be persistent (stable) or unique (the same identifier may identify multiple things).',
   ));
-  tripal_associate_chado_semweb_term(NULL, 'uniquename', $term);
+  chado_associate_semweb_term(NULL, 'uniquename', $term);
 
   $term = chado_insert_cvterm(array(
     'id' => 'data:2976',
@@ -477,7 +477,7 @@ function tripal_chado_populate_vocab_EDAM() {
     'cv_name' => 'EDAM',
     'definition' => 'Biological or biomedical data has been rendered into an image, typically for display on screen.',
   ));
-  tripal_associate_chado_semweb_term(NULL, 'eimage_id', $term);
+  chado_associate_semweb_term(NULL, 'eimage_id', $term);
 
   $term = chado_insert_cvterm(array(
     'id' => 'data:1274',
@@ -485,7 +485,7 @@ function tripal_chado_populate_vocab_EDAM() {
     'cv_name' => 'EDAM',
     'definition' => 'A map of (typically one) DNA sequence annotated with positional or non-positional features.',
   ));
-  tripal_associate_chado_semweb_term(NULL, 'eimage_id', $term);
+  chado_associate_semweb_term(NULL, 'eimage_id', $term);
 
   $term = chado_insert_cvterm(array(
     'id' => 'data:1278',
@@ -493,7 +493,7 @@ function tripal_chado_populate_vocab_EDAM() {
     'cv_name' => 'EDAM',
     'definition' => 'A map showing the relative positions of genetic markers in a nucleic acid sequence, based on estimation of non-physical distance such as recombination frequencies.',
   ));
-  tripal_associate_chado_semweb_term('featuremap', 'featuremap_id', $term);
+  chado_associate_semweb_term('featuremap', 'featuremap_id', $term);
 
   $term = chado_insert_cvterm(array(
     'id' => 'data:1280',
@@ -501,7 +501,7 @@ function tripal_chado_populate_vocab_EDAM() {
     'cv_name' => 'EDAM',
     'definition' => 'A map of DNA (linear or circular) annotated with physical features or landmarks such as restriction sites, cloned DNA fragments, genes or genetic markers, along with the physical distances between them. Distance in a physical map is measured in base pairs. A physical map might be ordered relative to a reference map (typically a genetic map) in the process of genome sequencing.',
   ));
-  tripal_associate_chado_semweb_term('featuremap', 'featuremap_id', $term);
+  chado_associate_semweb_term('featuremap', 'featuremap_id', $term);
 
   $term = chado_insert_cvterm(array(
     'id' => 'data:2012',
@@ -523,7 +523,7 @@ function tripal_chado_populate_vocab_EDAM() {
     'cv_name' => 'EDAM',
     'definition' => 'An identifier of a biological or bioinformatics database.',
   ));
-  tripal_associate_chado_semweb_term('db', 'name', $term);
+  chado_associate_semweb_term('db', 'name', $term);
 
   $term = chado_insert_cvterm(array(
     'id' => 'data:1047',
@@ -531,7 +531,7 @@ function tripal_chado_populate_vocab_EDAM() {
     'cv_name' => 'EDAM',
     'definition' => 'The name of a biological or bioinformatics database.',
   ));
-  tripal_associate_chado_semweb_term('analysis', 'sourceuri', $term);
+  chado_associate_semweb_term('analysis', 'sourceuri', $term);
 
   $term = chado_insert_cvterm(array(
     'id' => 'data:2336',
@@ -539,7 +539,7 @@ function tripal_chado_populate_vocab_EDAM() {
     'cv_name' => 'EDAM',
     'definition' => 'Phase for translation of DNA (0, 1 or 2) relative to a fragment of the coding sequence.',
   ));
-  tripal_associate_chado_semweb_term('featureloc', 'phase', $term);
+  chado_associate_semweb_term('featureloc', 'phase', $term);
 
   $term = chado_insert_cvterm(array(
     'id' => 'data:0853',
@@ -547,7 +547,7 @@ function tripal_chado_populate_vocab_EDAM() {
     'cv_name' => 'EDAM',
     'definition' => 'The strand of a DNA sequence (forward or reverse).',
   ));
-  tripal_associate_chado_semweb_term('featureloc', 'strand', $term);
+  chado_associate_semweb_term('featureloc', 'strand', $term);
   $term = chado_insert_cvterm(array(
     'id' => 'data:3002',
     'name' => 'Annotation track',
@@ -556,7 +556,7 @@ function tripal_chado_populate_vocab_EDAM() {
     'biomolecular (typically genome) sequence, suitable for import and ' .
     'display in a genome browser. Synonym: Sequence annotation track.',
   ));
-  tripal_associate_chado_semweb_term('featureloc', 'srcfeature_id', $term);
+  chado_associate_semweb_term('featureloc', 'srcfeature_id', $term);
 
   $term = chado_insert_cvterm(array(
     'id' => 'operation:2945',
@@ -564,7 +564,7 @@ function tripal_chado_populate_vocab_EDAM() {
     'cv_name' => 'EDAM',
     'definition' => 'Apply analytical methods to existing data of a specific type.',
   ));
-  tripal_associate_chado_semweb_term('phylotree', 'analysis_id', $term);
+  chado_associate_semweb_term('phylotree', 'analysis_id', $term);
 
   $term = chado_insert_cvterm(array(
     'id' => 'data:0872',
@@ -637,7 +637,7 @@ function tripal_chado_populate_vocab_OBCS() {
     'cv_name' => 'OBCS',
     'definition' => 'A data item that represents an arrangement according to a rank, i.e., the position of a particular case relative to other cases on a defined scale.',
   ));
-  tripal_associate_chado_semweb_term(NULL, 'rank', $term);
+  chado_associate_semweb_term(NULL, 'rank', $term);
 }
 /**
  * Adds the Information Artifact Ontology database and terms.
@@ -660,8 +660,8 @@ function tripal_chado_populate_vocab_OBI() {
     'cv_name' => 'obi',
     'definition' => 'A material entity that is an individual living system, such as animal, plant, bacteria or virus, that is capable of replicating or reproducing, growth and maintenance in the right environment. An organism may be unicellular or made up, like humans, of many billions of cells divided into specialized tissues and organs.',
   ));
-  tripal_associate_chado_semweb_term(NULL, 'organism_id', $term);
-  tripal_associate_chado_semweb_term('biomaterial', 'taxon_id', $term);
+  chado_associate_semweb_term(NULL, 'organism_id', $term);
+  chado_associate_semweb_term('biomaterial', 'taxon_id', $term);
 }
 
 /**
@@ -713,7 +713,7 @@ function tripal_chado_populate_vocab_IAO() {
       'a class or property. Shall be Aristotelian, formalized and normalized. ' .
       'Can be augmented with colloquial definitions.',
   ));
-  tripal_associate_chado_semweb_term(NULL, 'definition', $term);
+  chado_associate_semweb_term(NULL, 'definition', $term);
 
   $term = chado_insert_cvterm(array(
     'id' => 'IAO:0000129',
@@ -725,9 +725,9 @@ function tripal_chado_populate_vocab_IAO() {
     'packaging and indicates its order within a set of other products ' .
     'having the same name.',
   ));
-  tripal_associate_chado_semweb_term('analysis', 'programversion', $term);
-  tripal_associate_chado_semweb_term('analysis', 'sourceversion', $term);
-  tripal_associate_chado_semweb_term(NULL, 'version', $term);
+  chado_associate_semweb_term('analysis', 'programversion', $term);
+  chado_associate_semweb_term('analysis', 'sourceversion', $term);
+  chado_associate_semweb_term(NULL, 'version', $term);
 
   $term = chado_insert_cvterm(array(
     'id' => 'IAO:0000064',
@@ -735,7 +735,7 @@ function tripal_chado_populate_vocab_IAO() {
     'cv_name' => 'IAO',
     'definition' => 'An algorithm is a set of instructions for performing a paticular calculation.',
   ));
-  tripal_associate_chado_semweb_term('analysis', 'algorithm', $term);
+  chado_associate_semweb_term('analysis', 'algorithm', $term);
 }
 
 /**
@@ -908,7 +908,7 @@ function tripal_chado_populate_vocab_LOCAL() {
     'cv_name' => 'local',
     'definition' => 'The time at which the record was last modified.',
   ));
-  tripal_associate_chado_semweb_term(NULL, 'timelastmodified', $term);
+  chado_associate_semweb_term(NULL, 'timelastmodified', $term);
 
   $term = chado_insert_cvterm(array(
     'id' => 'local:timeaccessioned',
@@ -916,7 +916,7 @@ function tripal_chado_populate_vocab_LOCAL() {
     'cv_name' => 'local',
     'definition' => 'The time at which the record was first added.',
   ));
-  tripal_associate_chado_semweb_term(NULL, 'timeaccessioned', $term);
+  chado_associate_semweb_term(NULL, 'timeaccessioned', $term);
 
   $term = chado_insert_cvterm(array(
     'id' => 'local:timeexecuted',
@@ -924,7 +924,7 @@ function tripal_chado_populate_vocab_LOCAL() {
     'cv_name' => 'local',
     'definition' => 'The time when the task was executed.',
   ));
-  tripal_associate_chado_semweb_term(NULL, 'timeexecuted', $term);
+  chado_associate_semweb_term(NULL, 'timeexecuted', $term);
 
   $term = chado_insert_cvterm(array(
     'id' => 'local:infraspecific_type',
@@ -932,7 +932,7 @@ function tripal_chado_populate_vocab_LOCAL() {
     'definition' => 'The connector type (e.g. subspecies, varietas, forma, etc.) for the infraspecific name',
     'cv_name' => 'local',
   ));
-  tripal_associate_chado_semweb_term('organism', 'type_id', $term);
+  chado_associate_semweb_term('organism', 'type_id', $term);
 
   $term = chado_insert_cvterm(array(
     'id' => 'local:abbreviation',
@@ -940,7 +940,7 @@ function tripal_chado_populate_vocab_LOCAL() {
     'cv_name' => 'local',
     'definition' => 'A shortened name (or abbreviation) for the item.'
   ));
-  tripal_associate_chado_semweb_term('organism', 'abbreviation', $term);
+  chado_associate_semweb_term('organism', 'abbreviation', $term);
 
   $term = chado_insert_cvterm(array(
     'id' => 'local:expression',
@@ -955,7 +955,7 @@ function tripal_chado_populate_vocab_LOCAL() {
     'definition' => 'Indicates if this feature was predicted computationally using another feature.',
     'cv_name' => 'local',
   ));
-  tripal_associate_chado_semweb_term('feature', 'is_analysis', $term);
+  chado_associate_semweb_term('feature', 'is_analysis', $term);
 
   $term = chado_insert_cvterm(array(
     'id' => 'local:is_obsolete',
@@ -963,7 +963,7 @@ function tripal_chado_populate_vocab_LOCAL() {
     'definition' => 'Indicates if this record is obsolete.',
     'cv_name' => 'local',
   ));
-  tripal_associate_chado_semweb_term(NULL, 'is_obsolete', $term);
+  chado_associate_semweb_term(NULL, 'is_obsolete', $term);
 
   $term = chado_insert_cvterm(array(
     'id' => 'local:miniref',
@@ -971,7 +971,7 @@ function tripal_chado_populate_vocab_LOCAL() {
     'definition' => 'A small in-house unique identifier for a publication.',
     'cv_name' => 'local',
   ));
-  tripal_associate_chado_semweb_term('pub', 'miniref', $term);
+  chado_associate_semweb_term('pub', 'miniref', $term);
 
   //-----------------------------
   // Relationship Terms
@@ -982,9 +982,9 @@ function tripal_chado_populate_vocab_LOCAL() {
     'definition' => 'The subject of a relationship clause.',
     'cv_name' => 'local',
   ));
-  tripal_associate_chado_semweb_term(NULL, 'subject_id', $term);
-  tripal_associate_chado_semweb_term(NULL, 'subject_reagent_id', $term);
-  tripal_associate_chado_semweb_term(NULL, 'subject_project_id', $term);
+  chado_associate_semweb_term(NULL, 'subject_id', $term);
+  chado_associate_semweb_term(NULL, 'subject_reagent_id', $term);
+  chado_associate_semweb_term(NULL, 'subject_project_id', $term);
 
   $term = chado_insert_cvterm(array(
     'id' => 'local:relationship_object',
@@ -992,9 +992,9 @@ function tripal_chado_populate_vocab_LOCAL() {
     'definition' => 'The object of a relationship clause.',
     'cv_name' => 'local',
   ));
-  tripal_associate_chado_semweb_term(NULL, 'object_id', $term);
-  tripal_associate_chado_semweb_term(NULL, 'object_reagent_id', $term);
-  tripal_associate_chado_semweb_term(NULL, 'object_project_id', $term);
+  chado_associate_semweb_term(NULL, 'object_id', $term);
+  chado_associate_semweb_term(NULL, 'object_reagent_id', $term);
+  chado_associate_semweb_term(NULL, 'object_project_id', $term);
 
   $term = chado_insert_cvterm(array(
     'id' => 'local:relationship_type',
@@ -1002,20 +1002,20 @@ function tripal_chado_populate_vocab_LOCAL() {
     'definition' => 'The relationship type.',
     'cv_name' => 'local',
   ));
-  tripal_associate_chado_semweb_term('acquisition_relationship', 'type_id', $term);
-  tripal_associate_chado_semweb_term('biomaterial_relationship', 'type_id', $term);
-  tripal_associate_chado_semweb_term('cell_line_relationship', 'type_id', $term);
-  tripal_associate_chado_semweb_term('contact_relationship', 'type_id', $term);
-  tripal_associate_chado_semweb_term('element_relationship', 'type_id', $term);
-  tripal_associate_chado_semweb_term('elementresult_relationship', 'type_id', $term);
-  tripal_associate_chado_semweb_term('feature_relationship', 'type_id', $term);
-  tripal_associate_chado_semweb_term('nd_reagent_relationship', 'type_id', $term);
-  tripal_associate_chado_semweb_term('phylonode_relationship', 'type_id', $term);
-  tripal_associate_chado_semweb_term('project_relationship', 'type_id', $term);
-  tripal_associate_chado_semweb_term('pub_relationship', 'type_id', $term);
-  tripal_associate_chado_semweb_term('quantification_relationship', 'type_id', $term);
-  tripal_associate_chado_semweb_term('stock_relationship', 'type_id', $term);
-  tripal_associate_chado_semweb_term('cvterm_relationship', 'type_id', $term);
+  chado_associate_semweb_term('acquisition_relationship', 'type_id', $term);
+  chado_associate_semweb_term('biomaterial_relationship', 'type_id', $term);
+  chado_associate_semweb_term('cell_line_relationship', 'type_id', $term);
+  chado_associate_semweb_term('contact_relationship', 'type_id', $term);
+  chado_associate_semweb_term('element_relationship', 'type_id', $term);
+  chado_associate_semweb_term('elementresult_relationship', 'type_id', $term);
+  chado_associate_semweb_term('feature_relationship', 'type_id', $term);
+  chado_associate_semweb_term('nd_reagent_relationship', 'type_id', $term);
+  chado_associate_semweb_term('phylonode_relationship', 'type_id', $term);
+  chado_associate_semweb_term('project_relationship', 'type_id', $term);
+  chado_associate_semweb_term('pub_relationship', 'type_id', $term);
+  chado_associate_semweb_term('quantification_relationship', 'type_id', $term);
+  chado_associate_semweb_term('stock_relationship', 'type_id', $term);
+  chado_associate_semweb_term('cvterm_relationship', 'type_id', $term);
 
   //-----------------------------
   // NCBI Organism Property Terms
@@ -1322,7 +1322,7 @@ function tripal_chado_populate_vocab_LOCAL() {
     'is_relationship' => 0,
     'db_name' => 'local'
   ));
-  tripal_associate_chado_semweb_term('featurepos', 'map_feature_id', $term);
+  chado_associate_semweb_term('featurepos', 'map_feature_id', $term);
 
 
   //--------------
@@ -1337,7 +1337,7 @@ function tripal_chado_populate_vocab_LOCAL() {
       'represent the 5-prime coordinate.',
     'cv_name' => 'local',
   ));
-  tripal_associate_chado_semweb_term('featureloc', 'fmin', $term);
+  chado_associate_semweb_term('featureloc', 'fmin', $term);
   $term = chado_insert_cvterm(array(
     'id' => 'local:fmax',
     'name' => 'maximal boundary',
@@ -1347,7 +1347,7 @@ function tripal_chado_populate_vocab_LOCAL() {
       '3-prime coordinate',
     'cv_name' => 'local',
   ));
-  tripal_associate_chado_semweb_term('featureloc', 'fmax', $term);
+  chado_associate_semweb_term('featureloc', 'fmax', $term);
 
 
   //--------------
@@ -1424,7 +1424,7 @@ function tripal_chado_populate_vocab_LOCAL() {
     'influential people, and the like.',
     'cv_name' => 'local',
   ));
-  tripal_associate_chado_semweb_term('biomaterial', 'biosourceprovider_id', $term);
+  chado_associate_semweb_term('biomaterial', 'biosourceprovider_id', $term);
 
 
   chado_insert_cvterm(array(
@@ -1504,7 +1504,7 @@ function tripal_chado_populate_vocab_SWO() {
       'processor and that directs a computer\'s processor to perform ' .
       'specific operations.',
   ));
-  tripal_associate_chado_semweb_term('analysis', 'program', $term);
+  chado_associate_semweb_term('analysis', 'program', $term);
 }
 
 /**
@@ -1552,31 +1552,31 @@ function tripal_chado_populate_vocab_TPUB() {
       array('update_existing' => TRUE)
   );
   $term = chado_get_cvterm(array('id' => 'TPUB:0000039'));
-  tripal_associate_chado_semweb_term('pub', 'title', $term);
+  chado_associate_semweb_term('pub', 'title', $term);
 
   $term = chado_get_cvterm(array('id' => 'TPUB:0000243'));
-  tripal_associate_chado_semweb_term('pub', 'volumetitle', $term);
+  chado_associate_semweb_term('pub', 'volumetitle', $term);
 
   $term = chado_get_cvterm(array('id' => 'TPUB:0000042'));
-  tripal_associate_chado_semweb_term('pub', 'volume', $term);
+  chado_associate_semweb_term('pub', 'volume', $term);
 
   $term = chado_get_cvterm(array('id' => 'TPUB:0000256'));
-  tripal_associate_chado_semweb_term('pub', 'series_name', $term);
+  chado_associate_semweb_term('pub', 'series_name', $term);
 
   $term = chado_get_cvterm(array('id' => 'TPUB:0000043'));
-  tripal_associate_chado_semweb_term('pub', 'issue', $term);
+  chado_associate_semweb_term('pub', 'issue', $term);
 
   $term = chado_get_cvterm(array('id' => 'TPUB:0000059'));
-  tripal_associate_chado_semweb_term('pub', 'pyear', $term);
+  chado_associate_semweb_term('pub', 'pyear', $term);
 
   $term = chado_get_cvterm(array('id' => 'TPUB:0000044'));
-  tripal_associate_chado_semweb_term('pub', 'pages', $term);
+  chado_associate_semweb_term('pub', 'pages', $term);
 
   $term = chado_get_cvterm(array('id' => 'TPUB:0000244'));
-  tripal_associate_chado_semweb_term('pub', 'publisher', $term);
+  chado_associate_semweb_term('pub', 'publisher', $term);
 
   $term = chado_get_cvterm(array('id' => 'TPUB:0000245'));
-  tripal_associate_chado_semweb_term('pub', 'pubplace', $term);
+  chado_associate_semweb_term('pub', 'pubplace', $term);
 }
 
 /**
@@ -1597,7 +1597,7 @@ function tripal_chado_populate_vocab_UO() {
     'cv_name' => 'uo',
     'description' => 'A unit of measurement is a standardized quantity of a physical quality.'
   ));
-  tripal_associate_chado_semweb_term('featuremap', 'unittype_id', $term);
+  chado_associate_semweb_term('featuremap', 'unittype_id', $term);
 }
 
 /**
@@ -1614,13 +1614,13 @@ function tripal_chado_populate_vocab_TAXRANK() {
   chado_insert_cv('taxonomic_rank', 'A vocabulary of taxonomic ranks (species, family, phylum, etc)');
 
   $term = chado_get_cvterm(array('id' => 'TAXRANK:0000005'));
-  tripal_associate_chado_semweb_term('organism', 'genus', $term);
+  chado_associate_semweb_term('organism', 'genus', $term);
 
   $term = chado_get_cvterm(array('id' => 'TAXRANK:0000006'));
-  tripal_associate_chado_semweb_term('organism', 'species', $term);
+  chado_associate_semweb_term('organism', 'species', $term);
 
   $term = chado_get_cvterm(array('id' => 'TAXRANK:0000045'));
-  tripal_associate_chado_semweb_term('organism', 'infraspecific_name', $term);
+  chado_associate_semweb_term('organism', 'infraspecific_name', $term);
 }
 
 /**
@@ -1643,7 +1643,7 @@ function tripal_chado_populate_vocab_NCBITAXON() {
     'name' => 'common name',
     'cv_name' => 'ncbitaxon',
   ));
-  tripal_associate_chado_semweb_term('organism', 'common_name', $term);
+  chado_associate_semweb_term('organism', 'common_name', $term);
 }
 
 /**

+ 1 - 1
tripal_chado/tripal_chado.drush.inc

@@ -217,7 +217,7 @@ function drush_tripal_chado_trp_refresh_mview() {
   }
 
   drush_print('Updating the Materialized View with ID=' . $mview_id);
-  $status = tripal_populate_mview($mview_id);
+  $status = chado_populate_mview($mview_id);
   if ($status) {
     drush_log('Materialized View Updated', 'ok');
   }

+ 40 - 40
tripal_chado/tripal_chado.install

@@ -703,7 +703,7 @@ function tripal_chado_update_7300() {
       'cv_name' => 'EDAM',
       'definition' => 'An identifier of a biological or bioinformatics database.',
     ));
-    tripal_associate_chado_semweb_term('db', 'name', $term);
+    chado_associate_semweb_term('db', 'name', $term);
   }
   catch (\PDOException $e) {
     $error = $e->getMessage();
@@ -821,7 +821,7 @@ function tripal_chado_update_7304() {
       'cv_name' => 'SIO',
       'definition' => 'A vocabulary is a collection of terms.',
     ));
-    tripal_associate_chado_semweb_term('cvterm', 'cv_id', $term);
+    chado_associate_semweb_term('cvterm', 'cv_id', $term);
     $term = chado_insert_cvterm(array(
       'id' => 'data:2976',
       'name' => 'Protein sequence',
@@ -837,7 +837,7 @@ function tripal_chado_update_7304() {
       'represent the 5-prime coordinate.',
       'cv_name' => 'local',
     ));
-    tripal_associate_chado_semweb_term('featureloc', 'fmin', $term);
+    chado_associate_semweb_term('featureloc', 'fmin', $term);
     $term = chado_insert_cvterm(array(
       'id' => 'local:fmax',
       'name' => 'maximal boundary',
@@ -847,14 +847,14 @@ function tripal_chado_update_7304() {
       '3-prime coordinate',
       'cv_name' => 'local',
     ));
-    tripal_associate_chado_semweb_term('featureloc', 'fmax', $term);
+    chado_associate_semweb_term('featureloc', 'fmax', $term);
     $term = chado_insert_cvterm(array(
       'id' => 'data:2336',
       'name' => 'Translation phase specification',
       'cv_name' => 'EDAM',
       'definition' => 'Phase for translation of DNA (0, 1 or 2) relative to a fragment of the coding sequence.',
     ));
-    tripal_associate_chado_semweb_term('featureloc', 'phase', $term);
+    chado_associate_semweb_term('featureloc', 'phase', $term);
     $term = chado_insert_cvterm(array(
       'id' => 'data:3002',
       'name' => 'Annotation track',
@@ -863,7 +863,7 @@ function tripal_chado_update_7304() {
         'biomolecular (typically genome) sequence, suitable for import and ' .
         'display in a genome browser. Synonym: Sequence annotation track.',
     ));
-    tripal_associate_chado_semweb_term('featureloc', 'srcfeature_id', $term);
+    chado_associate_semweb_term('featureloc', 'srcfeature_id', $term);
   }
   catch (\PDOException $e) {
     $transaction->rollback();
@@ -1045,8 +1045,8 @@ function tripal_chado_update_7308() {
       'packaging and indicates its order within a set of other products ' .
       'having the same name.',
     ));
-    tripal_associate_chado_semweb_term('analysis', 'sourceversion', $term);
-    tripal_associate_chado_semweb_term(NULL, 'version', $term);
+    chado_associate_semweb_term('analysis', 'sourceversion', $term);
+    chado_associate_semweb_term(NULL, 'version', $term);
 
     $term = chado_insert_cvterm(array(
       'id' => 'schema:name',
@@ -1054,7 +1054,7 @@ function tripal_chado_update_7308() {
       'cv_name' => 'schema',
       'definition' => 'The name of the item.',
     ));
-    tripal_associate_chado_semweb_term('analysis', 'sourcename', $term);
+    chado_associate_semweb_term('analysis', 'sourcename', $term);
 
     $term = chado_insert_cvterm(array(
       'id' => 'data:2091',
@@ -1062,7 +1062,7 @@ function tripal_chado_update_7308() {
       'cv_name' => 'EDAM',
       'definition' => 'A persistent (stable) and unique identifier, typically identifying an object (entry) from a database.',
     ));
-    tripal_associate_chado_semweb_term('dbxref', 'accession', $term);
+    chado_associate_semweb_term('dbxref', 'accession', $term);
 
   }
   catch (\PDOException $e) {
@@ -1082,16 +1082,16 @@ function tripal_chado_update_7309() {
       'cv_name' => 'SIO',
       'definition' => 'An annotation is a written explanatory or critical description, or other in-context information (e.g., pattern, motif, link), that has been associated with data or other types of information.',
     ));
-    tripal_associate_chado_semweb_term('feature_cvterm', 'cvterm_id', $term);
-    tripal_associate_chado_semweb_term('analysis_cvterm', 'cvterm_id', $term);
-    tripal_associate_chado_semweb_term('cell_line_cvterm', 'cvterm_id', $term);
-    tripal_associate_chado_semweb_term('environment_cvterm', 'cvterm_id', $term);
-    tripal_associate_chado_semweb_term('expression_cvterm', 'cvterm_id', $term);
-    tripal_associate_chado_semweb_term('library_cvterm', 'cvterm_id', $term);
-    tripal_associate_chado_semweb_term('organism_cvterm', 'cvterm_id', $term);
-    tripal_associate_chado_semweb_term('phenotype_cvterm', 'cvterm_id', $term);
-    tripal_associate_chado_semweb_term('stock_cvterm', 'cvterm_id', $term);
-    tripal_associate_chado_semweb_term('stock_relationship_cvterm', 'cvterm_id', $term);
+    chado_associate_semweb_term('feature_cvterm', 'cvterm_id', $term);
+    chado_associate_semweb_term('analysis_cvterm', 'cvterm_id', $term);
+    chado_associate_semweb_term('cell_line_cvterm', 'cvterm_id', $term);
+    chado_associate_semweb_term('environment_cvterm', 'cvterm_id', $term);
+    chado_associate_semweb_term('expression_cvterm', 'cvterm_id', $term);
+    chado_associate_semweb_term('library_cvterm', 'cvterm_id', $term);
+    chado_associate_semweb_term('organism_cvterm', 'cvterm_id', $term);
+    chado_associate_semweb_term('phenotype_cvterm', 'cvterm_id', $term);
+    chado_associate_semweb_term('stock_cvterm', 'cvterm_id', $term);
+    chado_associate_semweb_term('stock_relationship_cvterm', 'cvterm_id', $term);
 
 
     $term = chado_insert_cvterm(array(
@@ -1100,10 +1100,10 @@ function tripal_chado_update_7309() {
       'cv_name' => 'SIO',
       'definition' => 'NOT is a logical operator in that has the value true if its operand is false.',
     ));
-    tripal_associate_chado_semweb_term('feature_cvterm', 'is_not', $term);
-    tripal_associate_chado_semweb_term('analysis_cvterm', 'is_not', $term);
-    tripal_associate_chado_semweb_term('organism_cvterm', 'is_not', $term);
-    tripal_associate_chado_semweb_term('stock_cvterm', 'is_not', $term);
+    chado_associate_semweb_term('feature_cvterm', 'is_not', $term);
+    chado_associate_semweb_term('analysis_cvterm', 'is_not', $term);
+    chado_associate_semweb_term('organism_cvterm', 'is_not', $term);
+    chado_associate_semweb_term('stock_cvterm', 'is_not', $term);
   }
   catch (\PDOException $e) {
     $error = $e->getMessage();
@@ -1132,7 +1132,7 @@ function tripal_chado_update_7310() {
       'cv_name' => 'OBCS',
       'definition' => 'A data item that represents an arrangement according to a rank, i.e., the position of a particular case relative to other cases on a defined scale.',
     ));
-    tripal_associate_chado_semweb_term(NULL, 'rank', $term);
+    chado_associate_semweb_term(NULL, 'rank', $term);
   }
   catch (\PDOException $e) {
     $error = $e->getMessage();
@@ -1153,7 +1153,7 @@ function tripal_chado_update_7311() {
         'represent the 5-prime coordinate.',
       'cv_name' => 'local',
     ));
-    tripal_associate_chado_semweb_term('featureloc', 'fmin', $term);
+    chado_associate_semweb_term('featureloc', 'fmin', $term);
   }
   catch (\PDOException $e) {
     $error = $e->getMessage();
@@ -1172,14 +1172,14 @@ function tripal_chado_update_7312() {
       'definition' => 'A small in-house unique identifier for a publication.',
       'cv_name' => 'local',
     ));
-    tripal_associate_chado_semweb_term('pub', 'miniref', $term);
+    chado_associate_semweb_term('pub', 'miniref', $term);
     $term = chado_insert_cvterm(array(
       'id' => 'schema:url',
       'name' => 'url',
       'cv_name' => 'schema',
       'definition' => 'URL of the item.',
     ));
-    tripal_associate_chado_semweb_term('db', 'url', $term);
+    chado_associate_semweb_term('db', 'url', $term);
   }
   catch (\PDOException $e) {
     $error = $e->getMessage();
@@ -1215,7 +1215,7 @@ function tripal_chado_update_7314() {
       'is_relationship' => 0,
       'db_name' => 'local'
     ));
-    tripal_associate_chado_semweb_term('featurepos', 'map_feature_id', $term);
+    chado_associate_semweb_term('featurepos', 'map_feature_id', $term);
   }
   catch (\PDOException $e) {
     $error = $e->getMessage();
@@ -1270,7 +1270,7 @@ function tripal_chado_update_7317() {
       'cv_name' => 'obi',
       'definition' => 'A material entity that is an individual living system, such as animal, plant, bacteria or virus, that is capable of replicating or reproducing, growth and maintenance in the right environment. An organism may be unicellular or made up, like humans, of many billions of cells divided into specialized tissues and organs.',
     ));
-    tripal_associate_chado_semweb_term('biomaterial', 'taxon_id', $term);
+    chado_associate_semweb_term('biomaterial', 'taxon_id', $term);
     $term = chado_insert_cvterm(array(
       'id' => 'local:contact',
       'name' => 'contact',
@@ -1279,7 +1279,7 @@ function tripal_chado_update_7317() {
       'influential people, and the like.',
       'cv_name' => 'local',
     ));
-    tripal_associate_chado_semweb_term('biomaterial', 'biosourceprovider_id', $term);
+    chado_associate_semweb_term('biomaterial', 'biosourceprovider_id', $term);
   }
   catch (\PDOException $e) {
     $error = $e->getMessage();
@@ -1338,7 +1338,7 @@ function tripal_chado_update_7320() {
     try {
     // Associate the Analysis term with the analysis_id of the phylotree table.
     $term = chado_get_cvterm(array('id' => 'operation:2945'));
-    tripal_associate_chado_semweb_term('phylotree', 'analysis_id', $term);
+    chado_associate_semweb_term('phylotree', 'analysis_id', $term);
 
     $term = chado_insert_cvterm(array(
       'id' => 'data:0872',
@@ -1476,12 +1476,12 @@ function tripal_chado_update_7323() {
     tripal_chado_add_db2cv_mview_mview();
 
     drupal_set_message('Populating materialized view db2cv_mview...');
-    $mview_id = tripal_get_mview_id('db2cv_mview');
-    tripal_populate_mview($mview_id);
+    $mview_id = chado_get_mview_id('db2cv_mview');
+    chado_populate_mview($mview_id);
 
     drupal_set_message('Populating materialized view cv_root_mview...');
-    $mview_id = tripal_get_mview_id('cv_root_mview');
-    tripal_populate_mview($mview_id);
+    $mview_id = chado_get_mview_id('cv_root_mview');
+    chado_populate_mview($mview_id);
   }
   catch (\PDOException $e) {
     $error = $e->getMessage();
@@ -1497,14 +1497,14 @@ function tripal_chado_update_7324() {
       module_load_include('inc', 'tripal_chado', 'includes/setup/tripal_chado.chado_vx_x');
 
       // Remove the old mview.
-      $mview_id = tripal_get_mview_id('db2cv_mview');
-      tripal_delete_mview($mview_id);
+      $mview_id = chado_get_mview_id('db2cv_mview');
+      chado_delete_mview($mview_id);
 
       // Readd the mview.
       tripal_chado_add_db2cv_mview_mview();
       drupal_set_message('Populating materialized view db2cv_mview...');
-      $mview_id = tripal_get_mview_id('db2cv_mview');
-      tripal_populate_mview($mview_id);
+      $mview_id = chado_get_mview_id('db2cv_mview');
+      chado_populate_mview($mview_id);
     }
   }
   catch (\PDOException $e) {

+ 2 - 2
tripal_chado/tripal_chado.module

@@ -984,7 +984,7 @@ function tripal_chado_exclude_type_by_default() {
 /**
  * Implements hook_job_describe_args().
  *
- * Describes the arguments for the tripal_populate_mview job to allow for
+ * Describes the arguments for the chado_populate_mview job to allow for
  * greater readability in the jobs details pages.
  *
  * @param $callback
@@ -1000,7 +1000,7 @@ function tripal_chado_exclude_type_by_default() {
  */
 function tripal_chado_job_describe_args($callback, $args) {
   $new_args = array();
-  if ($callback == 'tripal_populate_mview') {
+  if ($callback == 'chado_populate_mview') {
     // get this mview details
     $sql = "SELECT * FROM {tripal_mviews} WHERE mview_id = :mview_id ";
     $results = db_query($sql, array(':mview_id' => $args[0]));