Ver Fonte

Tripal: Added documentation

laceysanderson há 14 anos atrás
pai
commit
e0500f0746
53 ficheiros alterados com 983 adições e 356 exclusões
  1. 70 20
      tripal_analysis/tripal_analysis.api.inc
  2. 25 10
      tripal_analysis/tripal_analysis.views.inc
  3. 1 1
      tripal_analysis/views/analysis.views.inc
  4. 1 1
      tripal_analysis/views/chado_analysis.views.inc
  5. 1 1
      tripal_analysis/views/misc_tables.views.inc
  6. 1 0
      tripal_core/chado_install.php
  7. 6 0
      tripal_core/chado_tables.schema.inc
  8. 11 2
      tripal_core/cvterms.php
  9. 34 16
      tripal_core/mviews.php
  10. 8 3
      tripal_core/tripal_core.api.inc
  11. 8 0
      tripal_core/tripal_core.install
  12. 0 1
      tripal_core/tripal_core.module
  13. 1 0
      tripal_core/tripal_core.schema.api.inc
  14. 12 1
      tripal_core/tripal_core.views.inc
  15. 34 7
      tripal_cv/charts.php
  16. 45 21
      tripal_cv/obo_loader.php
  17. 27 15
      tripal_cv/trees.php
  18. 19 11
      tripal_cv/tripal_cv.api.inc
  19. 21 7
      tripal_cv/tripal_cv.install
  20. 97 46
      tripal_cv/tripal_cv.module
  21. 25 6
      tripal_cv/tripal_cv.views.inc
  22. 2 0
      tripal_cv/views/cv.views.inc
  23. 2 0
      tripal_cv/views/cvterm.views.inc
  24. 4 4
      tripal_db/tripal_db.api.inc
  25. 9 3
      tripal_db/tripal_db.install
  26. 30 10
      tripal_db/tripal_db.module
  27. 19 5
      tripal_db/tripal_db.views.inc
  28. 2 0
      tripal_db/views/db.views.inc
  29. 2 0
      tripal_db/views/dbxref.views.inc
  30. 8 7
      tripal_feature/tripal_feature.api.inc
  31. 24 10
      tripal_feature/tripal_feature.install
  32. 12 2
      tripal_feature/tripal_feature.views.inc
  33. 1 1
      tripal_feature/views/chado_feature.views.inc
  34. 1 1
      tripal_feature/views/feature.views.inc
  35. 1 1
      tripal_feature/views/misc_tables.views.inc
  36. 74 19
      tripal_library/tripal_library.api.inc
  37. 15 5
      tripal_library/tripal_library.install
  38. 116 41
      tripal_library/tripal_library.module
  39. 19 4
      tripal_library/tripal_library.views.inc
  40. 1 0
      tripal_library/views/chado_library.views.inc
  41. 2 0
      tripal_library/views/library.views.inc
  42. 2 0
      tripal_library/views/misc_tables.views.inc
  43. 7 1
      tripal_organism/tripal_organism.api.inc
  44. 15 5
      tripal_organism/tripal_organism.install
  45. 95 34
      tripal_organism/tripal_organism.module
  46. 19 5
      tripal_organism/tripal_organism.views.inc
  47. 1 0
      tripal_organism/views/chado_organism.views.inc
  48. 2 0
      tripal_organism/views/organism.views.inc
  49. 25 19
      tripal_stock/tripal_stock.api.inc
  50. 23 7
      tripal_stock/tripal_stock.views.inc
  51. 1 1
      tripal_stock/views/chado_stock.views.inc
  52. 1 1
      tripal_stock/views/misc_tables.views.inc
  53. 1 1
      tripal_stock/views/stock.views.inc

+ 70 - 20
tripal_analysis/tripal_analysis.api.inc

@@ -16,7 +16,7 @@
  * @return
  *    Array describing the analysis table
  *
