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

Public Member Functions

 form ($form, &$form_state)
 
 formSubmit ($form, &$form_state)
 
 formValidate ($form, &$form_state)
 
 run ()
 
 postRun ()
 
 fixTermMismatch ($stanza, $dbxref, $cv, $name)
 
- 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)
 
 getArguments ()
 

Static Public Attributes

static $name = 'OBO Vocabulary Loader'
 
static $machine_name = 'chado_obo_loader'
 
static $description = 'Import vocabularies and terms in OBO format.'
 
static $file_types = ['obo']
 
static $upload_description = 'Please provide the details for importing a new OBO file. The file must have a .obo extension.'
 
static $upload_title = 'New OBO File'
 
static $use_analysis = FALSE
 
static $require_analysis = TRUE
 
static $button_text = 'Import OBO File'
 
static $methods
 
static $menu_path = 'admin/tripal/loaders/chado_vocabs/obo_loader'
 
static $file_required = FALSE
 
- 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

- 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 Function Documentation

◆ fixTermMismatch()

OBOImporter::fixTermMismatch (   $stanza,
  $dbxref,
  $cv,
  $name 
)

Fixes mismatches between two terms with the same name.

If it has been determined that a term's name has changed. Before we update or insert it we must check to make sure no other terms have that name. If they do we must make a correction.

Parameters
$dbxrefThe ChadoRecord object containing the dbxref record for the term to be inserted/updated.
$cvThe cvterm object.
$nameThe name of the term that is a potential conflict.
Returns
Returns TRUE if a conflict was found and corrected.

◆ form()

OBOImporter::form (   $form,
$form_state 
)
See also
TripalImporter::form()

Reimplemented from TripalImporter.

◆ formSubmit()

OBOImporter::formSubmit (   $form,
$form_state 
)
See also
TripalImporter::formSubmit()

Reimplemented from TripalImporter.

◆ formValidate()

OBOImporter::formValidate (   $form,
$form_state 
)
See also
TripalImporter::formValidate()

Reimplemented from TripalImporter.

◆ postRun()

OBOImporter::postRun ( )
See also
TripalImporter::postRun()

Reimplemented from TripalImporter.

◆ run()

OBOImporter::run ( )
See also
TripalImporter::run()
Parameters
$detailsThe following arguments are supported:
  • obo_id: (required) The ID of the ontology to be imported.

Reimplemented from TripalImporter.

Member Data Documentation

◆ $button_text

OBOImporter::$button_text = 'Import OBO File'
static

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

◆ $description

OBOImporter::$description = 'Import vocabularies and terms in OBO format.'
static

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

◆ $file_types

OBOImporter::$file_types = ['obo']
static

An array containing the extensions of allowed file types.

◆ $machine_name

OBOImporter::$machine_name = 'chado_obo_loader'
static

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

◆ $menu_path

OBOImporter::$menu_path = 'admin/tripal/loaders/chado_vocabs/obo_loader'
static

Be default, all loaders are automaticlly 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

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

Indicates the methods that the file uploader will support.

◆ $name

OBOImporter::$name = 'OBO Vocabulary Loader'
static

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

◆ $require_analysis

OBOImporter::$require_analysis = TRUE
static

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

◆ $upload_description

OBOImporter::$upload_description = 'Please provide the details for importing a new OBO file. The file must have a .obo extension.'
static

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

◆ $upload_title

OBOImporter::$upload_title = 'New OBO File'
static

The title that should appear above the upload button.

◆ $use_analysis

OBOImporter::$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: