|
|
@ -84,7 +84,7 @@ function islandora_get_breadcrumbs_recursive($pid, FedoraRepository $repository, |
|
|
|
SELECT DISTINCT ?object ?label |
|
|
|
SELECT DISTINCT ?object ?label |
|
|
|
FROM <#ri> |
|
|
|
FROM <#ri> |
|
|
|
WHERE { |
|
|
|
WHERE { |
|
|
|
<info:fedora/!pid> ?parentship_predicate ?object; |
|
|
|
<info:fedora/!pid> ?collection_predicate ?object; |
|
|
|
<fedora-model:label> ?label . |
|
|
|
<fedora-model:label> ?label . |
|
|
|
?object <fedora-model:state> <fedora-model:Active> |
|
|
|
?object <fedora-model:state> <fedora-model:Active> |
|
|
|
. |
|
|
|
. |
|
|
@ -99,10 +99,9 @@ EOQ; |
|
|
|
$filter_map = function ($filter) { |
|
|
|
$filter_map = function ($filter) { |
|
|
|
return "FILTER($filter)"; |
|
|
|
return "FILTER($filter)"; |
|
|
|
}; |
|
|
|
}; |
|
|
|
$compound_object_predicate = variable_get('islandora_compound_object_relationship', 'isConstituentOf'); |
|
|
|
$collection_predicate_filters = "sameTerm(?collection_predicate, <fedora-rels-ext:isPartOf>)"; |
|
|
|
$parentship_predicate_filters = "sameTerm(?parentship_predicate, <fedora-rels-ext:isPartOf>) || sameTerm(?parentship_predicate, <fedora-rels-ext:{$compound_object_predicate}>)"; |
|
|
|
$collection_predicate_filters .= " || sameTerm(?collection_predicate, <fedora-rels-ext:isMemberOfCollection>) || sameTerm(?collection_predicate, <fedora-rels-ext:isMemberOf>)"; |
|
|
|
$parentship_predicate_filters .= " || sameTerm(?parentship_predicate, <fedora-rels-ext:isMemberOfCollection>) || sameTerm(?parentship_predicate, <fedora-rels-ext:isMemberOf>)"; |
|
|
|
$query_filters[] = $collection_predicate_filters; |
|
|
|
$query_filters[] = $parentship_predicate_filters; |
|
|
|
|
|
|
|
$query_order = "ORDER BY DESC(?label)"; |
|
|
|
$query_order = "ORDER BY DESC(?label)"; |
|
|
|
$query = format_string($query, array( |
|
|
|
$query = format_string($query, array( |
|
|
|
'!optionals' => !empty($query_optionals) ? ('OPTIONAL {{' . implode('} UNION {', $query_optionals) . '}}') : '', |
|
|
|
'!optionals' => !empty($query_optionals) ? ('OPTIONAL {{' . implode('} UNION {', $query_optionals) . '}}') : '', |
|
|
|