|
|
@ -45,11 +45,12 @@ class CollectionClass { |
|
|
|
* @return type |
|
|
|
* @return type |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
function getRelatedObjects($pid, $limit, $offset, $itqlquery=NULL) { |
|
|
|
function getRelatedObjects($pid, $limit, $offset, $itqlquery=NULL) { |
|
|
|
module_load_include('inc', 'fedora_repository', 'ObjectHelper'); |
|
|
|
|
|
|
|
$objectHelper = new ObjectHelper(); |
|
|
|
|
|
|
|
if (!isset($itqlquery)) { |
|
|
|
if (!isset($itqlquery)) { |
|
|
|
// $query_string = $objectHelper->getStream($pid, 'QUERY', 0); |
|
|
|
module_load_include('inc', 'fedora_repository', 'api/fedora_item'); |
|
|
|
$itqlquery = $objectHelper->getStream($pid, 'QUERY', 0); |
|
|
|
$item = new Fedora_Item($pid); |
|
|
|
|
|
|
|
if ($item->exists() && array_key_exists('QUERY', $item->datastreams)) { |
|
|
|
|
|
|
|
$itqlquery = $item->get_datastream_dissemination('QUERY'); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return $this->getRelatedItems($pid, $itqlquery, $limit, $offset); |
|
|
|
return $this->getRelatedItems($pid, $itqlquery, $limit, $offset); |
|
|
|
} |
|
|
|
} |
|
|
@ -78,7 +79,11 @@ class CollectionClass { |
|
|
|
$objectHelper = new ObjectHelper(); |
|
|
|
$objectHelper = new ObjectHelper(); |
|
|
|
$query_string = $itqlquery; |
|
|
|
$query_string = $itqlquery; |
|
|
|
if (!isset($query_string)) { |
|
|
|
if (!isset($query_string)) { |
|
|
|
$query_string = $objectHelper->getStream($pid, 'QUERY', 0); |
|
|
|
$query_string = NULL; |
|
|
|
|
|
|
|
$item = new Fedora_Item($pid); |
|
|
|
|
|
|
|
if ($item->exists() && array_key_exists('QUERY', $item->datastreams)) { |
|
|
|
|
|
|
|
$query_string = $item->get_datastream_dissemination('QUERY'); |
|
|
|
|
|
|
|
} |
|
|
|
if ($query_string == NULL) { |
|
|
|
if ($query_string == NULL) { |
|
|
|
$query_string = 'select $object $title $content from <#ri> |
|
|
|
$query_string = 'select $object $title $content from <#ri> |
|
|
|
where ($object <fedora-model:label> $title |
|
|
|
where ($object <fedora-model:label> $title |
|
|
@ -498,11 +503,10 @@ class CollectionClass { |
|
|
|
module_load_include('inc', 'fedora_repository', 'CollectionManagement'); |
|
|
|
module_load_include('inc', 'fedora_repository', 'CollectionManagement'); |
|
|
|
module_load_include('inc', 'fedora_repository', 'BatchIngest'); |
|
|
|
module_load_include('inc', 'fedora_repository', 'BatchIngest'); |
|
|
|
global $base_url; |
|
|
|
global $base_url; |
|
|
|
$tabset = array(); |
|
|
|
|
|
|
|
global $user; |
|
|
|
global $user; |
|
|
|
$objectHelper = new ObjectHelper(); |
|
|
|
$tabset = array(); |
|
|
|
$item = new Fedora_Item($this->pid); |
|
|
|
|
|
|
|
$query = NULL; |
|
|
|
$query = NULL; |
|
|
|
|
|
|
|
$item = new Fedora_Item($this->pid); |
|
|
|
if ($item->exists() && array_key_exists('QUERY', $item->datastreams)) { |
|
|
|
if ($item->exists() && array_key_exists('QUERY', $item->datastreams)) { |
|
|
|
$query = $item->get_datastream_dissemination('QUERY'); |
|
|
|
$query = $item->get_datastream_dissemination('QUERY'); |
|
|
|
} |
|
|
|
} |
|
|
|