Do not add subject-references at top-level.

This commit is contained in:
Dave Longley 2013-08-06 13:46:56 -04:00
parent 090183dccc
commit 96e20e4afe

View file

@ -2770,11 +2770,17 @@ class JsonLdProcessor {
foreach($subjects_ as $subject_) { foreach($subjects_ as $subject_) {
$node_ = $graph_object->{$subject_}; $node_ = $graph_object->{$subject_};
unset($node_->listHeadFor); unset($node_->listHeadFor);
$node->{'@graph'}[] = $node_; // only add full subjects to top-level
if(!self::_isSubjectReference($node_)) {
$node->{'@graph'}[] = $node_;
}
} }
} }
unset($node->listHeadFor); unset($node->listHeadFor);
$result[] = $node; // only add full subjects to top-level
if(!self::_isSubjectReference($node)) {
$result[] = $node;
}
} }
return $result; return $result;