- * @ingroup tripal_analysis_api
+ * @ingroup tripal_schema_api
  */
 function tripal_analysis_chado_analysis_schema() {
   $description = array();
@@ -42,7 +42,7 @@ function tripal_analysis_chado_analysis_schema() {
  * @return
  *    Array describing the analysisfeature table
  *
- * @ingroup tripal_analysis_api
+ * @ingroup tripal_schema_api
  */
 function tripal_analysis_chado_analysisfeature_schema() {
   $description = array();
@@ -72,7 +72,7 @@ function tripal_analysis_chado_analysisfeature_schema() {
  * @return
  *    Array describing the analysisfeatureprop table
  *
- * @ingroup tripal_analysis_api
+ * @ingroup tripal_schema_api
  */
 function tripal_analysis_chado_analysisfeatureprop_schema() {
   $description = array();
@@ -95,15 +95,15 @@ function tripal_analysis_chado_analysisfeatureprop_schema() {
 
 
  /****************************************************************************
- * Implements hook_chado_analysisprop_schema()
- * Purpose: To add descriptions and foreign keys to default table description
- * Note: This array will be merged with the array from all other implementations
- *
- * @return
- *    Array describing the analysisprop table
- *
- * @ingroup tripal_analysis_api
- */
+  * Implements hook_chado_analysisprop_schema()
+  * Purpose: To add descriptions and foreign keys to default table description
+  * Note: This array will be merged with the array from all other implementations
+  *
+  * @return
+  *    Array describing the analysisprop table
+  *
+  * @ingroup tripal_schema_api
+  */
 function tripal_analysis_chado_analysisprop_schema() {
   $description = array();
 
@@ -123,35 +123,85 @@ function tripal_analysis_chado_analysisprop_schema() {
 
   return $description;
 }
+
 /**
-*
+ * Retrieve properties of a given type for a given analysis
+ *
+ * @param $analysis_id
+ *    The analysis_id of the properties you would like to retrieve
+ * @param $property
+ *    The cvterm name of the properties to retrieve
+ *
+ * @return
+ *    An analysis chado variable with the specified properties expanded
  *
  * @ingroup tripal_analysis_api
-*/
+ */
 function tripal_analysis_get_property($analysis_id,$property){
    return tripal_core_get_property('analysis',$analysis_id,$property,'tripal');
 }
+
 /**
-*
+ * Insert a given property
+ *
+ * @param $analysis_id
+ *   The analysis_id of the property to insert
+ * @param $property
+ *   The cvterm name of the property to insert
+ * @param $value
+ *   The value of the property to insert
+ * @param $update_if_present
+ *   A boolean indicated whether to update the record if it's already present
+ *
+ * @return
+ *   True of success, False otherwise
  *
  * @ingroup tripal_analysis_api
-*/
+ */
 function tripal_analysis_insert_property($analysis_id,$property,$value,$update_if_present = 0){
     return tripal_core_insert_property('analysis',$analysis_id,$property,'tripal',$value,$update_if_present);
 }
+
 /**
-*
+ * Update a given property
+ *
+ * @param $analysis_id
+ *   The analysis_id of the property to update
+ * @param $property
+ *   The cvterm name of the property to update
+ * @param $value
+ *   The value of the property to update
+ * @param $insert_if_missing 
+ *   A boolean indicated whether to insert the record if it's absent
+ *
+ * Note: The property will be identified using the unique combination of the $analysis_id and $property
+ * and then it will be updated with the supplied value
+ *
+ * @return
+ *   True of success, False otherwise
  *
  * @ingroup tripal_analysis_api
-*/
+ */
 function tripal_analysis_update_property($analysis_id,$property,$value,$insert_if_missing = 0){
    return tripal_core_update_property('analysis',$analysis_id,$property,'tripal',$value, $insert_if_missing);
 }
+
 /**
-*
+ * Delete a given property
+ *
+ * @param $analysis_id
+ *   The analysis_id of the property to delete
+ * @param $property
+ *   The cvterm name of the property to delete
+ *
+ * Note: The property will be identified using the unique combination of the $analysis_id and $property
+ * and then it will be deleted
+ *
+ * @return
+ *   True of success, False otherwise 
  *
  * @ingroup tripal_analysis_api
-*/
+ */
 function tripal_analysis_delete_property($analysis_id,$property){
    return tripal_core_delete_property('analysis',$analysis_id,$property,'tripal');
 }

+ 25 - 10
tripal_analysis/tripal_analysis.views.inc

@@ -9,9 +9,19 @@
  *  Documentation on views integration can be found at 
  *  http://views2.logrus.com/doc/html/index.html.
  */
- 
-/*************************************************************************
+
+/**
+ * @defgroup tripal_analysis_views Analysis Views Integration
+ * @ingroup views
+ * @ingroup tripal_analysis
+ */
+
+require('views/analysis.views.inc');
+require('views/chado_analysis.views.inc');
+require('views/misc_tables.views.inc'); 
+/**
  * Implements hook_views_data()
+ *
  * Purpose: Describe chado/tripal tables & fields to views
  *
  * @return: a data array which follows the structure outlined in the
@@ -20,11 +30,8 @@
  *   includes basic details about the table, fields in that table and
  *   relationships between that table and others (joins)
  *
- * @ingroup tripal_analysis
+ * @ingroup tripal_analysis_views
  */
-require('views/analysis.views.inc');
-require('views/chado_analysis.views.inc');
-require('views/misc_tables.views.inc');
 function tripal_analysis_views_data()  {
   $data = array();
 
@@ -35,16 +42,19 @@ function tripal_analysis_views_data()  {
   return $data;
 }
 
-/*************************************************************************
+/**
  * Implements hook_views_handlers()
+ *
  * Purpose: Register all custom handlers with views
  *   where a handler describes either "the type of field", 
  *   "how a field should be filtered", "how a field should be sorted"
- * @return: An array of handler definitions
  *
- * @ingroup tripal_analysis
+ * @return
+ *   An array of handler definitions
+ *
+ * @ingroup tripal_analysis_views
  */
-function chado_analysis_views_views_handlers() {
+function tripal_analysis_views_views_handlers() {
   return array(
     'info' => array(
       'path' => drupal_get_path('module', 'tripal_analysis') . '/views/handlers',
@@ -60,6 +70,11 @@ function chado_analysis_views_views_handlers() {
   );
 }
 
+/**
+ *
+ *
+ * @ingroup tripal_analysis_views
+ */
 function tripal_analysis_views_default_views () {
   $views = array();
   

+ 1 - 1
tripal_analysis/views/analysis.views.inc

@@ -26,7 +26,7 @@
  *   );
  * @endcode
  *
- * @ingroup tripal_analysis
+ * @ingroup tripal_analysis_views
  */
 function retrieve_analysis_views_data() {
 	global $db_url;

+ 1 - 1
tripal_analysis/views/chado_analysis.views.inc

@@ -8,7 +8,7 @@
  * The main need for description of this table to views is to join chado data with drupal nodes
  *
  *
- * @ingroup tripal_analysis
+ * @ingroup tripal_analysis_views
  */
 function retrieve_chado_analysis_views_data () {
 	global $db_url;

+ 1 - 1
tripal_analysis/views/misc_tables.views.inc

@@ -16,7 +16,7 @@
       ); 
  *   @endcode
  *
- * @ingroup tripal_analysis
+ * @ingroup tripal_analysis_views
  */
 function retrieve_analysis_misc_tables_views_data() {
   $data = array();

+ 1 - 0
tripal_core/chado_install.php

@@ -19,6 +19,7 @@ using chado in a database external to the Drupal database with a 'chado' entry i
    );
    return $form;
 }
+
 /**
 *
 * @ingroup tripal_core

+ 6 - 0
tripal_core/chado_tables.schema.inc

@@ -1,5 +1,11 @@
 <?php
 
+/**
+ * Retrieves the schema for all tables
+ * This function is deprecated
+ *
+ * @ingroup tripal_schema_api
+ */
 function tripal_core_get_chado_schema (){
 
    $schema['organism_dbxref'] = array(

+ 11 - 2
tripal_core/cvterms.php

@@ -121,8 +121,17 @@ function tripal_add_cv($cv_name,$definition){
 }
 
 /************************************************************************
-* Get cvterm_id for a tripal cvterm by passing its name
-*/
+ * Get cvterm_id for a tripal cvterm by passing its name
+ * This function is deprecated
+ *
+ * @param $cvterm
+ *   The name of the cvterm to return
+ *
+ * @return
+ *   A database result for the cvterm?
+ *
+ * @ingroup tripal_cv_api
+ */
 function tripal_get_cvterm_id ($cvterm){
 	$sql = "SELECT CVT.cvterm_id FROM {cvterm} CVT
          	    INNER JOIN cv ON cv.cv_id = CVT.cv_id 

+ 34 - 16
tripal_core/mviews.php

@@ -5,18 +5,24 @@
 
 /**
  * Add a materialized view to the chado database to help speed data access.
- * @param name The name of the materialized view.
- * @param modulename The name of the module submitting the materialized view (e.g. 'tripal_library')
- * @param mv_table The name of the table to add to chado. This is the table that can be queried.
- * @param mv_specs The table definition 
- * @param indexed The columns that are to be indexed
- * @param query The SQL query that loads the materialized view with data
- * @param special_index  
- * function
- * @return nothing
  *
-* @ingroup tripal_core
-*/
+ * @param $name 
+ *   The name of the materialized view.
+ * @param $modulename 
+ *   The name of the module submitting the materialized view (e.g. 'tripal_library')
+ * @param $mv_table 
+ *   The name of the table to add to chado. This is the table that can be queried.
+ * @param $mv_specs 
+ *   The table definition 
+ * @param $indexed 
+ *   The columns that are to be indexed
+ * @param $query 
+ *   The SQL query that loads the materialized view with data
+ * @param $special_index  
+ *   function
+ *
+ * @ingroup tripal_core_api
+ */
 function tripal_add_mview ($name,$modulename,$mv_table,$mv_specs,$indexed,$query,$special_index){
 
    $record = new stdClass();
@@ -62,10 +68,16 @@ function tripal_add_mview ($name,$modulename,$mv_table,$mv_specs,$indexed,$query
    }
 }
 /**
-*
-*
-* @ingroup tripal_core
-*/
+ * Retrieve the materialized view_id given the name
+ *
+ * @param $view_name
+ *   The name of the materialized view
+ *
+ * @return
+ *   The unique identifier for the given view
+ *
+ * @ingroup tripal_core_api
+ */
 function tripal_mviews_get_mview_id ($view_name){
 
    $sql = "SELECT * FROM {tripal_mviews} ".
@@ -117,9 +129,15 @@ function tripal_mviews_action ($op,$mview_id){
    return '';
 }
 /**
+* Update a Materialized View
 *
+* @param $mview_id
+*   The unique identifier for the materialized view to be updated
 *
-* @ingroup tripal_core
+* @return
+*   True if successful, false otherwise
+*
+* @ingroup tripal_core_api
 */
 function tripal_update_mview ($mview_id){
    $sql = "SELECT * FROM {tripal_mviews} WHERE mview_id = %d ";

+ 8 - 3
tripal_core/tripal_core.api.inc

@@ -20,6 +20,11 @@
  * @}
  */
 
+/** 
+ * @defgroup tripal_core_api Tripal Core API
+ * @ingroup tripal_api
+ */
+
 /** 
  * @defgroup tripal_schema_api Tripal Schema API
  * @{
@@ -1296,7 +1301,7 @@ function tripal_core_exclude_field_from_feature_by_default() {
   return array();
 }
 
-/************************************************************************
+/**
  *  Use this function instead of db_query() to avoid switching databases
  *  when making query to the chado database
  */
@@ -1315,7 +1320,7 @@ function chado_query($sql) {
 	return $results;
 }
 
-/************************************************************************
+/**
  * Get chado id for a node. E.g, if you want to get 'analysis_id' from the 
  * 'analysis' table for a synced 'chado_analysis' node, use:
  * $analysis_id = chado_get_id_for_node ('analysis', $node)
@@ -1327,7 +1332,7 @@ function chado_get_id_for_node ($table, $node) {
 	 return db_result(db_query("SELECT $table"."_id FROM {chado_".$table."} WHERE nid = $node->nid"));
 }
 
-/************************************************************************
+/**
  *  Get node id for a chado feature/organism/analysis. E.g, if you want to
  *  get the node id for an analysis, use:
  *  $nid = chado_get_node_id ('analysis', $analysis_id)

+ 8 - 0
tripal_core/tripal_core.install

@@ -2,6 +2,8 @@
 
 /************************************************************************
 *  Implementation of hook_install();
+* 
+* @ingroup tripal_core
 */
 function tripal_core_install(){
 
@@ -22,6 +24,8 @@ function tripal_core_install(){
 
 /************************************************************************
 * Implementation of hook_schema().
+*
+* @ingroup tripal_core
 */
 function tripal_core_schema() {
    $schema = tripal_core_get_schemas();
@@ -29,6 +33,8 @@ function tripal_core_schema() {
 }
 /************************************************************************
 * Implementation of hook_uninstall()
+*
+* @ingroup tripal_core
 */
 function tripal_core_uninstall(){
    drupal_uninstall_schema('tripal_core');
@@ -39,6 +45,8 @@ function tripal_core_uninstall(){
 * correctly.  By putting the table definitions in a separate function we
 * can easily provide the entire list for hook_install or individual
 * tables for an update.
+*
+* @ingroup tripal_core
 */
 function tripal_core_get_schemas (){  
   $schema = array();

+ 0 - 1
tripal_core/tripal_core.module

@@ -4,7 +4,6 @@ require_once "jobs.php";
 require_once "mviews.php";
 require_once "cvterms.php";
 require_once "chado_install.php";
-require_once "bulk_loader.php";
 
 require_once "tripal_core.api.inc";
 

+ 1 - 0
tripal_core/tripal_core.schema.api.inc

@@ -9,6 +9,7 @@
 
 /**
  *
+ * @ingroup tripal_schema_api
  */
 function tripal_core_get_chado_tables() {
   if(is_array($db_url) and array_key_exists('chado',$db_url)){

+ 12 - 1
tripal_core/tripal_core.views.inc

@@ -1,10 +1,18 @@
 <?php
 
+/**
+ * @defgroup views Views Integration
+ * @{
+ * Provide rules for formatting and composition of fields
+ * @}
+ */
+ 
 /**
  * @defgroup views_field_handlers Views Field Handlers
  * @{
  * Provide rules for formatting and composition of fields
  * @}
+ * @ingroup views
  */
 
 /**
@@ -12,6 +20,7 @@
  * @{
  * Provide the ability to filter based on specified data
  * @}
+ * @ingroup views
  */
 
 /**
@@ -19,13 +28,15 @@
  * @{
  * Provide methods describing how specific data should be sorted
  * @}
+ * @ingroup views
  */
 
 /**
- * @defgroup views_argument_handlers Views Sort Handlers
+ * @defgroup views_argument_handlers Views Arguement Handlers
  * @{
  * Provide the ability to filter pased on arguments in the path of the view
  * @}
+ * @ingroup views
  */
  
 /**

+ 34 - 7
tripal_cv/charts.php

@@ -1,9 +1,17 @@
 <?php
 
 
-/*************************************************************************
-*
-*/
+/**
+ * Generates JSON used for generating a chart
+ *
+ * @param $chart_id
+ *   The unique identifier for the chart
+ *
+ * @return
+ *   JSON array needed for the js caller
+ *
+ * @ingroup tripal_cv
+ */
 function tripal_cv_chart($chart_id){
   // parse out the tripal module name from the chart_id to find out 
   // which Tripal "hook" to call:
@@ -23,10 +31,29 @@ function tripal_cv_chart($chart_id){
 
 }
 
-/*************************************************************************
-*  name: tripal_cv_chart
-*  description:  
-*/
+ /**
+  * Determines the counts needed for the chart to be rendered
+  *
+  * @param $cnt_table
+  *   The table containing counts for the various cvterms
+  * @param $fk_column
+  *   The column in the count table to join it to the cvterm table
+  * @param $cnt_column
+  *   The name of the column in the count table containing the counts
+  * @param $filter
+  *   A Filter string. Default is (1=1).
+  * @param $title
+  *   The title of the chart to be rendered.
+  * @param $type
+  *   The type of chart to be rendered. Default is p3 (pie chart).
+  * @param $size
+  *   The size of the chart to be rendered. Default is 300x75.
+  *
+  * @return 
+  *   An options array needed to render the chart specified
+  *
+  * @ingroup tripal_cv_api
+  */
 function tripal_cv_count_chart($cnt_table, $fk_column,
    $cnt_column, $filter = null, $title = '', $type = 'p3', $size='300x75') {
 

+ 45 - 21
tripal_cv/obo_loader.php

@@ -1,7 +1,13 @@
 <?php
 
-/*************************************************************************
+/** 
+ * @defgroup tripal_obo_loader Tripal Ontology Loader
+ * @ingroup tripal_cv
+ */
+ 
+/**
 *
+* @ingroup tripal_obo_loader
 */
 function tripal_cv_load_obo_v1_2_id($obo_id,$jobid = NULL){
 
@@ -27,8 +33,9 @@ function tripal_cv_load_obo_v1_2_id($obo_id,$jobid = NULL){
       }
    }  
 }
-/*************************************************************************
+/**
 *
+* @ingroup tripal_obo_loader
 */
 function tripal_cv_load_obo_v1_2_file($obo_name,$file,$jobid = NULL,$is_new = 1){
    $newcvs = array();
@@ -41,8 +48,9 @@ function tripal_cv_load_obo_v1_2_file($obo_name,$file,$jobid = NULL,$is_new = 1)
    tripal_cv_load_update_cvtermpath($newcvs,$jobid);
    print "Ontology Sucessfully loaded!\n";  
 }
-/*************************************************************************
+/**
 *
+* @ingroup tripal_obo_loader
 */
 function tripal_cv_load_obo_v1_2_url($obo_name,$url,$jobid = NULL,$is_new = 1){
 
@@ -74,8 +82,9 @@ function tripal_cv_load_obo_v1_2_url($obo_name,$url,$jobid = NULL,$is_new = 1){
 
    print "Ontology Sucessfully loaded!\n";
 }
-/*************************************************************************
+/**
 *
+* @ingroup tripal_obo_loader
 */
 function tripal_cv_load_update_cvtermpath($newcvs,$jobid){
 
@@ -84,15 +93,16 @@ function tripal_cv_load_update_cvtermpath($newcvs,$jobid){
       tripal_cv_update_cvtermpath($cvid, $jobid);
    }
 }
-/*************************************************************************
+/**
 *
 */
 function tripal_cv_load_obo_add_ref($name,$path){
    $isql = "INSERT INTO tripal_cv_obo (name,path) VALUES ('%s','%s')";
    db_query($isql,$name,$path);
 }
-/*************************************************************************
+/**
 *
+* @ingroup tripal_obo_loader
 */
 function tripal_cv_load_obo_v1_2($file,$jobid = NULL,&$newcvs) {
 
@@ -137,16 +147,18 @@ function tripal_cv_load_obo_v1_2($file,$jobid = NULL,&$newcvs) {
    }
    return tripal_cv_obo_loader_done();
 }
-/*************************************************************************
+/**
 *
+* @ingroup tripal_obo_loader
 */
 function tripal_cv_obo_quiterror ($message){
    print "ERROR: $message\n";
    db_query("set search_path to public");  
    exit;
 }
-/*************************************************************************
+/**
 *
+* @ingroup tripal_obo_loader
 */
 function tripal_cv_obo_loader_done (){
    // return the search path to normal
@@ -154,8 +166,9 @@ function tripal_cv_obo_loader_done (){
    db_query("set search_path to public");  
    return '';
 }
-/*************************************************************************
+/**
 *
+* @ingroup tripal_obo_loader
 */
 function tripal_cv_obo_process_terms($terms,$defaultcv,$obo,$jobid=null,&$newcvs){
 
@@ -178,10 +191,11 @@ function tripal_cv_obo_process_terms($terms,$defaultcv,$obo,$jobid=null,&$newcvs
    }
    return 1;
 }
-/*************************************************************************
+
+/**
 *
+* @ingroup tripal_obo_loader
 */
-
 function tripal_cv_obo_process_term($term,$defaultcv,$obo,$is_relationship=0,&$newcvs){
 
    // add the cvterm
@@ -300,8 +314,9 @@ function tripal_cv_obo_process_term($term,$defaultcv,$obo,$is_relationship=0,&$n
    }
    return 1;
 }
-/*************************************************************************
+/**
 *
+* @ingroup tripal_obo_loader
 */
 function tripal_cv_obo_add_db($dbname){
 
@@ -315,8 +330,9 @@ function tripal_cv_obo_add_db($dbname){
    }
    return $db;
 }
-/*************************************************************************
+/**
 *
+* @ingroup tripal_obo_loader
 */
 function tripal_cv_obo_add_cv($name,$comment){
 
@@ -342,8 +358,9 @@ function tripal_cv_obo_add_cv($name,$comment){
    }
    return $cv;
 }
-/*************************************************************************
+/**
 *
+* @ingroup tripal_obo_loader
 */
 function tripal_cv_obo_add_cvterm_prop($cvterm,$property,$value,$rank){
 
@@ -388,8 +405,9 @@ function tripal_cv_obo_add_cvterm_prop($cvterm,$property,$value,$rank){
    }
    return 1;
 }
-/*************************************************************************
+/**
 *
+* @ingroup tripal_obo_loader
 */
 function tripal_cv_obo_add_relationship($cvterm,$defaultcv,$obo,$rel,$objname,$object_is_relationship=0){
 
@@ -427,8 +445,9 @@ function tripal_cv_obo_add_relationship($cvterm,$defaultcv,$obo,$rel,$objname,$o
 
    return 1;
 }
-/*************************************************************************
+/**
 *
+* @ingroup tripal_obo_loader
 */
 function tripal_cv_obo_get_term($obo,$id){
    foreach ($obo as $type){
@@ -441,8 +460,9 @@ function tripal_cv_obo_get_term($obo,$id){
    }
    return;
 }
-/*************************************************************************
+/**
 *
+* @ingroup tripal_obo_loader
 */
 function tripal_cv_obo_add_synonyms($term,$cvterm){
 
@@ -517,8 +537,9 @@ function tripal_cv_obo_add_synonyms($term,$cvterm){
    }
    return 1;
 }
-/*************************************************************************
+/**
 *
+* @ingroup tripal_obo_loader
 */
 function tripal_cv_obo_add_cv_term($term,$defaultcv,$is_relationship = 0,$update = 1){
 
@@ -634,8 +655,9 @@ function tripal_cv_obo_add_cv_term($term,$defaultcv,$is_relationship = 0,$update
    // return the cvterm
    return $cvterm;
 }
-/*************************************************************************
+/**
 *
+* @ingroup tripal_obo_loader
 */
 function tripal_cv_obo_add_cvterm_dbxref($cvterm,$xref){
 
@@ -677,8 +699,9 @@ function tripal_cv_obo_add_cvterm_dbxref($cvterm,$xref){
    }
    return 1;
 }
-/*************************************************************************
+/**
 *
+* @ingroup tripal_obo_loader
 */
 function tripal_cv_obo_add_dbxref($db_id,$accession,$version='',$description=''){
 
@@ -699,8 +722,9 @@ function tripal_cv_obo_add_dbxref($db_id,$accession,$version='',$description='')
    return $dbxref;
 
 }
-/*************************************************************************
+/**
 *
+* @ingroup tripal_obo_loader
 */
 function tripal_cv_obo_parse($obo_file,&$obo,&$header){
    $i = 0;

+ 27 - 15
tripal_cv/trees.php

@@ -4,8 +4,9 @@
 // Copyright 2009 Clemson University
 //
 
-/*************************************************************************
+/**
 *
+* @ingroup tripal_cv
 */
 function tripal_cv_show_browser() {
   
@@ -17,8 +18,9 @@ function tripal_cv_show_browser() {
 }
 
 
-/*************************************************************************
+/**
 *
+* @ingroup tripal_cv
 */
 function tripal_cv_tree($tree_id){
   // parse out the tripal module name from the chart_id to find out 
@@ -40,8 +42,9 @@ function tripal_cv_tree($tree_id){
 }
 
 
-/*************************************************************************
+/**
 *
+* @ingroup tripal_cv
 */
 function tripal_cv_update_tree() {
    $content = array();
@@ -75,11 +78,14 @@ function tripal_cv_update_tree() {
    }
    drupal_json($content);
 }
-/*************************************************************************
-*  name:  tripal_cv_init_cv
-*  description:  This function returns the JSON array for the jsTree 
+/**
+* Generates JSON needed for jsTree Root-level Branches
+*
+* This function returns the JSON array for the jsTree 
 *    jQuery code that builds a tree for browsing the ontology.  This function
 *    should be called to generate the root level branches of the tree.
+*
+* @ingroup tripal_cv_api
 */
 function tripal_cv_init_tree($cv_id,$cnt_table = null, $fk_column = null,
    $cnt_column = null, $filter = null, $label = null) {
@@ -136,10 +142,13 @@ function tripal_cv_init_tree($cv_id,$cnt_table = null, $fk_column = null,
    return $content;
 
 }
-/*************************************************************************
-*  name:  tripal_cv_get_term_children
-*  description:  This function returns the JSON array for the jsTree 
-*    jQuery code when expanding a term to view it's children.  
+/**
+*  Generates SON needed for jsTree -expanding a term to view children
+*
+*  This function returns the JSON array for the jsTree 
+*    jQuery code when expanding a term to view it's children.
+*
+* @ingroup tripal_cv_api
 */
 function tripal_cv_get_term_children($cvterm_id,$cnt_table = null, 
    $fk_column = null,$cnt_column = null, $filter = null, $label = null) {
@@ -228,8 +237,9 @@ function tripal_cv_get_term_children($cvterm_id,$cnt_table = null,
    $content[] = $cnt_sql;
    return $content;
 }
-/*************************************************************************
-*
+/**
+* 
+* @ingroup tripal_cv
 */
 function tripal_cv_init_browser($cv_id) {
 
@@ -249,8 +259,9 @@ function tripal_cv_init_browser($cv_id) {
 
    drupal_json(array('update' => "$content"));
 }
-/*************************************************************************
+/**
 *
+* @ingroup tripal_cv
 */
 function tripal_cv_cvterm_info($cvterm_id){
 
@@ -321,9 +332,10 @@ function tripal_cv_cvterm_info($cvterm_id){
    ";
    drupal_json(array('update' => $content));
 }
-/*******************************************************************************
+/**
+*
+* @ingroup tripal_cv
 */
-
 function tripal_cv_list_form($form_state) {
 
    // get a list of db from chado for user to choose

+ 19 - 11
tripal_cv/tripal_cv.api.inc

@@ -39,7 +39,7 @@
  * @ingroup tripal_cv_api
  */
 function tripal_cv_get_cv ($select_values) {
-/**
+
   $columns = array(
     'cv_id', 
     'name', 
@@ -62,7 +62,7 @@ function tripal_cv_get_cv ($select_values) {
       WATCHDOG_WARNING
     );
   }
-*/  
+  
 }
 
 // Purpose: To retrieve a chado cv object
@@ -85,7 +85,7 @@ function tripal_cv_get_cv ($select_values) {
 //function tripal_cv_get_cv ($where_options)
 
 /**
- *
+ * Retrieve a cv given the cv name
  *
  * @param $name
  *  The name of the cv to be returned
@@ -103,7 +103,16 @@ function tripal_cv_get_cv_by_name ($name) {
 }
 
 /**
- * return the cv object for the specified CV id
+ * Retrieve the cv object for the specified CV id
+ *
+ * NOTE: This function is deprecated.
+ * @see tripal_core_chado_generate_vars
+ *
+ * @param $cv_id
+ *   The unique identifier for the cv retrieve
+ *
+ * @return
+ *   An object describing the cv
  *
  * @ingroup tripal_cv_api
  */
@@ -116,8 +125,7 @@ function tripal_cv_get_cv_by_id ($cv_id) {
 }
 
 /**
- * Purpose: Create an options array to be used in a form element
- *   which provides a list of all chado cvs
+ * Create an options array to be used in a form element which provides a list of all chado cvs
  *
  * @return 
  *   An array(cv_id => name) for each cv in the chado cv table
@@ -142,7 +150,7 @@ function tripal_cv_get_cv_options() {
 }
 
 /**
- * Purpose: To retrieve a chado controlled vocabulary term object
+ * To retrieve a chado controlled vocabulary term object
  *
  * @param $select_values
  *   An array meant to uniquely select a given controlled vocabulary term
@@ -191,7 +199,7 @@ function tripal_cv_get_cv_options() {
  * @ingroup tripal_cv_api
  */
 function tripal_cv_get_cvterm ($select_values) {
-/**
+
   $columns = array(
     'cvterm_id', 
     'cv_id', 
@@ -226,11 +234,11 @@ function tripal_cv_get_cvterm ($select_values) {
       WATCHDOG_WARNING
     );
   }
-*/  
+ 
 }
 
 /**
- * Purpose: Retrieve a chado cvterm object with a given name
+ * Retrieve a chado cvterm object with a given name
  *
  * @param $name
  *   the cvterm.name
@@ -261,7 +269,7 @@ function tripal_cv_get_cvterm_by_name ($name, $cv_id=0) {
 }
 
 /**
- * Purpose: Create an options array to be used in a form element
+ * Create an options array to be used in a form element
  *   which provides a list of all chado cvterms
  * 
  * @param $cv_id 

+ 21 - 7
tripal_cv/tripal_cv.install

@@ -1,7 +1,9 @@
 <?php
 
-/*******************************************************************************
+/**
 *  Implementation of hook_install();
+*
+* @ingroup tripal_cv
 */
 function tripal_cv_install(){
 
@@ -45,9 +47,11 @@ function tripal_cv_install(){
    drupal_install_schema('tripal_cv');
    tripal_cv_add_obo_defaults();
 }
-/*******************************************************************************
+/**
 *  This update adds the new tripal_obo table.  This is an upgrade from
 *  Tripal version 0.2
+*
+* @ingroup tripal_cv
 */
 
 function tripal_cv_update_6000(){
@@ -59,8 +63,10 @@ function tripal_cv_update_6000(){
    
    return $ret;
 }
-/*******************************************************************************
+/**
 * Implementation of hook_uninstall()
+*
+* @ingroup tripal_cv
 */
 function tripal_cv_uninstall(){
 
@@ -73,9 +79,11 @@ function tripal_cv_uninstall(){
    drupal_uninstall_schema('tripal_cv');
 }
 
-/*******************************************************************************
+/**
  * Implementation of hook_requirements(). Make sure 'Tripal Core' is enabled
  * before installation
+ *
+ * @ingroup tripal_cv
  */
 function tripal_cv_requirements($phase) {
    $requirements = array();
@@ -90,18 +98,22 @@ function tripal_cv_requirements($phase) {
    }
    return $requirements;
 }
-/************************************************************************
+/**
 * Implementation of hook_schema().
+*
+* @ingroup tripal_cv
 */
 function tripal_cv_schema() {
    $schema = tripal_cv_get_schemas();
    return $schema;
 }
-/************************************************************************
+/**
 * This function simply defines all tables needed for the module to work
 * correctly.  By putting the table definitions in a separate function we 
 * can easily provide the entire list for hook_install or individual
 * tables for an update.
+*
+* @ingroup tripal_cv
 */
 function tripal_cv_get_schemas (){  
   $schema = array();
@@ -119,8 +131,10 @@ function tripal_cv_get_schemas (){
   );
   return $schema;
 }
-/************************************************************************
+/**
 * Add's defaults to the tripal_cv_obo table
+*
+* @ingroup tripal_cv
 */
 function tripal_cv_add_obo_defaults(){
    // insert commonly used ontologies into the tables

+ 97 - 46
tripal_cv/tripal_cv.module

@@ -6,8 +6,14 @@ require_once "obo_loader.php";
 
 require_once "tripal_cv.api.inc";
 
-/*************************************************************************
+/**
+ * @defgroup tripal_cv Controlled Vocabulary Module
+ * @ingroup tripal_modules
+ */
+ 
+/**
 *
+* @ingroup tripal_cv
 */
 function tripal_cv_init(){
 
@@ -21,8 +27,9 @@ function tripal_cv_init(){
    drupal_add_js (drupal_get_path('theme', 'tripal').'/js/jsTree/source/_lib.js');
    drupal_add_js (drupal_get_path('theme', 'tripal').'/js/jsTree/source/tree_component.js');
 }
-/*************************************************************************
+/**
 *
+* @ingroup tripal_cv
 */
 function tripal_cv_menu() {
    $items = array();
@@ -152,9 +159,11 @@ function tripal_cv_menu() {
    return $items;
 }
 
-/*******************************************************************************
+/**
  *  The following function proves access control for users trying to
  *  perform actions on data managed by this module
+ *
+ * @ingroup tripal_cv
  */
 function chado_cv_access($op, $node, $account){
   if ($op == 'create') {
@@ -179,10 +188,12 @@ function chado_cv_access($op, $node, $account){
    return FALSE;
 }
 
-/*******************************************************************************
+/**
 *  Set the permission types that the chado module uses.  Essentially we
 *  want permissionis that protect creation, editing and deleting of chado
 *  data objects
+*
+* @ingroup tripal_cv
 */
 function tripal_cv_perm(){
    return array(
@@ -193,20 +204,24 @@ function tripal_cv_perm(){
    );
 }
 
-/*************************************************************************
+/**
  * Implements hook_views_api()
  * Purpose: Essentially this hook tells drupal that there is views support for
  *  for this module which then includes tripal_cv.views.inc where all the
  *  views integration code is
+ *
+ * @ingroup tripal_cv
  */
 function tripal_cv_views_api() {
 	return array('api' => 2.0);
 }
 
-/*******************************************************************************
+/**
  *  We need to let drupal know about our theme functions and their arguments.
  *  We create theme functions to allow users of the module to customize the
  *  look and feel of the output generated in this module
+ *
+ * @ingroup tripal_cv
  */
 function tripal_cv_theme () {
    return array(
@@ -216,10 +231,12 @@ function tripal_cv_theme () {
    );
 }
 
-/*************************************************************************
+/**
  * Purpose: Provide Guidance to new Tripal Admin
  *
  * @return HTML Formatted text
+ *
+ * @ingroup tripal_cv
  */
 function tripal_cv_module_description_page() {
   $text = '';
@@ -304,13 +321,15 @@ function tripal_cv_module_description_page() {
   return $text;
 }
 
-/*************************************************************************
- * @section Edit/Delete CVs
- *************************************************************************/
+///////////////////////////////////////////
+// Edit/Delete CVs
+//////////////////////////////////////////
  
-/*************************************************************************
+/**
  * Purpose: Provides the form for Updating and Deleteing existing
  *   chado controlled vocabularies (See chado cv table)
+ *
+  * @ingroup tripal_cv
  */
 function tripal_cv_admin_page(){
    $add_url = url("admin/tripal/tripal_cv/new");
@@ -326,10 +345,12 @@ function tripal_cv_admin_page(){
    return $output;
 }
 
-/*************************************************************************
+/**
  * Purpose: Provides the actual "Select CV" form on the Update/Delete Controlled
  *   Vocabulary page. This form also triggers the edit javascript
  * @todo Modify this form to use Drupal AJAX
+ *
+  * @ingroup tripal_cv
  */
 function tripal_cv_select_form(){
 
@@ -360,8 +381,10 @@ function tripal_cv_select_form(){
 
    return $form;
 }
-/*************************************************************************
+/**
  * Purpose: The edit controlled vocabulary javascript
+ *
+  * @ingroup tripal_cv
  */
 function tripal_ajax_cv_edit (){ 
    // get the database id, build the form and then return the JSON object
@@ -370,8 +393,10 @@ function tripal_ajax_cv_edit (){
    drupal_json(array('status' => TRUE, 'data' => $form));
 }
 
-/*************************************************************************
+/**
  * Purpose: Provides a form to allow updating/deleteing of controlled vocabularies
+ *
+  * @ingroup tripal_cv
  */
 function tripal_cv_edit_form(&$form_state = NULL,$cvid = NULL){
 
@@ -438,8 +463,10 @@ function tripal_cv_edit_form(&$form_state = NULL,$cvid = NULL){
    return $form;
 }
 
-/************************************************************************
+/**
  * Purpose: The submit function of the update/delete controlled vocabulary form
+ *
+  * @ingroup tripal_cv
  */
 function tripal_cv_edit_form_submit($form, &$form_state){
 
@@ -483,12 +510,14 @@ function tripal_cv_edit_form_submit($form, &$form_state){
    return '';
 }
 
-/*************************************************************************
- * @section Add CVs
- *************************************************************************/
+/////////////////////////////////////
+// Add CVs
+////////////////////////////////////
 
-/*************************************************************************
+/**
  * Purpose: Provides the Add controlled vocabulary form
+ *
+  * @ingroup tripal_cv
  */
 function tripal_cv_add_form(&$form_state = NULL){
 
@@ -530,8 +559,10 @@ function tripal_cv_add_form(&$form_state = NULL){
    return $form;
 }
 
-/************************************************************************
+/**
  * Purpose: The submit function for the add controlled vocabulary form
+ *
+  * @ingroup tripal_cv
  */
 function tripal_cv_add_form_submit($form, &$form_state){
 
@@ -557,13 +588,15 @@ function tripal_cv_add_form_submit($form, &$form_state){
    return '';
 }
 
-/*************************************************************************
- * @section Add Controlled Vocabulary Term
- *************************************************************************/
+//////////////////////////////////////////
+// Add Controlled Vocabulary Term
+//////////////////////////////////////////
 
-/*************************************************************************
+/**
  * Purpose: Provides the form that allows adding of terms to an existing
  *   controlled vocabulary
+ *
+  * @ingroup tripal_cv
  */
 function tripal_cv_add_cvterm_form (&$form_state) {
 	$form = array();
@@ -670,8 +703,10 @@ function tripal_cv_add_cvterm_form (&$form_state) {
   return $form;
 }
 
-/*************************************************************************
+/**
  * Purpose: Validates the input for adding a cvterm
+ *
+  * @ingroup tripal_cv
  */
 function tripal_cv_add_cvterm_form_validate ($form, &$form_state) {
   if (!empty($form_state['ahah_submission'])) {
@@ -680,8 +715,10 @@ function tripal_cv_add_cvterm_form_validate ($form, &$form_state) {
   
 }
 
-/*************************************************************************
+/**
  * Purpose: Adds terms to an existing controlled vocabulary
+ *
+  * @ingroup tripal_cv
  */
 function tripal_cv_add_cvterm_form_submit ($form, &$form_state) {
   if (!empty($form_state['ahah_submission'])) {
@@ -746,10 +783,12 @@ function tripal_cv_add_cvterm_form_submit ($form, &$form_state) {
   return;
 }
 
-/*************************************************************************
+/**
  * Purpose: This function gets called when the selecting of a cv from
  *   the select list triggers it. This function simply rebuilds the form
  *   with new information. No elements are created here
+ *
+  * @ingroup tripal_cv
  */
 function tripal_cv_add_cvterm_callback () {
 
@@ -790,13 +829,15 @@ function tripal_cv_add_cvterm_callback () {
   drupal_json(array('status' => TRUE, 'data' => $output));
 }
 
-/*************************************************************************
- * @section Ontology Loader
- *************************************************************************/
+///////////////////////////////
+// Ontology Loader
+//////////////////////////////
  
-/*************************************************************************
+/**
  * Purpose: Provides the form to load an already existing controlled
  *  Vocabulary into chado
+ *
+  * @ingroup tripal_obo_loader
  */
 function tripal_cv_obo_form(&$form_state = NULL){
 
@@ -888,9 +929,11 @@ function tripal_cv_obo_form(&$form_state = NULL){
    return $form;
 }
 
-/************************************************************************
+/**
  * Purpose: The submit function for the load ontology form. It registers a
  *   tripal job to run the obo_loader.php script
+ *
+   * @ingroup tripal_obo_loader
  */
 function tripal_cv_obo_form_submit($form, &$form_state){
    global $user;
@@ -924,12 +967,13 @@ function tripal_cv_obo_form_submit($form, &$form_state){
    return '';
 }
 
-/*************************************************************************
- * @section cvterm path management
- *************************************************************************/
+////////////////////////////////////
+// cvterm path management
+///////////////////////////////////
 
-/*************************************************************************
+/**
 *
+* @ingroup tripal_cv
 */
 function tripal_cv_cvtermpath_form () {
 
@@ -964,8 +1008,9 @@ function tripal_cv_cvtermpath_form () {
    );
    return $form;
 }
-/*************************************************************************
+/**
 *
+* @ingroup tripal_cv
 */
 function tripal_cv_cvtermpath_form_validate($form, &$form_state) {
    global $user;
@@ -985,8 +1030,10 @@ function tripal_cv_cvtermpath_form_validate($form, &$form_state) {
    }
 }
 
-/***********************************************************
+/**
  * Update the cvtermpath table
+ *
+ * @ingroup tripal_cv
  */
 function tripal_cv_update_cvtermpath($cvid = NULL, $job_id = NULL) {
 
@@ -1002,13 +1049,15 @@ function tripal_cv_update_cvtermpath($cvid = NULL, $job_id = NULL) {
    return;
 }
 
-/*************************************************************************
- * @section Miscellaneous
- * @todo check to see if these functions are still needed and/or if they
- *   should be moved to the api file
- *************************************************************************/
+//////////////////////////////////////
+// @section Miscellaneous
+// @todo check to see if these functions are still needed and/or if they
+//   should be moved to the api file
+//////////////////////////////////////
  
-/*************************************************************************
+/**
+*
+* @ingroup tripal_cv
 */
 function tripal_cv_get_cv_id($cv_name){
 
@@ -1021,8 +1070,9 @@ function tripal_cv_get_cv_id($cv_name){
    return $cv->cv_id;
 }
 
-/*************************************************************************
+/**
 *
+* @ingroup tripal_cv
 */
 function tripal_cv_cvterm_edit($cvterm_id){
    $sql = "
@@ -1037,8 +1087,9 @@ function tripal_cv_cvterm_edit($cvterm_id){
    return theme('tripal_cv_cvterm_edit',$cvterm);
 }
 
-/*************************************************************************
+/**
 *
+* @ingroup tripal_cv
 */
 function theme_tripal_cv_cvterm_edit(&$cvterm){
    $output = "

+ 25 - 6
tripal_cv/tripal_cv.views.inc

@@ -9,18 +9,29 @@
  *  Documentation on views integration can be found at 
  *  http://views2.logrus.com/doc/html/index.html.
  */
- 
-/*************************************************************************
+
+/**
+ * @defgroup tripal_cv_views Controlled Vocabulary Views Integration
+ * @ingroup views
+ * @ingroup tripal_cv
+ */
+
+require_once('views/cvterm.views.inc');
+require_once('views/cv.views.inc'); 
+/**
  * Implements hook_views_data()
+ *
  * Purpose: Describe chado/tripal tables & fields to views
- * @return: a data array which follows the structure outlined in the
+ *
+ * @return
+ *   a data array which follows the structure outlined in the
  *   views2 documentation for this hook. Essentially, it's an array of table
  *   definitions keyed by chado/tripal table name. Each table definition 
  *   includes basic details about the table, fields in that table and
  *   relationships between that table and others (joins)
+ *
+ * @ingroup tripal_cv_views
  */
-require_once('views/cvterm.views.inc');
-require_once('views/cv.views.inc');
 function tripal_cv_views_data() {
   $data = array();
   
@@ -35,12 +46,16 @@ function tripal_cv_views_data() {
   return $data;
 }
  
-/*************************************************************************
+/**
  * Implements hook_views_handlers()
+ *
  * Purpose: Register all custom handlers with views
  *   where a handler describes either "the type of field", 
  *   "how a field should be filtered", "how a field should be sorted"
+ *
  * @return: An array of handler definitions
+ *
+ * @ingroup tripal_cv_views
  */
 function tripal_cv_views_handlers() {
  return array(
@@ -55,6 +70,10 @@ function tripal_cv_views_handlers() {
  );
 }
 
+/**
+ *
+ * @ingroup tripal_cv_views
+ */
 function tripal_cv_views_default_views () {
   $views = array();
   

+ 2 - 0
tripal_cv/views/cv.views.inc

@@ -15,6 +15,8 @@
  *       constraint cv_c1 unique (name)
  *   );
  * @endcode
+ *
+ * @ingroup tripal_cv_views
  */
 function retrieve_cv_views_data() {
   $data = array();

+ 2 - 0
tripal_cv/views/cvterm.views.inc

@@ -22,6 +22,8 @@
  *       constraint cvterm_c2 unique (dbxref_id)
  *   );
  * @endcode
+ *
+ * @ingroup tripal_cv_views
  */
 function retrieve_cvterm_views_data() {
 

+ 4 - 4
tripal_db/tripal_db.api.inc

@@ -41,7 +41,7 @@
  * @ingroup tripal_db_api
  */
 function tripal_db_get_db ($select_values) {
-/**
+
   $columns = array(
     'db_id', 
     'name', 
@@ -66,7 +66,7 @@ function tripal_db_get_db ($select_values) {
       WATCHDOG_WARNING
     );
   }
-*/  
+  
 }
 
 /**
@@ -204,7 +204,7 @@ function tripal_db_get_db_options() {
  * @ingroup tripal_db_api
  */
 function tripal_db_get_dbxref ($select_values) {
-/**
+
   $columns = array(
     'dbxref_id',
     'db_id', 
@@ -232,7 +232,7 @@ function tripal_db_get_dbxref ($select_values) {
       WATCHDOG_WARNING
     );
   }
-  */
+
 }
 
 /**

+ 9 - 3
tripal_db/tripal_db.install

@@ -1,7 +1,9 @@
 <?php
 
-/*******************************************************************************
+/**
 *  Implementation of hook_install();
+*
+* @ingroup tripal_db
 */
 function tripal_db_install(){
 
@@ -10,16 +12,20 @@ function tripal_db_install(){
 
 }
 
-/*******************************************************************************
+/**
 * Implementation of hook_uninstall()
+*
+* @ingroup tripal_db
 */
 function tripal_db_uninstall(){
 
 }
 
-/*******************************************************************************
+/**
  * Implementation of hook_requirements(). Make sure 'Tripal Core' is enabled
  * before installation
+ *
+ * @ingroup tripal_db
  */
 function tripal_db_requirements($phase) {
    $requirements = array();

+ 30 - 10
tripal_db/tripal_db.module

@@ -2,8 +2,14 @@
 
 require_once "tripal_db.api.inc";
 
-/*************************************************************************
+/**
+ * @defgroup tripal_db External Database Module
+ * @ingroup tripal_modules
+ */
+ 
+/**
 *
+* @ingroup tripal_db
 */
 function tripal_db_init(){
 
@@ -11,8 +17,9 @@ function tripal_db_init(){
    drupal_add_css(drupal_get_path('theme', 'tripal').'/css/tripal_db.css');
    drupal_add_js(drupal_get_path('theme', 'tripal').'/js/tripal_db.js');
 }
-/*************************************************************************
+/**
 *
+* @ingroup tripal_db
 */
 function tripal_db_menu() {
    $items = array();
@@ -50,10 +57,12 @@ function tripal_db_menu() {
    return $items;
 }
 
-/*******************************************************************************
+/**
 *  Set the permission types that the chado module uses.  Essentially we
 *  want permissionis that protect creation, editing and deleting of chado
 *  data objects
+*
+* @ingroup tripal_db
 */
 function tripal_db_perm(){
    return array(
@@ -64,20 +73,24 @@ function tripal_db_perm(){
    );
 }
 
-/*************************************************************************
+/**
  * Implements hook_views_api()
  * Purpose: Essentially this hook tells drupal that there is views support for
  *  for this module which then includes tripal_db.views.inc where all the
  *  views integration code is
+ *
+ * @ingroup tripal_db
  */
 function tripal_db_views_api() {
 	return array('api' => 2.0);
 }
 
-/*************************************************************************
+/**
  * Purpose: Provide Guidance to new Tripal Admin
  *
  * @return HTML Formatted text
+ *
+ * @ingroup tripal_db
  */
 function tripal_db_module_description_page() {
   $text = '';
@@ -123,8 +136,10 @@ function tripal_db_module_description_page() {
   return $text;
 }
 
-/*************************************************************************
+/**
+*
 *
+* @ingroup tripal_db
 */
 function tripal_db_admin_page(){
    $add_url = url("admin/tripal/tripal_db/add_db");
@@ -133,8 +148,10 @@ function tripal_db_admin_page(){
    $output .= '<div id="db-edit-div">Please select a database above to view or edit</div>';
    return $output;
 }
-/*************************************************************************
+/**
+*
 *
+* @ingroup tripal_db
 */
 function tripal_db_select_form(){
 
@@ -165,8 +182,9 @@ function tripal_db_select_form(){
 
    return $form;
 }
-/*************************************************************************
+/**
 *
+* @ingroup tripal_db
 */
 function tripal_ajax_db_edit (){ 
    // get the database id, build the form and then return the JSON object
@@ -174,8 +192,9 @@ function tripal_ajax_db_edit (){
    $form = drupal_get_form('tripal_db_form',$dbid);
    drupal_json(array('status' => TRUE, 'data' => $form));
 }
-/*************************************************************************
+/**
 *
+* @ingroup tripal_db
 */
 function tripal_db_form(&$form_state = NULL,$dbid = NULL){
 
@@ -274,8 +293,9 @@ function tripal_db_form(&$form_state = NULL,$dbid = NULL){
 
    return $form;
 }
-/************************************************************************
+/**
 *
+* @ingroup tripal_db
 */
 function tripal_db_form_submit($form, &$form_state){
 

+ 19 - 5
tripal_db/tripal_db.views.inc

@@ -9,8 +9,16 @@
  *  Documentation on views integration can be found at 
  *  http://views2.logrus.com/doc/html/index.html.
  */
- 
-/*************************************************************************
+
+/**
+ * @defgroup tripal_db_views External Database Views Integration
+ * @ingroup views
+ * @ingroup tripal_db
+ */
+
+require_once('views/dbxref.views.inc');
+require_once('views/db.views.inc'); 
+/**
  * Implements hook_views_data()
  * Purpose: Describe chado/tripal tables & fields to views
  * @return: a data array which follows the structure outlined in the
@@ -18,9 +26,9 @@
  *   definitions keyed by chado/tripal table name. Each table definition 
  *   includes basic details about the table, fields in that table and
  *   relationships between that table and others (joins)
+ *
+ * @ingroup tripal_db_views
  */
-require_once('views/dbxref.views.inc');
-require_once('views/db.views.inc');
 function tripal_db_views_data()  {
 
    $data = array();
@@ -30,12 +38,14 @@ function tripal_db_views_data()  {
 
 }
 
-/*************************************************************************
+/**
  * Implements hook_views_handlers()
  * Purpose: Register all custom handlers with views
  *   where a handler describes either "the type of field", 
  *   "how a field should be filtered", "how a field should be sorted"
  * @return: An array of handler definitions
+ *
+ * @ingroup tripal_db_views
  */
 function tripal_db_views_handlers() {
  return array(
@@ -50,6 +60,10 @@ function tripal_db_views_handlers() {
  );
 }
 
+/**
+ *
+ * @ingroup tripal_db_views
+ */
 function tripal_db_views_default_views () {
   $views = array();
   

+ 2 - 0
tripal_db/views/db.views.inc

@@ -17,6 +17,8 @@
  *    constraint db_c1 unique (name)
  * );
  * @endcode
+ *
+ * @ingroup tripal_db_views
  */
 function retrieve_db_views_data() {
   

+ 2 - 0
tripal_db/views/dbxref.views.inc

@@ -18,6 +18,8 @@
  *    constraint dbxref_c1 unique (db_id,accession,version)
  * );
  * @endcode
+ *
+ * @ingroup tripal_db_views
  */
 function retrieve_dbxref_views_data() {
 

+ 8 - 7
tripal_feature/tripal_feature.api.inc

@@ -8,7 +8,7 @@
  * @return
  *    Array describing the feature table
  *
- * @ingroup tripal_feature
+ * @ingroup tripal_schema_api
  */
 function tripal_feature_chado_feature_schema() {
   $description = array();
@@ -67,7 +67,7 @@ function tripal_feature_chado_feature_schema() {
  * @return
  *    Array describing the featureprop table
  *
- * @ingroup tripal_feature
+ * @ingroup tripal_schema_api
  */
 function tripal_feature_chado_featureprop_schema() {
   $description = array();
@@ -104,7 +104,7 @@ function tripal_feature_chado_featureprop_schema() {
  * @return
  *    Array describing the featureloc table
  *
- * @ingroup tripal_feature
+ * @ingroup tripal_schema_api
  */
 function tripal_feature_chado_featureloc_schema() {
   $description = array();
@@ -135,7 +135,7 @@ function tripal_feature_chado_featureloc_schema() {
  * @return
  *    Array describing the feature_dbxref table
  *
- * @ingroup tripal_feature
+ * @ingroup tripal_schema_api
  */
 function tripal_feature_chado_feature_dbxref_schema() {
   $description = array();
@@ -166,7 +166,7 @@ function tripal_feature_chado_feature_dbxref_schema() {
  * @return
  *    Array describing the feature_dbxref table
  *
- * @ingroup tripal_feature
+ * @ingroup tripal_schema_api
  */
 function tripal_feature_chado_feature_relationship_schema() {
   $description = array();
@@ -196,7 +196,7 @@ function tripal_feature_chado_feature_relationship_schema() {
  * @return
  *    Array describing the feature_dbxref table
  *
- * @ingroup tripal_feature
+ * @ingroup tripal_schema_api
  */
 function tripal_feature_chado_feature_cvterm_schema() {
   $description = array();
@@ -225,7 +225,8 @@ function tripal_feature_chado_feature_cvterm_schema() {
 }
 /**
 *
-**/
+* @ingroup tripal_schema_api
+*/
 function tripal_feature_chado_feature_synonym_schema() {
   $description = array();
 

+ 24 - 10
tripal_feature/tripal_feature.install

@@ -1,7 +1,9 @@
 <?php
 
-/************************************************************************
+/**
 *  Implementation of hook_install();
+*
+* @ingroup tripal_feature
 */
 function tripal_feature_install(){
    // create the module's data directory
@@ -15,11 +17,12 @@ function tripal_feature_install(){
    tripal_feature_add_organism_count_mview();
 
 }
-/*******************************************************************************
+/**
 *  Update for Drupal 6.x, Tripal 0.2b, Feature Module 0.2
 *  This update adjusts the materialized view by adding a 'cvterm_id' column
+*
+* @ingroup tripal_feature
 */
-
 function tripal_feature_update_6000(){
    // recreate the materialized view
    tripal_feature_add_organism_count_mview();
@@ -29,8 +32,10 @@ function tripal_feature_update_6000(){
    
    return $ret;
 }
-/*******************************************************************************
 
+/**
+*
+* @ingroup tripal_feature
 */
 function tripal_feature_update_6300(){
    // add the relationship aggregator table to the database
@@ -40,8 +45,9 @@ function tripal_feature_update_6300(){
    
    return $ret;
 }
-/*******************************************************************************
-
+/**
+*
+* @ingroup tripal_feature
 */
 function tripal_feature_add_organism_count_mview(){
    $view_name = 'organism_feature_count';
@@ -88,15 +94,19 @@ function tripal_feature_add_organism_count_mview(){
       tripal_mviews_action('update',$mview_id);
    }
 }
-/************************************************************************
+/**
 * Implementation of hook_schema().
+*
+* @ingroup tripal_feature
 */
 function tripal_feature_schema() {
    $schema = tripal_feature_get_schemas();
    return $schema;
 }
-/************************************************************************
+/**
 * Implementation of hook_uninstall()
+*
+* @ingroup tripal_feature
 */
 function tripal_feature_uninstall(){
 
@@ -118,11 +128,13 @@ function tripal_feature_uninstall(){
    }
 }
 
-/************************************************************************
+/**
 * This function simply defines all tables needed for the module to work
 * correctly.  By putting the table definitions in a separate function we 
 * can easily provide the entire list for hook_install or individual
 * tables for an update.
+*
+* @ingroup tripal_feature
 */
 function tripal_feature_get_schemas ($table = NULL){  
   $schema = array();
@@ -161,9 +173,11 @@ function tripal_feature_get_schemas ($table = NULL){
   return $schema;
 }
 
-/*******************************************************************************
+/**
  * Implementation of hook_requirements(). Make sure 'Tripal Core' is enabled
  * before installation
+ *
+ * @ingroup tripal_feature
  */
 function tripal_feature_requirements($phase) {
    $requirements = array();

+ 12 - 2
tripal_feature/tripal_feature.views.inc

@@ -9,6 +9,12 @@
  *  Documentation on views integration can be found at 
  *  http://views2.logrus.com/doc/html/index.html.
  */
+
+/**
+ * @defgroup tripal_feature_views Feature Views Integration
+ * @ingroup views
+ * @ingroup tripal_feature
+ */
  
 /**
  * Implements hook_views_data()
@@ -21,7 +27,7 @@
  *   includes basic details about the table, fields in that table and
  *   relationships between that table and others (joins)
  *
- * @ingroup tripal_feature
+ * @ingroup tripal_feature_views
  */
 require_once('views/feature.views.inc');
 require_once('views/chado_feature.views.inc');
@@ -45,7 +51,7 @@ function tripal_feature_views_data()  {
  *
  * @return: An array of handler definitions
  *
- * @ingroup tripal_feature
+ * @ingroup tripal_feature_views
  */
 function tripal_feature_views_handlers() {
  return array(
@@ -66,6 +72,10 @@ function tripal_feature_views_handlers() {
  );
 }
 
+/**
+ *
+ * @ingroup tripal_feature_views
+ */
 function tripal_feature_views_default_views () {
   $views = array();
   

+ 1 - 1
tripal_feature/views/chado_feature.views.inc

@@ -7,7 +7,7 @@
  *
  * The main need for description of this table to views is to join chado data with drupal nodes
  *
- * @ingroup tripal_feature
+ * @ingroup tripal_feature_views
  */
 function retrieve_chado_feature_views_data () {
 	global $db_url;

+ 1 - 1
tripal_feature/views/feature.views.inc

@@ -33,7 +33,7 @@
  *   );
  * @endcode
  *
- * @ingroup tripal_feature
+ * @ingroup tripal_feature_views
  */
  function retrieve_feature_views_data() {
 	global $db_url;

+ 1 - 1
tripal_feature/views/misc_tables.views.inc

@@ -16,7 +16,7 @@
       ); 
  *   @endcode
  *
- * @ingroup tripal_feature
+ * @ingroup tripal_feature_views
  */
 function retrieve_feature_misc_tables_views_data() {
   $data = array();

+ 74 - 19
tripal_library/tripal_library.api.inc

@@ -1,5 +1,11 @@
 <?php
 
+/**
+ * @defgroup tripal_library_api Library Module API
+ * @ingroup tripal_api
+ * @ingroup tripal_library
+ */
+ 
 /**
  * Implements hook_chado_library_schema()
  * Purpose: To add descriptions and foreign keys to default table description
@@ -8,7 +14,7 @@
  * @return
  *    Array describing the library table
  *
- * @ingroup tripal_library
+ * @ingroup tripal_schema_api
  */
 function tripal_library_chado_library_schema() {
   $description = array();
@@ -49,7 +55,7 @@ function tripal_library_chado_library_schema() {
  * @return
  *    Array describing the library_feature table
  *
- * @ingroup tripal_library
+ * @ingroup tripal_schema_api
  */
 function tripal_library_chado_library_feature_schema() {
   $description = array();
@@ -80,7 +86,7 @@ function tripal_library_chado_library_feature_schema() {
  * @return
  *    Array describing the libraryprop table
  *
- * @ingroup tripal_library
+ * @ingroup tripal_schema_api
  */
 function tripal_library_chado_libraryprop_schema() {
   $description = array();
@@ -103,35 +109,84 @@ function tripal_library_chado_libraryprop_schema() {
   
   return $description;
 }
+
 /**
-* Adds a single property to an existing library record.
-*
-* @ingroup tripal_api
-*/
+ * Retrieve properties of a given type for a given library
+ *
+ * @param $library_id
+ *    The library_id of the properties you would like to retrieve
+ * @param $property
+ *    The cvterm name of the properties to retrieve
+ *
+ * @return
+ *    An library chado variable with the specified properties expanded
+ *
+ * @ingroup tripal_library_api
+ */
 function tripal_library_get_property($library_id,$property){
    return tripal_core_get_property('library',$library_id,$property,'tripal');
 }
+
 /**
-* Adds a single property to an existing library record.
-*
-* @ingroup tripal_api
-*/
+ * Insert a given property
+ *
+ * @param $library_id
+ *   The library_id of the property to insert
+ * @param $property
+ *   The cvterm name of the property to insert
+ * @param $value
+ *   The value of the property to insert
+ * @param $update_if_present
+ *   A boolean indicated whether to update the record if it's already present
+ *
+ * @return
+ *   True of success, False otherwise
+ *
+ * @ingroup tripal_library_api
+ */
 function tripal_library_insert_property($library_id,$property,$value,$update_if_present = 0){
    return tripal_core_insert_property('library',$library_id,$property,'tripal',$value,$update_if_present);
 }
+
 /**
-* Adds a single property to an existing library record.
-*
-* @ingroup tripal_api
-*/
+ * Update a given property
+ *
+ * @param $library_id
+ *   The library_id of the property to update
+ * @param $property
+ *   The cvterm name of the property to update
+ * @param $value
+ *   The value of the property to update
+ * @param $insert_if_missing 
+ *   A boolean indicated whether to insert the record if it's absent
+ *
+ * Note: The property will be identified using the unique combination of the $library_id and $property
+ * and then it will be updated with the supplied value
+ *
+ * @return
+ *   True of success, False otherwise
+ *
+ * @ingroup tripal_library_api
+ */
 function tripal_library_update_property($library_id,$property,$value,$insert_if_missing = 0){
    return tripal_core_update_property('library',$library_id,$property,'tripal',$value, $insert_if_missing);
 }
 /**
-* Adds a single property to an existing library record.
-*
-* @ingroup tripal_api
-*/
+ * Delete a given property
+ *
+ * @param $library_id
+ *   The library_id of the property to delete
+ * @param $property
+ *   The cvterm name of the property to delete
+ *
+ * Note: The property will be identified using the unique combination of the $library_id and $property
+ * and then it will be deleted
+ *
+ * @return
+ *   True of success, False otherwise 
+ *
+ * @ingroup tripal_library_api
+ */
 function tripal_library_delete_property($library_id,$property){
    return tripal_core_delete_property('library',$library_id,$property,'tripal');
 }

+ 15 - 5
tripal_library/tripal_library.install

@@ -1,7 +1,9 @@
 <?php
 
-/*******************************************************************************
+/**
 *  Implementation of hook_install();
+*
+* @ingroup tripal_library
 */
 function tripal_library_install(){
    // create the module's data directory
@@ -52,16 +54,20 @@ function tripal_library_install(){
 
 }
 
-/*******************************************************************************
+/**
  * Implementation of hook_schema().
+ *
+ * @ingroup tripal_library
  */
 function tripal_library_schema() {
    $schema = tripal_library_get_schemas();
    return $schema;
 }
 
-/*******************************************************************************
+/**
  * Implementation of hook_uninstall()
+ *
+ * @ingroup tripal_library
  */
 function tripal_library_uninstall(){
    drupal_uninstall_schema('tripal_library');
@@ -87,11 +93,13 @@ function tripal_library_uninstall(){
    }
 }
 
-/*******************************************************************************
+/**
  * This function simply defines all tables needed for the module to work
  * correctly.  By putting the table definitions in a separate function we
  * can easily provide the entire list for hook_install or individual
  * tables for an update.
+ *
+ * @ingroup tripal_library
  */
 function tripal_library_get_schemas (){
   $schema = array();
@@ -127,9 +135,11 @@ function tripal_library_get_schemas (){
   return $schema;
 }
 
-/*******************************************************************************
+/**
  * Implementation of hook_requirements(). Make sure 'Tripal Core' is enabled
  * before installation
+ *
+ * @ingroup tripal_library
  */
 function tripal_library_requirements($phase) {
    $requirements = array();

+ 116 - 41
tripal_library/tripal_library.module

@@ -1,13 +1,23 @@
 <?php
 
+/**
+ * @defgroup tripal_library Library
+ * @{
+ * Provides functions for managing chado libraries including creating details pages for each library
+ * @}
+ * @ingroup tripal_modules
+ */
+ 
 require('tripal_library.api.inc');
 
-/*******************************************************************************
+/**
  * Display help and module information
  * @param path which path of the site we're displaying help
  * @param arg array that holds the current path as would be returned from arg()
  * function
  * @return help text for the path
+ *
+ * @ingroup tripal_library
  */
 function tripal_library_help($path, $arg) {
    $output = '';
@@ -21,9 +31,11 @@ function tripal_library_help($path, $arg) {
    return $output;
 }
 
-/*******************************************************************************
+/**
  * Provide information to drupal about the node types that we're creating
  * in this module
+ *
+ * @ingroup tripal_library
  */
 function tripal_library_node_info() {
    $nodes = array();
@@ -40,10 +52,12 @@ function tripal_library_node_info() {
    return $nodes;
 }
 
-/*******************************************************************************
+/**
  * Set the permission types that the chado module uses.  Essentially we
  * want permissionis that protect creation, editing and deleting of chado
  * data objects
+ *
+ * @ingroup tripal_library
  */
 function tripal_library_perm(){
    return array(
@@ -53,8 +67,10 @@ function tripal_library_perm(){
       'edit chado_library content',
    );
 }
-/************************************************************************
+/**
  *  Set the permission types that the module uses.
+ *
+ * @ingroup tripal_library
  */
 function chado_library_access($op, $node, $account) {
    if ($op == 'create') {
@@ -78,10 +94,12 @@ function chado_library_access($op, $node, $account) {
    }
    return FALSE;
 }
-/*******************************************************************************
+/**
  * Menu items are automatically added for the new node types created
  * by this module to the 'Create Content' Navigation menu item.  This function
  * adds more menu items needed for this module.
+ *
+ * @ingroup tripal_library
  */
 function tripal_library_menu() {
    $items = array();
@@ -122,11 +140,13 @@ function tripal_library_menu() {
    return $items;
 }
 
-/*************************************************************************
+/**
  * Implements hook_views_api()
  * Purpose: Essentially this hook tells drupal that there is views support for
  *  for this module which then includes tripal_db.views.inc where all the
  *  views integration code is
+ *
+ * @ingroup tripal_library
  */ 
 function tripal_library_views_api() {
    return array(
@@ -134,10 +154,12 @@ function tripal_library_views_api() {
    );
 }
 
-/*************************************************************************
+/**
  * Purpose: Provide Guidance to new Tripal Admin
  *
  * @return HTML Formatted text
+ *
+ * @ingroup tripal_library
  */
 function tripal_library_module_description_page() {
   $text = '';
@@ -236,8 +258,10 @@ function tripal_library_module_description_page() {
   return $text;
 }
 
-/*******************************************************************************
+/**
  * Administrative settings form
+ *
+ * @ingroup tripal_library
  */
 function tripal_library_admin () {
    $form = array();
@@ -270,10 +294,12 @@ function tripal_library_admin () {
    return system_settings_form($form);
 }
 
-/*******************************************************************************
+/**
  * HOOK: Implementation of hook_nodeapi()
  * Display library information for associated features or organisms
  * This function also provides contents for indexing
+ *
+ * @ingroup tripal_library
  */
 function tripal_library_nodeapi(&$node, $op, $teaser, $page) {
 
@@ -310,10 +336,12 @@ function tripal_library_nodeapi(&$node, $op, $teaser, $page) {
    }
 }
 
-/************************************************************************
+/**
  *  We need to let drupal know about our theme functions and their arguments.
  *  We create theme functions to allow users of the module to customize the
  *  look and feel of the output generated in this module
+ *
+ * @ingroup tripal_library
  */
 function tripal_library_theme () {
    return array(
@@ -355,10 +383,12 @@ function tripal_library_theme () {
    );
 }
 
-/************************************************************************
+/**
  * This function is an extension of the chado_feature_view and
  * chado_organism_view by providing the markup for the library object
  * THAT WILL BE INDEXED.
+ *
+ * @ingroup tripal_library
  */
 function theme_tripal_library_search_index ($node) {
 
@@ -411,8 +441,10 @@ function theme_tripal_library_search_index ($node) {
    return $content;
 }
 
-/*******************************************************************************
+/**
  * This function shows library information on an organism/feature node
+ *
+ * @ingroup tripal_library
  */
 function theme_tripal_library_node_libraries($node) {
    $content = "";
@@ -459,8 +491,10 @@ function theme_tripal_library_node_libraries($node) {
    return $content;
 }
 
-/************************************************************************
+/**
+ *
  *
+ * @ingroup tripal_library
  */
 function get_tripal_library_admin_form_menu_set(&$form){
    $form['menu'] = array(
@@ -491,8 +525,10 @@ function get_tripal_library_admin_form_menu_set(&$form){
       '#weight' => 1,
    );
 }
-/************************************************************************
+/**
  *
+ *
+ * @ingroup tripal_library
  */
 function get_tripal_library_admin_form_cleanup_set(&$form) {
    $form['cleanup'] = array(
@@ -514,8 +550,10 @@ function get_tripal_library_admin_form_cleanup_set(&$form) {
       '#weight' => 2,
    );
 }
-/************************************************************************
+/**
+ *
  *
+ * @ingroup tripal_library
  */
 function get_tripal_library_admin_form_taxonomy_set(&$form) {
    $form['taxonify'] = array(
@@ -559,8 +597,9 @@ function get_tripal_library_admin_form_taxonomy_set(&$form) {
       '#weight'      => 3
    );
 }
-/************************************************************************
+/**
  *
+ * @ingroup tripal_library
  */
 function get_tripal_library_admin_form_reindex_set(&$form) {
    // define the fieldsets
@@ -602,8 +641,9 @@ function get_tripal_library_admin_form_reindex_set(&$form) {
       '#weight' => 3,
    );
 }
-/************************************************************************
+/**
  *
+ * @ingroup tripal_library
  */
 function get_tripal_library_admin_form_sync_set (&$form) {
    // define the fieldsets
@@ -670,8 +710,9 @@ function get_tripal_library_admin_form_sync_set (&$form) {
       );
    }
 }
-/************************************************************************
+/**
  *
+ * @ingroup tripal_library
  */
 function tripal_library_admin_validate($form, &$form_state) {
    global $user;  // we need access to the user info
@@ -754,8 +795,9 @@ function tripal_library_admin_validate($form, &$form_state) {
          'tripal_library_cleanup',$job_args,$user->uid);
    }
 }
-/*******************************************************************************
+/**
  *
+ * @ingroup tripal_library
  */
 function tripal_library_show_libraries (){
    // Show libraries stored in Drupal's {chado_library} table
@@ -773,18 +815,21 @@ function tripal_library_show_libraries (){
    }
 }
 
-/*******************************************************************************
+/**
  *
+ * @ingroup tripal_library
  */
 function tripal_library_cron (){
 
 }
-/*******************************************************************************
+/**
  *
  *                  CHADO_LIBRARY NODE FUNCTIONS
  *
  *  The following function proves access control for users trying to
  *  perform actions on data managed by this module
+ *
+ * @ingroup tripal_library
  */
 function tripal_library_library_access($op, $node, $account){
    if ($op == 'create') {
@@ -807,8 +852,10 @@ function tripal_library_library_access($op, $node, $account){
       }
    }
 }
-/*******************************************************************************
+/**
  *  validates submission of form when adding or updating a library node
+ *
+ * @ingroup tripal_library
  */
 function chado_library_validate($node){
    $lib = 0;
@@ -837,10 +884,12 @@ function chado_library_validate($node){
    }
 }
 
-/*******************************************************************************
+/**
  *  When a new chado_library node is created we also need to add information
  *  to our chado_library table.  This function is called on insert of a new node
  *  of type 'chado_library' and inserts the necessary information.
+ *
+ * @ingroup tripal_library
  */
 function chado_library_insert($node){
 
@@ -882,8 +931,10 @@ function chado_library_insert($node){
 		);
 	}
 }
-/*******************************************************************************
+/**
  * Update nodes
+ *
+ * @ingroup tripal_library
  */
 function chado_library_update($node){
    if($node->revision){
@@ -917,8 +968,10 @@ function chado_library_update($node){
 }
 
 
-/*******************************************************************************
+/**
  * Add the library as a taxonomy term for associating with library_features
+ *
+ * @ingroup tripal_library
  */
 function tripal_library_add_taxonomy ($node,$library_id){
 
@@ -966,9 +1019,11 @@ function tripal_library_add_taxonomy ($node,$library_id){
    }
 }
 
-/*******************************************************************************
+/**
  *  When editing or creating a new node of type 'chado_library' we need
  *  a form.  This function creates the form that will be used for this.
+ *
+ * @ingroup tripal_library
  */
 function chado_library_form ($node){
    $form = array();
@@ -1075,8 +1130,10 @@ function chado_library_form ($node){
 
    return $form;
 }
-/************************************************************************
+/**
+ *
  *
+ * @ingroup tripal_library
  */
 function tripal_library_sync_libraries ($library_id = NULL, $job_id = NULL){
 
@@ -1130,9 +1187,11 @@ function tripal_library_sync_libraries ($library_id = NULL, $job_id = NULL){
    return $page_content;
 }
 
-/************************************************************************
+/**
  *  When a node is requested by the user this function is called to allow us
  *  to add auxiliary data to the node object.
+ *
+ * @ingroup tripal_library
  */
 function chado_library_load($node){
    // get the feature details from chado
@@ -1145,9 +1204,11 @@ function chado_library_load($node){
    return $additions;
 
 }
-/*******************************************************************************
+/**
  *  This function customizes the view of the chado_library node.  It allows
  *  us to generate the markup. This function is required for node [Preview]
+ *
+ * @ingroup tripal_library
  */
 function chado_library_view ($node, $teaser = FALSE, $page = FALSE) {
    // use drupal's default node view:
@@ -1171,11 +1232,13 @@ function chado_library_view ($node, $teaser = FALSE, $page = FALSE) {
    return $node;
 }
 
-/************************************************************************
- **  This function creates the html markup for the library table.
- **  It can be overridden in the theme for the site by adding a php
- **  method in the template.php file named
- **  <theme_name>_tripal_library_library_table(&$libraries)
+/**
+ *  This function creates the html markup for the library table.
+ *  It can be overridden in the theme for the site by adding a php
+ *  method in the template.php file named
+ *  [theme_name]_tripal_library_library_table(&$libraries)
+ *
+ * @ingroup tripal_library
  */
 
 function theme_tripal_library_library_table ($libraries) {
@@ -1220,8 +1283,9 @@ function theme_tripal_library_library_table ($libraries) {
    return $output;
 }
 
-/************************************************************************
+/**
  *
+ * @ingroup tripal_library
  */
 function tripal_library_feature_set_taxonomy($library_id = NULL){
 
@@ -1273,8 +1337,9 @@ function tripal_library_feature_set_taxonomy($library_id = NULL){
       print "Updated $feature->feature_id as $feature->libname\n";
    }
 }
-/*******************************************************************************
+/**
  *
+ * @ingroup tripal_library
  */
 function tripal_library_reindex_features ($library_id = NULL, $job_id = NULL){
    $i = 0;
@@ -1320,8 +1385,9 @@ function tripal_library_reindex_features ($library_id = NULL, $job_id = NULL){
       $i++;
    }
 }
-/*******************************************************************************
+/**
  *
+ * @ingroup tripal_library
  */
 function tripal_library_taxonify_features ($library_id = NULL, $job_id = NULL){
    $i = 0;
@@ -1377,8 +1443,9 @@ function tripal_library_taxonify_features ($library_id = NULL, $job_id = NULL){
       $i++;
    }
 }
-/*******************************************************************************
+/**
  * Delete data from drupal and chado databases when a node is deleted
+ * @ingroup tripal_library
  */
 function chado_library_delete(&$node){
    // Before removing, get library_id so we can remove it from chado database
@@ -1410,11 +1477,13 @@ function chado_library_delete(&$node){
    tripal_db_set_active($previous_db);
 }
 
-/************************************************************************
+/**
  * Display block with libraries
  * @param op    - parameter to define the phase being called for the block
  * @param delta - id of the block to return (ignored when op is list)
  * @param edit  - when op is save, contains the submitted form data
+ *
+ * @ingroup tripal_library
  */
 function tripal_library_block($op = 'list', $delta = '0', $edit = array()){
    switch($op){
@@ -1478,11 +1547,16 @@ function tripal_library_block($op = 'list', $delta = '0', $edit = array()){
    }
 }
 
-/*******************************************************************************
+/**
  * This function uses library_id's of all drupal library nodes as input and
  * pull the library information (name, uniquename, type, genus, species,
  * common_name, description) from chado database. The return type is an object
  * array that stores sorted $library objects
+ *
+ * This function is DEPRECATED
+ * Please use tripal_core_chado_generate_vars
+ * 
+ * @ingroup tripal_library_api
  */
 function get_chado_libraries() {
    $sql_drupal = "SELECT COUNT (library_id) FROM {chado_library}";
@@ -1525,8 +1599,9 @@ function get_chado_libraries() {
       return $libraries;
    }
 }
-/************************************************************************
+/**
  *
+ * @ingroup tripal_library
  */
 function tripal_library_cleanup($dummy = NULL, $job_id = NULL) {
 

+ 19 - 4
tripal_library/tripal_library.views.inc

@@ -9,7 +9,16 @@
  *  Documentation on views integration can be found at 
  *  http://views2.logrus.com/doc/html/index.html.
  */
- 
+
+/**
+ * @defgroup tripal_library_views Library Views Integration
+ * @ingroup views
+ * @ingroup tripal_library
+ */
+
+require_once('views/library.views.inc');
+require_once('views/chado_library.views.inc');
+require_once('views/misc_tables.views.inc'); 
 /*************************************************************************
  * Implements hook_views_data()
  * Purpose: Describe chado/tripal tables & fields to views
@@ -18,10 +27,9 @@
  *   definitions keyed by chado/tripal table name. Each table definition 
  *   includes basic details about the table, fields in that table and
  *   relationships between that table and others (joins)
+ *
+ * @ingroup tripal_library_views
  */
-require_once('views/library.views.inc');
-require_once('views/chado_library.views.inc');
-require_once('views/misc_tables.views.inc');
 function tripal_library_views_data()  {
   $data = array();
   
@@ -38,6 +46,8 @@ function tripal_library_views_data()  {
  *   where a handler describes either "the type of field", 
  *   "how a field should be filtered", "how a field should be sorted"
  * @return: An array of handler definitions
+ *
+ * @ingroup tripal_library_views
  */
 function tripal_library_views_handlers() {
  return array(
@@ -58,6 +68,11 @@ function tripal_library_views_handlers() {
  );
 }
 
+/**
+ *
+ *
+ * @ingroup tripal_library_views
+ */
 function tripal_library_views_default_views () {
   $views = array();
   

+ 1 - 0
tripal_library/views/chado_library.views.inc

@@ -7,6 +7,7 @@
  *
  * The main need for description of this table to views is to join chado data with drupal nodes
  *
+ * @ingroup tripal_library_views
  */
 function retrieve_chado_library_views_data () {
 	global $db_url;

+ 2 - 0
tripal_library/views/library.views.inc

@@ -25,6 +25,8 @@
  *    constraint library_c1 unique (organism_id,uniquename,type_id)
  * );
  * @endcode
+ *
+ * @ingroup tripal_library_views
  */
 function retrieve_library_views_data() {
 	global $db_url;

+ 2 - 0
tripal_library/views/misc_tables.views.inc

@@ -15,6 +15,8 @@
         ),
       ); 
  *   @endcode
+ *
+ * @ingroup tripal_library_views
  */
 function retrieve_library_misc_tables_views_data() {
   $data = array();

+ 7 - 1
tripal_organism/tripal_organism.api.inc

@@ -1,11 +1,13 @@
 <?php
-
+ 
 /*************************************************************************
  * Purpose: Create an options array to be used in a form element
  *   which provides a list of all chado organisms
  *
  * @return an array(organism_id => common_name) 
  *   for each organism in the chado organism table
+ *
+ * @ingroup tripal_organism_api
  */
 function tripal_organism_get_organism_options() {
 
@@ -28,6 +30,8 @@ function tripal_organism_get_organism_options() {
  * Purpose: Return a given organism object using the nid
  *
  * @return organism object created by node load
+ *
+ * @ingroup tripal_organism_api
  */
 function tripal_organism_get_organism_by_nid ($nid) {
 
@@ -39,6 +43,8 @@ function tripal_organism_get_organism_by_nid ($nid) {
  * Purpose: Return a given organism object using the organism id
  *
  * @return organism object created by node load
+ *
+ * @ingroup tripal_organism_api
  */
 function tripal_organism_get_organism_by_organism_id ($organism_id) {
 

+ 15 - 5
tripal_organism/tripal_organism.install

@@ -1,7 +1,9 @@
 <?php
 
-/*******************************************************************************
+/**
 *  Implementation of hook_install();
+*
+* @ingroup tripal_organism
 */
 function tripal_organism_install(){
 
@@ -22,16 +24,20 @@ function tripal_organism_install(){
 
 }
 
-/*******************************************************************************
+/**
 * Implementation of hook_schema().
+*
+* @ingroup tripal_organism
 */
 function tripal_organism_schema() {
    $schema = tripal_organism_get_schemas();
 	return $schema;
 }
 
-/*******************************************************************************
+/**
 * Implementation of hook_uninstall()
+*
+* @ingroup tripal_organism
 */
 function tripal_organism_uninstall(){
    drupal_uninstall_schema('tripal_organism');
@@ -54,11 +60,13 @@ function tripal_organism_uninstall(){
    }
 }
 
-/************************************************************************
+/**
 * This function simply defines all tables needed for the module to work
 * correctly.  By putting the table definitions in a separate function we
 * can easily provide the entire list for hook_install or individual
 * tables for an update.
+*
+* @ingroup tripal_organism
 */
 function tripal_organism_get_schemas (){
   $schema = array();
@@ -95,9 +103,11 @@ function tripal_organism_get_schemas (){
   return $schema;
 }
 
-/*******************************************************************************
+/**
  * Implementation of hook_requirements(). Make sure 'Tripal Core' is enabled
  * before installation
+ *
+ * @ingroup tripal_organism
  */
 function tripal_organism_requirements($phase) {
    $requirements = array();

+ 95 - 34
tripal_organism/tripal_organism.module

@@ -2,9 +2,14 @@
 
 require_once "tripal_organism.api.inc";
 
+/**
+ * @defgroup tripal_organism Organism
+ * @ingroup tripal_modules
+ */
 
-/*************************************************************************
+/**
 *
+* @ingroup tripal_organism
 */
 function tripal_organism_init(){
 
@@ -12,9 +17,11 @@ function tripal_organism_init(){
    drupal_add_js (drupal_get_path('theme', 'tripal').'/js/tripal_organism.js'); 
    drupal_add_css(drupal_get_path('theme', 'tripal').'/css/tripal_organism.css');
 }
-/*******************************************************************************
+/**
  *  Provide information to drupal about the node types that we're creating
  *  in this module
+ *
+ * @ingroup tripal_organism
  */
 function tripal_organism_node_info() {
    $nodes = array();
@@ -31,11 +38,13 @@ function tripal_organism_node_info() {
    return $nodes;
 }
 
-/*******************************************************************************
+/**
  * Display block with organisms
  * @param op    - parameter to define the phase being called for the block
  * @param delta - id of the block to return (ignored when op is list)
  * @param edit  - when op is save, contains the submitted form data
+ *
+ * @ingroup tripal_organism
  */
 function tripal_organism_block($op = 'list', $delta = '0', $edit = array()){
    switch($op){
@@ -76,10 +85,12 @@ function tripal_organism_block($op = 'list', $delta = '0', $edit = array()){
       }
    }
 }
-/*******************************************************************************
+/**
  *  Menu items are automatically added for the new node types created
  *  by this module to the 'Create Content' Navigation menu item.  This function
  *  adds more menu items needed for this module.
+ *
+ * @ingroup tripal_organism
  */
 function tripal_organism_menu() {
   $items = array();
@@ -112,9 +123,11 @@ function tripal_organism_menu() {
    
   return $items;
 }
-/*******************************************************************************
+/**
  *  The following function proves access control for users trying to
  *  perform actions on data managed by this module
+ *
+ * @ingroup tripal_organism
  */
 function chado_organism_access($op, $node, $account){
    switch ($op){
@@ -128,10 +141,12 @@ function chado_organism_access($op, $node, $account){
         return user_access('access chado_organism content', $account);
    }
 }
-/*******************************************************************************
+/**
 *  Set the permission types that the chado module uses.  Essentially we
 *  want permissionis that protect creation, editing and deleting of chado
-#  data objects
+*  data objects
+*
+* @ingroup tripal_organism
 */
 function tripal_organism_perm(){
    return array(
@@ -142,10 +157,12 @@ function tripal_organism_perm(){
    );
 }
 
-/*************************************************************************
+/**
  * Purpose: Provide Guidance to new Tripal Admin
  *
  * @return HTML Formatted text
+ *
+ * @ingroup tripal_organism
  */
 function tripal_organism_module_description_page() {
   $text = '';
@@ -277,8 +294,10 @@ function tripal_organism_module_description_page() {
   return $text;
 }
 
-/*******************************************************************************
+/**
  * Administrative settings for chado_orgnism
+ *
+ * @ingroup tripal_organism
  */
 function tripal_organism_admin () {
 
@@ -310,8 +329,10 @@ function tripal_organism_admin () {
 
    return system_settings_form($form);
 }
-/************************************************************************
+/**
+ *
  *
+ * @ingroup tripal_organism
  */
 function get_tripal_organism_admin_form_cleanup_set(&$form) {
    $form['cleanup'] = array(
@@ -333,8 +354,10 @@ function get_tripal_organism_admin_form_cleanup_set(&$form) {
       '#weight' => 2,
    );
 }
-/************************************************************************
+/**
+*
 *
+* @ingroup tripal_organism
 */
 function get_tripal_organism_admin_form_taxonomy_set(&$form) {
    $form['taxonify'] = array(
@@ -378,8 +401,9 @@ function get_tripal_organism_admin_form_taxonomy_set(&$form) {
       '#weight'      => 3
   );
 }
-/************************************************************************
+/**
 *
+* @ingroup tripal_organism
 */
 function get_tripal_organism_admin_form_reindex_set(&$form) {
    // define the fieldsets
@@ -421,8 +445,9 @@ function get_tripal_organism_admin_form_reindex_set(&$form) {
       '#weight' => 3,
   );
 }
-/************************************************************************
+/**
 *
+* @ingroup tripal_organism
 */
 function get_tripal_organism_admin_form_sync_set (&$form) {
    // define the fieldsets
@@ -496,8 +521,9 @@ function get_tripal_organism_admin_form_sync_set (&$form) {
       );
    }
 }
-/************************************************************************
+/**
 *
+* @ingroup tripal_organism
 */
 function tripal_organism_admin_validate($form, &$form_state) {
    global $user;  // we need access to the user info
@@ -584,10 +610,12 @@ function tripal_organism_admin_validate($form, &$form_state) {
          'tripal_organisms_cleanup',$job_args,$user->uid);
    }
 }
-/*******************************************************************************
+/**
  *  We need to let drupal know about our theme functions and their arguments.
  *  We create theme functions to allow users of the module to customize the
  *  look and feel of the output generated in this module
+ *
+ * @ingroup tripal_organism
  */
 function tripal_organism_theme () {
    return array(
@@ -608,8 +636,9 @@ function tripal_organism_theme () {
       ),
    );
 }
-/*******************************************************************************
+/**
  * 
+ * @ingroup tripal_organism
  */
 function tripal_organism_nodeapi(&$node, $op, $teaser, $page) {
 
@@ -620,8 +649,9 @@ function tripal_organism_nodeapi(&$node, $op, $teaser, $page) {
          }
    }
 }
-/*******************************************************************************
+/**
  *
+ * @ingroup tripal_organism
  */
 function tripal_organism_cron (){
    // we want to make sure that any new organisms or features that were
@@ -629,8 +659,10 @@ function tripal_organism_cron (){
    // nodes created for themselves in drupal.
 //   tripal_organism_sync_organisms();
 }
+
 /**
 *
+* @ingroup tripal_organism
 */
 function chado_organism_validate($node,&$form){
    // check to see if the organism already exists, but only for an insert
@@ -646,10 +678,12 @@ function chado_organism_validate($node,&$form){
       }
    }
 }
-/*******************************************************************************
+/**
  *  When a new chado_organism node is created we also need to add information
  *  to our chado_organism table.  This function is called on insert of a new node
  *  of type 'chado_organism' and inserts the necessary information.
+ *
+ * @ingroup tripal_organism
  */
 function chado_organism_insert($node){
 
@@ -691,8 +725,10 @@ function chado_organism_insert($node){
    // add the image 
    chado_organism_add_image($node);
 }
-/*******************************************************************************
+/**
  * Update organisms
+ *
+ * @ingroup tripal_organism
  */
 function chado_organism_update($node){
    if($node->revision){
@@ -722,9 +758,11 @@ function chado_organism_update($node){
 
    }
 }
-/*******************************************************************************
+/**
  * Delete organism from both drupal and chado databases. Check dependency before
  * deleting from chado.
+ *
+ * @ingroup tripal_organism
  */
 function chado_organism_delete($node){
    $organism_id = chado_get_id_for_node('organism',$node);
@@ -761,8 +799,10 @@ function chado_organism_delete($node){
    }
    tripal_db_set_active($previous_db);
 }
-/*******************************************************************************
+/**
+*
 *
+* @ingroup tripal_organism
 */
 function chado_organism_add_image($node){
    // check to see if a file was uploaded. If so then copy it to the images
@@ -783,9 +823,11 @@ function chado_organism_add_image($node){
 }
 
 
-/*******************************************************************************
+/**
  *  When editing or creating a new node of type 'chado_organism' we need
  *  a form.  This function creates the form that will be used for this.
+ *
+ * @ingroup tripal_organism
  */
 function chado_organism_form ($node, $param){
    $organism = $node->organism;
@@ -865,9 +907,11 @@ function chado_organism_form ($node, $param){
    return $form;
 }
 
-/*******************************************************************************
+/**
  *  When a node is requested by the user this function is called to allow us
  *  to add auxiliary data to the node object.
+ *
+ * @ingroup tripal_organism
  */
 function chado_organism_load($node){
    // find the organism and add in the details
@@ -882,9 +926,11 @@ function chado_organism_load($node){
    return $additions;
 }
 
-/*******************************************************************************
+/**
  *  This function customizes the view of the chado_organism node.  It allows
  *  us to generate the markup.
+ *
+ * @ingroup tripal_organism
  */
 function chado_organism_view ($node, $teaser = FALSE, $page = FALSE) {
    // use drupal's default node view:
@@ -892,8 +938,10 @@ function chado_organism_view ($node, $teaser = FALSE, $page = FALSE) {
    return $node;
 }
 
-/*******************************************************************************
+/**
  * Synchronize organisms from chado to drupal
+ *
+ * @ingroup tripal_organism
  */
 function tripal_organism_sync_organisms ($organism_id = NULL, $job_id = NULL){
    global $user;
@@ -942,12 +990,14 @@ function tripal_organism_sync_organisms ($organism_id = NULL, $job_id = NULL){
    }
    return $page_content;
 }
-/*******************************************************************************
+/**
  * Display help and module information
  * @param path which path of the site we're displaying help
  * @param arg array that holds the current path as would be returned from arg()
  * function
  * @return help text for the path
+ *
+ * @ingroup tripal_organism
  */
 function tripal_organism_help($path, $arg) {
   $output = '';
@@ -961,9 +1011,11 @@ function tripal_organism_help($path, $arg) {
   return $output;
 }
 
-/*******************************************************************************
+/**
  * Display the summary view of organisms when click on the 'Organisms'
  * primary-link
+ *
+ * @ingroup tripal_organism
  */
 function tripal_organism_show_organisms (){
    // Show libraries stored in Drupal's {chado_organism} table
@@ -977,8 +1029,9 @@ function tripal_organism_show_organisms (){
                "synchronize organisms.");
    }
 }
-/*******************************************************************************
+/**
 *
+* @ingroup tripal_organism
 */
 function theme_tripal_organism_organism_page($organisms) {
 
@@ -1015,11 +1068,13 @@ function theme_tripal_organism_organism_page($organisms) {
    return $output;
 }
 
-/*******************************************************************************
+/**
  * This function uses organism_id's of all drupal organism nodes as input and
  * pull the organism information (genus, species, common_name, comment) from
  * chado database. The return type is an object array that stores $organism
  * objects sorted by common_name
+ *
+ * @ingroup tripal_organism
  */
 function get_chado_organisms() {
    $sql_drupal = "SELECT COUNT (organism_id) FROM {chado_organism}";
@@ -1050,8 +1105,9 @@ function get_chado_organisms() {
       return $organisms;
    }
 }
-/*******************************************************************************
+/**
  *
+ * @ingroup tripal_organism
  */
 function tripal_organism_reindex_features ($organism_id = NULL, $job_id = NULL){
    $i = 0;
@@ -1086,8 +1142,9 @@ function tripal_organism_reindex_features ($organism_id = NULL, $job_id = NULL){
       $i++;
    }
 }
-/*******************************************************************************
+/**
  *
+ * @ingroup tripal_organism
  */
 function tripal_organism_taxonify_features ($organism_id = NULL, $job_id = NULL){
    $i = 0;
@@ -1132,8 +1189,9 @@ function tripal_organism_taxonify_features ($organism_id = NULL, $job_id = NULL)
       $i++;
    }
 }
-/*******************************************************************************
+/**
  *  Returns a list of organisms that are currently synced with Drupal
+ * @ingroup tripal_organism
  */
 function tripal_organism_get_synced() {
 
@@ -1156,8 +1214,9 @@ function tripal_organism_get_synced() {
    }  
    return $org_list;
 }
-/************************************************************************
+/**
  *
+ * @ingroup tripal_organism
  */
 function tripal_organisms_cleanup($dummy = NULL, $job_id = NULL) {
 
@@ -1225,11 +1284,13 @@ function tripal_organisms_cleanup($dummy = NULL, $job_id = NULL) {
    return '';
 }
 
-/*************************************************************************
+/**
  * Implements hook_views_api()
  * Purpose: Essentially this hook tells drupal that there is views support for
  *  for this module which then includes tripal_db.views.inc where all the
  *  views integration code is
+ *
+ * @ingroup tripal_organism
  */ 
 function tripal_organism_views_api() {
    return array(

+ 19 - 5
tripal_organism/tripal_organism.views.inc

@@ -9,8 +9,16 @@
  *  Documentation on views integration can be found at 
  *  http://views2.logrus.com/doc/html/index.html.
  */
- 
-/*************************************************************************
+
+/**
+ * @defgroup tripal_organism_views Organism Views Integration
+ * @ingroup views
+ * @ingroup tripal_organism
+ */
+
+require_once('views/organism.views.inc');
+require_once('views/chado_organism.views.inc'); 
+/**
  * Implements hook_views_data()
  * Purpose: Describe chado/tripal tables & fields to views
  * @return: a data array which follows the structure outlined in the
@@ -18,9 +26,9 @@
  *   definitions keyed by chado/tripal table name. Each table definition 
  *   includes basic details about the table, fields in that table and
  *   relationships between that table and others (joins)
+ *
+ * @ingroup tripal_organism_views
  */
-require_once('views/organism.views.inc');
-require_once('views/chado_organism.views.inc');
 function tripal_organism_views_data()  {
   $data = array();
   
@@ -30,12 +38,14 @@ function tripal_organism_views_data()  {
   return $data;
 }
 
-/*************************************************************************
+/**
  * Implements hook_views_handlers()
  * Purpose: Register all custom handlers with views
  *   where a handler describes either "the type of field", 
  *   "how a field should be filtered", "how a field should be sorted"
  * @return: An array of handler definitions
+ *
+ * @ingroup tripal_organism_views
  */
 function tripal_organism_views_handlers() {
  return array(
@@ -53,6 +63,10 @@ function tripal_organism_views_handlers() {
  );
 }
 
+/**
+ *
+ * @ingroup tripal_organism_views
+ */
 function tripal_organism_views_default_views () {
   $views = array();
   

+ 1 - 0
tripal_organism/views/chado_organism.views.inc

@@ -7,6 +7,7 @@
  *
  * The main need for description of this table to views is to join chado data with drupal nodes
  *
+ * @ingroup tripal_organism_views
  */
 function retrieve_chado_organism_views_data () {
 	global $db_url;

+ 2 - 0
tripal_organism/views/organism.views.inc

@@ -21,6 +21,8 @@
  *        constraint organism_c1 unique (genus,species)
  * );
  * @endcode
+ *
+ * @ingroup tripal_organism_views
  */
 function retrieve_organism_views_data() {
 	global $db_url;

+ 25 - 19
tripal_stock/tripal_stock.api.inc

@@ -1,4 +1,10 @@
 <?php
+
+/**
+ * @defgroup tripal_stock_api Stock Module API
+ * @ingroup tripal_api
+ * @ingroup tripal_stock
+ */
  
 /**
  * Purpose: Return a given stock node using the nid
@@ -9,9 +15,9 @@
  * @return
  *   stock node with the passed in node ID
  *
- * @ingroup tripal_api
+ * @ingroup tripal_stock_api
  */
-function triapl_stock_get_stock_by_nid ($nid) {
+function tripal_stock_get_stock_by_nid ($nid) {
 	
 	return node_load($nid);
 	
@@ -23,7 +29,7 @@ function triapl_stock_get_stock_by_nid ($nid) {
  * @return 
  *   Stock object created by node load
  *
- * @ingroup tripal_api
+ * @ingroup tripal_stock_api
  */
 function tripal_stock_get_stock_by_stock_id ($stock_id) {
 
@@ -45,7 +51,7 @@ function tripal_stock_get_stock_by_stock_id ($stock_id) {
  * @return 
  *   An array of node objects keyed by stock_id
  *
- * @ingroup tripal_api
+ * @ingroup tripal_stock_api
  */
 function tripal_stock_get_all_stocks() {
 	$sql = "SELECT stock_id, nid from {chado_stock}";
@@ -94,7 +100,7 @@ function tripal_stock_get_all_stocks() {
  * organism_id foreign key constraint by specifying the genus and species.  The cvterm is also 
  * specified using its foreign key and the cv_id for the cvterm is nested as well.
  *
- * @ingroup tripal_api
+ * @ingroup tripal_stock_api
  */
 function tripal_stock_get_stocks($values) {
 
@@ -153,7 +159,7 @@ function tripal_stock_get_stocks($values) {
  * The above code selects all Lens culinaris stocks with the synonym (stock property) CDC Redberry.
  * The nodes for each stock selected are loaded and returned in an array.
  *
- * @ingroup tripal_api
+ * @ingroup tripal_stock_api
  */
 function tripal_stock_get_stocks_by_stockprop($stockprop_values, $stock_values) {
 
@@ -193,7 +199,7 @@ function tripal_stock_get_stocks_by_stockprop($stockprop_values, $stock_values)
  * @return
  *   An array of stock node objects
  *
- * @ingroup tripal_api
+ * @ingroup tripal_stock_api
  */
 function tripal_stock_get_stock_by_name_identifier($name, $organism_id) {
   $stock_ids = array();
@@ -310,7 +316,7 @@ function tripal_stock_get_stock_by_name_identifier($name, $organism_id) {
  * @return
  *    Array describing the stock table
  *
- * @ingroup tripal_api
+ * @ingroup tripal_schema_api
  */
 function tripal_stock_chado_stock_schema() {
   $description = array();
@@ -361,7 +367,7 @@ function tripal_stock_chado_stock_schema() {
  * @return
  *    Array describing the stockprop table
  *
- * @ingroup tripal_api
+ * @ingroup tripal_schema_api
  */
 function tripal_stock_chado_stockprop_schema() {
   $description = array();
@@ -392,7 +398,7 @@ function tripal_stock_chado_stockprop_schema() {
  * @return
  *    Array describing the stockprop_pub table
  *
- * @ingroup tripal_api
+ * @ingroup tripal_schema_api
  */
 function tripal_stock_chado_stockprop_pub_schema() {
   $description = array();
@@ -423,7 +429,7 @@ function tripal_stock_chado_stockprop_pub_schema() {
  * @return
  *    Array describing the stock_cvterm table
  *
- * @ingroup tripal_api
+ * @ingroup tripal_schema_api
  */
 function tripal_stock_chado_stock_cvterm_schema() {
   $description = array();
@@ -461,7 +467,7 @@ function tripal_stock_chado_stock_cvterm_schema() {
  * @return
  *    Array describing the stock_dbxref table
  *
- * @ingroup tripal_api
+ * @ingroup tripal_schema_api
  */
 function tripal_stock_chado_stock_dbxref_schema() {
   $description = array();
@@ -492,7 +498,7 @@ function tripal_stock_chado_stock_dbxref_schema() {
  * @return
  *    Array describing the stock_genotype table
  *
- * @ingroup tripal_api
+ * @ingroup tripal_schema_api
  */
 function tripal_stock_chado_stock_genotype_schema() {
   $description = array();
@@ -523,7 +529,7 @@ function tripal_stock_chado_stock_genotype_schema() {
  * @return
  *    Array describing the stock_pub table
  *
- * @ingroup tripal_api
+ * @ingroup tripal_schema_api
  */
 function tripal_stock_chado_stock_pub_schema() {
   $description = array();
@@ -554,7 +560,7 @@ function tripal_stock_chado_stock_pub_schema() {
  * @return
  *    Array describing the stock_relationship table
  *
- * @ingroup tripal_api
+ * @ingroup tripal_schema_api
  */
 function tripal_stock_chado_stock_relationship_schema() {
   $description = array();
@@ -586,7 +592,7 @@ function tripal_stock_chado_stock_relationship_schema() {
  * @return
  *    Array describing the stock_relationship_pub table
  *
- * @ingroup tripal_api
+ * @ingroup tripal_schema_api
  */
 function tripal_stock_chado_stock_relationship_pub_schema() {
   $description = array();
@@ -617,7 +623,7 @@ function tripal_stock_chado_stock_relationship_pub_schema() {
  * @return
  *    Array describing the stockcollection table
  *
- * @ingroup tripal_api
+ * @ingroup tripal_schema_api
  */
 function tripal_stock_chado_stockcollection_schema() {
   $description = array();
@@ -648,7 +654,7 @@ function tripal_stock_chado_stockcollection_schema() {
  * @return
  *    Array describing the stockcollection_stock table
  *
- * @ingroup tripal_api
+ * @ingroup tripal_schema_api
  */
 function tripal_stock_chado_stockcollection_stock_schema() {
   $description = array();
@@ -679,7 +685,7 @@ function tripal_stock_chado_stockcollection_stock_schema() {
  * @return
  *    Array describing the stockcollectionprop table
  *
- * @ingroup tripal_api
+ * @ingroup tripal_schema_api
  */
 function tripal_stock_chado_stockcollectionprop_schema() {
   $description = array();

+ 23 - 7
tripal_stock/tripal_stock.views.inc

@@ -9,8 +9,17 @@
  *  Documentation on views integration can be found at 
  *  http://views2.logrus.com/doc/html/index.html.
  */
- 
-/*************************************************************************
+
+/**
+ * @defgroup tripal_stock_views Stock Views Integration
+ * @ingroup views
+ * @ingroup tripal_stock
+ */
+
+require_once('views/stock.views.inc');
+require_once('views/chado_stock.views.inc');
+require_once('views/misc_tables.views.inc'); 
+/**
  * Implements hook_views_data(): Describe chado/tripal tables & fields to views
  *
  * @return array
@@ -19,10 +28,9 @@
  *   definitions keyed by chado/tripal table name. Each table definition 
  *   includes basic details about the table, fields in that table and
  *   relationships between that table and others (joins)
+ *
+ * @ingroup tripal_stock_views
  */
-require_once('views/stock.views.inc');
-require_once('views/chado_stock.views.inc');
-require_once('views/misc_tables.views.inc');
 function tripal_stock_views_data()  {
   $data = array();
 
@@ -33,7 +41,7 @@ function tripal_stock_views_data()  {
   return $data;
 }
 
-/*************************************************************************
+/**
  * Implements hook_views_handlers()
  *
  * Purpose: Register all custom handlers with views
@@ -42,6 +50,8 @@ function tripal_stock_views_data()  {
  *
  * @return array
  *   An array of handler definitions
+ *
+ * @ingroup tripal_stock_views
  */
 function tripal_stock_views_handlers() {
  return array(
@@ -83,7 +93,7 @@ function tripal_stock_views_handlers() {
  );
 }
 
-/*************************************************************************
+/**
  * Implements hook_views_pre_render
  *
  * Purpose: Intercepts the view after the query has been executed
@@ -92,6 +102,8 @@ function tripal_stock_views_handlers() {
  *   for all stocks in the table.
  *
  * @todo add if !<chado/drupal same db> around NID portion
+ *
+ * @ingroup tripal_stock_views
  */
 function tripal_stock_views_pre_render	(&$view) {
 	if (preg_match('/stock/', $view->base_table)) {
@@ -181,6 +193,10 @@ function tripal_stock_views_pre_render	(&$view) {
 	} //if we're dealing with a stock view
 }
 
+/**
+ *
+ * @ingroup tripal_stock_views
+ */
 function tripal_stock_views_default_views() {
   $views = array();
   

+ 1 - 1
tripal_stock/views/chado_stock.views.inc

@@ -8,7 +8,7 @@
  *
  * @see tripal_stock_views_data() --in tripal_stock.views.inc
  *
- * @ingroup tripal_stock
+ * @ingroup tripal_stock_views
  */
 function retrieve_chado_stock_views_data () {
 	global $db_url;

+ 1 - 1
tripal_stock/views/misc_tables.views.inc

@@ -16,7 +16,7 @@
       ); 
  *   @endcode
  *
- * @ingroup tripal_stock
+ * @ingroup tripal_stock_views
  */
 function retrieve_stock_misc_tables_views_data() {
   $data = array();

+ 1 - 1
tripal_stock/views/stock.views.inc

@@ -28,7 +28,7 @@
       );
  * @endcode
  *
- * @ingroup tripal_stock
+ * @ingroup tripal_stock_views
  */
 function retrieve_stock_views_data() {
   global $db_url;