Browse Source

Switched queries from dc:title to fedora label

pull/78/head
Ben Woodhead 13 years ago
parent
commit
b60921adf4
  1. 2
      CollectionClass.inc
  2. 12
      ContentModel.inc
  3. 8
      ObjectHelper.inc
  4. 2
      api/fedora_collection.inc
  5. 4
      api/fedora_utils.inc
  6. 2
      fedora_repository.module

2
CollectionClass.inc

@ -81,7 +81,7 @@ class CollectionClass {
$query_string = $objectHelper->getStream($pid, 'QUERY', 0);
if ($query_string == NULL) {
$query_string = 'select $object $title $content from <#ri>
where ($object <dc:title> $title
where ($object <fedora-model:label> $title
and $object <fedora-model:hasModel> $content
and ($object <fedora-rels-ext:isMemberOfCollection> <info:fedora/' . $pid . '>
or $object <fedora-rels-ext:isMemberOf> <info:fedora/' . $pid . '>)

12
ContentModel.inc

@ -429,12 +429,12 @@ class ContentModel extends XMLDatastream {
*/
public function getServices() {
$query = 'select $object $title from <#ri>
where ($object <dc:title> $title
and $object <fedora-model:isDeploymentOf> $deploymentOf
and $object <fedora-model:hasModel> <info:fedora/fedora-system:ServiceDeployment-3.0>
and $object <fedora-model:isContractorOf> <info:fedora/' . $this->pid . '>
and $object <fedora-model:state> <info:fedora/fedora-system:def/model#Active>)
order by $title';
where ($object <fedora-model:label> $title
and $object <fedora-model:isDeploymentOf> $deploymentOf
and $object <fedora-model:hasModel> <info:fedora/fedora-system:ServiceDeployment-3.0>
and $object <fedora-model:isContractorOf> <info:fedora/' . $this->pid . '>
and $object <fedora-model:state> <info:fedora/fedora-system:def/model#Active>)
order by $title';
module_load_include('inc', 'fedora_repository', 'CollectionClass');

8
ObjectHelper.inc

@ -729,7 +729,7 @@ class ObjectHelper {
*/
function get_parent_objects($pid) {
$query_string = 'select $object $title from <#ri>
where ($object <dc:title> $title
where ($object <fedora-model:label> $title
and <info:fedora/' . $pid . '> <fedora-rels-ext:isMemberOfCollection> $object
and $object <fedora-model:state> <info:fedora/fedora-system:def/model#Active>)
order by $title';
@ -829,7 +829,7 @@ class ObjectHelper {
// Get title and descriptions for $pid
$query_string = 'select $title $desc from <#ri>
where $o <dc:title> $title
where $o <fedora-model:label> $title
and $o <dc:description> $desc
and $o <mulgara:is> <info:fedora/' . $pid . '>';
@ -858,7 +858,7 @@ class ObjectHelper {
$query_string = 'select $o $title from <#ri> ' .
// $query_string = 'select $o $title $desc from <#ri> '.
'where $s <info:fedora/fedora-system:def/relations-external#hasMember> $o ' .
'and $o <dc:title> $title ' .
'and $o <fedora-model:label> $title ' .
// 'and $o <dc:description> $desc '.
'and ( ';
@ -929,7 +929,7 @@ class ObjectHelper {
}
else {
$query_string = 'select $parentObject $title $content from <#ri>
where (<info:fedora/' . $pid . '> <dc:title> $title
where (<info:fedora/' . $pid . '> <fedora-model:label> $title
and $parentObject <fedora-model:hasModel> $content
and (<info:fedora/' . $pid . '> <fedora-rels-ext:isMemberOfCollection> $parentObject
or <info:fedora/' . $pid . '> <fedora-rels-ext:isMemberOf> $parentObject

2
api/fedora_collection.inc

@ -77,7 +77,7 @@ function get_related_items_as_xml($collection_pid, $relationship = array('isMemb
}
$query_string = 'select $object $title $content from <#ri>
where ($object <dc:title> $title
where ($object <fedora-model:label> $title
and $object <fedora-model:hasModel> $content
and (';

4
api/fedora_utils.inc

@ -239,7 +239,7 @@ function get_collections_as_option_array() {
$allowed_string = variable_get('fedora_pids_allowed', 'default: demo: changeme: islandora:');
$namespaces = explode(':', $allowed_string);
$query = 'select $object $title from <#ri>
where ($object <dc:title> $title
where ($object <fedora-model:label> $title
and $object <info:fedora/fedora-system:def/model#hasModel> <info:fedora/islandora:collectionCModel>
and $object <fedora-model:state> <info:fedora/fedora-system:def/model#Active>)
order by $title';
@ -288,7 +288,7 @@ function get_content_models_as_option_array() {
}
}
$query = 'select $object $title from <#ri>
where ($object <dc:title> $title
where ($object <fedora-model:label> $title
and ($object <fedora-model:hasModel> <info:fedora/fedora-system:ContentModel-3.0>
or $object <fedora-rels-ext:isMemberOfCollection> <info:fedora/islandora:ContentModelsCollection>)
and $object <fedora-model:state> <info:fedora/fedora-system:def/model#Active>)

2
fedora_repository.module

@ -1596,7 +1596,7 @@ function fedora_repository_demo_objects_form_submit($form, &$form_state) {
$dc->set_element('dc:title', array('Installed Content Model'));
$dc->save();
$cmodel_collection->add_datastream_from_string('select $object $title from <#ri>
where ($object <dc:title> $title
where ($object <fedora-model:label> $title
and ($object <fedora-model:hasModel> <info:fedora/fedora-system:ContentModel-3.0>
or $object <fedora-rels-ext:isMemberOfCollection> <info:fedora/islandora:ContentModelsCollection>)
and $object <fedora-model:state> <info:fedora/fedora-system:def/model#Active>)

Loading…
Cancel
Save