Skip to content

Commit ab544bc

Browse files
removing empty or uninformative field/values for target relations
1 parent b3a0f61 commit ab544bc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drugbank/drugbank.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ function parsePartnerRelation($did, &$x,$type)
263263
$parent = parent::getVoc().ucfirst(str_replace(" ","-",$type));
264264
$name = (string) $x->name;
265265
$knownaction = (string) $x->{'known-action'};
266+
$knownaction = $knownaction=="unknown"?'':$knownaction;
266267

267268
parent::addRDF(
268269
parent::describeIndividual($pid,$name,$parent).
@@ -277,6 +278,7 @@ function parsePartnerRelation($did, &$x,$type)
277278

278279
// the main elements for the relation are actions, known-action, references,
279280
foreach($x->actions AS $actions => $action) {
281+
if(!trim($action)) continue;
280282
$aid = str_replace(array(" ","/"),"-",$action->action);
281283
$auri = parent::getVoc().$aid;
282284
parent::addRDF(

0 commit comments

Comments
 (0)