public function obi__organism::elementInfo

3.x obi__organism.inc public obi__organism::elementInfo()

Overrides TripalField::elementInfo

See also

TripalField::elementInfo()

File

tripal_chado/includes/TripalFields/obi__organism/obi__organism.inc, line 211

Class

obi__organism

Code

public function elementInfo() {
  $field_term = $this->getFieldTermID();

  $genus_term = chado_get_semweb_term('organism', 'genus');
  $species_term = chado_get_semweb_term('organism', 'species');
  $infraspecific_name_term = chado_get_semweb_term('organism', 'infraspecific_name');
  $infraspecific_type_term = chado_get_semweb_term('organism', 'type_id');

  return array(
    $field_term => array(
      'operations' => array('eq', 'contains', 'starts'),
      'sortable' => TRUE,
      'searchable' => TRUE,
      'readonly' => FALSE,
      'type' => 'xs:complexType',
      'elements' => array(
        'rdfs:label' => array(
          'searchable' => TRUE,
          'name' => 'scientific_name',
          'operations' => array('eq', 'ne', 'contains', 'starts'),
          'sortable' => FALSE,
          'type' => 'xs:string',
          'readonly' => TRUE,
          'required' => FALSE,
        ),
        $genus_term => array(
          'searchable' => TRUE,
          'name' => 'genus',
          'operations' => array('eq', 'ne', 'contains', 'starts'),
          'sortable' => TRUE,
          'readonly' => FALSE,
          'type' => 'xs:string',
          'required' => TRUE,
        ),
        $species_term => array(
          'searchable' => TRUE,
          'name' => 'species',
          'operations' => array('eq', 'ne', 'contains', 'starts'),
          'sortable' => TRUE,
          'readonly' => FALSE,
          'type' => 'xs:string',
          'required' => TRUE,
        ),
        $infraspecific_name_term => array(
          'searchable' => TRUE,
          'name' => 'infraspecies',
          'operations' => array('eq', 'ne', 'contains', 'starts'),
          'sortable' => TRUE,
          'readonly' => FALSE,
          'type' => 'xs:string',
          'required' => FALSE,
        ),
        $infraspecific_type_term => array(
          'searchable' => TRUE,
          'name' => 'infraspecific_type',
          'operations' => array('eq', 'ne', 'contains', 'starts'),
          'sortable' => TRUE,
          'readonly' => FALSE,
          'type' => 'xs:integer',
          'required' => FALSE,
        ),
        'entity' => array(
          'searchable' => FALSE,
        ),
      ),
    ),
  );
}