|
|
@ -57,27 +57,21 @@ function islandora_get_breadcrumbs_recursive($pid, FedoraRepository $repository, |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
else { |
|
|
|
$query_string = <<<EOQ |
|
|
|
$query_string = 'select $parentObject $title $content from <#ri> |
|
|
|
SELECT ?parentObject ?title |
|
|
|
where ( |
|
|
|
FROM <#ri> |
|
|
|
<info:fedora/' . $pid . '> <fedora-model:label> $title |
|
|
|
WHERE { |
|
|
|
and $parentObject <fedora-model:hasModel> $content |
|
|
|
?object <fedora-model:label> ?title ; |
|
|
|
and ( |
|
|
|
{ |
|
|
|
<info:fedora/' . $pid . '> <fedora-rels-ext:isMemberOfCollection> $parentObject |
|
|
|
?object <fedora-rels-ext:isMemberOfCollection> ?parentObject . |
|
|
|
or <info:fedora/' . $pid . '> <fedora-rels-ext:isMemberOf> $parentObject |
|
|
|
} |
|
|
|
or <info:fedora/' . $pid . '> <fedora-rels-ext:isPartOf> $parentObject |
|
|
|
UNION { |
|
|
|
) |
|
|
|
?object <fedora-rels-ext:isMemberOf> ?parentObject . |
|
|
|
and $parentObject <fedora-model:state> <info:fedora/fedora-system:def/model#Active> |
|
|
|
} |
|
|
|
) |
|
|
|
UNION { |
|
|
|
minus $content <mulgara:is> <info:fedora/fedora-system:FedoraObject-3.0> |
|
|
|
?object <fedora-rels-ext:isPartOf> ?parentObject . |
|
|
|
minus $parentObject <mulgara:is> <info:fedora/' . $pid . '> |
|
|
|
} |
|
|
|
order by $title desc'; |
|
|
|
?parentObject <fedora-model:state> <fedora-model:Active> . |
|
|
|
$results = $repository->ri->itqlQuery($query_string); |
|
|
|
FILTER (sameTerm(?object, <info:fedora/$pid>)) |
|
|
|
|
|
|
|
FILTER (!sameTerm(?object, ?parentObject)) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
ORDER BY ?title |
|
|
|
|
|
|
|
EOQ; |
|
|
|
|
|
|
|
$results = $repository->ri->sparqlQuery($query_string); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (count($results) > 0 && $context['level'] > 0) { |
|
|
|
if (count($results) > 0 && $context['level'] > 0) { |
|
|
|
$parent = $results[0]['parentObject']['value']; |
|
|
|
$parent = $results[0]['parentObject']['value']; |
|
|
|