Skip to content

Commit d83f20b

Browse files
Merge pull request #469 from micheldumontier/bioportal
added dc:title to classes
2 parents d02bfcc + d38fd55 commit d83f20b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

bioportal/bioportal.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,9 @@ function OBO2RDF($abbv)
464464
$tid = $ns.":".$id;
465465
echo $tid.PHP_EOL;
466466
} else if($a[0] == "name") {
467-
$buf .= parent::describeClass($tid,addslashes(stripslashes($a[1])));
467+
$name = addslashes(stripslashes($a[1]));
468+
$buf .= parent::describeClass($tid,$name);
469+
$buf .= parent::triplifyString($tid,"dc:title",$name);
468470
} else if($a[0] == "is_a") {
469471
if(FALSE !== ($pos = strpos($a[1],"!"))) $a[1] = substr($a[1],0,$pos-1);
470472
$buf .= parent::triplify($tid,"rdfs:subPropertyOf","obo_vocabulary:".strtolower($a[1]));
@@ -493,7 +495,7 @@ function OBO2RDF($abbv)
493495
} else if($a[0] == "name") {
494496
// $t = parent::triplifyString($tid,"rdfs:label",str_replace(array("\"", "'"), array("","\\\'"), stripslashes($a[1]))." [$tid]");
495497
$label = str_replace(array("\"", "'"), array("","\\\'"), stripslashes($a[1]));
496-
$t = parent::describeIndividual($tid,$label,"owl:Class");
498+
$t = parent::describeIndividual($tid,$label,"owl:Class",$label);
497499
$t .= parent::triplify($tid,"rdfs:isDefinedBy",$ouri);
498500
$min .= $t;
499501
$buf .= $t;

0 commit comments

Comments
 (0)