Browse Source

API: changed [table]_retrieve to chado_[table]_retrieve

Lacey Sanderson 11 years ago
parent
commit
1706616450

+ 4 - 4
tripal_analysis/api/tripal_analysis.DEPRECATED.inc

@@ -95,9 +95,9 @@ function tripal_analysis_delete_property($analysis_id, $property, $cv_name = 'tr
 /**
 /**
  * @deprecated Restructured API to make naming more readable and consistent.
  * @deprecated Restructured API to make naming more readable and consistent.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
- * This function has been replaced by analysis_retrieve().
+ * This function has been replaced by chado_analysis_retrieve().
  *
  *
- * @see analysis_retrieve().
+ * @see chado_analysis_retrieve().
  */
  */
 function tripal_analysis_get_node($analysis_id) {
 function tripal_analysis_get_node($analysis_id) {
 
 
@@ -107,9 +107,9 @@ function tripal_analysis_get_node($analysis_id) {
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     array(
     array(
       '%old_function'=>'tripal_analysis_get_node',
       '%old_function'=>'tripal_analysis_get_node',
-      '%new_function' => 'analysis_retrieve'
+      '%new_function' => 'chado_analysis_retrieve'
     )
     )
   );
   );
 
 
-  return analysis_retrieve(array('analysis_id' => $analysis_id));
+  return chado_analysis_retrieve(array('analysis_id' => $analysis_id));
 }
 }

+ 3 - 3
tripal_analysis/api/tripal_analysis.api.inc

