Tripal
Static Public Attributes | List of all members
PubBulkImporter Class Reference
Inheritance diagram for PubBulkImporter:
Inheritance graph
[legend]
Collaboration diagram for PubBulkImporter:
Collaboration graph
[legend]

Static Public Attributes

static $name = 'Chado Bulk Publication Importer'
 
static $machine_name = 'chado_pub_bulk'
 
static $description = 'Create and modify importers that can connect to and retrieve publications from remote databases.'
 
static $file_types = []
 
static $upload_description = ''
 
static $upload_title = 'File Upload'
 
static $use_analysis = FALSE
 
static $require_analysis = FALSE
 
static $button_text = 'Import'
 
static $methods
 
static $file_required = FALSE
 
static $argument_list = []
 
static $cardinality = 0
 
static $menu_path = ''
 
static $callback = 'tripal_pub_importers_list'
 
static $callback_module = 'tripal_chado'
 
static $callback_path = 'includes/loaders/tripal_chado.pub_importers.inc'
 
- Static Public Attributes inherited from TripalImporter
static $name = 'Tripal Loader'
 
static $machine_name = 'tripal_loader'
 
static $description = 'A base loader for all Tripal loaders'
 
static $file_types = []
 
static $upload_description = ''
 
static $upload_title = 'File Upload'
 
static $use_analysis = TRUE
 
static $require_analysis = TRUE
 
static $button_text = 'Import File'
 
static $use_button = TRUE
 
static $methods
 
static $file_required = TRUE
 
static $argument_list = []
 
static $cardinality = 1
 
static $menu_path = ''
 
static $callback = ''
 
static $callback_module = ''
 
static $callback_path = ''
 

Additional Inherited Members

- Public Member Functions inherited from TripalImporter
 __construct (TripalJob $job=NULL)
 
 setJob (TripalJob $job)
 
 create ($run_args, $file_details=[])
 
 load ($import_id)
 
 submitJob ()
 
 prepareFiles ()
 
 cleanFile ()
 
 logMessage ($message, $variables=[], $severity=TRIPAL_INFO)
 
 form ($form, &$form_state)
 
 formSubmit ($form, &$form_state)
 
 formValidate ($form, &$form_state)
 
 run ()
 
 postRun ()
 
 getArguments ()
 
- Static Public Member Functions inherited from TripalImporter
static byID ($import_id)
 
- Protected Member Functions inherited from TripalImporter
 setTotalItems ($total_items)
 
 addItemsHandled ($num_handled)
 
 setItemsHandled ($total_handled)
 
 setInterval ($interval)
 
- Protected Attributes inherited from TripalImporter
 $job
 
 $arguments
 
 $import_id
 
 $is_prepared
 
 $reported = 0
 

Member Data Documentation

◆ $argument_list

PubBulkImporter::$argument_list = []
static

The array of arguments used for this loader. Each argument should be a separate array containing a machine_name, name, and description keys. This information is used to build the help text for the loader.

◆ $button_text

PubBulkImporter::$button_text = 'Import'
static

Text that should appear on the button at the bottom of the importer form.

◆ $callback

PubBulkImporter::$callback = 'tripal_pub_importers_list'
static

If your importer requires more flexibility and advance features than the TripalImporter provides you can indicate a callback function. If set, the callback will be used to provide the importer interface to the end-user. However, because this bypasses the class infrastructure the run() function will also not be available and your importer must be fully self-sufficient outside of this class. The benefit for using a TripalImporter despite your loader being self-sufficient is that Tripal will treat your loader like all others providing a consistent location in the menu and set of permissions.

◆ $callback_module

PubBulkImporter::$callback_module = 'tripal_chado'
static

The name of the module that provides the callback function.

◆ $callback_path

PubBulkImporter::$callback_path = 'includes/loaders/tripal_chado.pub_importers.inc'
static

An include path for the callback function. Use a relative path within this scope of this module (e.g. includes/loaders/tripal_chado_pub_importers).

◆ $cardinality

PubBulkImporter::$cardinality = 0
static

Indicates how many files are allowed to be uploaded. By default this is set to allow only one file. Change to any positive number. A value of zero indicates an unlimited number of uploaded files are allowed.

◆ $description

PubBulkImporter::$description = 'Create and modify importers that can connect to and retrieve publications from remote databases.'
static

A brief description for this loader. This description will be presented to the site user.

◆ $file_required

PubBulkImporter::$file_required = FALSE
static

Indicates if the file must be provided. An example when it may not be necessary to require that the user provide a file for uploading if the loader keeps track of previous files and makes those available for selection.

◆ $file_types

PubBulkImporter::$file_types = []
static

An array containing the extensions of allowed file types.

◆ $machine_name

PubBulkImporter::$machine_name = 'chado_pub_bulk'
static

The machine name for this loader. This name will be used to construct the URL for the loader.

◆ $menu_path

PubBulkImporter::$menu_path = ''
static

Be default, all loaders are automatically added to the Admin > Tripal > Data Loaders menu. However, if this loader should be made available via a different menu path, then set it here. If the value is empty then the path will be the default.

◆ $methods

PubBulkImporter::$methods
static
Initial value:
= [
'file_upload' => FALSE,
'file_local' => FALSE,
'file_remote' => FALSE,
]

Indicates the methods that the file uploader will support.

◆ $name

PubBulkImporter::$name = 'Chado Bulk Publication Importer'
static

The name of this loader. This name will be presented to the site user.

◆ $require_analysis

PubBulkImporter::$require_analysis = FALSE
static

If the $use_analysis value is set above then this value indicates if the analysis should be required.

◆ $upload_description

PubBulkImporter::$upload_description = ''
static

Provides information to the user about the file upload. Typically this may include a description of the file types allowed.

◆ $upload_title

PubBulkImporter::$upload_title = 'File Upload'
static

The title that should appear above the upload button.

◆ $use_analysis

PubBulkImporter::$use_analysis = FALSE
static

If the loader should require an analysis record. To maintain provenance we should always indicate where the data we are uploading comes from. The method that Tripal attempts to use for this by associating upload files with an analysis record. The analysis record provides the details for how the file was created or obtained. Set this to FALSE if the loader should not require an analysis when loading. if $use_analysis is set to true then the form values will have an 'analysis_id' key in the $form_state array on submitted forms.


The documentation for this class was generated from the following file: