diff --git a/ObjectHelper.inc b/ObjectHelper.inc index 381ab39c..17974b26 100644 --- a/ObjectHelper.inc +++ b/ObjectHelper.inc @@ -566,11 +566,14 @@ class ObjectHelper { } $cmodels = array(); foreach ($sxml->xpath('//@uri') as $uri) { - if (strpos($uri, 'fedora-system') != FALSE && $include_fedora_system_content_models == FALSE) { + if (strpos($uri, 'fedora-system:fedoraObject-3.0') != FALSE && $include_fedora_system_content_models == FALSE) { continue; } $cmodel_pid = substr(strstr($uri, '/'), 1); - $cmodels[] = ContentModel::loadFromModel($cmodel_pid); + $cm = ContentModel::loadFromModel($cmodel_pid); + if ($cm) { + $cmodels[] = $cm; + } } return $cmodels; diff --git a/collection_policies/JPG-COLLECTION POLICY.xml b/collection_policies/JPG-COLLECTION POLICY.xml index 98f3520b..3e2fd4db 100644 --- a/collection_policies/JPG-COLLECTION POLICY.xml +++ b/collection_policies/JPG-COLLECTION POLICY.xml @@ -1,70 +1 @@ - - - - - - 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/content_models/COLLECTIONCM.xml b/content_models/COLLECTIONCM.xml index 144dbad8..8232e730 100644 --- a/content_models/COLLECTIONCM.xml +++ b/content_models/COLLECTIONCM.xml @@ -1,20 +1,20 @@ - - + text/xml text/plain application/xml - + - + - - + + - + The name given to the resource 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/fedora_repository.module b/fedora_repository.module index 797f29be..dcca797f 100644 --- a/fedora_repository.module +++ b/fedora_repository.module @@ -223,7 +223,6 @@ function fedora_repository_ingest_form_validate($form, &$form_state) { function fedora_repository_ingest_form(&$form_state, $collection_pid, $collection_label = NULL, $content_model = NULL) { module_load_include('inc', 'fedora_repository', 'formClass'); - //$client = getSoapClient(variable_get('fedora_soap_manage_url', 'http://localhost:8080/fedora/services/management?wsdl')); // For the sake of easily maintaining the module in different core versions create our own form_values variable. if (empty($form_state['storage']['step'])) { $form_state['storage']['step'] = 1; @@ -771,7 +770,6 @@ function fedora_repository_get_items($pid = NULL, $dsId = NULL, $collection = NU $objectHelper->getBreadcrumbs($pid, $breadcrumbs); drupal_set_breadcrumb(array_reverse($breadcrumbs)); - $offset = $limit * $page_number; //$results = $collectionClass->getRelatedObjects($pid, $limit, $offset, NULL); //updated so we can do paging in query not in xslt //$results = $collectionClass->getRelatedItems($pid, NULL); @@ -1384,9 +1382,16 @@ function fedora_repository_demo_objects_form_submit($form, &$form_state) { $smiley_stuff->add_relationship('isMemberOfCollection', 'info:fedora/islandora:demos'); $tn = $smiley_stuff->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/images/smileytn.png', 'TN', 'Thumbnail.png', 'image/png', 'M'); $cp = $smiley_stuff->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/collection_policies/JPG-COLLECTION POLICY.xml', 'COLLECTION_POLICY', 'Collection Policy.xml', 'application/xml', 'X'); + $cm = new Fedora_Item('demo:DualResImage'); try { $cmstream = $cm->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/content_models/STANDARD JPG.xml', 'ISLANDORACM', 'Content Model.xml', 'application/xml', 'X'); + } catch (exception $e) { + + } + $dual_res_image_collection_cmodel = new Fedora_Item('demo:DualResImageCollection'); + try { + $cmstream = $dual_res_image_collection_cmodel->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/content_models/COLLECTIONCM.xml', 'ISLANDORACM', 'Islandora Content Model.xml', 'application/xml', 'X'); drupal_set_message("Successfully installed demo:SmileyStuff collection view.", 'message'); } catch (exception $e) { diff --git a/ilives/book.inc b/ilives/book.inc index 706d0f4c..608b9ba0 100644 --- a/ilives/book.inc +++ b/ilives/book.inc @@ -169,7 +169,7 @@ class IslandoraBook { $html = ''; $tabset['second_tab'] = array( '#type' => 'tabpage', - '#title' => t('Full-size'), + '#title' => t('Read'), '#content' => $html ); $tabset['first_tab'] = array( @@ -179,12 +179,14 @@ class IslandoraBook { // This will be the content of the tab. '#content' => fedora_ilives_create_book_view($this->pid), ); - - $tabset['add_pages'] = array( - '#type' => 'tabpage', - '#title' => t('Add pages'), - '#content' => drupal_get_form('book_add_pages_form', $this->pid), - ); + + if (user_access('ingest new fedora objects')) { + $tabset['add_pages'] = array( + '#type' => 'tabpage', + '#title' => t('Add pages'), + '#content' => drupal_get_form('book_add_pages_form', $this->pid), + ); + } return $tabset; } } diff --git a/plugins/herbarium.inc b/plugins/herbarium.inc index 54a7d331..3af6f8bd 100644 --- a/plugins/herbarium.inc +++ b/plugins/herbarium.inc @@ -106,10 +106,6 @@ class Herbarium { global $base_url; $tabset = array(); - - $tabset['my_tabset'] = array( - '#type' => 'tabset', - ); global $user; $qs = ''; @@ -119,13 +115,13 @@ class Herbarium { $viewer_url = variable_get('fedora_base_url', '') . '/get/'. $this->pid . '/ilives:viewerSdef/getViewer'. $qs; $html = ''; - $tabset['my_tabset']['second_tab'] = array( + $tabset['second_tab'] = array( // $collection_fieldset = array ( '#type' => 'tabpage', '#title' => t('Full-size'), '#content' => $html ); - $tabset['my_tabset']['first_tab'] = array( + $tabset['first_tab'] = array( // #type and #title are the minimum requirements. '#type' => 'tabpage', '#title' => t('View'), @@ -135,15 +131,15 @@ class Herbarium { ); $dwc = new DarwinCore($this->item); - $tabset['my_tabset']['third_tab'] = array( + $tabset['third_tab'] = array( '#type' => 'tabpage', '#title' => t('Description'), ); - $tabset['my_tabset']['third_tab']['tabset'] = array( + $tabset['third_tab']['tabset'] = array( '#type' => 'tabset', ); - $tabset['my_tabset']['third_tab']['tabset']['view'] = array( + $tabset['third_tab']['tabset']['view'] = array( '#type' => 'tabpage', '#title' => t('Darwin Core'), '#content' => $dwc->asHTML(), @@ -152,17 +148,17 @@ class Herbarium { $obj = new ObjectHelper(); if (fedora_repository_access(OBJECTHELPER :: $EDIT_FEDORA_METADATA, $this->pid, $user)) { $editform = drupal_get_form('fedora_repository_edit_qdc_form', $this->pid, 'DARWIN_CORE'); - $tabset['my_tabset']['third_tab']['tabset']['edit'] = array( + $tabset['third_tab']['tabset']['edit'] = array( '#type' => 'tabpage', '#title' => t('Edit'), '#content' => $editform, ); - $tabset['my_tabset']['third_tab']['tabset']['source'] = array( + $tabset['third_tab']['tabset']['source'] = array( '#type' => 'tabpage', '#title' => t('Vew Source'), ); $xmlsrc = $dwc->asXML(); - $tabset['my_tabset']['third_tab']['tabset']['source']['srctext'] = array( + $tabset['third_tab']['tabset']['source']['srctext'] = array( '#name' => 'source', '#type' => 'textarea', '#value' => $xmlsrc, @@ -170,7 +166,6 @@ class Herbarium { '#height' => 50, ); } - - return tabs_render($tabset); + return $tabset; } }