Browse Source

Reorganized Importer functions

Stephen Ficklin 7 years ago
parent
commit
9ad1232f7f
2 changed files with 46 additions and 64 deletions
  1. 46 44
      tripal/includes/TripalImporter.inc
  2. 0 20
      tripal_chado/tripal_chado.module

+ 46 - 44
tripal/includes/TripalImporter.inc

@@ -434,49 +434,6 @@ class TripalImporter {
     }
   }
 
-  // --------------------------------------------------------------------------
-  //                     OVERRIDEABLE FUNCTIONS
-  // --------------------------------------------------------------------------
-
-  /**
-   * Provides form elements to be added to the loader form.
-   *
-   * These form elements are added after the file uploader section that
-   * is automaticaly provided by the TripalImporter.
-   *
-   * @return
-   *   A $form array.
-   */
-  public function form($form, &$form_state) {
-    return $form;
-  }
-
-  /**
-   * Handles submission of the form elements.
-   *
-   * The form elements provided in the implementation of the form() function
-   * can be used for special submit if needed.
-   */
-  public function formSubmit($form, &$form_state) {
-
-  }
-
-  /**
-   * Handles validation of the form elements.
-   *
-   * The form elements provided in the implementation of the form() function
-   * should be validated using this function.
-   */
-  public function formValidate($form, &$form_state) {
-
-  }
-
-  /**
-   * Performs the import.
-   */
-  public function run() {
-  }
-
   /**
    * Logs a message for the importer.
    *
@@ -537,7 +494,7 @@ class TripalImporter {
    *   The total number of items to process.
    */
   protected function setTotalItems($total_items) {
-     $this->total_items = $total_items;
+    $this->total_items = $total_items;
   }
   /**
    * Adds to the count of the total number of items that have been handle.d
@@ -603,4 +560,49 @@ class TripalImporter {
   protected function setInterval($interval) {
     $this->interval = $interval;
   }
+
+  // --------------------------------------------------------------------------
+  //                     OVERRIDEABLE FUNCTIONS
+  // --------------------------------------------------------------------------
+
+  /**
+   * Provides form elements to be added to the loader form.
+   *
+   * These form elements are added after the file uploader section that
+   * is automaticaly provided by the TripalImporter.
+   *
+   * @return
+   *   A $form array.
+   */
+  public function form($form, &$form_state) {
+    return $form;
+  }
+
+  /**
+   * Handles submission of the form elements.
+   *
+   * The form elements provided in the implementation of the form() function
+   * can be used for special submit if needed.
+   */
+  public function formSubmit($form, &$form_state) {
+
+  }
+
+  /**
+   * Handles validation of the form elements.
+   *
+   * The form elements provided in the implementation of the form() function
+   * should be validated using this function.
+   */
+  public function formValidate($form, &$form_state) {
+
+  }
+
+  /**
+   * Performs the import.
+   */
+  public function run() {
+  }
+
+
 }

+ 0 - 20
tripal_chado/tripal_chado.module

@@ -357,26 +357,6 @@ function tripal_chado_menu() {
     'type' => MENU_NORMAL_ITEM,
     'weight' => 6
   );
-//   $items['admin/tripal/loaders/fasta_loader'] = array(
-//     'title' => 'Chado FASTA File Loader',
-//     'description' => 'Load sequences from a multi-FASTA file into Chado',
-//     'page callback' => 'drupal_get_form',
-//     'page arguments' => array('tripal_feature_fasta_load_form'),
-//     'access arguments' => array('administer tripal'),
-//     'file' => 'includes/loaders/tripal_chado.fasta_loader.inc',
-//     'file path' => drupal_get_path('module', 'tripal_chado'),
-//     'type' => MENU_NORMAL_ITEM,
-//   );
-//   $items['admin/tripal/loaders/gff3_load'] = array(
-//     'title' => 'Chado GFF3 File Loader',
-//     'description' => 'Import a GFF3 file into Chado',
-//     'page callback' => 'drupal_get_form',
-//     'page arguments' => array('tripal_feature_gff3_load_form'),
-//     'access arguments' => array('administer tripal'),
-//     'file' => 'includes/loaders/tripal_chado.gff_loader.inc',
-//     'file path' => drupal_get_path('module', 'tripal_chado'),
-//     'type' => MENU_NORMAL_ITEM,
-//   );
   $items['admin/tripal/loaders/ncbi_taxonomy_loader'] = array(
     'title' => 'Chado NCBI Taxonomy Loader',
     'description' => 'Loads taxonomic details about installed organisms.',