Browse Source

Added more doxygen commenting -there wasn't any groups for the bulk loader or tripal views

Lacey Sanderson 12 years ago
parent
commit
fca91cc322

+ 9 - 0
tripal_bulk_loader/api/tripal_bulk_loader.api.templates.inc

@@ -2,6 +2,9 @@
 /**
 /**
  * @file
  * @file
  * All functions in this file provide an API to administrative management of bulk loader templates
  * All functions in this file provide an API to administrative management of bulk loader templates
+ *
+ * @defgroup tripal_bulk_loader_api Tripal Bulk Loader Module API
+ * @ingroup tripal_api
  */
  */
 
 
 /**
 /**
@@ -19,6 +22,8 @@
  *
  *
  * @return
  * @return
  *   TRUE if the record name is not empty and not already in the template_array; FALSE otherwise
  *   TRUE if the record name is not empty and not already in the template_array; FALSE otherwise
+ *
+ * @ingroup tripal_bulk_loader_api
  */
  */
 function tripal_bulk_loader_is_record_name_unique($new_record_name, $template_id, $template_array = NULL, $current_priority = NULL) {
 function tripal_bulk_loader_is_record_name_unique($new_record_name, $template_id, $template_array = NULL, $current_priority = NULL) {
 
 
@@ -63,6 +68,8 @@ function tripal_bulk_loader_is_record_name_unique($new_record_name, $template_id
  *
  *
  * @return
  * @return
  *   The modified template array
  *   The modified template array
+ *
+ * @ingroup tripal_bulk_loader_api
  */
  */
 function tripal_bulk_loader_delete_record($delete_priority, $template_array) {
 function tripal_bulk_loader_delete_record($delete_priority, $template_array) {
 
 
@@ -95,6 +102,8 @@ function tripal_bulk_loader_delete_record($delete_priority, $template_array) {
  *
  *
  * @return
  * @return
  *   The modified template array
  *   The modified template array
+ *
+ * @ingroup tripal_bulk_loader_api
  */
  */
 function tripal_bulk_loader_delete_field($priority, $delete_field_index, $template_array) {
 function tripal_bulk_loader_delete_field($priority, $delete_field_index, $template_array) {
 
 

+ 10 - 0
tripal_bulk_loader/tripal_bulk_loader.admin.inc

@@ -7,6 +7,8 @@
 
 
 /**
 /**
  * Provides a description page and quick links for the bulk loader
  * Provides a description page and quick links for the bulk loader
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_admin_template() {
 function tripal_bulk_loader_admin_template() {
   $output = '';
   $output = '';
@@ -75,6 +77,8 @@ function tripal_bulk_loader_admin_template() {
 
 
 /**
 /**
  * Provides a description page and quick links for template management
  * Provides a description page and quick links for template management
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_admin_manage_templates() {
 function tripal_bulk_loader_admin_manage_templates() {
   $output = '';
   $output = '';
@@ -116,6 +120,8 @@ function tripal_bulk_loader_admin_manage_templates() {
 
 
 /**
 /**
  * Provides a listing of bulk loader jobs and links for administration
  * Provides a listing of bulk loader jobs and links for administration
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_admin_jobs() {
 function tripal_bulk_loader_admin_jobs() {
   $output = '';
   $output = '';
@@ -163,6 +169,8 @@ function tripal_bulk_loader_admin_jobs() {
 
 
 /**
 /**
  * A Configuration form for this module
  * A Configuration form for this module
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_configuration_form($form_state = NULL) {
 function tripal_bulk_loader_configuration_form($form_state = NULL) {
   $form = array();
   $form = array();
@@ -254,6 +262,8 @@ function tripal_bulk_loader_configuration_form($form_state = NULL) {
 
 
 /**
 /**
  * A Configuration form for this module (Submit)
  * A Configuration form for this module (Submit)
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_configuration_form_submit($form, $form_state) {
 function tripal_bulk_loader_configuration_form_submit($form, $form_state) {
 
 

+ 43 - 0
tripal_bulk_loader/tripal_bulk_loader.admin.templates.inc

@@ -14,6 +14,8 @@
 
 
 /**
 /**
  * The main form reached at admin/tripal/tripal_bulk_loader/create and /edit
  * The main form reached at admin/tripal/tripal_bulk_loader/create and /edit
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_modify_template_base_form($form_state = NULL, $mode) {
 function tripal_bulk_loader_modify_template_base_form($form_state = NULL, $mode) {
   $form = array();
   $form = array();
@@ -347,6 +349,8 @@ function tripal_bulk_loader_modify_template_base_form($form_state = NULL, $mode)
 
 
 /**
 /**
  * Submit for tripal_bulk_loader_modify_template_base_form
  * Submit for tripal_bulk_loader_modify_template_base_form
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_modify_template_base_form_submit($form, &$form_state) {
 function tripal_bulk_loader_modify_template_base_form_submit($form, &$form_state) {
 
 
@@ -498,6 +502,8 @@ function tripal_bulk_loader_modify_template_base_form_submit($form, &$form_state
 /**
 /**
  * Delete Template Form
  * Delete Template Form
  * This form allows admin to delete already existing templates
  * This form allows admin to delete already existing templates
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_delete_template_base_form() {
 function tripal_bulk_loader_delete_template_base_form() {
   $form = array();
   $form = array();
@@ -533,6 +539,8 @@ function tripal_bulk_loader_delete_template_base_form() {
  *   The form that was submitted
  *   The form that was submitted
  * @param $form_state
  * @param $form_state
  *   The values and storage that were submitted
  *   The values and storage that were submitted
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_delete_template_base_form_submit($form, &$form_state) {
 function tripal_bulk_loader_delete_template_base_form_submit($form, &$form_state) {
   $sql = "DELETE FROM {tripal_bulk_loader_template} WHERE template_id=%d";
   $sql = "DELETE FROM {tripal_bulk_loader_template} WHERE template_id=%d";
@@ -559,6 +567,8 @@ function tripal_bulk_loader_delete_template_base_form_submit($form, &$form_state
  *   Either 'import' or 'export' to indicate which function is being performed
  *   Either 'import' or 'export' to indicate which function is being performed
  * @return
  * @return
  *   A form array to be rendered by drupal_get_form
  *   A form array to be rendered by drupal_get_form
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_import_export_template_form($form_state = NULL, $mode) {
 function tripal_bulk_loader_import_export_template_form($form_state = NULL, $mode) {
   $form = array();
   $form = array();
@@ -621,6 +631,8 @@ function tripal_bulk_loader_import_export_template_form($form_state = NULL, $mod
  *   The form that was submitted
  *   The form that was submitted
  * @param $form_state
  * @param $form_state
  *   The values and storage that were submitted
  *   The values and storage that were submitted
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_import_export_template_form_submit($form, &$form_state) {
 function tripal_bulk_loader_import_export_template_form_submit($form, &$form_state) {
   switch ($form_state['values']['mode']) {
   switch ($form_state['values']['mode']) {
@@ -669,6 +681,8 @@ function tripal_bulk_loader_import_export_template_form_submit($form, &$form_sta
  *   Contains the values and storage for the form
  *   Contains the values and storage for the form
  * @return
  * @return
  *   A form array to be rendered by drupal_get_form
  *   A form array to be rendered by drupal_get_form
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_edit_template_record_form(&$form_state = NULL) {
 function tripal_bulk_loader_edit_template_record_form(&$form_state = NULL) {
   $form['#cache'] = TRUE; // Make sure the form is cached.
   $form['#cache'] = TRUE; // Make sure the form is cached.
@@ -883,6 +897,11 @@ function tripal_bulk_loader_edit_template_record_form(&$form_state = NULL) {
   return $form;
   return $form;
 }
 }
 
 
+/**
+ * Implements hook_form_validate()
+ *
+ * @ingroup tripal_bulk_loader
+ */
 function tripal_bulk_loader_edit_template_record_form_validate($form, $form_state) {
 function tripal_bulk_loader_edit_template_record_form_validate($form, $form_state) {
 
 
   // Don't worry about validation when Cancel button is clicked
   // Don't worry about validation when Cancel button is clicked
@@ -907,6 +926,8 @@ function tripal_bulk_loader_edit_template_record_form_validate($form, $form_stat
  *   The form that was submitted
  *   The form that was submitted
  * @param $form_state
  * @param $form_state
  *   Contains the values and storage for the form
  *   Contains the values and storage for the form
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_edit_template_record_form_submit($form, &$form_state) {
 function tripal_bulk_loader_edit_template_record_form_submit($form, &$form_state) {
   //dpm($form_state, 'form state -start submit');
   //dpm($form_state, 'form state -start submit');
@@ -1000,6 +1021,8 @@ function tripal_bulk_loader_edit_template_record_form_submit($form, &$form_state
  *   Contains the values and storage for the form
  *   Contains the values and storage for the form
  * @return
  * @return
  *   A form array to be rendered by drupal_get_form
  *   A form array to be rendered by drupal_get_form
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_add_template_field_form(&$form_state = NULL) {
 function tripal_bulk_loader_add_template_field_form(&$form_state = NULL) {
   $form = array();
   $form = array();
@@ -1553,6 +1576,11 @@ function tripal_bulk_loader_add_template_field_form(&$form_state = NULL) {
   return $form;
   return $form;
 }
 }
 
 
+/**
+ * Implements hook_form_validate().
+ *
+ * @ingroup tripal_bulk_loader
+ */
 function tripal_bulk_loader_add_template_field_form_validate($form, $form_state) {
 function tripal_bulk_loader_add_template_field_form_validate($form, $form_state) {
 
 
   // Don't worry about validation when Cancel button is clicked
   // Don't worry about validation when Cancel button is clicked
@@ -1577,6 +1605,8 @@ function tripal_bulk_loader_add_template_field_form_validate($form, $form_state)
  *   The form that was submitted
  *   The form that was submitted
  * @param $form_state
  * @param $form_state
  *   The values and storage for the form
  *   The values and storage for the form
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_add_template_field_form_submit($form, &$form_state) {
 function tripal_bulk_loader_add_template_field_form_submit($form, &$form_state) {
 
 
@@ -1731,6 +1761,8 @@ function tripal_bulk_loader_add_template_field_form_submit($form, &$form_state)
  *   Contains the values and storage for the form
  *   Contains the values and storage for the form
  * @return
  * @return
  *   A form array to be rendered by drupal_get_form
  *   A form array to be rendered by drupal_get_form
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_edit_template_field_form(&$form_state = NULL) {
 function tripal_bulk_loader_edit_template_field_form(&$form_state = NULL) {
   $form = array();
   $form = array();
@@ -2295,6 +2327,11 @@ function tripal_bulk_loader_edit_template_field_form(&$form_state = NULL) {
   return $form;
   return $form;
 }
 }
 
 
+/**
+ * Implements hook_form_validate().
+ *
+ * @ingroup tripal_bulk_loader
+ */
 function tripal_bulk_loader_edit_template_field_form_validate($form, $form_state) {
 function tripal_bulk_loader_edit_template_field_form_validate($form, $form_state) {
 
 
   // Don't worry about validation when Cancel button is clicked
   // Don't worry about validation when Cancel button is clicked
@@ -2319,6 +2356,8 @@ function tripal_bulk_loader_edit_template_field_form_validate($form, $form_state
  *   The form that was submitted
  *   The form that was submitted
  * @param $form_state
  * @param $form_state
  *   The values and storage for the form
  *   The values and storage for the form
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_edit_template_field_form_submit($form, &$form_state) {
 function tripal_bulk_loader_edit_template_field_form_submit($form, &$form_state) {
 
 
@@ -2534,6 +2573,8 @@ function tripal_bulk_loader_edit_template_field_form_submit($form, &$form_state)
  *
  *
  * @return
  * @return
  *  JSON Data printed to the screen
  *  JSON Data printed to the screen
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_add_field_ahah() {
 function tripal_bulk_loader_add_field_ahah() {
 
 
@@ -2569,6 +2610,8 @@ function tripal_bulk_loader_add_field_ahah() {
  *
  *
  * @return
  * @return
  *  JSON Data printed to the screen
  *  JSON Data printed to the screen
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_edit_field_ahah() {
 function tripal_bulk_loader_edit_field_ahah() {
 
 

+ 26 - 0
tripal_bulk_loader/tripal_bulk_loader.constants.inc

@@ -25,6 +25,8 @@
  * @return
  * @return
  *   On success it returns the object (with primary key if inserted);
  *   On success it returns the object (with primary key if inserted);
  *   on failure it returns FALSE
  *   on failure it returns FALSE
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_update_constant($nid, $group_id, $table, $field, $record_id, $field_id, $value) {
 function tripal_bulk_loader_update_constant($nid, $group_id, $table, $field, $record_id, $field_id, $value) {
 
 
@@ -68,6 +70,11 @@ function tripal_bulk_loader_update_constant($nid, $group_id, $table, $field, $re
   }
   }
 }
 }
 
 
+/**
+ * Check if a bulk loading job has exposed constants
+ *
+ * @ingroup tripal_bulk_loader
+ */
 function tripal_bulk_loader_has_exposed_fields($node) {
 function tripal_bulk_loader_has_exposed_fields($node) {
 
 
   // exposed fields isn't set
   // exposed fields isn't set
@@ -110,6 +117,8 @@ function tripal_bulk_loader_has_exposed_fields($node) {
  *
  *
  * @return
  * @return
  *   A form array to be rendered by drupal_get_form()
  *   A form array to be rendered by drupal_get_form()
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_set_constants_form($form_state, $node) {
 function tripal_bulk_loader_set_constants_form($form_state, $node) {
   $form = array();
   $form = array();
@@ -263,6 +272,8 @@ function tripal_bulk_loader_set_constants_form($form_state, $node) {
 /**
 /**
  * Validate that the values entered exist in the database
  * Validate that the values entered exist in the database
  * if indicated in hte template array
  * if indicated in hte template array
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_set_constants_form_validate($form, $form_state) {
 function tripal_bulk_loader_set_constants_form_validate($form, $form_state) {
 
 
@@ -305,6 +316,8 @@ function tripal_bulk_loader_set_constants_form_validate($form, $form_state) {
 
 
 /**
 /**
  * Insert/update the constants associated with this node
  * Insert/update the constants associated with this node
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_set_constants_form_submit($form, $form_state) {
 function tripal_bulk_loader_set_constants_form_submit($form, $form_state) {
 
 
@@ -332,6 +345,11 @@ function tripal_bulk_loader_set_constants_form_submit($form, $form_state) {
 
 
 }
 }
 
 
+/**
+ * Themes the bulk loading job set constants form
+ *
+ * @ingroup tripal_bulk_loader
+ */
 function theme_tripal_bulk_loader_set_constants_form($form) {
 function theme_tripal_bulk_loader_set_constants_form($form) {
   $output = '';
   $output = '';
 
 
@@ -394,6 +412,8 @@ function theme_tripal_bulk_loader_set_constants_form($form) {
  *
  *
  * @return
  * @return
  *   A form array to be rendered by drupal_get_form()
  *   A form array to be rendered by drupal_get_form()
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_edit_constant_set_form($form_state, $node, $group_id) {
 function tripal_bulk_loader_edit_constant_set_form($form_state, $node, $group_id) {
   $form = array();
   $form = array();
@@ -491,6 +511,8 @@ function tripal_bulk_loader_edit_constant_set_form($form_state, $node, $group_id
 
 
 /**
 /**
  * Edit constants in the current constant set
  * Edit constants in the current constant set
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_edit_constant_set_form_submit($form, $form_state) {
 function tripal_bulk_loader_edit_constant_set_form_submit($form, $form_state) {
 
 
@@ -532,6 +554,8 @@ function tripal_bulk_loader_edit_constant_set_form_submit($form, $form_state) {
  *
  *
  * @return
  * @return
  *   A form array to be rendered by drupal_get_form()
  *   A form array to be rendered by drupal_get_form()
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_delete_constant_set_form($form_state, $node, $group_id) {
 function tripal_bulk_loader_delete_constant_set_form($form_state, $node, $group_id) {
   $form = array();
   $form = array();
@@ -560,6 +584,8 @@ function tripal_bulk_loader_delete_constant_set_form($form_state, $node, $group_
 
 
 /**
 /**
  * Delete the current constant set
  * Delete the current constant set
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_delete_constant_set_form_submit($form, $form_state) {
 function tripal_bulk_loader_delete_constant_set_form_submit($form, $form_state) {
 
 

+ 23 - 11
tripal_bulk_loader/tripal_bulk_loader.loader.inc

@@ -10,6 +10,8 @@
  *
  *
  * This form is meant to be included on the node page to allow users to submit/re-submit
  * This form is meant to be included on the node page to allow users to submit/re-submit
  * loading jobs
  * loading jobs
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_add_loader_job_form($form_state, $node) {
 function tripal_bulk_loader_add_loader_job_form($form_state, $node) {
   $form = array();
   $form = array();
@@ -58,6 +60,8 @@ function tripal_bulk_loader_add_loader_job_form($form_state, $node) {
 
 
 /**
 /**
  * Add Loader Job Form (Submit)
  * Add Loader Job Form (Submit)
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_add_loader_job_form_submit($form, $form_state) {
 function tripal_bulk_loader_add_loader_job_form_submit($form, $form_state) {
   global $user;
   global $user;
@@ -121,6 +125,8 @@ function tripal_bulk_loader_add_loader_job_form_submit($form, $form_state) {
  *
  *
  * Note: Instead of returning a value this function updates the tripal_bulk_loader.status.
  * Note: Instead of returning a value this function updates the tripal_bulk_loader.status.
  *   Errors are thrown through watchdog and can be viewed at admin/reports/dblog.
  *   Errors are thrown through watchdog and can be viewed at admin/reports/dblog.
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_load_data($nid, $job_id) {
 function tripal_bulk_loader_load_data($nid, $job_id) {
 
 
@@ -457,17 +463,13 @@ function tripal_bulk_loader_load_data($nid, $job_id) {
 }
 }
 
 
 /**
 /**
+ * Process the data array for a given line
  *
  *
+ * @param $addt
+ *   Requires: field2column', 'record2priority', 'line', 'line_num',
+ *   'group_index', 'node', 'nid'
  *
  *
-         $options = array(
-          'field2column' => $field2column,
-          'record2priority' => $record2priority,
-          'line' => $line,
-          'line_num' => $num_lines,
-          'group_index' => $group_index,
-          'node' => $node,
-          'nid' => $node->nid,
-        );
+ * @ingroup tripal_bulk_loader
  */
  */
 function process_data_array_for_line($priority, &$data, &$default_data, $addt) {
 function process_data_array_for_line($priority, &$data, &$default_data, $addt) {
 //$time_start = microtime(true);
 //$time_start = microtime(true);
@@ -828,6 +830,8 @@ function process_data_array_for_line($priority, &$data, &$default_data, $addt) {
  *   An array mapping values fields to line columns
  *   An array mapping values fields to line columns
  * @return
  * @return
  *   Supplemented values array
  *   Supplemented values array
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_add_spreadsheetdata_to_values($values, $line, $field2column) {
 function tripal_bulk_loader_add_spreadsheetdata_to_values($values, $line, $field2column) {
   foreach ($values as $field => $value) {
   foreach ($values as $field => $value) {
@@ -858,9 +862,9 @@ function tripal_bulk_loader_add_spreadsheetdata_to_values($values, $line, $field
  * the name of the record whose values array should be substituted here. Thus the foreign
  * the name of the record whose values array should be substituted here. Thus the foreign
  * record is looked up and the values array is substituted in.
  * record is looked up and the values array is substituted in.
  *
  *
+ * @ingroup tripal_bulk_loader
  */
  */
-function tripal_bulk_loader_add_foreignkey_to_values($table_array, $values, $data, $record2priority, $nid,
-  $priority, $default_data) {
+function tripal_bulk_loader_add_foreignkey_to_values($table_array, $values, $data, $record2priority, $nid, $priority, $default_data) {
 
 
   // iterate through each field in the $values arrray and
   // iterate through each field in the $values arrray and
   // substitute any values for FK / referring fields
   // substitute any values for FK / referring fields
@@ -953,6 +957,8 @@ function tripal_bulk_loader_add_foreignkey_to_values($table_array, $values, $dat
  *   The select/insert values array for the given table
  *   The select/insert values array for the given table
  * @param $table_data
  * @param $table_data
  *   The data array for the given table
  *   The data array for the given table
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_regex_tranform_values($values, $table_data, $line) {
 function tripal_bulk_loader_regex_tranform_values($values, $table_data, $line) {
 
 
@@ -1000,6 +1006,8 @@ function tripal_bulk_loader_regex_tranform_values($values, $table_data, $line) {
 /**
 /**
  * Flattens an array up to two levels
  * Flattens an array up to two levels
  * Used for printing of arrays without taking up much space
  * Used for printing of arrays without taking up much space
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_flatten_array($values) {
 function tripal_bulk_loader_flatten_array($values) {
   $flattened_values = array();
   $flattened_values = array();
@@ -1028,6 +1036,8 @@ function tripal_bulk_loader_flatten_array($values) {
 
 
 /**
 /**
  * Used to display loader progress to the user
  * Used to display loader progress to the user
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_progress_bar($current=0, $total=100, $size=50) {
 function tripal_bulk_loader_progress_bar($current=0, $total=100, $size=50) {
   $new_bar = FALSE;
   $new_bar = FALSE;
@@ -1102,6 +1112,8 @@ function tripal_bulk_loader_progress_bar($current=0, $total=100, $size=50) {
  *   A boolean indicating whether the current line is finished
  *   A boolean indicating whether the current line is finished
  * @param $close
  * @param $close
  *   A boolean indicating that the file should be closed
  *   A boolean indicating that the file should be closed
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_progress_file_track_job($job_id, $record_added, $line_complete = FALSE, $close = FALSE) {
 function tripal_bulk_loader_progress_file_track_job($job_id, $record_added, $line_complete = FALSE, $close = FALSE) {
   // retrieve the file handle
   // retrieve the file handle

+ 32 - 2
tripal_bulk_loader/tripal_bulk_loader.module

@@ -3,8 +3,8 @@
  * @file
  * @file
  * The functions for the Tripal bulk loader.
  * The functions for the Tripal bulk loader.
  *
  *
- * 
- * 
+ * @defgroup tripal_bulk_loader Tripal Bulk Loader Module
+ * @ingroup tripal_modules
  */
  */
 include('tripal_bulk_loader.loader.inc');
 include('tripal_bulk_loader.loader.inc');
 include('tripal_bulk_loader.constants.inc');
 include('tripal_bulk_loader.constants.inc');
@@ -17,6 +17,8 @@ include('api/tripal_bulk_loader.api.templates.inc');
 /**
 /**
  * Implements hook_init
  * Implements hook_init
  * Used to add stylesheets and javascript files to the header
  * Used to add stylesheets and javascript files to the header
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_init() {
 function tripal_bulk_loader_init() {
   // Add javascript and style sheet
   // Add javascript and style sheet
@@ -26,6 +28,8 @@ function tripal_bulk_loader_init() {
 
 
 /**
 /**
  * Implements hook_menu
  * Implements hook_menu
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_menu() {
 function tripal_bulk_loader_menu() {
   $items = array();
   $items = array();
@@ -163,6 +167,8 @@ function tripal_bulk_loader_menu() {
 
 
 /**
 /**
  * Implements hook_theme
  * Implements hook_theme
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_theme() {
 function tripal_bulk_loader_theme() {
   return array(
   return array(
@@ -190,6 +196,8 @@ function tripal_bulk_loader_theme() {
 
 
 /**
 /**
  *  Implements hook_access
  *  Implements hook_access
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_access($op, $node, $account) {
 function tripal_bulk_loader_access($op, $node, $account) {
   if ($op == 'create') {
   if ($op == 'create') {
@@ -217,6 +225,8 @@ function tripal_bulk_loader_access($op, $node, $account) {
 
 
 /**
 /**
  * Implements hook_perm
  * Implements hook_perm
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_perm() {
 function tripal_bulk_loader_perm() {
   return array(
   return array(
@@ -233,6 +243,8 @@ function tripal_bulk_loader_perm() {
 
 
 /**
 /**
  * Implements hook_node_info
  * Implements hook_node_info
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_node_info() {
 function tripal_bulk_loader_node_info() {
   $nodes = array();
   $nodes = array();
@@ -250,6 +262,8 @@ function tripal_bulk_loader_node_info() {
 /**
 /**
  * Implements node_form
  * Implements node_form
  * Used to gather the extra details stored with a Bulk Loading Job Node
  * Used to gather the extra details stored with a Bulk Loading Job Node
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_form($node, $form_state) {
 function tripal_bulk_loader_form($node, $form_state) {
   $form = array();
   $form = array();
@@ -333,6 +347,8 @@ function tripal_bulk_loader_form($node, $form_state) {
 
 
 /**
 /**
  * Implements node_load
  * Implements node_load
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_load($node) {
 function tripal_bulk_loader_load($node) {
   $sql = "SELECT * FROM {tripal_bulk_loader} WHERE nid = %d";
   $sql = "SELECT * FROM {tripal_bulk_loader} WHERE nid = %d";
@@ -405,6 +421,8 @@ function tripal_bulk_loader_load($node) {
 /**
 /**
  * Implements node_insert
  * Implements node_insert
  * Insert the data from the node form on Create content
  * Insert the data from the node form on Create content
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_insert($node) {
 function tripal_bulk_loader_insert($node) {
 
 
@@ -424,6 +442,8 @@ function tripal_bulk_loader_insert($node) {
 /**
 /**
  * Implements node_delete
  * Implements node_delete
  * Deletes the data when the delete button on the node form is clicked
  * Deletes the data when the delete button on the node form is clicked
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_delete($node) {
 function tripal_bulk_loader_delete($node) {
   $sql = "DELETE FROM {tripal_bulk_loader} WHERE nid = %d";
   $sql = "DELETE FROM {tripal_bulk_loader} WHERE nid = %d";
@@ -433,6 +453,8 @@ function tripal_bulk_loader_delete($node) {
 /**
 /**
  * Implements node_update
  * Implements node_update
  * Updates the data submitted by the node form on edit
  * Updates the data submitted by the node form on edit
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_update($node) {
 function tripal_bulk_loader_update($node) {
 
 
@@ -461,6 +483,8 @@ function tripal_bulk_loader_update($node) {
 
 
 /**
 /**
  * Preprocessor function for the tripal_bulk_loader template
  * Preprocessor function for the tripal_bulk_loader template
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_preprocess_tripal_bulk_loader_template(&$variables) {
 function tripal_bulk_loader_preprocess_tripal_bulk_loader_template(&$variables) {
 
 
@@ -489,6 +513,8 @@ function tripal_bulk_loader_preprocess_tripal_bulk_loader_template(&$variables)
  *     total_lines = the total number of lines in the input file
  *     total_lines = the total number of lines in the input file
  *     percent_file = the percent the input file has been loaded
  *     percent_file = the percent the input file has been loaded
  *     num_records = the number of records successfully inserted
  *     num_records = the number of records successfully inserted
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_progess_file_get_progress($job_id, $update_progress = TRUE) {
 function tripal_bulk_loader_progess_file_get_progress($job_id, $update_progress = TRUE) {
   $filename = '/tmp/tripal_bulk_loader_progress-' . $job_id . '.out';
   $filename = '/tmp/tripal_bulk_loader_progress-' . $job_id . '.out';
@@ -556,6 +582,8 @@ function tripal_bulk_loader_progess_file_get_progress($job_id, $update_progress
  * @return
  * @return
  *   An array where keys are the human readable headers describing each arguement
  *   An array where keys are the human readable headers describing each arguement
  *   and the value is the aguement passed in after formatting
  *   and the value is the aguement passed in after formatting
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_job_describe_args($callback, $args) {
 function tripal_bulk_loader_job_describe_args($callback, $args) {
 
 
@@ -572,6 +600,8 @@ function tripal_bulk_loader_job_describe_args($callback, $args) {
 /**
 /**
  * Implements hook_coder_ignore().
  * Implements hook_coder_ignore().
  * Defines the path to the file (tripal_bulk_loader.coder_ignores.txt) where ignore rules for coder are stored
  * Defines the path to the file (tripal_bulk_loader.coder_ignores.txt) where ignore rules for coder are stored
+ *
+ * @ingroup tripal_bulk_loader
  */
  */
 function tripal_bulk_loader_coder_ignore() {
 function tripal_bulk_loader_coder_ignore() {
   return array(
   return array(

+ 86 - 86
tripal_feature/tripal_feature.module

@@ -6,7 +6,7 @@
  */
  */
 
 
 /**
 /**
- * @defgroup tripal_feature Feature
+ * @defgroup tripal_feature Feature Module
  * @ingroup tripal_modules
  * @ingroup tripal_modules
  * @{
  * @{
  * Provides functions for managing chado features including creating details pages for each feature
  * Provides functions for managing chado features including creating details pages for each feature
@@ -266,7 +266,7 @@ function tripal_feature_menu() {
     'access arguments' => array('edit chado_feature content'),
     'access arguments' => array('edit chado_feature content'),
     'type' => MENU_LOCAL_TASK,
     'type' => MENU_LOCAL_TASK,
     'weight' => 10,
     'weight' => 10,
-  ); 
+  );
 
 
   // the menu link for addressing any feature (by name, uniquename, synonym)
   // the menu link for addressing any feature (by name, uniquename, synonym)
   $items['feature/%'] = array(
   $items['feature/%'] = array(
@@ -277,7 +277,7 @@ function tripal_feature_menu() {
     'access arguments' => array('access chado_feature content'),
     'access arguments' => array('access chado_feature content'),
     'type' => MENU_NORMAL_ITEM,
     'type' => MENU_NORMAL_ITEM,
   );
   );
-  
+
   return $items;
   return $items;
 }
 }
 
 
@@ -362,9 +362,9 @@ function tripal_feature_theme() {
       'function' => 'theme_tripal_feature_edit_ALL_properties_form',
       'function' => 'theme_tripal_feature_edit_ALL_properties_form',
     ),
     ),
     'tripal_feature_admin' => array(
     'tripal_feature_admin' => array(
-      'template' => 'tripal_feature_admin',  
-      'arguments' =>  array(NULL),  
-      'path' => drupal_get_path('module', 'tripal_feature') . '/theme' 
+      'template' => 'tripal_feature_admin',
+      'arguments' =>  array(NULL),
+      'path' => drupal_get_path('module', 'tripal_feature') . '/theme'
     ),
     ),
   );
   );
 }
 }
@@ -399,7 +399,7 @@ function tripal_feature_block($op = 'list', $delta = 0, $edit=array()) {
 
 
       $blocks['alignments']['info'] = t('Tripal Feature Alignments');
       $blocks['alignments']['info'] = t('Tripal Feature Alignments');
       $blocks['alignments']['cache'] = BLOCK_NO_CACHE;
       $blocks['alignments']['cache'] = BLOCK_NO_CACHE;
-      
+
       $blocks['relationships']['info'] = t('Tripal Feature Relationships');
       $blocks['relationships']['info'] = t('Tripal Feature Relationships');
       $blocks['relationships']['cache'] = BLOCK_NO_CACHE;
       $blocks['relationships']['cache'] = BLOCK_NO_CACHE;
 
 
@@ -491,7 +491,7 @@ function chado_feature_insert($node) {
   if ($node->is_obsolete) {
   if ($node->is_obsolete) {
     $obsolete = 'TRUE';
     $obsolete = 'TRUE';
   }
   }
-  
+
   // check to see if we are inserting a duplicate record.
   // check to see if we are inserting a duplicate record.
   $values = array(
   $values = array(
     'cv_id' => array(
     'cv_id' => array(
@@ -509,10 +509,10 @@ function chado_feature_insert($node) {
     'is_obsolete' => $obsolete,
     'is_obsolete' => $obsolete,
     'type_id' => $type[0]->cvterm_id,
     'type_id' => $type[0]->cvterm_id,
     'md5checksum' => md5($residues)
     'md5checksum' => md5($residues)
-  );    
+  );
   $options = array('is_duplicate' => TRUE, 'has_record' => TRUE);
   $options = array('is_duplicate' => TRUE, 'has_record' => TRUE);
   $exists = tripal_core_chado_select('feature', array('*'), $values, $options);
   $exists = tripal_core_chado_select('feature', array('*'), $values, $options);
-  
+
   // if the record is not a duplicate then add it
   // if the record is not a duplicate then add it
   if (!$exists) {
   if (!$exists) {
     $istatus = tripal_core_chado_insert('feature', $values);
     $istatus = tripal_core_chado_insert('feature', $values);
@@ -522,7 +522,7 @@ function chado_feature_insert($node) {
         array('%values' => print_r($values, TRUE)), WATCHDOG_WARNING);
         array('%values' => print_r($values, TRUE)), WATCHDOG_WARNING);
     }
     }
   }
   }
-  
+
   // now get the newly added record
   // now get the newly added record
   $values = array(
   $values = array(
     'organism_id' => $node->organism_id,
     'organism_id' => $node->organism_id,
@@ -530,7 +530,7 @@ function chado_feature_insert($node) {
     'type_id' => $type[0]->cvterm_id,
     'type_id' => $type[0]->cvterm_id,
   );
   );
   $feature = tripal_core_chado_select('feature', array('feature_id'), $values);
   $feature = tripal_core_chado_select('feature', array('feature_id'), $values);
-  
+
   // add the genbank accession and synonyms
   // add the genbank accession and synonyms
   chado_feature_add_synonyms($node->synonyms, $feature[0]->feature_id);
   chado_feature_add_synonyms($node->synonyms, $feature[0]->feature_id);
 
 
@@ -546,7 +546,7 @@ function chado_feature_insert($node) {
       db_query($sql, $node->nid, $node->vid, $feature[0]->feature_id);
       db_query($sql, $node->nid, $node->vid, $feature[0]->feature_id);
   }
   }
 }
 }
-  
+
 /**
 /**
  *
  *
  *
  *
@@ -602,7 +602,7 @@ function chado_feature_update($node) {
     array('%values' => print_r($values, TRUE)),
     array('%values' => print_r($values, TRUE)),
     WATCHDOG_WARNING
     WATCHDOG_WARNING
     );
     );
-  }  
+  }
 }
 }
 /**
 /**
  *
  *
@@ -612,7 +612,7 @@ function chado_feature_update($node) {
 function chado_feature_delete($node) {
 function chado_feature_delete($node) {
 
 
   $feature_id  = chado_get_id_for_node('feature', $node);
   $feature_id  = chado_get_id_for_node('feature', $node);
-  
+
   // if we don't have a library id for this node then this isn't a node of
   // if we don't have a library id for this node then this isn't a node of
   // type chado_library or the entry in the chado_library table was lost.
   // type chado_library or the entry in the chado_library table was lost.
   if (!$feature_id) {
   if (!$feature_id) {
@@ -875,7 +875,7 @@ function chado_feature_form($node, $param) {
    '#options'     => $ftypes,
    '#options'     => $ftypes,
    '#weight'      => 2
    '#weight'      => 2
   );
   );
-  
+
   // get the list of organisms
   // get the list of organisms
   $sql = "SELECT * FROM {Organism} ORDER BY genus, species";
   $sql = "SELECT * FROM {Organism} ORDER BY genus, species";
   $org_rset = chado_query($sql);
   $org_rset = chado_query($sql);
@@ -986,14 +986,14 @@ function chado_feature_validate($node) {
  *
  *
  * @ingroup tripal_feature
  * @ingroup tripal_feature
  */
  */
-function chado_feature_load($node) {  
+function chado_feature_load($node) {
 
 
   // get the feature details from chado
   // get the feature details from chado
   $feature_id = chado_get_id_for_node('feature', $node);
   $feature_id = chado_get_id_for_node('feature', $node);
 
 
   $values = array('feature_id' => $feature_id);
   $values = array('feature_id' => $feature_id);
   $feature = tripal_core_generate_chado_var('feature', $values);
   $feature = tripal_core_generate_chado_var('feature', $values);
-  
+
   if (strcmp($feature->name, $feature->uniquename)==0) {
   if (strcmp($feature->name, $feature->uniquename)==0) {
      $node->title = $feature->name . " (" . $feature->type_id->name . ") " . $feature->organism_id->genus . " " . $feature->organism_id->species ;
      $node->title = $feature->name . " (" . $feature->type_id->name . ") " . $feature->organism_id->genus . " " . $feature->organism_id->species ;
   }
   }
@@ -1290,7 +1290,7 @@ function tripal_feature_load_featureloc_sequences($feature_id, $featurelocs) {
          "WHERE feature_id = %d";
          "WHERE feature_id = %d";
   $floc_sequences = array();
   $floc_sequences = array();
   foreach ($featurelocs as $featureloc) {
   foreach ($featurelocs as $featureloc) {
-   
+
     // build the src name so we can keep track of the different parts for each feature
     // build the src name so we can keep track of the different parts for each feature
     $src = $featureloc->srcfeature_id->feature_id ."-". $featureloc->srcfeature_id->type_id->cvterm_id;
     $src = $featureloc->srcfeature_id->feature_id ."-". $featureloc->srcfeature_id->type_id->cvterm_id;
 
 
@@ -1300,40 +1300,40 @@ function tripal_feature_load_featureloc_sequences($feature_id, $featurelocs) {
       $rparts = array();  // we will fill this up if we're on the reverse strand
       $rparts = array();  // we will fill this up if we're on the reverse strand
 
 
       foreach ($parts as $start => $types) {
       foreach ($parts as $start => $types) {
-        foreach ($types as $type_name => $type) { 
+        foreach ($types as $type_name => $type) {
           if ($featureloc->strand >= 0) {
           if ($featureloc->strand >= 0) {
-             // this is on the forward strand.  We need to convert the start on the src feature to the 
+             // this is on the forward strand.  We need to convert the start on the src feature to the
              // start on this feature's sequence
              // start on this feature's sequence
              $parts[$start][$type_name]['start'] = $parts[$start][$type_name]['start'] - $featureloc->fmin;
              $parts[$start][$type_name]['start'] = $parts[$start][$type_name]['start'] - $featureloc->fmin;
-             $parts[$start][$type_name]['end']   = $parts[$start][$type_name]['end'] - $featureloc->fmin;          
+             $parts[$start][$type_name]['end']   = $parts[$start][$type_name]['end'] - $featureloc->fmin;
              $parts[$start][$type_name]['type']  = $type_name;
              $parts[$start][$type_name]['type']  = $type_name;
-          } 
+          }
           else {
           else {
-             // this is on the reverse strand.  We need to swap the start and stop and calculate from the 
+             // this is on the reverse strand.  We need to swap the start and stop and calculate from the
              // begining of the reverse sequence
              // begining of the reverse sequence
              $size = ($featureloc->fmax - $featureloc->fmin);
              $size = ($featureloc->fmax - $featureloc->fmin);
              $start_orig = $parts[$start][$type_name]['start'];
              $start_orig = $parts[$start][$type_name]['start'];
              $end_orig = $parts[$start][$type_name]['end'];
              $end_orig = $parts[$start][$type_name]['end'];
              $new_start = $size - ($end_orig - $featureloc->fmin);
              $new_start = $size - ($end_orig - $featureloc->fmin);
              $new_end = $size - ($start_orig - $featureloc->fmin);
              $new_end = $size - ($start_orig - $featureloc->fmin);
-             
+
              $rparts[$new_start][$type_name]['start'] = $new_start;
              $rparts[$new_start][$type_name]['start'] = $new_start;
              $rparts[$new_start][$type_name]['end']   = $new_end;
              $rparts[$new_start][$type_name]['end']   = $new_end;
              $rparts[$new_start][$type_name]['type']  = $type_name;
              $rparts[$new_start][$type_name]['type']  = $type_name;
           }
           }
         }
         }
       }
       }
-      
+
       // now sort the parts
       // now sort the parts
       // if we're on the reverse strand we need to resort
       // if we're on the reverse strand we need to resort
       if ($featureloc->strand >= 0) {
       if ($featureloc->strand >= 0) {
-        usort($parts, 'tripal_feature_sort_rel_parts_by_start');         
-      } 
+        usort($parts, 'tripal_feature_sort_rel_parts_by_start');
+      }
       else {
       else {
         usort($rparts, 'tripal_feature_sort_rel_parts_by_start');
         usort($rparts, 'tripal_feature_sort_rel_parts_by_start');
         $parts = $rparts;
         $parts = $rparts;
       }
       }
-      
+
       $floc_sequences[$src]['src'] = $src;
       $floc_sequences[$src]['src'] = $src;
       $floc_sequences[$src]['type'] = $featureloc->feature_id->type_id->name;
       $floc_sequences[$src]['type'] = $featureloc->feature_id->type_id->name;
       $sequence = db_fetch_object(chado_query($sql, $featureloc->fmin + 1, ($featureloc->fmax - $featureloc->fmin), $featureloc->srcfeature_id->feature_id));
       $sequence = db_fetch_object(chado_query($sql, $featureloc->fmin + 1, ($featureloc->fmax - $featureloc->fmin), $featureloc->srcfeature_id->feature_id));
@@ -1363,7 +1363,7 @@ function tripal_feature_get_matched_alignments($feature) {
   // This function is for features that align through an intermediate such
   // This function is for features that align through an intermediate such
   // as 'EST_match' or 'match'.  This occurs in the case where two sequences
   // as 'EST_match' or 'match'.  This occurs in the case where two sequences
   // align but where one does not align perfectly.  Some ESTs may be in a contig
   // align but where one does not align perfectly.  Some ESTs may be in a contig
-  // but not all of the EST.  Portions may overhang and not be included in the 
+  // but not all of the EST.  Portions may overhang and not be included in the
   // consensus if quality is bad.
   // consensus if quality is bad.
   // For example:
   // For example:
   //
   //
@@ -1371,10 +1371,10 @@ function tripal_feature_get_matched_alignments($feature) {
   //    Feature 2: EST_match           -------
   //    Feature 2: EST_match           -------
   //    Feature 3: EST                 ---------
   //    Feature 3: EST                 ---------
   //
   //
-  // The feature provided to the function will always be the feature 1.  The 
-  // featureloc columns prefixed with 'right' (e.g. right_fmin) belong to the 
+  // The feature provided to the function will always be the feature 1.  The
+  // featureloc columns prefixed with 'right' (e.g. right_fmin) belong to the
   // alignment of feature 3 with feature 2
   // alignment of feature 3 with feature 2
-  // 
+  //
   // Features may align to more than one feature and are not matches. We do
   // Features may align to more than one feature and are not matches. We do
   // not want to include these, so we have to filter on the SO terms:
   // not want to include these, so we have to filter on the SO terms:
   // match, or %_match
   // match, or %_match
@@ -1413,12 +1413,12 @@ function tripal_feature_get_matched_alignments($feature) {
           "ORDER BY FL1.fmin";
           "ORDER BY FL1.fmin";
 
 
    $results = chado_query($sql, $feature->feature_id, $feature->feature_id);
    $results = chado_query($sql, $feature->feature_id, $feature->feature_id);
-   
+
    // iterate through the results and add them to our featurelocs array
    // iterate through the results and add them to our featurelocs array
    $featurelocs = array();
    $featurelocs = array();
    while ($fl = db_fetch_object($results)) {
    while ($fl = db_fetch_object($results)) {
       $featurelocs[] = $fl ;
       $featurelocs[] = $fl ;
-   }   
+   }
    return $featurelocs;
    return $featurelocs;
 }
 }
 /**
 /**
@@ -1538,7 +1538,7 @@ function tripal_feature_load_organism_feature_browser($organism) {
   $options = array(
   $options = array(
     'pager' => array('limit' => 10, 'element' => 0),
     'pager' => array('limit' => 10, 'element' => 0),
     'order_by' => array('name' => 'ASC'),
     'order_by' => array('name' => 'ASC'),
-  );  
+  );
   $features = tripal_core_chado_select('feature', $columns, $values, $options);
   $features = tripal_core_chado_select('feature', $columns, $values, $options);
   $pager = theme('pager');
   $pager = theme('pager');
 
 
@@ -1746,20 +1746,20 @@ function tripal_feature_color_sequence($sequence, $parts, $defline) {
   $pos = 0;
   $pos = 0;
   $newseq .= "<pre id=\"tripal_feature-featureloc_sequence\">";
   $newseq .= "<pre id=\"tripal_feature-featureloc_sequence\">";
   $newseq .= ">$defline\n";
   $newseq .= ">$defline\n";
-  
+
   // iterate through the parts. They should be in order.
   // iterate through the parts. They should be in order.
   $ends = array();
   $ends = array();
   foreach ($parts as $index => $types) {
   foreach ($parts as $index => $types) {
-  
-    // get the start for this part.  All types in this part start at the 
+
+    // get the start for this part.  All types in this part start at the
     // same position so we only need the first record
     // same position so we only need the first record
     foreach ($types as $type => $child) {
     foreach ($types as $type => $child) {
       $start = $child['start'];
       $start = $child['start'];
       break;
       break;
     }
     }
-  
+
     // add in the sequence up to the start of this part
     // add in the sequence up to the start of this part
-    for ($i = $pos; $i < $start; $i++) {    
+    for ($i = $pos; $i < $start; $i++) {
       $newseq .= $sequence{$pos};
       $newseq .= $sequence{$pos};
       $seqcount++;
       $seqcount++;
       if ($seqcount % 50 == 0) {
       if ($seqcount % 50 == 0) {
@@ -1774,21 +1774,21 @@ function tripal_feature_color_sequence($sequence, $parts, $defline) {
     }
     }
 
 
     // we want to sort the parts by their end. We want the span tag to
     // we want to sort the parts by their end. We want the span tag to
-    // to be added in the order the parts end. 
+    // to be added in the order the parts end.
     usort($types, 'tripal_feature_sort_rel_parts_by_end');
     usort($types, 'tripal_feature_sort_rel_parts_by_end');
-    
-    // now add the child span for all types that start at this position  
+
+    // now add the child span for all types that start at this position
     foreach ($types as $type) {
     foreach ($types as $type) {
       $class = "tripal_feature-featureloc_sequence-" . $type['type'];
       $class = "tripal_feature-featureloc_sequence-" . $type['type'];
       $newseq .= "<span class=\"$class\">";
       $newseq .= "<span class=\"$class\">";
       // add the end position
       // add the end position
       $end = $type['end'];
       $end = $type['end'];
       $ends[$end][] = $end;
       $ends[$end][] = $end;
-    }         
+    }
   }
   }
-  
+
   // add in rest of the sequence
   // add in rest of the sequence
-  for ($i = $pos; $i <= strlen($sequence); $i++) {    
+  for ($i = $pos; $i <= strlen($sequence); $i++) {
     $newseq .= $sequence{$pos};
     $newseq .= $sequence{$pos};
     $seqcount++;
     $seqcount++;
     if ($seqcount % 50 == 0) {
     if ($seqcount % 50 == 0) {
@@ -1881,10 +1881,10 @@ function tripal_feature_nodeapi(&$node, $op, $teaser, $page) {
 function tripal_feature_preprocess_tripal_feature_relationships(&$variables) {
 function tripal_feature_preprocess_tripal_feature_relationships(&$variables) {
   // we want to provide a new variable that contains the matched features.
   // we want to provide a new variable that contains the matched features.
   $feature = $variables['node']->feature;
   $feature = $variables['node']->feature;
-   
+
   if (!$feature->all_relationships) {
   if (!$feature->all_relationships) {
-    $feature->all_relationships = tripal_feature_get_feature_relationships($feature);  
-  } 
+    $feature->all_relationships = tripal_feature_get_feature_relationships($feature);
+  }
 }
 }
 /**
 /**
  *
  *
@@ -1892,32 +1892,32 @@ function tripal_feature_preprocess_tripal_feature_relationships(&$variables) {
  * @ingroup tripal_feature
  * @ingroup tripal_feature
  */
  */
 function tripal_feature_preprocess_tripal_feature_alignments(&$variables) {
 function tripal_feature_preprocess_tripal_feature_alignments(&$variables) {
-  
+
   // we want to provide a new variable that contains the matched features.
   // we want to provide a new variable that contains the matched features.
   $feature = $variables['node']->feature;
   $feature = $variables['node']->feature;
   $feature = tripal_core_expand_chado_vars($feature, 'table', 'featureloc');
   $feature = tripal_core_expand_chado_vars($feature, 'table', 'featureloc');
-  
+
   // get alignments as child
   // get alignments as child
   $cfeaturelocs = $feature->featureloc->feature_id;
   $cfeaturelocs = $feature->featureloc->feature_id;
   if (!$cfeaturelocs) {
   if (!$cfeaturelocs) {
      $cfeaturelocs = array();
      $cfeaturelocs = array();
-  } 
-  elseif (!is_array($cfeaturelocs)) { 
-     $cfeaturelocs = array($cfeaturelocs); 
+  }
+  elseif (!is_array($cfeaturelocs)) {
+     $cfeaturelocs = array($cfeaturelocs);
   }
   }
   // get alignment as parent
   // get alignment as parent
   $pfeaturelocs = $feature->featureloc->srcfeature_id;
   $pfeaturelocs = $feature->featureloc->srcfeature_id;
   if (!$pfeaturelocs) {
   if (!$pfeaturelocs) {
      $pfeaturelocs = array();
      $pfeaturelocs = array();
-  } 
-  elseif (!is_array($pfeaturelocs)) { 
-     $pfeaturelocs = array($pfeaturelocs); 
+  }
+  elseif (!is_array($pfeaturelocs)) {
+     $pfeaturelocs = array($pfeaturelocs);
   }
   }
 
 
   // get matched alignments (those with an itermediate 'match' or 'EST_match', etc
   // get matched alignments (those with an itermediate 'match' or 'EST_match', etc
   $mfeaturelocs = tripal_feature_get_matched_alignments($feature);
   $mfeaturelocs = tripal_feature_get_matched_alignments($feature);
   $feature->matched_featurelocs = tripal_feature_get_matched_alignments($feature);
   $feature->matched_featurelocs = tripal_feature_get_matched_alignments($feature);
-    
+
   // combine all three alignments into a single array for printing together in
   // combine all three alignments into a single array for printing together in
   // a single list
   // a single list
   $alignments = array();
   $alignments = array();
@@ -1956,7 +1956,7 @@ function tripal_feature_preprocess_tripal_feature_alignments(&$variables) {
      $alignments[] = $alignment;
      $alignments[] = $alignment;
   }
   }
   // in matching features, the left feature is always the feature
   // in matching features, the left feature is always the feature
-  // provided to this function. 
+  // provided to this function.
   foreach ($mfeaturelocs as $featureloc) {
   foreach ($mfeaturelocs as $featureloc) {
      // get more information about the right feature
      // get more information about the right feature
      $select = array('feature_id' => $featureloc->right_srcfeature_id);
      $select = array('feature_id' => $featureloc->right_srcfeature_id);
@@ -2153,7 +2153,7 @@ function tripal_feature_job_describe_args($callback, $args) {
     $new_args['Sequence Type'] = $args[2];
     $new_args['Sequence Type'] = $args[2];
     $new_args['Name Match Type'] = $args[14];
     $new_args['Name Match Type'] = $args[14];
     $new_args['Name RE'] = $args[4];
     $new_args['Name RE'] = $args[4];
-    $new_args['Unique Name RE'] = $args[5];   
+    $new_args['Unique Name RE'] = $args[5];
 
 
     // add in the relationship arguments
     // add in the relationship arguments
     $new_args['Relationship Type'] = $args[8];
     $new_args['Relationship Type'] = $args[8];
@@ -2197,12 +2197,12 @@ function tripal_feature_job_describe_args($callback, $args) {
 
 
   }
   }
   elseif ($callback == 'tripal_feature_load_gff3') {
   elseif ($callback == 'tripal_feature_load_gff3') {
-    
+
     $new_args['GFF File'] = $args[0];
     $new_args['GFF File'] = $args[0];
     $organism = tripal_core_chado_select('organism', array('genus', 'species'), array('organism_id' => $args[1]));
     $organism = tripal_core_chado_select('organism', array('genus', 'species'), array('organism_id' => $args[1]));
     $new_args['Organism'] = $organism[0]->genus . " " . $organism[0]->species;
     $new_args['Organism'] = $organism[0]->genus . " " . $organism[0]->species;
     $analysis = tripal_core_chado_select('analysis', array('name'), array('analysis_id' => $args[2]));
     $analysis = tripal_core_chado_select('analysis', array('name'), array('analysis_id' => $args[2]));
-    $new_args['Analysis'] = $analysis[0]->name;   
+    $new_args['Analysis'] = $analysis[0]->name;
     $new_args['Use a Transaction'] = ($args[7] == 1) ? "Yes" : "No";
     $new_args['Use a Transaction'] = ($args[7] == 1) ? "Yes" : "No";
     $new_args['Import only new features'] = ($args[3] == 1) ? "Yes" : "No";
     $new_args['Import only new features'] = ($args[3] == 1) ? "Yes" : "No";
     $new_args['Import all and update'] = ($args[4] == 1) ? "Yes" : "No";
     $new_args['Import all and update'] = ($args[4] == 1) ? "Yes" : "No";
@@ -2249,29 +2249,29 @@ function tripal_feature_coder_ignore() {
 function tripal_feature_match_features_page($id) {
 function tripal_feature_match_features_page($id) {
 
 
   $sql = "
   $sql = "
-    SELECT 
-      F.name, F.uniquename, F.feature_id, 
-      O.genus, O.species, O.organism_id, 
-      CVT.cvterm_id, CVT.name as type_name, 
-      CF.nid, 
-      array_agg(S.name) as synonyms 
-    FROM feature F 
-      INNER JOIN organism O on F.organism_id = O.organism_id 
-      INNER JOIN cvterm CVT on CVT.cvterm_id = F.type_id 
-      LEFT JOIN feature_synonym FS on FS.feature_id = F.feature_id 
-      LEFT JOIN synonym S on S.synonym_id = FS.synonym_id 
-      INNER JOIN public.chado_feature CF on CF.feature_id = F.feature_id 
-    WHERE 
-      F.uniquename = '%s' or 
-      F.name = '%s' or 
-      S.name = '%s' 
-    GROUP BY F.name, F.uniquename, F.feature_id, O.genus, O.species, 
+    SELECT
+      F.name, F.uniquename, F.feature_id,
+      O.genus, O.species, O.organism_id,
+      CVT.cvterm_id, CVT.name as type_name,
+      CF.nid,
+      array_agg(S.name) as synonyms
+    FROM feature F
+      INNER JOIN organism O on F.organism_id = O.organism_id
+      INNER JOIN cvterm CVT on CVT.cvterm_id = F.type_id
+      LEFT JOIN feature_synonym FS on FS.feature_id = F.feature_id
+      LEFT JOIN synonym S on S.synonym_id = FS.synonym_id
+      INNER JOIN public.chado_feature CF on CF.feature_id = F.feature_id
+    WHERE
+      F.uniquename = '%s' or
+      F.name = '%s' or
+      S.name = '%s'
+    GROUP BY F.name, F.uniquename, F.feature_id, O.genus, O.species,
       O.organism_id, CVT.cvterm_id, CVT.name, CF.nid
       O.organism_id, CVT.cvterm_id, CVT.name, CF.nid
   ";
   ";
   $results = chado_query($sql, $id, $id, $id);
   $results = chado_query($sql, $id, $id, $id);
-  
+
   $num_matches = 0;
   $num_matches = 0;
-  
+
   // iterate through the matches and build the table for showing matches
   // iterate through the matches and build the table for showing matches
   $header = array('Uniquename', 'Name', 'Type', 'Species', 'Synonyms');
   $header = array('Uniquename', 'Name', 'Type', 'Species', 'Synonyms');
   $rows = array();
   $rows = array();
@@ -2286,10 +2286,10 @@ function tripal_feature_match_features_page($id) {
        $match->type_name,
        $match->type_name,
        '<i>' . $match->genus . ' ' . $match->species . '</i>',
        '<i>' . $match->genus . ' ' . $match->species . '</i>',
        $synonyms,
        $synonyms,
-    ); 
-    $num_matches++;   
+    );
+    $num_matches++;
   }
   }
-  
+
   // if we have more than one match then generate the table, otherwise, redirect
   // if we have more than one match then generate the table, otherwise, redirect
   // to the matched feature
   // to the matched feature
   if ($num_matches == 1) {
   if ($num_matches == 1) {
@@ -2298,7 +2298,7 @@ function tripal_feature_match_features_page($id) {
   if ($num_matches == 0) {
   if ($num_matches == 0) {
     return "<p>No features matched the given name '$id'</p>";
     return "<p>No features matched the given name '$id'</p>";
   }
   }
-  
+
   $table_attrs = array(
   $table_attrs = array(
     'class' => 'tripal-table tripal-table-horz'
     'class' => 'tripal-table tripal-table-horz'
   );
   );

+ 15 - 15
tripal_featuremap/tripal_featuremap.module

@@ -1,7 +1,7 @@
 <?php
 <?php
 
 
 /**
 /**
- * @defgroup tripal_featuremap Map
+ * @defgroup tripal_featuremap Feature Map Module
  * @ingroup tripal_modules
  * @ingroup tripal_modules
  * @{
  * @{
  * Provides functions for managing chado maps including creating details pages for each map
  * Provides functions for managing chado maps including creating details pages for each map
@@ -106,7 +106,7 @@ function chado_featuremap_access($op, $node, $account) {
  */
  */
 function tripal_featuremap_menu() {
 function tripal_featuremap_menu() {
   $items = array();
   $items = array();
-  
+
   // The administative settings menu
   // The administative settings menu
   $items['admin/tripal/tripal_featuremap'] = array(
   $items['admin/tripal/tripal_featuremap'] = array(
     'title' => 'Maps',
     'title' => 'Maps',
@@ -133,7 +133,7 @@ function tripal_featuremap_menu() {
     'access arguments' => array('administer tripal featuremap'),
     'access arguments' => array('administer tripal featuremap'),
     'type' => MENU_CALLBACK
     'type' => MENU_CALLBACK
   );
   );
-  
+
   return $items;
   return $items;
 }
 }
 
 
@@ -176,7 +176,7 @@ function tripal_featuremap_nodeapi(&$node, $op, $teaser, $page) {
         $node->content['tripal_featuremap_index_version'] = array(
         $node->content['tripal_featuremap_index_version'] = array(
           '#value' => theme('tripal_featuremap_search_result', $node),
           '#value' => theme('tripal_featuremap_search_result', $node),
         );
         );
-      }      
+      }
   }
   }
 }
 }
 
 
@@ -208,9 +208,9 @@ function tripal_featuremap_theme() {
       'template' => 'tripal_featuremap_publication',
       'template' => 'tripal_featuremap_publication',
     ),
     ),
     'tripal_featuremap_admin' => array(
     'tripal_featuremap_admin' => array(
-      'template' => 'tripal_featuremap_admin',  
-      'arguments' =>  array(NULL),  
-      'path' => drupal_get_path('module', 'tripal_featuremap') . '/theme' 
+      'template' => 'tripal_featuremap_admin',
+      'arguments' =>  array(NULL),
+      'path' => drupal_get_path('module', 'tripal_featuremap') . '/theme'
     ),
     ),
   );
   );
 }
 }
@@ -276,7 +276,7 @@ function tripal_featuremap_map_access($op, $node, $account) {
  * @ingroup tripal_featuremap
  * @ingroup tripal_featuremap
  */
  */
 function chado_featuremap_form($node) {
 function chado_featuremap_form($node) {
-  $type = node_get_types('type', $node);  
+  $type = node_get_types('type', $node);
   $form = array();
   $form = array();
 
 
   $featuremap = $node->featuremap;
   $featuremap = $node->featuremap;
@@ -303,7 +303,7 @@ function chado_featuremap_form($node) {
     '#required'      => TRUE,
     '#required'      => TRUE,
     '#default_value' => $featuremap->description,
     '#default_value' => $featuremap->description,
   );
   );
-  
+
   // get the list of unit types
   // get the list of unit types
   $values = array(
   $values = array(
     'cv_id' => array(
     'cv_id' => array(
@@ -339,7 +339,7 @@ function chado_featuremap_validate($node) {
   $map = 0;
   $map = 0;
   // check to make sure the unique name on the map is unique
   // check to make sure the unique name on the map is unique
   // before we try to insert into chado. If this is an update then we will
   // before we try to insert into chado. If this is an update then we will
-  // have a featuremap_id, therefore we want to look for another map with this 
+  // have a featuremap_id, therefore we want to look for another map with this
   // name but with a different featuremap_id. If this is an insert, just look
   // name but with a different featuremap_id. If this is an insert, just look
   // for a case where the name already exists.
   // for a case where the name already exists.
   if ($node->featuremap_id) {
   if ($node->featuremap_id) {
@@ -421,7 +421,7 @@ function chado_featuremap_update($node) {
     'name' => $node->title,
     'name' => $node->title,
     'unittype_id' => $node->unittype_id
     'unittype_id' => $node->unittype_id
   );
   );
-  $status = tripal_core_chado_update('featuremap', $match, $values);  
+  $status = tripal_core_chado_update('featuremap', $match, $values);
 }
 }
 /**
 /**
  *  When a node is requested by the user this function is called to allow us
  *  When a node is requested by the user this function is called to allow us
@@ -451,7 +451,7 @@ function chado_featuremap_view($node, $teaser = FALSE, $page = FALSE) {
    // use drupal's default node view:
    // use drupal's default node view:
   if (!$teaser) {
   if (!$teaser) {
 
 
-    $node = node_prepare($node, $teaser);    
+    $node = node_prepare($node, $teaser);
   }
   }
   return $node;
   return $node;
 }
 }
@@ -463,13 +463,13 @@ function chado_featuremap_view($node, $teaser = FALSE, $page = FALSE) {
 function chado_featuremap_delete(&$node) {
 function chado_featuremap_delete(&$node) {
 
 
   $featuremap_id = chado_get_id_for_node('featuremap', $node);
   $featuremap_id = chado_get_id_for_node('featuremap', $node);
-  
+
   // if we don't have a map id for this node then this isn't a node of
   // if we don't have a map id for this node then this isn't a node of
   // type chado_featuremap or the entry in the chado_featuremap table was lost.
   // type chado_featuremap or the entry in the chado_featuremap table was lost.
   if (!$featuremap_id) {
   if (!$featuremap_id) {
     return;
     return;
   }
   }
-  
+
   // Remove data from {chado_featuremap}, {node} and {node_revisions} tables of
   // Remove data from {chado_featuremap}, {node} and {node_revisions} tables of
   // drupal database
   // drupal database
   $sql_del = "DELETE FROM {chado_featuremap} ".
   $sql_del = "DELETE FROM {chado_featuremap} ".
@@ -491,7 +491,7 @@ function chado_featuremap_delete(&$node) {
 }
 }
 
 
 /*
 /*
- * 
+ *
  */
  */
 function theme_tripal_featuremap_search_result($node) {
 function theme_tripal_featuremap_search_result($node) {
 
 

+ 12 - 3
tripal_genetic/tripal_genetic.module

@@ -7,6 +7,9 @@
  *
  *
  * For documentation regarding the Chado X module:
  * For documentation regarding the Chado X module:
  * @see http://gmod.org/wiki/Chado_General_Module
  * @see http://gmod.org/wiki/Chado_General_Module
+ *
+ * @defgroup tripal_genetic Genetic Module
+ * @ingroup tripal_modules
  */
  */
 
 
 require('api/tripal_genetic.api.inc');
 require('api/tripal_genetic.api.inc');
@@ -18,6 +21,8 @@ require('includes/tripal_genetic.schema.inc');
  * Purpose: Essentially this hook tells drupal that there is views support for
  * Purpose: Essentially this hook tells drupal that there is views support for
  *  for this module which then includes tripal_genetic.views.inc where all the
  *  for this module which then includes tripal_genetic.views.inc where all the
  *  views integration code is
  *  views integration code is
+ *
+ * @ingroup tripal_genetic
  */
  */
 function tripal_genetic_views_api() {
 function tripal_genetic_views_api() {
   return array(
   return array(
@@ -25,8 +30,10 @@ function tripal_genetic_views_api() {
   );
   );
 }
 }
 
 
-/*
- * 
+/**
+ * Implements hook_theme().
+ *
+ * @ingroup tripal_genetic
  */
  */
 function tripal_genetic_theme() {
 function tripal_genetic_theme() {
   return array(
   return array(
@@ -38,14 +45,16 @@ function tripal_genetic_theme() {
 }
 }
 
 
 /**
 /**
+ * Implements hook_nodeapi().
  *
  *
+ * @ingroup tripal_genetic
  */
  */
 function tripal_genetic_nodeapi(&$node, $op, $teaser, $page) {
 function tripal_genetic_nodeapi(&$node, $op, $teaser, $page) {
   switch ($op) {
   switch ($op) {
     case 'view':
     case 'view':
       if ($node->type == 'chado_feature') {
       if ($node->type == 'chado_feature') {
         // the tripal_natural_diversity module provides a tripal_feature_nd_genotype
         // the tripal_natural_diversity module provides a tripal_feature_nd_genotype
-        // template.  The only difference between them is the addition of 
+        // template.  The only difference between them is the addition of
         // project information by this ND module's template.  Therefore,
         // project information by this ND module's template.  Therefore,
         // if the tripal_natural_diversity content is present then don't add the
         // if the tripal_natural_diversity content is present then don't add the
         // template from this module as the ND module would superceed this.
         // template from this module as the ND module would superceed this.

+ 6 - 1
tripal_genetic/tripal_genetic.views.inc

@@ -24,6 +24,8 @@
  *   definitions keyed by chado/tripal table name. Each table definition
  *   definitions keyed by chado/tripal table name. Each table definition
  *   includes basic details about the table, fields in that table and
  *   includes basic details about the table, fields in that table and
  *   relationships between that table and others (joins)
  *   relationships between that table and others (joins)
+ *
+ * @ingroup tripal_genetic
  */
  */
 function tripal_genetic_views_data()  {
 function tripal_genetic_views_data()  {
   $data = array();
   $data = array();
@@ -76,6 +78,8 @@ function tripal_genetic_views_data()  {
  *   "how a field should be filtered", "how a field should be sorted"
  *   "how a field should be filtered", "how a field should be sorted"
  *
  *
  * @return: An array of handler definitions
  * @return: An array of handler definitions
+ *
+ * @ingroup tripal_genetic
  */
  */
 function tripal_genetic_views_handlers() {
 function tripal_genetic_views_handlers() {
   return array(
   return array(
@@ -89,8 +93,9 @@ function tripal_genetic_views_handlers() {
 }
 }
 
 
 /**
 /**
+ * Implements hook_views_default_views().
  *
  *
- * @ingroup tripal_feature_views
+ * @ingroup tripal_genetic
  */
  */
 function tripal_genetic_views_default_views() {
 function tripal_genetic_views_default_views() {
   $views = array();
   $views = array();

+ 13 - 13
tripal_library/tripal_library.module

@@ -1,7 +1,7 @@
 <?php
 <?php
 
 
 /**
 /**
- * @defgroup tripal_library Library
+ * @defgroup tripal_library Library Module
  * @ingroup tripal_modules
  * @ingroup tripal_modules
  * @{
  * @{
  * Provides functions for managing chado libraries including creating details pages for each library
  * Provides functions for managing chado libraries including creating details pages for each library
@@ -240,9 +240,9 @@ function tripal_library_theme() {
        'template' => 'tripal_library_terms',
        'template' => 'tripal_library_terms',
     ),
     ),
     'tripal_library_admin' => array(
     'tripal_library_admin' => array(
-      'template' => 'tripal_library_admin',  
-      'arguments' =>  array(NULL),  
-      'path' => drupal_get_path('module', 'tripal_library') . '/theme', 
+      'template' => 'tripal_library_admin',
+      'arguments' =>  array(NULL),
+      'path' => drupal_get_path('module', 'tripal_library') . '/theme',
     ),
     ),
   );
   );
 }
 }
@@ -451,7 +451,7 @@ function chado_library_form($node) {
     '#default_value' => $uniquename,
     '#default_value' => $uniquename,
     '#weight'        => 2
     '#weight'        => 2
   );
   );
-    
+
   // get the list of library types
   // get the list of library types
   $values = array(
   $values = array(
     'cv_id' => array(
     'cv_id' => array(
@@ -549,7 +549,7 @@ function chado_library_insert($node) {
   if ($node->library_id) {
   if ($node->library_id) {
     $library['library_id'] = $node->library_id;
     $library['library_id'] = $node->library_id;
   }
   }
-  else {    
+  else {
     $values = array(
     $values = array(
       'name' => $node->title,
       'name' => $node->title,
       'uniquename' => $node->uniquename,
       'uniquename' => $node->uniquename,
@@ -561,7 +561,7 @@ function chado_library_insert($node) {
 
 
   if ($library) {
   if ($library) {
      // add the description property
      // add the description property
-    tripal_library_insert_property($library['library_id'], 'library_description', 
+    tripal_library_insert_property($library['library_id'], 'library_description',
       $node->library_description);
       $node->library_description);
 
 
     // make sure the entry for this feature doesn't already exist in the chado_library table
     // make sure the entry for this feature doesn't already exist in the chado_library table
@@ -593,7 +593,7 @@ function chado_library_update($node) {
     // there is no way to handle revisions in Chado but leave
     // there is no way to handle revisions in Chado but leave
     // this here just to make not we've addressed it.
     // this here just to make not we've addressed it.
   }
   }
-  
+
   $library_id = chado_get_id_for_node('library', $node) ;
   $library_id = chado_get_id_for_node('library', $node) ;
   // update the library record
   // update the library record
   $match = array(
   $match = array(
@@ -661,13 +661,13 @@ function chado_library_view($node, $teaser = FALSE, $page = FALSE) {
 function chado_library_delete(&$node) {
 function chado_library_delete(&$node) {
 
 
   $library_id = chado_get_id_for_node('library', $node);
   $library_id = chado_get_id_for_node('library', $node);
-  
+
   // if we don't have a library id for this node then this isn't a node of
   // if we don't have a library id for this node then this isn't a node of
   // type chado_library or the entry in the chado_library table was lost.
   // type chado_library or the entry in the chado_library table was lost.
   if (!$library_id) {
   if (!$library_id) {
     return;
     return;
   }
   }
-  
+
   // Remove data from {chado_library}, {node} and {node_revisions} tables of
   // Remove data from {chado_library}, {node} and {node_revisions} tables of
   // drupal database
   // drupal database
   $sql_del = "DELETE FROM {chado_library} ".
   $sql_del = "DELETE FROM {chado_library} ".
@@ -681,11 +681,11 @@ function chado_library_delete(&$node) {
   $sql_del = "DELETE FROM {node} ".
   $sql_del = "DELETE FROM {node} ".
             "WHERE nid = %d ".
             "WHERE nid = %d ".
             "AND vid = %d";
             "AND vid = %d";
-  db_query($sql_del, $node->nid, $node->vid);  
+  db_query($sql_del, $node->nid, $node->vid);
 
 
   // Remove data from library and libraryprop tables of chado database as well
   // Remove data from library and libraryprop tables of chado database as well
   chado_query("DELETE FROM {libraryprop} WHERE library_id = %d", $library_id);
   chado_query("DELETE FROM {libraryprop} WHERE library_id = %d", $library_id);
-  chado_query("DELETE FROM {library} WHERE library_id = %d", $library_id);  
+  chado_query("DELETE FROM {library} WHERE library_id = %d", $library_id);
 }
 }
 
 
 /**
 /**
@@ -705,7 +705,7 @@ function tripal_library_block($op = 'list', $delta = '0', $edit = array()) {
 
 
     $blocks['libbase']['info'] = t('Tripal Library Details');
     $blocks['libbase']['info'] = t('Tripal Library Details');
     $blocks['libbase']['cache'] = BLOCK_NO_CACHE;
     $blocks['libbase']['cache'] = BLOCK_NO_CACHE;
-    
+
     $blocks['libterms']['info'] = t('Tripal Library Terms');
     $blocks['libterms']['info'] = t('Tripal Library Terms');
     $blocks['libterms']['cache'] = BLOCK_NO_CACHE;
     $blocks['libterms']['cache'] = BLOCK_NO_CACHE;
 
 

+ 16 - 5
tripal_natural_diversity/tripal_natural_diversity.module

@@ -10,6 +10,9 @@ require_once('includes/tripal_natural_diversity.schema.inc');
  *
  *
  * For documentation regarding the Chado X module:
  * For documentation regarding the Chado X module:
  * @see http://gmod.org/wiki/Chado_General_Module
  * @see http://gmod.org/wiki/Chado_General_Module
+ *
+ * @defgroup tripal_natural_diversity Natural Diversity Module
+ * @ingroup tripal_modules
  */
  */
 
 
 /*************************************************************************
 /*************************************************************************
@@ -17,6 +20,8 @@ require_once('includes/tripal_natural_diversity.schema.inc');
  * Purpose: Essentially this hook tells drupal that there is views support for
  * Purpose: Essentially this hook tells drupal that there is views support for
  *  for this module which then includes tripal_natural_diversity.views.inc where all the
  *  for this module which then includes tripal_natural_diversity.views.inc where all the
  *  views integration code is
  *  views integration code is
+ *
+ * @ingroup tripal_natural_diversity
  */
  */
 function tripal_natural_diversity_views_api() {
 function tripal_natural_diversity_views_api() {
   return array(
   return array(
@@ -26,6 +31,8 @@ function tripal_natural_diversity_views_api() {
 
 
 /**
 /**
  * Implements hook_theme
  * Implements hook_theme
+ *
+ * @ingroup tripal_natural_diversity
  */
  */
 function tripal_natural_diversity_theme() {
 function tripal_natural_diversity_theme() {
   return array(
   return array(
@@ -48,15 +55,17 @@ function tripal_natural_diversity_theme() {
   );
   );
 }
 }
 
 
-/*
+/**
+ * Implements hook_nodeapi().
  *
  *
+ * @ingroup tripal_natural_diversity
  */
  */
-function tripal_natural_diversity_nodeapi(&$node, $op, $teaser, $page){  
+function tripal_natural_diversity_nodeapi(&$node, $op, $teaser, $page){
   switch ($op) {
   switch ($op) {
     case 'view':
     case 'view':
       if ($node->type == 'chado_feature') {
       if ($node->type == 'chado_feature') {
         // the tripal_genetic module provides a tripal_feature_genotype
         // the tripal_genetic module provides a tripal_feature_genotype
-        // template.  The only difference between them is the addition of 
+        // template.  The only difference between them is the addition of
         // project information by this module's template.  Therefore,
         // project information by this module's template.  Therefore,
         // if the tripal_genetic content is present get rid of as this
         // if the tripal_genetic content is present get rid of as this
         // module superceeds it.
         // module superceeds it.
@@ -82,8 +91,10 @@ function tripal_natural_diversity_nodeapi(&$node, $op, $teaser, $page){
   }
   }
 }
 }
 
 
-/*
- * 
+/**
+ *
+ *
+ * @ingroup tripal_natural_diversity
  */
  */
 function tripal_natural_diversity_preprocess_tripal_stock_nd_genotypes(&$variables){
 function tripal_natural_diversity_preprocess_tripal_stock_nd_genotypes(&$variables){
 
 

+ 5 - 1
tripal_natural_diversity/tripal_natural_diversity.views.inc

@@ -24,6 +24,8 @@
  *   definitions keyed by chado/tripal table name. Each table definition
  *   definitions keyed by chado/tripal table name. Each table definition
  *   includes basic details about the table, fields in that table and
  *   includes basic details about the table, fields in that table and
  *   relationships between that table and others (joins)
  *   relationships between that table and others (joins)
+ *
+ * @ingroup tripal_natural_diversity_views
  */
  */
 function tripal_natural_diversity_views_data()  {
 function tripal_natural_diversity_views_data()  {
   $data = array();
   $data = array();
@@ -95,6 +97,8 @@ function tripal_natural_diversity_views_data()  {
  *   "how a field should be filtered", "how a field should be sorted"
  *   "how a field should be filtered", "how a field should be sorted"
  *
  *
  * @return: An array of handler definitions
  * @return: An array of handler definitions
+ *
+ * @ingroup tripal_natural_diversity_views
  */
  */
 function tripal_natural_diversity_views_handlers() {
 function tripal_natural_diversity_views_handlers() {
   return array(
   return array(
@@ -115,7 +119,7 @@ function tripal_natural_diversity_views_handlers() {
 /**
 /**
  * Created Default views related to the tables integrated by this module
  * Created Default views related to the tables integrated by this module
  *
  *
- * @ingroup tripal_feature_views
+ * @ingroup tripal_natural_diversity_views
  */
  */
 function tripal_natural_diversity_views_default_views() {
 function tripal_natural_diversity_views_default_views() {
   $views = array();
   $views = array();

+ 5 - 5
tripal_organism/tripal_organism.module

@@ -5,7 +5,7 @@ require_once "includes/tripal_organism.admin.inc";
 
 
 /**
 /**
  * @file
  * @file
- * @defgroup tripal_organism Organism
+ * @defgroup tripal_organism Organism Module
  * @ingroup tripal_modules
  * @ingroup tripal_modules
  */
  */
 
 
@@ -145,9 +145,9 @@ function tripal_organism_theme() {
        'template' => 'tripal_organism_teaser',
        'template' => 'tripal_organism_teaser',
     ),
     ),
     'tripal_organism_admin' => array(
     'tripal_organism_admin' => array(
-      'template' => 'tripal_organism_admin',  
-      'arguments' =>  array(NULL),  
-      'path' => drupal_get_path('module', 'tripal_organism') . '/theme' 
+      'template' => 'tripal_organism_admin',
+      'arguments' =>  array(NULL),
+      'path' => drupal_get_path('module', 'tripal_organism') . '/theme'
     ),
     ),
   );
   );
 }
 }
@@ -357,7 +357,7 @@ function chado_organism_update($node) {
  */
  */
 function chado_organism_delete($node) {
 function chado_organism_delete($node) {
   $organism_id = chado_get_id_for_node('organism', $node);
   $organism_id = chado_get_id_for_node('organism', $node);
-  
+
   // if we don't have an organism id for this node then this isn't a node of
   // if we don't have an organism id for this node then this isn't a node of
   // type chado_organism or the entry in the chado_organism table was lost.
   // type chado_organism or the entry in the chado_organism table was lost.
   if (!$organism_id) {
   if (!$organism_id) {

+ 5 - 0
tripal_phenotype/tripal_phenotype.module

@@ -7,6 +7,9 @@
  *
  *
  * For documentation regarding the Chado X module:
  * For documentation regarding the Chado X module:
  * @see http://gmod.org/wiki/Chado_General_Module
  * @see http://gmod.org/wiki/Chado_General_Module
+ *
+ * @defgroup tripal_phenotype Phenotype Module
+ * @ingroup tripal_modules
  */
  */
 
 
 /*************************************************************************
 /*************************************************************************
@@ -14,6 +17,8 @@
  * Purpose: Essentially this hook tells drupal that there is views support for
  * Purpose: Essentially this hook tells drupal that there is views support for
  *  for this module which then includes tripal_phenotype.views.inc where all the
  *  for this module which then includes tripal_phenotype.views.inc where all the
  *  views integration code is
  *  views integration code is
+ *
+ * @ingroup tripal_phenotype
  */
  */
 function tripal_phenotype_views_api() {
 function tripal_phenotype_views_api() {
   return array(
   return array(

+ 6 - 1
tripal_phenotype/tripal_phenotype.views.inc

@@ -24,6 +24,8 @@
  *   definitions keyed by chado/tripal table name. Each table definition
  *   definitions keyed by chado/tripal table name. Each table definition
  *   includes basic details about the table, fields in that table and
  *   includes basic details about the table, fields in that table and
  *   relationships between that table and others (joins)
  *   relationships between that table and others (joins)
+ *
+ * @ingroup tripal_phenotype_views
  */
  */
 function tripal_phenotype_views_data()  {
 function tripal_phenotype_views_data()  {
   $data = array();
   $data = array();
@@ -77,6 +79,8 @@ function tripal_phenotype_views_data()  {
  *   "how a field should be filtered", "how a field should be sorted"
  *   "how a field should be filtered", "how a field should be sorted"
  *
  *
  * @return: An array of handler definitions
  * @return: An array of handler definitions
+ *
+ * @ingroup tripal_phenotype_views
  */
  */
 function tripal_phenotype_views_handlers() {
 function tripal_phenotype_views_handlers() {
   return array(
   return array(
@@ -91,7 +95,8 @@ function tripal_phenotype_views_handlers() {
 
 
 /**
 /**
  *
  *
- * @ingroup tripal_feature_views
+ *
+ * @ingroup tripal_phenotype_views
  */
  */
 function tripal_phenotype_views_default_views() {
 function tripal_phenotype_views_default_views() {
   $views = array();
   $views = array();

+ 59 - 36
tripal_project/tripal_project.module

@@ -10,6 +10,9 @@ require('api/tripal_project.api.inc');
  *
  *
  * For documentation regarding the Chado General module:
  * For documentation regarding the Chado General module:
  * @see http://gmod.org/wiki/Chado_General_Module
  * @see http://gmod.org/wiki/Chado_General_Module
+ *
+ * @defgroup tripal_project Project Module
+ * @ingroup tripal_modules
  */
  */
 
 
 /**
 /**
@@ -19,6 +22,8 @@ require('api/tripal_project.api.inc');
  *  for this module which then includes tripal_project.views.inc where all the
  *  for this module which then includes tripal_project.views.inc where all the
  *  views integration code is
  *  views integration code is
  *
  *
+ * @ingroup tripal_project
+ *
  */
  */
 function tripal_project_views_api() {
 function tripal_project_views_api() {
   return array(
   return array(
@@ -28,12 +33,14 @@ function tripal_project_views_api() {
 
 
 /**
 /**
  * Implements hook_menu
  * Implements hook_menu
+ *
+ * @ingroup tripal_project
  */
  */
 function tripal_project_menu() {
 function tripal_project_menu() {
   $items[ 'admin/tripal/tripal_project' ]= array(
   $items[ 'admin/tripal/tripal_project' ]= array(
     'title' => 'Projects',
     'title' => 'Projects',
     'page callback' => 'theme',
     'page callback' => 'theme',
-    'page arguments' => array('tripal_project_admin'),   
+    'page arguments' => array('tripal_project_admin'),
     'access arguments' => array('adminster tripal projects'),
     'access arguments' => array('adminster tripal projects'),
     'type' => MENU_NORMAL_ITEM
     'type' => MENU_NORMAL_ITEM
   );
   );
@@ -55,6 +62,8 @@ function tripal_project_menu() {
  *  This function sets the permission for the user to access the information in the database.
  *  This function sets the permission for the user to access the information in the database.
  *  This includes creating, inserting, deleting and updating of information in the database
  *  This includes creating, inserting, deleting and updating of information in the database
  *
  *
+ *
+ * @ingroup tripal_project
  */
  */
 function tripal_project_perm() {
 function tripal_project_perm() {
   return array(
   return array(
@@ -83,6 +92,8 @@ function tripal_project_perm() {
  *  @return
  *  @return
  *    True if a operation was performed
  *    True if a operation was performed
  *
  *
+ *
+ * @ingroup tripal_project
  */
  */
 function chado_project_access($op, $node, $account) {
 function chado_project_access($op, $node, $account) {
 
 
@@ -120,6 +131,8 @@ function chado_project_access($op, $node, $account) {
  * that the title(Project Name) and body(Description) set to true so that they information can be
  * that the title(Project Name) and body(Description) set to true so that they information can be
  * entered
  * entered
  *
  *
+ *
+ * @ingroup tripal_project
  */
  */
 function tripal_project_node_info() {
 function tripal_project_node_info() {
   return array(
   return array(
@@ -146,7 +159,7 @@ function tripal_project_theme() {
     'tripal_project_base' => array(
     'tripal_project_base' => array(
       'arguments' => array('node' => NULL),
       'arguments' => array('node' => NULL),
       'template' => 'tripal_project_base',
       'template' => 'tripal_project_base',
-    ), 
+    ),
     'tripal_project_contact' => array(
     'tripal_project_contact' => array(
        'arguments' => array('node' => NULL),
        'arguments' => array('node' => NULL),
        'template' => 'tripal_project_contact',
        'template' => 'tripal_project_contact',
@@ -164,9 +177,9 @@ function tripal_project_theme() {
        'template' => 'tripal_project_properties',
        'template' => 'tripal_project_properties',
     ),
     ),
     'tripal_project_admin' => array(
     'tripal_project_admin' => array(
-      'template' => 'tripal_project_admin',  
-      'arguments' =>  array(NULL),  
-      'path' => drupal_get_path('module', 'tripal_project') . '/theme' 
+      'template' => 'tripal_project_admin',
+      'arguments' =>  array(NULL),
+      'path' => drupal_get_path('module', 'tripal_project') . '/theme'
     ),
     ),
   );
   );
 }
 }
@@ -185,6 +198,8 @@ function tripal_project_theme() {
  *  @return $form
  *  @return $form
  *    An array as described by the Drupal Form API
  *    An array as described by the Drupal Form API
  *
  *
+ *
+ * @ingroup tripal_project
  */
  */
 function chado_project_form(&$node, $form_state) {
 function chado_project_form(&$node, $form_state) {
   $form = array();
   $form = array();
@@ -199,7 +214,7 @@ function chado_project_form(&$node, $form_state) {
   // the projectprop table and leave the project.description field blank.
   // the projectprop table and leave the project.description field blank.
   // however, for backwards compatibitily, we check to see if the description
   // however, for backwards compatibitily, we check to see if the description
   // is in the $node->body field. If it is we'll use that.  When the node is
   // is in the $node->body field. If it is we'll use that.  When the node is
-  // edited the text will be moved out of the body and into the projectprop 
+  // edited the text will be moved out of the body and into the projectprop
   // table where it should belong.
   // table where it should belong.
   if ($node->body) {
   if ($node->body) {
     $project_description = $node->body;
     $project_description = $node->body;
@@ -227,7 +242,7 @@ function chado_project_form(&$node, $form_state) {
     '#default_value' => $node->title,
     '#default_value' => $node->title,
     '#weight'        => 1
     '#weight'        => 1
   );
   );
- 
+
   $form['project_description']= array(
   $form['project_description']= array(
     '#type'          => 'textarea',
     '#type'          => 'textarea',
     '#title'         => t('Project Description'),
     '#title'         => t('Project Description'),
@@ -238,7 +253,7 @@ function chado_project_form(&$node, $form_state) {
   );
   );
 
 
   return $form;
   return $form;
- 
+
 }
 }
 /**
 /**
  *  validates submission of form when adding or updating a project node
  *  validates submission of form when adding or updating a project node
@@ -267,13 +282,15 @@ function chado_project_validate($node) {
  *  @parm $node
  *  @parm $node
  *    Then node that has the information stored within, accessed given the nid
  *    Then node that has the information stored within, accessed given the nid
  *
  *
+ *
+ * @ingroup tripal_project
  */
  */
 function chado_project_insert($node) {
 function chado_project_insert($node) {
 
 
   if ($node->project_id) {
   if ($node->project_id) {
     $project['project_id'] = $node->project_id;
     $project['project_id'] = $node->project_id;
   }
   }
-  else {    
+  else {
     $values = array(
     $values = array(
       'name' => $node->title,
       'name' => $node->title,
       'description' => '',
       'description' => '',
@@ -283,7 +300,7 @@ function chado_project_insert($node) {
 
 
   if ($project) {
   if ($project) {
      // add the description property
      // add the description property
-    tripal_project_insert_property($project['project_id'], 'project_description', 
+    tripal_project_insert_property($project['project_id'], 'project_description',
       $node->project_description);
       $node->project_description);
 
 
     // make sure the entry for this feature doesn't already exist in the chado_project table
     // make sure the entry for this feature doesn't already exist in the chado_project table
@@ -311,17 +328,19 @@ function chado_project_insert($node) {
  * The node which is to be deleted, only chado project and chado_project need to be dealt with
  * The node which is to be deleted, only chado project and chado_project need to be dealt with
  * since the drupal node is deleted automagically
  * since the drupal node is deleted automagically
  *
  *
+ *
+ * @ingroup tripal_project
  */
  */
 function chado_project_delete($node) {
 function chado_project_delete($node) {
 
 
   $project_id = chado_get_id_for_node('project', $node);
   $project_id = chado_get_id_for_node('project', $node);
-  
+
   // if we don't have a project id for this node then this isn't a node of
   // if we don't have a project id for this node then this isn't a node of
   // type chado_project or the entry in the chado_project table was lost.
   // type chado_project or the entry in the chado_project table was lost.
   if (!$project_id) {
   if (!$project_id) {
     return;
     return;
   }
   }
-  
+
   // Remove data from {chado_project}, {node} and {node_revisions} tables of
   // Remove data from {chado_project}, {node} and {node_revisions} tables of
   // drupal database
   // drupal database
   $sql_del = "DELETE FROM {chado_project} ".
   $sql_del = "DELETE FROM {chado_project} ".
@@ -340,7 +359,7 @@ function chado_project_delete($node) {
 
 
   // Remove data from project and projectprop tables of chado database as well
   // Remove data from project and projectprop tables of chado database as well
   chado_query("DELETE FROM {projectprop} WHERE project_id = %d", $project_id);
   chado_query("DELETE FROM {projectprop} WHERE project_id = %d", $project_id);
-  chado_query("DELETE FROM {project} WHERE project_id = %d", $project_id);  
+  chado_query("DELETE FROM {project} WHERE project_id = %d", $project_id);
 }
 }
 
 
 /**
 /**
@@ -350,6 +369,8 @@ function chado_project_delete($node) {
  *  The node which is to have its containing information updated when the user modifies information
  *  The node which is to have its containing information updated when the user modifies information
  *  pertaining to the specific project
  *  pertaining to the specific project
  *
  *
+ *
+ * @ingroup tripal_project
  */
  */
 function chado_project_update($node) {
 function chado_project_update($node) {
  if ($node->revision) {
  if ($node->revision) {
@@ -368,7 +389,7 @@ function chado_project_update($node) {
   );
   );
   $status = tripal_core_chado_update('project', $match, $values);
   $status = tripal_core_chado_update('project', $match, $values);
   tripal_project_update_property($project_id, 'project_description', $node->project_description, 1);
   tripal_project_update_property($project_id, 'project_description', $node->project_description, 1);
-  
+
 
 
 }
 }
 
 
@@ -381,6 +402,8 @@ function chado_project_update($node) {
  * @return $node
  * @return $node
  *   The node, containing the loaded project with the current nid
  *   The node, containing the loaded project with the current nid
  *
  *
+ *
+ * @ingroup tripal_project
  */
  */
 function chado_project_load($node) {
 function chado_project_load($node) {
 
 
@@ -413,13 +436,13 @@ function tripal_project_block($op = 'list', $delta = '0', $edit = array()) {
 
 
     $blocks['projectprops']['info'] = t('Tripal Project Properties');
     $blocks['projectprops']['info'] = t('Tripal Project Properties');
     $blocks['projectprops']['cache'] = BLOCK_NO_CACHE;
     $blocks['projectprops']['cache'] = BLOCK_NO_CACHE;
-    
+
     $blocks['projectpubs']['info'] = t('Tripal Project Publications');
     $blocks['projectpubs']['info'] = t('Tripal Project Publications');
     $blocks['projectpubs']['cache'] = BLOCK_NO_CACHE;
     $blocks['projectpubs']['cache'] = BLOCK_NO_CACHE;
-    
+
     $blocks['projectcont']['info'] = t('Tripal Project Contact');
     $blocks['projectcont']['info'] = t('Tripal Project Contact');
     $blocks['projectcont']['cache'] = BLOCK_NO_CACHE;
     $blocks['projectcont']['cache'] = BLOCK_NO_CACHE;
-    
+
     $blocks['projectrels']['info'] = t('Tripal Project Relationships');
     $blocks['projectrels']['info'] = t('Tripal Project Relationships');
     $blocks['projectrels']['cache'] = BLOCK_NO_CACHE;
     $blocks['projectrels']['cache'] = BLOCK_NO_CACHE;
 
 
@@ -466,7 +489,7 @@ function tripal_project_block($op = 'list', $delta = '0', $edit = array()) {
 function tripal_project_preprocess_tripal_project_relationships(&$variables) {
 function tripal_project_preprocess_tripal_project_relationships(&$variables) {
   // we want to provide a new variable that contains the matched projects.
   // we want to provide a new variable that contains the matched projects.
   $project = $variables['node']->project;
   $project = $variables['node']->project;
-   
+
   // normally we would use tripal_core_expand_chado_vars to expand our
   // normally we would use tripal_core_expand_chado_vars to expand our
   // organism object and add in the relationships, however whan a large
   // organism object and add in the relationships, however whan a large
   // number of relationships are present this significantly slows the
   // number of relationships are present this significantly slows the
@@ -477,7 +500,7 @@ function tripal_project_preprocess_tripal_project_relationships(&$variables) {
       INNER JOIN project P       ON PR.object_project_id = P.project_id
       INNER JOIN project P       ON PR.object_project_id = P.project_id
       INNER JOIN cvterm CVT      ON PR.type_id           = CVT.cvterm_id
       INNER JOIN cvterm CVT      ON PR.type_id           = CVT.cvterm_id
       LEFT JOIN chado_project CP ON P.project_id         = CP.project_id
       LEFT JOIN chado_project CP ON P.project_id         = CP.project_id
-    WHERE PR.subject_project_id = %d      
+    WHERE PR.subject_project_id = %d
   ";
   ";
   $as_subject = chado_query($sql, $project->project_id);
   $as_subject = chado_query($sql, $project->project_id);
   $sql = "
   $sql = "
@@ -486,48 +509,48 @@ function tripal_project_preprocess_tripal_project_relationships(&$variables) {
       INNER JOIN project P       ON PR.subject_project_id = P.project_id
       INNER JOIN project P       ON PR.subject_project_id = P.project_id
       INNER JOIN cvterm CVT      ON PR.type_id            = CVT.cvterm_id
       INNER JOIN cvterm CVT      ON PR.type_id            = CVT.cvterm_id
       LEFT JOIN chado_project CP ON P.project_id          = CP.project_id
       LEFT JOIN chado_project CP ON P.project_id          = CP.project_id
-    WHERE PR.object_project_id = %d      
+    WHERE PR.object_project_id = %d
   ";
   ";
-  $as_object = chado_query($sql, $project->project_id);   
-  
+  $as_object = chado_query($sql, $project->project_id);
+
   // combine both object and subject relationshisp into a single array
   // combine both object and subject relationshisp into a single array
   $relationships = array();
   $relationships = array();
   $relationships['object'] = array();
   $relationships['object'] = array();
   $relationships['subject'] = array();
   $relationships['subject'] = array();
-  
+
   // iterate through the object relationships
   // iterate through the object relationships
   while ($relationship = db_fetch_object($as_object)) {
   while ($relationship = db_fetch_object($as_object)) {
-     
+
      // get the relationship and child types
      // get the relationship and child types
      $rel_type = t(preg_replace('/_/', " ", $relationship->rel_type));
      $rel_type = t(preg_replace('/_/', " ", $relationship->rel_type));
      $sub_type = t(preg_replace('/_/', " ", $relationship->sub_type));
      $sub_type = t(preg_replace('/_/', " ", $relationship->sub_type));
-     
+
      if (!array_key_exists($rel_type, $relationships['object'])) {
      if (!array_key_exists($rel_type, $relationships['object'])) {
-       $relationships['object'][$rel_type] = array();   
+       $relationships['object'][$rel_type] = array();
      }
      }
      if (!array_key_exists($sub_type, $relationships['object'][$rel_type])) {
      if (!array_key_exists($sub_type, $relationships['object'][$rel_type])) {
-       $relationships['object'][$rel_type][$sub_type] = array();   
+       $relationships['object'][$rel_type][$sub_type] = array();
      }
      }
-     $relationships['object'][$rel_type][$sub_type][] = $relationship;     
+     $relationships['object'][$rel_type][$sub_type][] = $relationship;
   }
   }
-  
+
   // now add in the subject relationships
   // now add in the subject relationships
   while ($relationship = db_fetch_object($as_subject)) {
   while ($relationship = db_fetch_object($as_subject)) {
-     
+
      // get the relationship and child types
      // get the relationship and child types
      $rel_type = t(preg_replace('/_/', " ", $relationship->rel_type));
      $rel_type = t(preg_replace('/_/', " ", $relationship->rel_type));
      $obj_type = t(preg_replace('/_/', " ", $relationship->obj_type));
      $obj_type = t(preg_replace('/_/', " ", $relationship->obj_type));
-     
+
      if (!array_key_exists($rel_type, $relationships['subject'])) {
      if (!array_key_exists($rel_type, $relationships['subject'])) {
-       $relationships['subject'][$rel_type] = array();   
+       $relationships['subject'][$rel_type] = array();
      }
      }
      if (!array_key_exists($obj_type, $relationships['subject'][$rel_type])) {
      if (!array_key_exists($obj_type, $relationships['subject'][$rel_type])) {
-       $relationships['subject'][$rel_type][$obj_type] = array();   
+       $relationships['subject'][$rel_type][$obj_type] = array();
      }
      }
-     $relationships['subject'][$rel_type][$obj_type][] = $relationship;     
+     $relationships['subject'][$rel_type][$obj_type][] = $relationship;
   }
   }
-  
-  
+
+
   $project->all_relationships = $relationships;
   $project->all_relationships = $relationships;
 
 
 }
 }

+ 6 - 1
tripal_project/tripal_project.views.inc

@@ -24,6 +24,8 @@
  *   definitions keyed by chado/tripal table name. Each table definition
  *   definitions keyed by chado/tripal table name. Each table definition
  *   includes basic details about the table, fields in that table and
  *   includes basic details about the table, fields in that table and
  *   relationships between that table and others (joins)
  *   relationships between that table and others (joins)
+ *
+ * @ingroup tripal_project_views
  */
  */
 function tripal_project_views_data()  {
 function tripal_project_views_data()  {
   $data = array();
   $data = array();
@@ -74,6 +76,8 @@ function tripal_project_views_data()  {
  *   "how a field should be filtered", "how a field should be sorted"
  *   "how a field should be filtered", "how a field should be sorted"
  *
  *
  * @return: An array of handler definitions
  * @return: An array of handler definitions
+ *
+ * @ingroup tripal_project_views
  */
  */
 function tripal_project_views_handlers() {
 function tripal_project_views_handlers() {
   return array(
   return array(
@@ -88,7 +92,8 @@ function tripal_project_views_handlers() {
 
 
 /**
 /**
  *
  *
- * @ingroup tripal_feature_views
+ *
+ * @ingroup tripal_project_views
  */
  */
 function tripal_project_views_default_views() {
 function tripal_project_views_default_views() {
   $views = array();
   $views = array();

+ 33 - 0
tripal_views/api/tripal_views.api.inc

@@ -3,6 +3,9 @@
 /**
 /**
  * @file
  * @file
  * API functions for Tripal Views Integration
  * API functions for Tripal Views Integration
+ *
+ * @defgroup tripal_views_api Tripal Views Module API
+ * @ingroup tripal_api
  */
  */
 
 
 /**
 /**
@@ -18,6 +21,8 @@
  * @return
  * @return
  *   returns the lowest priority.  If the table has not been integrated, a priority of 10
  *   returns the lowest priority.  If the table has not been integrated, a priority of 10
  *   is returned.
  *   is returned.
+ *
+ * @ingroup tripal_views_api
  */
  */
 function tripal_views_get_table_lightest_priority($table_name) {
 function tripal_views_get_table_lightest_priority($table_name) {
 
 
@@ -44,6 +49,8 @@ function tripal_views_get_table_lightest_priority($table_name) {
  *
  *
  * @return
  * @return
  *   On success, the setup_id to use for integration of this table; otherwise FALSE
  *   On success, the setup_id to use for integration of this table; otherwise FALSE
+ *
+ * @ingroup tripal_views_api
  */
  */
 function tripal_views_get_lightest_priority_setup($table_name) {
 function tripal_views_get_lightest_priority_setup($table_name) {
 
 
@@ -68,6 +75,8 @@ function tripal_views_get_lightest_priority_setup($table_name) {
  *
  *
  * @return
  * @return
  *   On success, the setup_id to use for integration of this table; otherwise FALSE
  *   On success, the setup_id to use for integration of this table; otherwise FALSE
+ *
+ * @ingroup tripal_views_api
  */
  */
 function tripal_views_get_setup_id($table_name, $priority) {
 function tripal_views_get_setup_id($table_name, $priority) {
 
 
@@ -93,6 +102,8 @@ function tripal_views_get_setup_id($table_name, $priority) {
  *  If the table is already integrated, the setup_id of the existing integration
  *  If the table is already integrated, the setup_id of the existing integration
  *  record is returned (If priority is not specified this will be the lightest record);
  *  record is returned (If priority is not specified this will be the lightest record);
  *  Otherwise the table is not already integrated and FALSE is returned.
  *  Otherwise the table is not already integrated and FALSE is returned.
+ *
+ * @ingroup tripal_views_api
  */
  */
 function tripal_views_is_integrated($table_name, $priority = NULL) {
 function tripal_views_is_integrated($table_name, $priority = NULL) {
 
 
@@ -121,6 +132,8 @@ function tripal_views_is_integrated($table_name, $priority = NULL) {
  *   The name of the table associated with this setup
  *   The name of the table associated with this setup
  *
  *
  * @return TRUE is this is the lightest priority; FALSE otherwise
  * @return TRUE is this is the lightest priority; FALSE otherwise
+ *
+ * @ingroup tripal_views_api
  */
  */
 function tripal_views_is_lightest_priority_setup($setup_id, $table_name) {
 function tripal_views_is_lightest_priority_setup($setup_id, $table_name) {
 
 
@@ -175,6 +188,8 @@ function tripal_views_is_lightest_priority_setup($setup_id, $table_name) {
   );
   );
   tripal_views_integration_add_entry($defn_array);
   tripal_views_integration_add_entry($defn_array);
  * @endcode
  * @endcode
+ *
+ * @ingroup tripal_views_api
  */
  */
 function tripal_views_integration_add_entry($defn_array) {
 function tripal_views_integration_add_entry($defn_array) {
   $no_errors = TRUE;
   $no_errors = TRUE;
@@ -350,6 +365,8 @@ function tripal_views_integration_add_entry($defn_array) {
  *
  *
  * @return
  * @return
  *   A views integration definition array as used by tripal_views_integration_add_entry()
  *   A views integration definition array as used by tripal_views_integration_add_entry()
+ *
+ * @ingroup tripal_views_api
  */
  */
 function tripal_views_integration_export_entry($setup_id) {
 function tripal_views_integration_export_entry($setup_id) {
 
 
@@ -409,6 +426,8 @@ function tripal_views_integration_export_entry($setup_id) {
  *
  *
  * @return
  * @return
  *   TRUE on Success; FALSE otherwise
  *   TRUE on Success; FALSE otherwise
+ *
+ * @ingroup tripal_views_api
  */
  */
 function tripal_views_integration_remove_entry_by_table_name($table_name, $priority) {
 function tripal_views_integration_remove_entry_by_table_name($table_name, $priority) {
 
 
@@ -432,6 +451,8 @@ function tripal_views_integration_remove_entry_by_table_name($table_name, $prior
  *
  *
  * @param $setup_id
  * @param $setup_id
  *   The setup ID of the views integration entry to remove
  *   The setup ID of the views integration entry to remove
+ *
+ * @ingroup tripal_views_api
  */
  */
 function tripal_views_integration_remove_entry_by_setup_id($setup_id) {
 function tripal_views_integration_remove_entry_by_setup_id($setup_id) {
 
 
@@ -445,6 +466,8 @@ function tripal_views_integration_remove_entry_by_setup_id($setup_id) {
 /**
 /**
  * Integrate all chado tables in the schema api.  This integration only occurs
  * Integrate all chado tables in the schema api.  This integration only occurs
  * once and sets all Chado tables to a priority of 10
  * once and sets all Chado tables to a priority of 10
+ *
+ * @ingroup tripal_views_api
  */
  */
 function tripal_views_integrate_all_chado_tables() {
 function tripal_views_integrate_all_chado_tables() {
 
 
@@ -469,6 +492,8 @@ function tripal_views_integrate_all_chado_tables() {
  * @return
  * @return
  *   The tripal views integration array which is the parameter for
  *   The tripal views integration array which is the parameter for
  *   tripal_views_integration_add_entry($defn_array)
  *   tripal_views_integration_add_entry($defn_array)
+ *
+ * @ingroup tripal_views_api
  */
  */
 function tripal_views_get_integration_array_for_chado_table($table_name, $base_table = TRUE, $priority = 9) {
 function tripal_views_get_integration_array_for_chado_table($table_name, $base_table = TRUE, $priority = 9) {
 
 
@@ -594,6 +619,8 @@ function tripal_views_get_integration_array_for_chado_table($table_name, $base_t
  *
  *
  * @param &$defn_array
  * @param &$defn_array
  *   The current definition array for a given table
  *   The current definition array for a given table
+ *
+ * @ingroup tripal_views_api
  */
  */
 function tripal_views_add_node_relationship_to_chado_table_integration($defn_array) {
 function tripal_views_add_node_relationship_to_chado_table_integration($defn_array) {
   $integrations[$defn_array['table']] = $defn_array;
   $integrations[$defn_array['table']] = $defn_array;
@@ -700,6 +727,8 @@ function tripal_views_add_node_relationship_to_chado_table_integration($defn_arr
  * @param $template_priority
  * @param $template_priority
  *   The priority of the template to be used for the clone; this is an existing integration.
  *   The priority of the template to be used for the clone; this is an existing integration.
  *   If no priority is supplied then the lightest priority will be used.
  *   If no priority is supplied then the lightest priority will be used.
+ *
+ * @ingroup tripal_views_api
  */
  */
 function tripal_views_clone_integration($table_name, $new_priority = NULL, $template_priority = NULL) {
 function tripal_views_clone_integration($table_name, $new_priority = NULL, $template_priority = NULL) {
 
 
@@ -750,6 +779,8 @@ function tripal_views_clone_integration($table_name, $new_priority = NULL, $temp
  *
  *
  * @return
  * @return
  *   TRUE if the field was added successfully; FALSE otherwise
  *   TRUE if the field was added successfully; FALSE otherwise
+ *
+ * @ingroup tripal_views_api
  */
  */
 function tripal_views_add_field_to_integration($table_name, $priority, $field) {
 function tripal_views_add_field_to_integration($table_name, $priority, $field) {
   $no_errors = TRUE;
   $no_errors = TRUE;
@@ -888,6 +919,8 @@ function tripal_views_add_field_to_integration($table_name, $priority, $field) {
  *   The name of the other table involved in the join
  *   The name of the other table involved in the join
  * @param $left_field
  * @param $left_field
  *   The name of the field from the other table involved in the join
  *   The name of the field from the other table involved in the join
+ *
+ * @ingroup tripal_views_api
  */
  */
 function tripal_views_remove_join_from_integration($setup_id, $base_table, $base_field, $left_table, $left_field) {
 function tripal_views_remove_join_from_integration($setup_id, $base_table, $base_field, $left_table, $left_field) {
   db_query(
   db_query(