Browse Source

Merge pull request #78 from bwoodhead/6.x

Swiched from dc:title to fedora label

https://jira.duraspace.org/browse/ISLANDORA-512
https://jira.duraspace.org/browse/ISLANDORA-484
pull/79/head
Jonathan Green 13 years ago
parent
commit
f7d34b3092
  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); $query_string = $objectHelper->getStream($pid, 'QUERY', 0);
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 <dc:title> $title where ($object <fedora-model:label> $title
and $object <fedora-model:hasModel> $content and $object <fedora-model:hasModel> $content
and ($object <fedora-rels-ext:isMemberOfCollection> <info:fedora/' . $pid . '> and ($object <fedora-rels-ext:isMemberOfCollection> <info:fedora/' . $pid . '>
or $object <fedora-rels-ext:isMemberOf> <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() { public function getServices() {
$query = 'select $object $title from <#ri> $query = 'select $object $title from <#ri>
where ($object <dc:title> $title where ($object <fedora-model:label> $title
and $object <fedora-model:isDeploymentOf> $deploymentOf and $object <fedora-model:isDeploymentOf> $deploymentOf
and $object <fedora-model:hasModel> <info:fedora/fedora-system:ServiceDeployment-3.0> 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:isContractorOf> <info:fedora/' . $this->pid . '>
and $object <fedora-model:state> <info:fedora/fedora-system:def/model#Active>) and $object <fedora-model:state> <info:fedora/fedora-system:def/model#Active>)
order by $title'; order by $title';
module_load_include('inc', 'fedora_repository', 'CollectionClass'); module_load_include('inc', 'fedora_repository', 'CollectionClass');

8
ObjectHelper.inc

@ -729,7 +729,7 @@ class ObjectHelper {
*/ */
function get_parent_objects($pid) { function get_parent_objects($pid) {
$query_string = 'select $object $title from <#ri> $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 <info:fedora/' . $pid . '> <fedora-rels-ext:isMemberOfCollection> $object
and $object <fedora-model:state> <info:fedora/fedora-system:def/model#Active>) and $object <fedora-model:state> <info:fedora/fedora-system:def/model#Active>)
order by $title'; order by $title';
@ -829,7 +829,7 @@ class ObjectHelper {
// Get title and descriptions for $pid // Get title and descriptions for $pid
$query_string = 'select $title $desc from <#ri> $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 <dc:description> $desc
and $o <mulgara:is> <info:fedora/' . $pid . '>'; 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 from <#ri> ' .
// $query_string = 'select $o $title $desc from <#ri> '. // $query_string = 'select $o $title $desc from <#ri> '.
'where $s <info:fedora/fedora-system:def/relations-external#hasMember> $o ' . '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 $o <dc:description> $desc '.
'and ( '; 'and ( ';
@ -929,7 +929,7 @@ class ObjectHelper {
} }
else { else {
$query_string = 'select $parentObject $title $content from <#ri> $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 $parentObject <fedora-model:hasModel> $content
and (<info:fedora/' . $pid . '> <fedora-rels-ext:isMemberOfCollection> $parentObject and (<info:fedora/' . $pid . '> <fedora-rels-ext:isMemberOfCollection> $parentObject
or <info:fedora/' . $pid . '> <fedora-rels-ext:isMemberOf> $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> $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-model:hasModel> $content
and ('; 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:'); $allowed_string = variable_get('fedora_pids_allowed', 'default: demo: changeme: islandora:');
$namespaces = explode(':', $allowed_string); $namespaces = explode(':', $allowed_string);
$query = 'select $object $title from <#ri> $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 <info:fedora/fedora-system:def/model#hasModel> <info:fedora/islandora:collectionCModel>
and $object <fedora-model:state> <info:fedora/fedora-system:def/model#Active>) and $object <fedora-model:state> <info:fedora/fedora-system:def/model#Active>)
order by $title'; order by $title';
@ -288,7 +288,7 @@ function get_content_models_as_option_array() {
} }
} }
$query = 'select $object $title from <#ri> $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> and ($object <fedora-model:hasModel> <info:fedora/fedora-system:ContentModel-3.0>
or $object <fedora-rels-ext:isMemberOfCollection> <info:fedora/islandora:ContentModelsCollection>) or $object <fedora-rels-ext:isMemberOfCollection> <info:fedora/islandora:ContentModelsCollection>)
and $object <fedora-model:state> <info:fedora/fedora-system:def/model#Active>) 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->set_element('dc:title', array('Installed Content Model'));
$dc->save(); $dc->save();
$cmodel_collection->add_datastream_from_string('select $object $title from <#ri> $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> and ($object <fedora-model:hasModel> <info:fedora/fedora-system:ContentModel-3.0>
or $object <fedora-rels-ext:isMemberOfCollection> <info:fedora/islandora:ContentModelsCollection>) or $object <fedora-rels-ext:isMemberOfCollection> <info:fedora/islandora:ContentModelsCollection>)
and $object <fedora-model:state> <info:fedora/fedora-system:def/model#Active>) and $object <fedora-model:state> <info:fedora/fedora-system:def/model#Active>)

Loading…
Cancel
Save