@@ -70,7 +70,7 @@ function tripal_analysis_unregister_child($modulename) {
  *
  *
  * @ingroup tripal_analysis_api
  * @ingroup tripal_analysis_api
  */
  */
-function analysis_retrieve($identifier, $options) {
+function chado_analysis_retrieve($identifier, $options) {
 
 
   // Set Defaults
   // Set Defaults
   if (!isset($options['include_fk'])) {
   if (!isset($options['include_fk'])) {
@@ -126,7 +126,7 @@ function analysis_retrieve($identifier, $options) {
     tripal_report_error(
     tripal_report_error(
       'tripal_analysis_api',
       'tripal_analysis_api',
       TRIPAL_ERROR,
       TRIPAL_ERROR,
-      "analysis_retrieve: The identifiers you passed in were not unique. You passed in %identifier.",
+      "chado_analysis_retrieve: The identifiers you passed in were not unique. You passed in %identifier.",
       array(
       array(
         '%identifier'=> print_r($identifiers, TRUE)
         '%identifier'=> print_r($identifiers, TRUE)
       )
       )
@@ -138,7 +138,7 @@ function analysis_retrieve($identifier, $options) {
     tripal_report_error(
     tripal_report_error(
       'tripal_analysis_api',
       'tripal_analysis_api',
       TRIPAL_ERROR,
       TRIPAL_ERROR,
-      "analysis_retrieve: chado_generate_var() failed to return a analysis based on the identifiers
+      "chado_analysis_retrieve: chado_generate_var() failed to return a analysis based on the identifiers
         you passed in. You should check that your identifiers are correct, as well as, look
         you passed in. You should check that your identifiers are correct, as well as, look
         for a chado_generate_var error for additional clues. You passed in %identifier.",
         for a chado_generate_var error for additional clues. You passed in %identifier.",
       array(
       array(

+ 28 - 28
tripal_cv/api/tripal_cv.DEPRECATED.inc

@@ -7,9 +7,9 @@
 /**
 /**
  * @deprecated Restructured API to make naming more readable and consistent.
  * @deprecated Restructured API to make naming more readable and consistent.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
- * This function has been replaced by cv_retrieve().
+ * This function has been replaced by chado_cv_retrieve().
  *
  *
- * @see cv_retrieve().
+ * @see chado_cv_retrieve().
  */
  */
 function tripal_cv_get_cv($select_values) {
 function tripal_cv_get_cv($select_values) {
 
 
@@ -19,19 +19,19 @@ function tripal_cv_get_cv($select_values) {
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     array(
     array(
       '%old_function'=>'tripal_cv_get_cv',
       '%old_function'=>'tripal_cv_get_cv',
-      '%new_function' => 'cv_retrieve'
+      '%new_function' => 'chado_cv_retrieve'
     )
     )
   );
   );
 
 
-  return cv_retrieve($select_values);
+  return chado_cv_retrieve($select_values);
 }
 }
 
 
 /**
 /**
  * @deprecated Restructured API to make naming more readable and consistent.
  * @deprecated Restructured API to make naming more readable and consistent.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
- * This function has been replaced by cv_retrieve().
+ * This function has been replaced by chado_cv_retrieve().
  *
  *
- * @see cv_retrieve().
+ * @see chado_cv_retrieve().
  */
  */
 function tripal_cv_get_cv_by_name($name) {
 function tripal_cv_get_cv_by_name($name) {
 
 
@@ -41,19 +41,19 @@ function tripal_cv_get_cv_by_name($name) {
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     array(
     array(
       '%old_function'=>'tripal_cv_get_cv_by_name',
       '%old_function'=>'tripal_cv_get_cv_by_name',
-      '%new_function' => 'cv_retrieve'
+      '%new_function' => 'chado_cv_retrieve'
     )
     )
   );
   );
 
 
-  return cv_retrieve(array('name' => $name));
+  return chado_cv_retrieve(array('name' => $name));
 }
 }
 
 
 /**
 /**
  * @deprecated Restructured API to make naming more readable and consistent.
  * @deprecated Restructured API to make naming more readable and consistent.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
- * This function has been replaced by cv_retrieve().
+ * This function has been replaced by chado_cv_retrieve().
  *
  *
- * @see cv_retrieve().
+ * @see chado_cv_retrieve().
  */
  */
 function tripal_cv_get_cv_by_id($cv_id) {
 function tripal_cv_get_cv_by_id($cv_id) {
 
 
@@ -63,19 +63,19 @@ function tripal_cv_get_cv_by_id($cv_id) {
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     array(
     array(
       '%old_function'=>'tripal_cv_get_cv_by_id',
       '%old_function'=>'tripal_cv_get_cv_by_id',
-      '%new_function' => 'cv_retrieve'
+      '%new_function' => 'chado_cv_retrieve'
     )
     )
   );
   );
 
 
-  return cv_retrieve(array('cv_id' => $id));
+  return chado_cv_retrieve(array('cv_id' => $id));
 }
 }
 
 
 /**
 /**
  * @deprecated Restructured API to make naming more readable and consistent.
  * @deprecated Restructured API to make naming more readable and consistent.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
- * This function has been replaced by cv_retrieve().
+ * This function has been replaced by chado_cv_retrieve().
  *
  *
- * @see cv_retrieve().
+ * @see chado_cv_retrieve().
  */
  */
 function tripal_cv_get_cv_id($cv_name) {
 function tripal_cv_get_cv_id($cv_name) {
 
 
@@ -85,11 +85,11 @@ function tripal_cv_get_cv_id($cv_name) {
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     array(
     array(
       '%old_function'=>'tripal_cv_get_cv_id',
       '%old_function'=>'tripal_cv_get_cv_id',
-      '%new_function' => 'cv_retrieve'
+      '%new_function' => 'chado_cv_retrieve'
     )
     )
   );
   );
 
 
-  $cv = cv_retrieve(array('name' => $cv_name));
+  $cv = chado_cv_retrieve(array('name' => $cv_name));
   if (isset($cv->cv_id)) {
   if (isset($cv->cv_id)) {
     return $cv->cv_id;
     return $cv->cv_id;
   }
   }
@@ -123,9 +123,9 @@ function tripal_cv_get_cv_options() {
 /**
 /**
  * @deprecated Restructured API to make naming more readable and consistent.
  * @deprecated Restructured API to make naming more readable and consistent.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
- * This function has been replaced by cvterm_retrieve().
+ * This function has been replaced by chado_cvterm_retrieve().
  *
  *
- * @see cvterm_retrieve().
+ * @see chado_cvterm_retrieve().
  */
  */
 function tripal_cv_get_cvterm_by_id($cvterm_id) {
 function tripal_cv_get_cvterm_by_id($cvterm_id) {
 
 
@@ -135,19 +135,19 @@ function tripal_cv_get_cvterm_by_id($cvterm_id) {
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     array(
     array(
       '%old_function'=>'tripal_cv_get_cvterm_by_id',
       '%old_function'=>'tripal_cv_get_cvterm_by_id',
-      '%new_function' => 'cvterm_retrieve'
+      '%new_function' => 'chado_cvterm_retrieve'
     )
     )
   );
   );
 
 
-  return cvterm_retrieve(array('cvterm_id' => $cvterm_id));
+  return chado_cvterm_retrieve(array('cvterm_id' => $cvterm_id));
 }
 }
 
 
 /**
 /**
  * @deprecated Restructured API to make naming more readable and consistent.
  * @deprecated Restructured API to make naming more readable and consistent.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
- * This function has been replaced by cvterm_retrieve().
+ * This function has been replaced by chado_cvterm_retrieve().
  *
  *
- * @see cvterm_retrieve().
+ * @see chado_cvterm_retrieve().
  */
  */
 function tripal_cv_get_cvterm_by_name($name, $cv_id = NULL, $cv_name = 'tripal') {
 function tripal_cv_get_cvterm_by_name($name, $cv_id = NULL, $cv_name = 'tripal') {
 
 
@@ -157,7 +157,7 @@ function tripal_cv_get_cvterm_by_name($name, $cv_id = NULL, $cv_name = 'tripal')
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     array(
     array(
       '%old_function'=>'tripal_cv_get_cvterm_by_name',
       '%old_function'=>'tripal_cv_get_cvterm_by_name',
-      '%new_function' => 'cvterm_retrieve'
+      '%new_function' => 'chado_cvterm_retrieve'
     )
     )
   );
   );
 
 
@@ -171,15 +171,15 @@ function tripal_cv_get_cvterm_by_name($name, $cv_id = NULL, $cv_name = 'tripal')
     );
     );
   }
   }
 
 
-  return cvterm_retrieve($identifiers);
+  return chado_cvterm_retrieve($identifiers);
 }
 }
 
 
 /**
 /**
  * @deprecated Restructured API to make naming more readable and consistent.
  * @deprecated Restructured API to make naming more readable and consistent.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
- * This function has been replaced by cvterm_retrieve().
+ * This function has been replaced by chado_cvterm_retrieve().
  *
  *
- * @see cvterm_retrieve().
+ * @see chado_cvterm_retrieve().
  */
  */
 function tripal_cv_get_cvterm_by_synonym($synonym, $cv_id = NULL, $cv_name = 'tripal') {
 function tripal_cv_get_cvterm_by_synonym($synonym, $cv_id = NULL, $cv_name = 'tripal') {
 
 
@@ -189,11 +189,11 @@ function tripal_cv_get_cvterm_by_synonym($synonym, $cv_id = NULL, $cv_name = 'tr
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     array(
     array(
       '%old_function'=>'tripal_cv_get_cvterm_by_synonym',
       '%old_function'=>'tripal_cv_get_cvterm_by_synonym',
-      '%new_function' => 'cvterm_retrieve'
+      '%new_function' => 'chado_cvterm_retrieve'
     )
     )
   );
   );
 
 
-  return cvterm_retrieve(array(
+  return chado_cvterm_retrieve(array(
     'synonym' => array(
     'synonym' => array(
       'name' => $synonym,
       'name' => $synonym,
       'cv_id' => $cv_id,
       'cv_id' => $cv_id,

+ 33 - 19
tripal_cv/api/tripal_cv.api.inc

@@ -44,7 +44,7 @@
  *
  *
  * @ingroup tripal_cv_api
  * @ingroup tripal_cv_api
  */
  */
-function cv_retrieve($identifiers, $options = array()) {
+function chado_cv_retrieve($identifiers, $options = array()) {
 
 
   // Set Defaults
   // Set Defaults
   if (!isset($options['include_fk'])) {
   if (!isset($options['include_fk'])) {
@@ -57,7 +57,7 @@ function cv_retrieve($identifiers, $options = array()) {
     tripal_report_error(
     tripal_report_error(
       'tripal_cv_api',
       'tripal_cv_api',
       TRIPAL_ERROR,
       TRIPAL_ERROR,
-      "cv_retrieve: The identifier passed in is expected to be an array with the key
+      "chado_cv_retrieve: The identifier passed in is expected to be an array with the key
         matching a column name in the cv table (ie: cv_id or name). You passed in %identifier.",
         matching a column name in the cv table (ie: cv_id or name). You passed in %identifier.",
       array(
       array(
         '%identifier'=> print_r($identifiers, TRUE)
         '%identifier'=> print_r($identifiers, TRUE)
@@ -68,7 +68,7 @@ function cv_retrieve($identifiers, $options = array()) {
     tripal_report_error(
     tripal_report_error(
       'tripal_cv_api',
       'tripal_cv_api',
       TRIPAL_ERROR,
       TRIPAL_ERROR,
-      "cv_retrieve: You did not pass in anything to identify the cv you want. The identifier
+      "chado_cv_retrieve: You did not pass in anything to identify the cv you want. The identifier
         is expected to be an array with the key matching a column name in the cv table
         is expected to be an array with the key matching a column name in the cv table
         (ie: cv_id or name). You passed in %identifier.",
         (ie: cv_id or name). You passed in %identifier.",
       array(
       array(
@@ -89,7 +89,7 @@ function cv_retrieve($identifiers, $options = array()) {
     tripal_report_error(
     tripal_report_error(
       'tripal_cv_api',
       'tripal_cv_api',
       TRIPAL_ERROR,
       TRIPAL_ERROR,
-      "cv_retrieve: The identifiers you passed in were not unique. You passed in %identifier.",
+      "chado_cv_retrieve: The identifiers you passed in were not unique. You passed in %identifier.",
       array(
       array(
         '%identifier'=> print_r($identifiers, TRUE)
         '%identifier'=> print_r($identifiers, TRUE)
       )
       )
@@ -101,7 +101,7 @@ function cv_retrieve($identifiers, $options = array()) {
     tripal_report_error(
     tripal_report_error(
       'tripal_cv_api',
       'tripal_cv_api',
       TRIPAL_ERROR,
       TRIPAL_ERROR,
-      "cv_retrieve: chado_generate_var() failed to return a cv based on the identifiers
+      "chado_cv_retrieve: chado_generate_var() failed to return a cv based on the identifiers
         you passed in. You should check that your identifiers are correct, as well as, look
         you passed in. You should check that your identifiers are correct, as well as, look
         for a chado_generate_var error for additional clues. You passed in %identifier.",
         for a chado_generate_var error for additional clues. You passed in %identifier.",
       array(
       array(
@@ -168,7 +168,7 @@ function cv_get_select_options() {
  *
  *
  * @ingroup tripal_cv_api
  * @ingroup tripal_cv_api
  */
  */
-function cvterm_retrieve($identifiers, $options = array()) {
+function chado_cvterm_retrieve($identifiers, $options = array()) {
 
 
   // Set Defaults
   // Set Defaults
   if (!isset($options['include_fk'])) {
   if (!isset($options['include_fk'])) {
@@ -181,7 +181,7 @@ function cvterm_retrieve($identifiers, $options = array()) {
     tripal_report_error(
     tripal_report_error(
       'tripal_cv_api',
       'tripal_cv_api',
       TRIPAL_ERROR,
       TRIPAL_ERROR,
-      "cvterm_retrieve: The identifier passed in is expected to be an array with the key
+      "chado_cvterm_retrieve: The identifier passed in is expected to be an array with the key
         matching a column name in the cvterm table (ie: cvterm_id or name). You passed in %identifier.",
         matching a column name in the cvterm table (ie: cvterm_id or name). You passed in %identifier.",
       array(
       array(
         '%identifier'=> print_r($identifiers, TRUE)
         '%identifier'=> print_r($identifiers, TRUE)
@@ -192,7 +192,7 @@ function cvterm_retrieve($identifiers, $options = array()) {
     tripal_report_error(
     tripal_report_error(
       'tripal_cv_api',
       'tripal_cv_api',
       TRIPAL_ERROR,
       TRIPAL_ERROR,
-      "cvterm_retrieve: You did not pass in anything to identify the cvterm you want. The identifier
+      "chado_cvterm_retrieve: You did not pass in anything to identify the cvterm you want. The identifier
         is expected to be an array with the key matching a column name in the cvterm table
         is expected to be an array with the key matching a column name in the cvterm table
         (ie: cvterm_id or name). You passed in %identifier.",
         (ie: cvterm_id or name). You passed in %identifier.",
       array(
       array(
@@ -202,17 +202,25 @@ function cvterm_retrieve($identifiers, $options = array()) {
   }
   }
 
 
   // If synonym was passed in, then process this first before calling chado_generate_var()
   // If synonym was passed in, then process this first before calling chado_generate_var()
-  if (array_key_exists('synonym', $identifiers)) {
-    $sname = $identifiers['synonym']['name'];
+  if (isset($identifier['synonym'])) {
+    $synonym = $identifier['synonym']['name'];
 
 
-    $values = array('synonym' => $sname);
-    if (array_key_exists('cv_id', $identifiers['synonym'])) {
-      $values['cvterm_id'] = array('cv_id' => $identifiers['synonym']['cv_id']);
+    $values = array(
+       'synonym' => $synonym,
+    );
+    $statement = "sel_cvtermsynonym_sy";
+    if (isset($identifier['synonym']['cv_id'])) {
+      $values['cvterm_id'] = array('cv_id' => $identifier['synonym']['cv_id']);
+      $statement = "sel_cvtermsynonym_sycv";
     }
     }
-    if (array_key_exists('cv_name', $identifiers['synonym'])) {
-      $values['cvterm_id'] = array('cv_id' => array('name' => $identifiers['synonym']['cv_name']));
+    if (isset($identifier['synonym']['cv_name'])) {
+      $values['cvterm_id'] = array('cv_id' => array('name' => $identifier['synonym']['cv_name']));
+      $statement = "sel_cvtermsynonym_sycv";
     }
     }
-    $options = array('case_insensitive_columns' => array('name'));
+    $options = array(
+      'statement_name' => $statement,
+      'case_insensitive_columns' => array('name')
+    );
     $synonym = chado_select_record('cvtermsynonym', array('cvterm_id'), $values, $options);
     $synonym = chado_select_record('cvtermsynonym', array('cvterm_id'), $values, $options);
 
 
     // if the synonym doens't exist or more than one record is returned then return false
     // if the synonym doens't exist or more than one record is returned then return false
@@ -232,10 +240,16 @@ function cvterm_retrieve($identifiers, $options = array()) {
     unset($identifiers['property']);
     unset($identifiers['property']);
     $cvterm = chado_get_record_with_property('cvterm', $property, $identifiers, $options);
     $cvterm = chado_get_record_with_property('cvterm', $property, $identifiers, $options);
   }
   }
+
   // Else we have a simple case and we can just use chado_generate_var to get the cvterm
   // Else we have a simple case and we can just use chado_generate_var to get the cvterm
   else {
   else {
+
     // Try to get the cvterm
     // Try to get the cvterm
-    $cvterm = chado_generate_var('cvterm', $identifiers, $options);
+    $cvterm = chado_generate_var(
+      'cvterm',
+      $identifiers,
+      $options
+    );
   }
   }
 
 
   // Ensure the cvterm is singular. If it's an array then it is not singular
   // Ensure the cvterm is singular. If it's an array then it is not singular
@@ -243,7 +257,7 @@ function cvterm_retrieve($identifiers, $options = array()) {
     tripal_report_error(
     tripal_report_error(
       'tripal_cv_api',
       'tripal_cv_api',
       TRIPAL_ERROR,
       TRIPAL_ERROR,
-      "cvterm_retrieve: The identifiers you passed in were not unique. You passed in %identifier.",
+      "chado_cvterm_retrieve: The identifiers you passed in were not unique. You passed in %identifier.",
       array(
       array(
         '%identifier'=> print_r($identifiers, TRUE)
         '%identifier'=> print_r($identifiers, TRUE)
       )
       )
@@ -255,7 +269,7 @@ function cvterm_retrieve($identifiers, $options = array()) {
     tripal_report_error(
     tripal_report_error(
       'tripal_cv_api',
       'tripal_cv_api',
       TRIPAL_ERROR,
       TRIPAL_ERROR,
-      "cvterm_retrieve: chado_generate_var() failed to return a cvterm based on the identifiers
+      "chado_cvterm_retrieve: chado_generate_var() failed to return a cvterm based on the identifiers
         you passed in. You should check that your identifiers are correct, as well as, look
         you passed in. You should check that your identifiers are correct, as well as, look
         for a chado_generate_var error for additional clues. You passed in %identifier.",
         for a chado_generate_var error for additional clues. You passed in %identifier.",
       array(
       array(

+ 20 - 20
tripal_db/api/tripal_db.DEPRECATED.inc

@@ -7,9 +7,9 @@
 /**
 /**
  * @deprecated Restructured API to make naming more readable and consistent.
  * @deprecated Restructured API to make naming more readable and consistent.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
- * This function has been replaced by db_retrieve().
+ * This function has been replaced by chado_db_retrieve().
  *
  *
- * @see db_retrieve().
+ * @see chado_db_retrieve().
  */
  */
 function tripal_db_get_db($select_values) {
 function tripal_db_get_db($select_values) {
 
 
@@ -19,19 +19,19 @@ function tripal_db_get_db($select_values) {
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     array(
     array(
       '%old_function'=>'tripal_db_get_db',
       '%old_function'=>'tripal_db_get_db',
-      '%new_function' => 'db_retrieve'
+      '%new_function' => 'chado_db_retrieve'
     )
     )
   );
   );
 
 
-  return db_retrieve($select_values);
+  return chado_db_retrieve($select_values);
 }
 }
 
 
 /**
 /**
  * @deprecated Restructured API to make naming more readable and consistent.
  * @deprecated Restructured API to make naming more readable and consistent.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
- * This function has been replaced by db_retrieve().
+ * This function has been replaced by chado_db_retrieve().
  *
  *
- * @see db_retrieve().
+ * @see chado_db_retrieve().
  */
  */
 function tripal_db_get_db_by_db_id($db_id) {
 function tripal_db_get_db_by_db_id($db_id) {
 
 
@@ -41,19 +41,19 @@ function tripal_db_get_db_by_db_id($db_id) {
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     array(
     array(
       '%old_function'=>'tripal_db_get_db_by_db_id',
       '%old_function'=>'tripal_db_get_db_by_db_id',
-      '%new_function' => 'db_retrieve'
+      '%new_function' => 'chado_db_retrieve'
     )
     )
   );
   );
 
 
-  return db_retrieve(array('db_id' => $db_id));
+  return chado_db_retrieve(array('db_id' => $db_id));
 }
 }
 
 
 /**
 /**
  * @deprecated Restructured API to make naming more readable and consistent.
  * @deprecated Restructured API to make naming more readable and consistent.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
- * This function has been replaced by db_retrieve().
+ * This function has been replaced by chado_db_retrieve().
  *
  *
- * @see db_retrieve().
+ * @see chado_db_retrieve().
  */
  */
 function tripal_db_get_db_by_name($name) {
 function tripal_db_get_db_by_name($name) {
 
 
@@ -63,11 +63,11 @@ function tripal_db_get_db_by_name($name) {
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     array(
     array(
       '%old_function'=>'tripal_db_get_db_by_name',
       '%old_function'=>'tripal_db_get_db_by_name',
-      '%new_function' => 'db_retrieve'
+      '%new_function' => 'chado_db_retrieve'
     )
     )
   );
   );
 
 
-  return db_retrieve(array('name' => $name));
+  return chado_db_retrieve(array('name' => $name));
 }
 }
 
 
 /**
 /**
@@ -95,9 +95,9 @@ function tripal_db_get_db_options() {
 /**
 /**
  * @deprecated Restructured API to make naming more readable and consistent.
  * @deprecated Restructured API to make naming more readable and consistent.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
- * This function has been replaced by db_retrieve().
+ * This function has been replaced by chado_db_retrieve().
  *
  *
- * @see dbxref_retrieve().
+ * @see chado_dbxref_retrieve().
  */
  */
 function tripal_db_get_dbxref($select_values) {
 function tripal_db_get_dbxref($select_values) {
 
 
@@ -107,19 +107,19 @@ function tripal_db_get_dbxref($select_values) {
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     array(
     array(
       '%old_function'=>'tripal_db_get_dbxref',
       '%old_function'=>'tripal_db_get_dbxref',
-      '%new_function' => 'dbxref_retrieve'
+      '%new_function' => 'chado_dbxref_retrieve'
     )
     )
   );
   );
 
 
-  return dbxref_retrieve($select_values);
+  return chado_dbxref_retrieve($select_values);
 }
 }
 
 
 /**
 /**
  * @deprecated Restructured API to make naming more readable and consistent.
  * @deprecated Restructured API to make naming more readable and consistent.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
- * This function has been replaced by db_retrieve().
+ * This function has been replaced by chado_db_retrieve().
  *
  *
- * @see dbxref_retrieve().
+ * @see chado_dbxref_retrieve().
  */
  */
 function tripal_db_get_dbxref_by_accession($accession, $db_id=0) {
 function tripal_db_get_dbxref_by_accession($accession, $db_id=0) {
 
 
@@ -129,7 +129,7 @@ function tripal_db_get_dbxref_by_accession($accession, $db_id=0) {
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     array(
     array(
       '%old_function'=>'tripal_db_get_dbxref_by_accession',
       '%old_function'=>'tripal_db_get_dbxref_by_accession',
-      '%new_function' => 'dbxref_retrieve'
+      '%new_function' => 'chado_dbxref_retrieve'
     )
     )
   );
   );
 
 
@@ -141,7 +141,7 @@ function tripal_db_get_dbxref_by_accession($accession, $db_id=0) {
       'db_id' => $db_id
       'db_id' => $db_id
     );
     );
   }
   }
-  return dbxref_retrieve($identifiers);
+  return chado_dbxref_retrieve($identifiers);
 }
 }
 
 
 /**
 /**

+ 14 - 17
tripal_db/api/tripal_db.api.inc

@@ -54,7 +54,7 @@
  *
  *
  * @ingroup tripal_db_api
  * @ingroup tripal_db_api
  */
  */
-function db_retrieve($identifiers, $options = array()) {
+function chado_db_retrieve($identifiers, $options = array()) {
 
 
   // Set Defaults
   // Set Defaults
   if (!isset($options['include_fk'])) {
   if (!isset($options['include_fk'])) {
@@ -67,7 +67,7 @@ function db_retrieve($identifiers, $options = array()) {
     tripal_report_error(
     tripal_report_error(
       'tripal_db_api',
       'tripal_db_api',
       TRIPAL_ERROR,
       TRIPAL_ERROR,
-      "db_retrieve: The identifier passed in is expected to be an array with the key
+      "chado_db_retrieve: The identifier passed in is expected to be an array with the key
         matching a column name in the db table (ie: db_id or name). You passed in %identifier.",
         matching a column name in the db table (ie: db_id or name). You passed in %identifier.",
       array(
       array(
         '%identifier'=> print_r($identifiers, TRUE)
         '%identifier'=> print_r($identifiers, TRUE)
@@ -78,7 +78,7 @@ function db_retrieve($identifiers, $options = array()) {
     tripal_report_error(
     tripal_report_error(
       'tripal_db_api',
       'tripal_db_api',
       TRIPAL_ERROR,
       TRIPAL_ERROR,
-      "db_retrieve: You did not pass in anything to identify the db you want. The identifier
+      "chado_db_retrieve: You did not pass in anything to identify the db you want. The identifier
         is expected to be an array with the key matching a column name in the db table
         is expected to be an array with the key matching a column name in the db table
         (ie: db_id or name). You passed in %identifier.",
         (ie: db_id or name). You passed in %identifier.",
       array(
       array(
@@ -99,7 +99,7 @@ function db_retrieve($identifiers, $options = array()) {
     tripal_report_error(
     tripal_report_error(
       'tripal_db_api',
       'tripal_db_api',
       TRIPAL_ERROR,
       TRIPAL_ERROR,
-      "db_retrieve: The identifiers you passed in were not unique. You passed in %identifier.",
+      "chado_db_retrieve: The identifiers you passed in were not unique. You passed in %identifier.",
       array(
       array(
         '%identifier'=> print_r($identifiers, TRUE)
         '%identifier'=> print_r($identifiers, TRUE)
       )
       )
@@ -111,7 +111,7 @@ function db_retrieve($identifiers, $options = array()) {
     tripal_report_error(
     tripal_report_error(
       'tripal_db_api',
       'tripal_db_api',
       TRIPAL_ERROR,
       TRIPAL_ERROR,
-      "db_retrieve: chado_generate_var() failed to return a db based on the identifiers
+      "chado_db_retrieve: chado_generate_var() failed to return a db based on the identifiers
         you passed in. You should check that your identifiers are correct, as well as, look
         you passed in. You should check that your identifiers are correct, as well as, look
         for a chado_generate_var error for additional clues. You passed in %identifier.",
         for a chado_generate_var error for additional clues. You passed in %identifier.",
       array(
       array(
@@ -200,7 +200,7 @@ function db_get_select_options() {
  *
  *
  * @ingroup tripal_db_api
  * @ingroup tripal_db_api
  */
  */
-function dbxref_retrieve($identifiers, $options = array()) {
+function chado_dbxref_retrieve($identifiers, $options = array()) {
 
 
   // Set Defaults
   // Set Defaults
   if (!isset($options['include_fk'])) {
   if (!isset($options['include_fk'])) {
@@ -213,7 +213,7 @@ function dbxref_retrieve($identifiers, $options = array()) {
     tripal_report_error(
     tripal_report_error(
       'tripal_db_api',
       'tripal_db_api',
       TRIPAL_ERROR,
       TRIPAL_ERROR,
-      "dbxref_retrieve: The identifier passed in is expected to be an array with the key
+      "chado_dbxref_retrieve: The identifier passed in is expected to be an array with the key
         matching a column name in the dbxref table (ie: dbxref_id or name). You passed in %identifier.",
         matching a column name in the dbxref table (ie: dbxref_id or name). You passed in %identifier.",
       array(
       array(
         '%identifier'=> print_r($identifiers, TRUE)
         '%identifier'=> print_r($identifiers, TRUE)
@@ -224,7 +224,7 @@ function dbxref_retrieve($identifiers, $options = array()) {
     tripal_report_error(
     tripal_report_error(
       'tripal_db_api',
       'tripal_db_api',
       TRIPAL_ERROR,
       TRIPAL_ERROR,
-      "dbxref_retrieve: You did not pass in anything to identify the dbxref you want. The identifier
+      "chado_dbxref_retrieve: You did not pass in anything to identify the dbxref you want. The identifier
         is expected to be an array with the key matching a column name in the dbxref table
         is expected to be an array with the key matching a column name in the dbxref table
         (ie: dbxref_id or name). You passed in %identifier.",
         (ie: dbxref_id or name). You passed in %identifier.",
       array(
       array(
@@ -254,7 +254,7 @@ function dbxref_retrieve($identifiers, $options = array()) {
     tripal_report_error(
     tripal_report_error(
       'tripal_db_api',
       'tripal_db_api',
       TRIPAL_ERROR,
       TRIPAL_ERROR,
-      "dbxref_retrieve: The identifiers you passed in were not unique. You passed in %identifier.",
+      "chado_dbxref_retrieve: The identifiers you passed in were not unique. You passed in %identifier.",
       array(
       array(
         '%identifier'=> print_r($identifiers, TRUE)
         '%identifier'=> print_r($identifiers, TRUE)
       )
       )
@@ -266,7 +266,7 @@ function dbxref_retrieve($identifiers, $options = array()) {
     tripal_report_error(
     tripal_report_error(
       'tripal_db_api',
       'tripal_db_api',
       TRIPAL_ERROR,
       TRIPAL_ERROR,
-      "dbxref_retrieve: chado_generate_var() failed to return a dbxref based on the identifiers
+      "chado_dbxref_retrieve: chado_generate_var() failed to return a dbxref based on the identifiers
         you passed in. You should check that your identifiers are correct, as well as, look
         you passed in. You should check that your identifiers are correct, as well as, look
         for a chado_generate_var error for additional clues. You passed in %identifier.",
         for a chado_generate_var error for additional clues. You passed in %identifier.",
       array(
       array(
@@ -413,11 +413,9 @@ function chado_dbxref_insert_record($values) {
  * @param $record_id
  * @param $record_id
  *   The primary key of the basetable to associate the dbxref with. This should be in integer.
  *   The primary key of the basetable to associate the dbxref with. This should be in integer.
  * @param $dbxref
  * @param $dbxref
- *   An associative array describing the dbxref. Valid keys include: 
- *     'accession' => the accession for the dbxref, 
- *     'db_name' => the name of the database the dbxref belongs to;
- *     'db_id' => the db_id from the databaes table of Chado. Substitutes for 'db_name'
- *     'dbxref_id' => the dbxref_id of the dbxref to assocaite.  Substitutes for all other keys.
+ *   An associative array describing the dbxref. Valid keys include: 'accession' => the
+ *   accession for the dbxref, 'db_name' => the name of the database the dbxref belongs to;
+ *   'db_id' => the primary key of the database the dbxref belongs to.
  * @param $options
  * @param $options
  *   An associative array of options. Valid keys include:
  *   An associative array of options. Valid keys include:
  *    - insert_dbxref: Insert the dbxref if it doesn't already exist. TRUE is the default
  *    - insert_dbxref: Insert the dbxref if it doesn't already exist. TRUE is the default
@@ -439,8 +437,7 @@ function chado_associate_dbxref($basetable, $record_id, $dbxref, $options = arra
     );
     );
     if (isset($dbxref['db_id'])) {
     if (isset($dbxref['db_id'])) {
       $values['db_id'] = $dbxref['db_id'];
       $values['db_id'] = $dbxref['db_id'];
-    } 
-    elseif (isset($dbxref['db_name'])) {
+    } elseif (isset($dbxref['db_name'])) {
       $values['db_id'] = array(
       $values['db_id'] = array(
         'name' => $dbxref['db_name']
         'name' => $dbxref['db_name']
       );
       );

+ 8 - 8
tripal_organism/api/tripal_organism.DEPRECATED.inc

@@ -7,9 +7,9 @@
 /**
 /**
  * @deprecated Restructured API to make naming more readable and consistent.
  * @deprecated Restructured API to make naming more readable and consistent.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
- * This function has been replaced by organism_retrieve().
+ * This function has been replaced by chado_organism_retrieve().
  *
  *
- * @see organism_retrieve().
+ * @see chado_organism_retrieve().
  */
  */
 function tripal_organism_get_organism_by_nid($nid) {
 function tripal_organism_get_organism_by_nid($nid) {
 
 
@@ -19,19 +19,19 @@ function tripal_organism_get_organism_by_nid($nid) {
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     array(
     array(
       '%old_function'=>'tripal_organism_get_organism_by_nid',
       '%old_function'=>'tripal_organism_get_organism_by_nid',
-      '%new_function' => 'organism_retrieve'
+      '%new_function' => 'chado_organism_retrieve'
     )
     )
   );
   );
 
 
-  return organism_retrieve(array('nid' => $nid));
+  return chado_organism_retrieve(array('nid' => $nid));
 }
 }
 
 
 /**
 /**
  * @deprecated Restructured API to make naming more readable and consistent.
  * @deprecated Restructured API to make naming more readable and consistent.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
- * This function has been replaced by organism_retrieve().
+ * This function has been replaced by chado_organism_retrieve().
  *
  *
- * @see organism_retrieve().
+ * @see chado_organism_retrieve().
  */
  */
 function tripal_organism_get_organism_by_organism_id($organism_id) {
 function tripal_organism_get_organism_by_organism_id($organism_id) {
 
 
@@ -41,11 +41,11 @@ function tripal_organism_get_organism_by_organism_id($organism_id) {
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     array(
     array(
       '%old_function'=>'tripal_organism_get_organism_by_organism_id',
       '%old_function'=>'tripal_organism_get_organism_by_organism_id',
-      '%new_function' => 'organism_retrieve'
+      '%new_function' => 'chado_organism_retrieve'
     )
     )
   );
   );
 
 
-  return organism_retrieve(array('organism_id' => $organism_id));
+  return chado_organism_retrieve(array('organism_id' => $organism_id));
 }
 }
 
 
 /**
 /**

+ 5 - 5
tripal_organism/api/tripal_organism.api.inc

@@ -39,7 +39,7 @@
  *
  *
  * @ingroup tripal_organism_api
  * @ingroup tripal_organism_api
  */
  */
-function organism_retrieve($identifiers, $options = array()) {
+function chado_organism_retrieve($identifiers, $options = array()) {
 
 
   // Set Defaults
   // Set Defaults
   if (!isset($options['include_fk'])) {
   if (!isset($options['include_fk'])) {
@@ -52,7 +52,7 @@ function organism_retrieve($identifiers, $options = array()) {
     tripal_report_error(
     tripal_report_error(
       'tripal_organism_api',
       'tripal_organism_api',
       TRIPAL_ERROR,
       TRIPAL_ERROR,
-      "organism_retrieve: The identifier passed in is expected to be an array with the key
+      "chado_organism_retrieve: The identifier passed in is expected to be an array with the key
         matching a column name in the organism table (ie: organism_id or name). You passed in %identifier.",
         matching a column name in the organism table (ie: organism_id or name). You passed in %identifier.",
       array(
       array(
         '%identifier'=> print_r($identifiers, TRUE)
         '%identifier'=> print_r($identifiers, TRUE)
@@ -63,7 +63,7 @@ function organism_retrieve($identifiers, $options = array()) {
     tripal_report_error(
     tripal_report_error(
       'tripal_organism_api',
       'tripal_organism_api',
       TRIPAL_ERROR,
       TRIPAL_ERROR,
-      "organism_retrieve: You did not pass in anything to identify the organism you want. The identifier
+      "chado_organism_retrieve: You did not pass in anything to identify the organism you want. The identifier
         is expected to be an array with the key matching a column name in the organism table
         is expected to be an array with the key matching a column name in the organism table
         (ie: organism_id or name). You passed in %identifier.",
         (ie: organism_id or name). You passed in %identifier.",
       array(
       array(
@@ -95,7 +95,7 @@ function organism_retrieve($identifiers, $options = array()) {
     tripal_report_error(
     tripal_report_error(
       'tripal_organism_api',
       'tripal_organism_api',
       TRIPAL_ERROR,
       TRIPAL_ERROR,
-      "organism_retrieve: The identifiers you passed in were not unique. You passed in %identifier.",
+      "chado_organism_retrieve: The identifiers you passed in were not unique. You passed in %identifier.",
       array(
       array(
         '%identifier'=> print_r($identifiers, TRUE)
         '%identifier'=> print_r($identifiers, TRUE)
       )
       )
@@ -107,7 +107,7 @@ function organism_retrieve($identifiers, $options = array()) {
     tripal_report_error(
     tripal_report_error(
       'tripal_organism_api',
       'tripal_organism_api',
       TRIPAL_ERROR,
       TRIPAL_ERROR,
-      "organism_retrieve: chado_generate_var() failed to return a organism based on the identifiers
+      "chado_organism_retrieve: chado_generate_var() failed to return a organism based on the identifiers
         you passed in. You should check that your identifiers are correct, as well as, look
         you passed in. You should check that your identifiers are correct, as well as, look
         for a chado_generate_var error for additional clues. You passed in %identifier.",
         for a chado_generate_var error for additional clues. You passed in %identifier.",
       array(
       array(

+ 21 - 21
tripal_stock/api/tripal_stock.DEPRECATED.inc

@@ -7,9 +7,9 @@
 /**
 /**
  * @deprecated Restructured API to make naming more readable and consistent.
  * @deprecated Restructured API to make naming more readable and consistent.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
- * This function has been replaced by stock_retrieve().
+ * This function has been replaced by chado_stock_retrieve().
  *
  *
- * @see stock_retrieve().
+ * @see chado_stock_retrieve().
  */
  */
 function tripal_stock_get_stock_by_nid($nid) {
 function tripal_stock_get_stock_by_nid($nid) {
 
 
@@ -19,19 +19,19 @@ function tripal_stock_get_stock_by_nid($nid) {
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     array(
     array(
       '%old_function'=>'tripal_stock_get_stock_by_nid',
       '%old_function'=>'tripal_stock_get_stock_by_nid',
-      '%new_function' => 'stock_retrieve'
+      '%new_function' => 'chado_stock_retrieve'
     )
     )
   );
   );
 
 
-  return stock_retrieve(array('nid' => $nid));
+  return chado_stock_retrieve(array('nid' => $nid));
 }
 }
 
 
 /**
 /**
  * @deprecated Restructured API to make naming more readable and consistent.
  * @deprecated Restructured API to make naming more readable and consistent.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
- * This function has been replaced by stock_retrieve().
+ * This function has been replaced by chado_stock_retrieve().
  *
  *
- * @see stock_retrieve().
+ * @see chado_stock_retrieve().
  */
  */
 function tripal_stock_get_stock_by_stock_id($stock_id) {
 function tripal_stock_get_stock_by_stock_id($stock_id) {
 
 
@@ -41,19 +41,19 @@ function tripal_stock_get_stock_by_stock_id($stock_id) {
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     array(
     array(
       '%old_function'=>'tripal_stock_get_stock_by_stock_id',
       '%old_function'=>'tripal_stock_get_stock_by_stock_id',
-      '%new_function' => 'stock_retrieve'
+      '%new_function' => 'chado_stock_retrieve'
     )
     )
   );
   );
 
 
-  return stock_retrieve(array('stock_id' => $stock_id));
+  return chado_stock_retrieve(array('stock_id' => $stock_id));
 }
 }
 
 
 /**
 /**
  * @deprecated Restructured API to make naming more readable and consistent.
  * @deprecated Restructured API to make naming more readable and consistent.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
- * This function has been replaced by stock_retrieve_multiple().
+ * This function has been replaced by chado_stock_retrieve_multiple().
  *
  *
- * @see stock_retrieve_multiple().
+ * @see chado_stock_retrieve_multiple().
  */
  */
 function tripal_stock_get_all_stocks() {
 function tripal_stock_get_all_stocks() {
 
 
@@ -82,9 +82,9 @@ function tripal_stock_get_all_stocks() {
 /**
 /**
  * @deprecated Restructured API to make naming more readable and consistent.
  * @deprecated Restructured API to make naming more readable and consistent.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
- * This function has been replaced by stock_retrieve_multiple().
+ * This function has been replaced by chado_stock_retrieve_multiple().
  *
  *
- * @see stock_retrieve_multiple().
+ * @see chado_stock_retrieve_multiple().
  */
  */
 function tripal_stock_get_stocks($values) {
 function tripal_stock_get_stocks($values) {
 
 
@@ -94,19 +94,19 @@ function tripal_stock_get_stocks($values) {
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     array(
     array(
       '%old_function'=>'tripal_stock_get_stocks',
       '%old_function'=>'tripal_stock_get_stocks',
-      '%new_function' => 'stock_retrieve_multiple'
+      '%new_function' => 'chado_stock_retrieve_multiple'
     )
     )
   );
   );
 
 
-  return stock_retrieve_multiple($values);
+  return chado_stock_retrieve_multiple($values);
 }
 }
 
 
 /**
 /**
  * @deprecated Restructured API to make naming more readable and consistent.
  * @deprecated Restructured API to make naming more readable and consistent.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
- * This function has been replaced by stock_retrieve().
+ * This function has been replaced by chado_stock_retrieve().
  *
  *
- * @see stock_retrieve().
+ * @see chado_stock_retrieve().
  */
  */
 function tripal_stock_get_stocks_by_stockprop($stockprop_values, $stock_values) {
 function tripal_stock_get_stocks_by_stockprop($stockprop_values, $stock_values) {
 
 
@@ -116,18 +116,18 @@ function tripal_stock_get_stocks_by_stockprop($stockprop_values, $stock_values)
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     array(
     array(
       '%old_function'=>'tripal_stock_get_stocks_by_stockprop',
       '%old_function'=>'tripal_stock_get_stocks_by_stockprop',
-      '%new_function' => 'stock_retrieve'
+      '%new_function' => 'chado_stock_retrieve'
     )
     )
   );
   );
 
 
   $stock_values['property'] = $stockprop_values;
   $stock_values['property'] = $stockprop_values;
-  return stock_retrieve_multiple($stock_values);
+  return chado_stock_retrieve_multiple($stock_values);
 }
 }
 
 
 /**
 /**
  * @deprecated Restructured API to make naming more readable and consistent.
  * @deprecated Restructured API to make naming more readable and consistent.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
- * This function has been replaced by stock_retrieve().
+ * This function has been replaced by chado_stock_retrieve().
  *
  *
  * Return all stocks with a given name identifier
  * Return all stocks with a given name identifier
  *  which might match stock.name, stock.uniquename, dbxref.accession,
  *  which might match stock.name, stock.uniquename, dbxref.accession,
@@ -141,7 +141,7 @@ function tripal_stock_get_stocks_by_stockprop($stockprop_values, $stock_values)
  * @return
  * @return
  *   An array of stock node objects
  *   An array of stock node objects
  *
  *
- * @see stock_retrieve().
+ * @see chado_stock_retrieve().
  */
  */
 function tripal_stock_get_stock_by_name_identifier($name, $organism_id) {
 function tripal_stock_get_stock_by_name_identifier($name, $organism_id) {
 
 
@@ -151,7 +151,7 @@ function tripal_stock_get_stock_by_name_identifier($name, $organism_id) {
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     array(
     array(
       '%old_function'=>'tripal_stock_get_stock_by_name_identifier',
       '%old_function'=>'tripal_stock_get_stock_by_name_identifier',
-      '%new_function' => 'stock_retrieve'
+      '%new_function' => 'chado_stock_retrieve'
     )
     )
   );
   );
 
 

+ 9 - 9
tripal_stock/api/tripal_stock.api.inc

@@ -39,7 +39,7 @@
  *
  *
  * @ingroup tripal_stock_api
  * @ingroup tripal_stock_api
  */
  */
-function stock_retrieve($identifiers, $options = array()) {
+function chado_stock_retrieve($identifiers, $options = array()) {
 
 
   // Set Defaults
   // Set Defaults
   if (!isset($options['include_fk'])) {
   if (!isset($options['include_fk'])) {
@@ -52,7 +52,7 @@ function stock_retrieve($identifiers, $options = array()) {
     tripal_report_error(
     tripal_report_error(
       'tripal_stock_api',
       'tripal_stock_api',
       TRIPAL_ERROR,
       TRIPAL_ERROR,
-      "stock_retrieve: The identifier passed in is expected to be an array with the key
+      "chado_stock_retrieve: The identifier passed in is expected to be an array with the key
         matching a column name in the stock table (ie: stock_id or name). You passed in %identifier.",
         matching a column name in the stock table (ie: stock_id or name). You passed in %identifier.",
       array(
       array(
         '%identifier'=> print_r($identifiers, TRUE)
         '%identifier'=> print_r($identifiers, TRUE)
@@ -63,7 +63,7 @@ function stock_retrieve($identifiers, $options = array()) {
     tripal_report_error(
     tripal_report_error(
       'tripal_stock_api',
       'tripal_stock_api',
       TRIPAL_ERROR,
       TRIPAL_ERROR,
-      "stock_retrieve: You did not pass in anything to identify the stock you want. The identifier
+      "chado_stock_retrieve: You did not pass in anything to identify the stock you want. The identifier
         is expected to be an array with the key matching a column name in the stock table
         is expected to be an array with the key matching a column name in the stock table
         (ie: stock_id or name). You passed in %identifier.",
         (ie: stock_id or name). You passed in %identifier.",
       array(
       array(
@@ -95,7 +95,7 @@ function stock_retrieve($identifiers, $options = array()) {
     tripal_report_error(
     tripal_report_error(
       'tripal_stock_api',
       'tripal_stock_api',
       TRIPAL_ERROR,
       TRIPAL_ERROR,
-      "stock_retrieve: The identifiers you passed in were not unique. You passed in %identifier.",
+      "chado_stock_retrieve: The identifiers you passed in were not unique. You passed in %identifier.",
       array(
       array(
         '%identifier'=> print_r($identifiers, TRUE)
         '%identifier'=> print_r($identifiers, TRUE)
       )
       )
@@ -107,7 +107,7 @@ function stock_retrieve($identifiers, $options = array()) {
     tripal_report_error(
     tripal_report_error(
       'tripal_stock_api',
       'tripal_stock_api',
       TRIPAL_ERROR,
       TRIPAL_ERROR,
-      "stock_retrieve: chado_generate_var() failed to return a stock based on the identifiers
+      "chado_stock_retrieve: chado_generate_var() failed to return a stock based on the identifiers
         you passed in. You should check that your identifiers are correct, as well as, look
         you passed in. You should check that your identifiers are correct, as well as, look
         for a chado_generate_var error for additional clues. You passed in %identifier.",
         for a chado_generate_var error for additional clues. You passed in %identifier.",
       array(
       array(
@@ -139,7 +139,7 @@ function stock_retrieve($identifiers, $options = array()) {
  *
  *
  * @ingroup tripal_stock_api
  * @ingroup tripal_stock_api
  */
  */
-function stock_retrieve_multiple($identifiers, $options = array()) {
+function chado_stock_retrieve_multiple($identifiers, $options = array()) {
 
 
   // Set Defaults
   // Set Defaults
   if (!isset($options['include_fk'])) {
   if (!isset($options['include_fk'])) {
@@ -152,7 +152,7 @@ function stock_retrieve_multiple($identifiers, $options = array()) {
     tripal_report_error(
     tripal_report_error(
       'tripal_stock_api',
       'tripal_stock_api',
       TRIPAL_ERROR,
       TRIPAL_ERROR,
-      "stock_retrieve: The identifier passed in is expected to be an array with the key
+      "chado_stock_retrieve: The identifier passed in is expected to be an array with the key
         matching a column name in the stock table (ie: stock_id or name). You passed in %identifier.",
         matching a column name in the stock table (ie: stock_id or name). You passed in %identifier.",
       array(
       array(
         '%identifier'=> print_r($identifiers, TRUE)
         '%identifier'=> print_r($identifiers, TRUE)
@@ -163,7 +163,7 @@ function stock_retrieve_multiple($identifiers, $options = array()) {
     tripal_report_error(
     tripal_report_error(
       'tripal_stock_api',
       'tripal_stock_api',
       TRIPAL_ERROR,
       TRIPAL_ERROR,
-      "stock_retrieve: You did not pass in anything to identify the stock you want. The identifier
+      "chado_stock_retrieve: You did not pass in anything to identify the stock you want. The identifier
         is expected to be an array with the key matching a column name in the stock table
         is expected to be an array with the key matching a column name in the stock table
         (ie: stock_id or name). You passed in %identifier.",
         (ie: stock_id or name). You passed in %identifier.",
       array(
       array(
@@ -195,7 +195,7 @@ function stock_retrieve_multiple($identifiers, $options = array()) {
     tripal_report_error(
     tripal_report_error(
       'tripal_stock_api',
       'tripal_stock_api',
       TRIPAL_ERROR,
       TRIPAL_ERROR,
-      "stock_retrieve: chado_generate_var() failed to return a stock based on the identifiers
+      "chado_stock_retrieve: chado_generate_var() failed to return a stock based on the identifiers
         you passed in. You should check that your identifiers are correct, as well as, look
         you passed in. You should check that your identifiers are correct, as well as, look
         for a chado_generate_var error for additional clues. You passed in %identifier.",
         for a chado_generate_var error for additional clues. You passed in %identifier.",
       array(
       array(