Skip to content

Commit d38fd55

Browse files
added dc:title to classes
1 parent a5ad495 commit d38fd55

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
@@ -477,7 +477,9 @@ function OBO2RDF($abbv)
477477
$id = str_replace( array("(",")"), array("_",""), $id);
478478
$tid = $ns.":".$id;
479479
} else if($a[0] == "name") {
480-
$buf .= parent::describeClass($tid,addslashes(stripslashes($a[1])));
480+
$name = addslashes(stripslashes($a[1]));
481+
$buf .= parent::describeClass($tid,$name);
482+
$buf .= parent::triplifyString($tid,"dc:title",$name);
481483
} else if($a[0] == "is_a") {
482484
if(FALSE !== ($pos = strpos($a[1],"!"))) $a[1] = substr($a[1],0,$pos-1);
483485
$buf .= parent::triplify($tid,"rdfs:subPropertyOf","obo_vocabulary:".strtolower($a[1]));
@@ -505,7 +507,7 @@ function OBO2RDF($abbv)
505507
} else if($a[0] == "name") {
506508
// $t = parent::triplifyString($tid,"rdfs:label",str_replace(array("\"", "'"), array("","\\\'"), stripslashes($a[1]))." [$tid]");
507509
$label = str_replace(array("\"", "'"), array("","\\\'"), stripslashes($a[1]));
508-
$t = parent::describeIndividual($tid,$label,"owl:Class");
510+
$t = parent::describeIndividual($tid,$label,"owl:Class",$label);
509511
$t .= parent::triplify($tid,"rdfs:isDefinedBy",$ouri);
510512
$min .= $t;
511513
$buf .= $t;

0 commit comments

Comments
 (0)