diff --git a/CollectionClass.inc b/CollectionClass.inc index 553634a4..8f3c3b5f 100644 --- a/CollectionClass.inc +++ b/CollectionClass.inc @@ -80,6 +80,11 @@ class CollectionClass { minus $content order by $title'; } + + } + else { + // Replace %parent_collection% with the actual collection PID + $query_string = preg_replace("/\%parent_collection\%/", "", $query_string); } $query_string = htmlentities(urlencode($query_string)); diff --git a/collection_policies/JPG-COLLECTION POLICY.xml b/collection_policies/JPG-COLLECTION POLICY.xml index 98f3520b..9ea4e3be 100644 --- a/collection_policies/JPG-COLLECTION POLICY.xml +++ b/collection_policies/JPG-COLLECTION POLICY.xml @@ -1,70 +1,22 @@ - - - - - - demo:Smiley - demo:DualResImage - ISLANDORACM - - - - isMemberOf - - - dc.description - - dc.title - dc.title - - - dc.creator - dc.creator - - - dc.description - dc.description - - - dc.date - dc.date - - - dc.identifier - dc.identifier - - - dc.language - dc.language - - - dc.publisher - dc.publisher - - - dc.rights - dc.rights - - - dc.subject - dc.subject - - - dc.relation - dc.relation - - - dcterms.temporal - dcterms.temporal - - - dcterms.spatial - dcterms.spatial - - - fgs.DS.first.text - Full Text - - - + + + + + + + dc.title + dc.creator + dc.description + dc.date + dc.identifier + dc.language + dc.publisher + dc.rights + dc.subject + dc.relation + dcterms.temporal + dcterms.spatial + Full Text + + isMemberOf + \ No newline at end of file diff --git a/collection_views/standard_jpeg_collection_query.txt b/collection_views/standard_jpeg_collection_query.txt new file mode 100644 index 00000000..1e0d301d --- /dev/null +++ b/collection_views/standard_jpeg_collection_query.txt @@ -0,0 +1,7 @@ +select $collTitle $collDesc $member $memberTitle $memberDesc +from <#ri> +where %parent_collection% $collTitle +and %parent_collection% $collDesc +and $member %parent_collection% +and $member $memberTitle +and $member $memberDesc diff --git a/collection_views/standard_jpeg_collection_view.xml b/collection_views/standard_jpeg_collection_view.xml new file mode 100644 index 00000000..e69de29b diff --git a/content_models/STANDARD JPG.xml b/content_models/STANDARD JPG.xml index 9a36e81e..911b1f91 100644 --- a/content_models/STANDARD JPG.xml +++ b/content_models/STANDARD JPG.xml @@ -1,198 +1,95 @@ - - - - image/jpeg - - - - - plugins/ShowDemoStreamsInFieldSets.inc - ShowDemoStreamsInFieldSets - showMediumSize - - - - - plugins/ShowStreamsInFieldSets.inc - ShowStreamsInFieldSets - showQdc - - - - image/jpeg - - plugins/ImageManipulation.inc - ImageManipulation - manipulateImage - jpg - MEDIUM_SIZE - - 120 - 160 - - - - - - - - image/jpeg - - - - plugins/ImageManipulation.inc - ImageManipulation - manipulateImage - jpg - MEDIUM_SIZE - - 160 - 120 - - - - plugins/ImageManipulation.inc - ImageManipulation - manipulateImage - jpg - TN - - 120 - 120 - - - - - - - - plugins/DemoFormBuilder.inc - DemoFormBuilder - buildQDCForm - handleQDCForm - - - - - - dc:title - textfield - The name given to the resource - true - - - - dc:creator - textfield - An entity primarily responsible for making the content of the resource such as a person, organization or service. - false - - - - dc:subject - select - Subject - false - - - image - image - - - photograph - photograph - - - presentation - presentation - - - art - art - - - - - - - dc:description - textarea - Description of the Image - true - - - - dc:publisher - textfield - An entity, (including persons, organizations, or services), responsible for making the resource available. - false - - - - dc:contributor - textfield - An entity responsible for contributing to the content of the resource such as a person, organization or service. - false - - - - dc:date - textfield - Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23) - false - - - - dc:type - textfield - Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary. - false - - - - dc:source - textfield - A reference to a resource from which the present resource is derived. - false - - - - dc:identifier - textfield - A unique reference to the resource; In this instance, the accession number or collection number. - false - - - - dc:language - select - The language of the intellectual content of the resource. - false - - - eng - English - - - fre - French - - - - - - dc:relation - textfield - Reference to a related resource. - false - - - - dc:rights - textarea - Information about intellectual property rights, copyright, and various property rights. - false - - - - + + + + image/jpeg + + + + image/jpeg + + + + 160 + 120 + + + + + 120 + 120 + + + + + + + + + + + + + + + + 120 + 160 + + + + + + + + + The name given to the resource + + + An entity primarily responsible for making the content of the resource such as a person, organization or service. + + + Subject + + image + photograph + presentation + art + + + + Description of the Image + + + An entity, (including persons, organizations, or services), responsible for making the resource available. + + + An entity responsible for contributing to the content of the resource such as a person, organization or service. + + + Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23) + + + Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary. + + + A reference to a resource from which the present resource is derived. + + + A unique reference to the resource; In this instance, the accession number or collection number. + + + The language of the intellectual content of the resource. + + English + French + + + + Reference to a related resource. + + + Information about intellectual property rights, copyright, and various property rights. + + + + \ No newline at end of file diff --git a/content_models/STANDARD_JPG.xml b/content_models/STANDARD_JPG.xml index 9a36e81e..911b1f91 100644 --- a/content_models/STANDARD_JPG.xml +++ b/content_models/STANDARD_JPG.xml @@ -1,198 +1,95 @@ - - - - image/jpeg - - - - - plugins/ShowDemoStreamsInFieldSets.inc - ShowDemoStreamsInFieldSets - showMediumSize - - - - - plugins/ShowStreamsInFieldSets.inc - ShowStreamsInFieldSets - showQdc - - - - image/jpeg - - plugins/ImageManipulation.inc - ImageManipulation - manipulateImage - jpg - MEDIUM_SIZE - - 120 - 160 - - - - - - - - image/jpeg - - - - plugins/ImageManipulation.inc - ImageManipulation - manipulateImage - jpg - MEDIUM_SIZE - - 160 - 120 - - - - plugins/ImageManipulation.inc - ImageManipulation - manipulateImage - jpg - TN - - 120 - 120 - - - - - - - - plugins/DemoFormBuilder.inc - DemoFormBuilder - buildQDCForm - handleQDCForm - - - - - - dc:title - textfield - The name given to the resource - true - - - - dc:creator - textfield - An entity primarily responsible for making the content of the resource such as a person, organization or service. - false - - - - dc:subject - select - Subject - false - - - image - image - - - photograph - photograph - - - presentation - presentation - - - art - art - - - - - - - dc:description - textarea - Description of the Image - true - - - - dc:publisher - textfield - An entity, (including persons, organizations, or services), responsible for making the resource available. - false - - - - dc:contributor - textfield - An entity responsible for contributing to the content of the resource such as a person, organization or service. - false - - - - dc:date - textfield - Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23) - false - - - - dc:type - textfield - Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary. - false - - - - dc:source - textfield - A reference to a resource from which the present resource is derived. - false - - - - dc:identifier - textfield - A unique reference to the resource; In this instance, the accession number or collection number. - false - - - - dc:language - select - The language of the intellectual content of the resource. - false - - - eng - English - - - fre - French - - - - - - dc:relation - textfield - Reference to a related resource. - false - - - - dc:rights - textarea - Information about intellectual property rights, copyright, and various property rights. - false - - - - + + + + image/jpeg + + + + image/jpeg + + + + 160 + 120 + + + + + 120 + 120 + + + + + + + + + + + + + + + + 120 + 160 + + + + + + + + + The name given to the resource + + + An entity primarily responsible for making the content of the resource such as a person, organization or service. + + + Subject + + image + photograph + presentation + art + + + + Description of the Image + + + An entity, (including persons, organizations, or services), responsible for making the resource available. + + + An entity responsible for contributing to the content of the resource such as a person, organization or service. + + + Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23) + + + Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary. + + + A reference to a resource from which the present resource is derived. + + + A unique reference to the resource; In this instance, the accession number or collection number. + + + The language of the intellectual content of the resource. + + English + French + + + + Reference to a related resource. + + + Information about intellectual property rights, copyright, and various property rights. + + + + \ No newline at end of file diff --git a/content_models/demo_Collection.xml b/content_models/demo_Collection.xml new file mode 100644 index 00000000..a2e804eb --- /dev/null +++ b/content_models/demo_Collection.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + ingest + + fedoraAdmin + 2011-03-29T14:15:20.712Z + Ingested from local file /usr/local/fedora/client/demo/foxml/local-server-demos/image-collection-demo/sDefObjects/demo_Collection.xml + + + + + + + + + + Service Definition Object (Collection) for Image Collection Demo + demo:Collection + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/content_models/demo_CollectionImpl.xml b/content_models/demo_CollectionImpl.xml new file mode 100644 index 00000000..b907afb9 --- /dev/null +++ b/content_models/demo_CollectionImpl.xml @@ -0,0 +1,196 @@ + + + + + + + + + + + + + + + + ingest + + fedoraAdmin + 2011-03-29T14:15:20.819Z + Ingested from local file /usr/local/fedora/client/demo/foxml/local-server-demos/image-collection-demo/sDepObjects/demo_CollectionImpl.xml + + + + + + + + + + Service Deployment Object (Collection) for Image Collection Demo + demo:ImageCollectionImpl + demo:CollectionImpl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + XSLT Binding + text/xml + + + + LIST Binding + text/xml + + + + QUERY Binding + text/plain + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/content_models/demo_DualResImage.xml b/content_models/demo_DualResImage.xml new file mode 100644 index 00000000..0bb7dd8c --- /dev/null +++ b/content_models/demo_DualResImage.xml @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + ingest + + fedoraAdmin + 2011-03-29T14:15:19.456Z + Ingested from local file /usr/local/fedora/client/demo/foxml/local-server-demos/image-collection-demo/cModelObjects/demo_DualResImage.xml + + + + + + + + + + Content Model Object (Image) for Image Collection Demo + demo:DualResImage + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + diff --git a/content_models/demo_DualResImageCollection.xml b/content_models/demo_DualResImageCollection.xml new file mode 100644 index 00000000..f4e1962f --- /dev/null +++ b/content_models/demo_DualResImageCollection.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + ingest + + fedoraAdmin + 2011-03-29T14:15:19.509Z + Ingested from local file /usr/local/fedora/client/demo/foxml/local-server-demos/image-collection-demo/cModelObjects/demo_DualResImageCollection.xml + + + + + + + + + + Content Model Object (Image Collection) for Image Collection Demo + demo:DualResImageCollection + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/content_models/demo_DualResImageImpl.xml b/content_models/demo_DualResImageImpl.xml new file mode 100644 index 00000000..36df937a --- /dev/null +++ b/content_models/demo_DualResImageImpl.xml @@ -0,0 +1,162 @@ + + + + + + + + + + + + + + + + ingest + + fedoraAdmin + 2011-03-29T14:15:20.881Z + Ingested from local file /usr/local/fedora/client/demo/foxml/local-server-demos/image-collection-demo/sDepObjects/demo_DualResImageImpl.xml + + + + + + + + + + Service Deployment Object (Image) for Image Collection Demo + demo:DualResImageImpl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + FULL_SIZE Binding + image/jpeg + + + + MEDIUM_SIZE Binding + image/jpeg + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/content_models/demo_DualResolution.xml b/content_models/demo_DualResolution.xml new file mode 100644 index 00000000..62348a34 --- /dev/null +++ b/content_models/demo_DualResolution.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + ingest + + fedoraAdmin + 2011-03-29T14:15:20.765Z + Ingested from local file /usr/local/fedora/client/demo/foxml/local-server-demos/image-collection-demo/sDefObjects/demo_DualResolution.xml + + + + + + + + + + Service Definition Object (Image) for Image Collection Demo + demo:DualResolution + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fedora_repository.module b/fedora_repository.module index 380a822e..f326af6a 100644 --- a/fedora_repository.module +++ b/fedora_repository.module @@ -1495,6 +1495,67 @@ function fedora_repository_required_fedora_objects() { ), ), ), + array ( + 'pid' => 'demo:DualResImage', + 'foxml_file' => "$module_path/content_models/demo_DualResImage.xml", + 'datastreams' => array( + array ( + 'dsid' => 'ISLANDORACM', + 'datastream_file' => "$module_path/content_models/STANDARD JPG.xml", + ), + ), + ), + array ( + 'pid' => 'demo:DualResImageCollection', + 'foxml_file' => "$module_path/content_models/demo_DualResImageCollection.xml", + 'datastreams' => array( + array( + 'dsid' => 'ISLANDORACM', + 'datastream_file' => "$module_path/content_models/COLLECTIONCM.xml", + ), + ), + ), + array ( + 'pid' => 'demo:DualResolution', + 'foxml_file' => "$module_path/content_models/demo_DualResolution.xml", + ), + array ( + 'pid' => 'demo:DualResImageImpl', + 'foxml_file' => "$module_path/content_models/demo_DualResImageImpl.xml", + ), + array ( + 'pid' => 'demo:CollectionImpl', + 'foxml_file' => "$module_path/content_models/demo_CollectionImpl.xml", + ), + array ( + 'pid' => 'demo:Collection', + 'foxml_file' => "$module_path/content_models/demo_Collection.xml", + ), + array ( + 'pid' => 'islandora:demo_image_collection', + 'label' => 'Demo Image Collection', + 'cmodel' => 'demo:DualResImageCollection', + 'parent' => 'islandora:demos', + 'datastreams' => array ( + array ( + 'dsid' => 'COLLECTION_POLICY', + 'datastream_file' => "$module_path/collection_policies/JPG-COLLECTION POLICY.xml", + ), + array ( + 'dsid' => 'TN', + 'datastream_file' => "$module_path/images/Gnome-emblem-photos.png", + 'mimetype' => 'image/png', + ), + array ( + 'dsid' => 'COLLECTION_VIEW', + 'datastream_file' => "$module_path/collection_views/SmileyStuff-COLLECTION_VIEW.xml", + ), + array ( + 'dsid' => 'QUERY', + 'datastream_file' => "$module_path/collection_views/standard_jpeg_collection_query.txt", + ), + ), + ), ), ), ); @@ -1861,7 +1922,7 @@ function fedora_repository_batch_reingest_object($object, &$context) { $context['message'][] = "$new_item->pid installed."; } } - elseif (!empty($object['dsid']) && !empty($object['datastream_file'])) { + if (!empty($object['dsid']) && !empty($object['datastream_file'])) { $datastreams = array ( array ( 'dsid' => $object['dsid'], @@ -1875,7 +1936,9 @@ function fedora_repository_batch_reingest_object($object, &$context) { if (!empty($datastreams) && is_array($datastreams)) { $label = !empty($object['label']) ? $object['label'] : ''; - $new_item = Fedora_Item::ingest_new_item($object['pid'], 'A', $label); + if (empty($object['foxml_file']) && !defined($new_item)) { + $new_item = Fedora_Item::ingest_new_item($object['pid'], 'A', $label); + } if (!empty($object['cmodel'])) { $new_item->add_relationship('hasModel', $object['cmodel'], FEDORA_MODEL_URI); } diff --git a/plugins/islandora_newspaper/islandora_newspaper.module b/plugins/islandora_newspaper/islandora_newspaper.module index 875655a3..00184676 100644 --- a/plugins/islandora_newspaper/islandora_newspaper.module +++ b/plugins/islandora_newspaper/islandora_newspaper.module @@ -42,6 +42,7 @@ function islandora_newspaper_required_fedora_objects() { ), array ( 'pid' => 'newspapers:collection', + 'label' => 'Newspapers Collection', 'cmodel' => 'islandora:collectionCModel', 'parent' => 'islandora:demos', 'datastreams' => array (