Parcourir la source

Fixed a few minor bugs

Stephen Ficklin il y a 8 ans
Parent
commit
cb447c53ae

+ 5 - 1
tripal_chado/includes/fields/chado_linker__contact.inc

@@ -267,11 +267,15 @@ class chado_linker__contact extends TripalField {
         $contact = $contact_linker->contact_id;
         $entity->{$field_name}['und'][$i] = array(
           'value' => array(
-            '@type' => $contact->type_id->dbxref_id->db_id->name . ':' . $contact->type_id->dbxref_id->accession,
             'type' => $contact->type_id->name,
             'name' => $contact->name,
             'description' => $contact->description,
           ),
+          'semantic_web' => array(
+            'type' => $contact->type_id->dbxref_id->db_id->name . ':' . $contact->type_id->dbxref_id->accession,
+            'name' => tripal_get_chado_semweb_term('contact', 'name'),
+            'description' => tripal_get_chado_semweb_term('contact', 'description'),
+          ),
           $field_table . '__' . $pkey => $contact_linker->$pkey,
           $field_table . '__' . $fkey_lcolumn => $contact_linker->$fkey_lcolumn->$fkey_lcolumn,
           $field_table . '__' . 'contact_id' => $contact->contact_id

+ 9 - 9
tripal_chado/includes/tripal_chado.semweb.inc

@@ -86,14 +86,6 @@ function tripal_chado_populate_vocab_SCHEMA() {
     'definition' => 'An alias for the item.',
   ));
 
-  $term = tripal_insert_cvterm(array(
-    'id' => 'schema:description',
-    'name' => 'description',
-    'cv_name' => 'schema',
-    'definition' => 'A description of the item.',
-  ));
-  tripal_associate_chado_semweb_term(NULL, 'description', $term);
-
   $term = tripal_insert_cvterm(array(
     'id' => 'schema:comment',
     'name' => 'comment',
@@ -101,7 +93,15 @@ function tripal_chado_populate_vocab_SCHEMA() {
     'definition' => 'Comments, typically from users.',
   ));
   tripal_associate_chado_semweb_term(NULL, 'comment', $term);
-  tripal_associate_chado_semweb_term('pub', 'uniquename', $term);
+
+  $term = tripal_insert_cvterm(array(
+    'id' => 'schema:description',
+    'name' => 'description',
+    'cv_name' => 'schema',
+    'definition' => 'A description of the item.',
+  ));
+  tripal_associate_chado_semweb_term(NULL, 'description', $term);
+  tripal_associate_chado_semweb_term('organism', 'comment', $term);
 }
 /**
  * Adds the EDAM database and terms.