Skip to content

Commit

Permalink
Handling of the "@@" operator. This operator is still missing at the …
Browse files Browse the repository at this point in the history
…level of the reification.
  • Loading branch information
fgiasson committed Sep 22, 2010
1 parent a814e80 commit 5a74b40
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions commON/CommonParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -1123,15 +1123,21 @@ public function getRdfN3($baseInstance = "", $baseOntology = "")
// If the attribute to be converted is not part of the linakge schema, then we
// simply create a "on-the-fly" attribute by using the $baseOntology URI.
$p = $baseOntology . substr($property, 1, strlen($property) - 1);
}

// @TODO: Check if "@" or "@@"
$n3 .= "<" . $recordId . "> <" . $p . "> \"\"\"" . $this->escapeN3($value["value"]) . "\"\"\" .\n";
if(substr($value["value"], 0, 1) == "@")
{
$n3 .= "<" . $recordId . "> <" . $p . "> <" . $baseInstance . substr($value["value"],1) . "> .\n";
}
// Check if the value is an external record reference
elseif(substr($value["value"], 0, 2) == "@@")
{
$n3 .= "<" . $recordId . "> <" . $p . "> <" . substr($value["value"],2) . "> .\n";
}
else
{
// @TODO: Check if "@" or "@@"
$n3 .= "<" . $recordId . "> <" . $p . "> \"\"\"" . $this->escapeN3($value["value"]) . "\"\"\" .\n";
}
}

// Check if there is some statements to reify
if(is_array($value["reify"]))
Expand Down

0 comments on commit 5a74b40

Please sign in to comment.