From df66c5a39bb94896583e07481acb93db90ec6539 Mon Sep 17 00:00:00 2001 From: Brandon Weigel Date: Mon, 6 May 2019 19:52:02 +0000 Subject: [PATCH 01/15] Add mods to dc transform --- xml/transforms/mods_to_dc.xsl | 424 ++++++++++++++++++++++++++++++++++ 1 file changed, 424 insertions(+) create mode 100644 xml/transforms/mods_to_dc.xsl diff --git a/xml/transforms/mods_to_dc.xsl b/xml/transforms/mods_to_dc.xsl new file mode 100644 index 00000000..4ac657cc --- /dev/null +++ b/xml/transforms/mods_to_dc.xsl @@ -0,0 +1,424 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + : + + + + . + + + + . + + + + + + + + + + + + + + + + + et al + + + + + + + + + et al. + + + + + + + + + + + + + + + + + + -- + + + + + + + + + + + + + + + + + + + + + + + + -- + + + + + + + + + + + + + - + + + + + + + + -- + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + - + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + Collection + + + Dataset + + + Service + + + Software + + + Image + + + InteractiveResource + + + MovingImage + + + PhysicalObject + + + Sound + + + StillImage + + + Text + + + Text + + + + + + + + + + + :  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- + + + + + + + + + + + -- + + + + + + + + + + + + + + + + + + + + + + + + , + + + + , + + + + + ( + + ) + + + ( + + ) + + + + + + + + + + \ No newline at end of file From 07f7b34213606a89f68111f45516803785d0747d Mon Sep 17 00:00:00 2001 From: root Date: Thu, 16 May 2019 20:18:57 +0000 Subject: [PATCH 02/15] Document hook for Travis --- islandora.module | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/islandora.module b/islandora.module index a72f4fb7..29cf59ef 100644 --- a/islandora.module +++ b/islandora.module @@ -663,7 +663,7 @@ function islandora_i18n_string_info() { } /** - * Implements islandora_i18n_string_list(). + * Implements hook_islandora_i18n_string_list(). */ function islandora_i18n_string_list($group) { if ($group == 'islandora') { From e1d8b77c5c0a924af10f1911e3b401ebc3f87f60 Mon Sep 17 00:00:00 2001 From: Brandon Weigel Date: Tue, 21 May 2019 14:11:40 +0000 Subject: [PATCH 03/15] Fix travis tuque warning --- includes/tuque_wrapper.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/tuque_wrapper.inc b/includes/tuque_wrapper.inc index 5295de83..29139e0b 100644 --- a/includes/tuque_wrapper.inc +++ b/includes/tuque_wrapper.inc @@ -254,7 +254,8 @@ class IslandoraFedoraObject extends FedoraObject { } catch (Exception $e) { if ($e instanceof DatastreamExistsException && variable_get('islandora_deprecation_return_false_when_datastream_exists', TRUE)) { - $message = format_string('The datastream @dsid already exists on the object: @pid. As of 7.x-1.10 the function signature for ingestDatastream will be changed from returning FALSE on failure to throwing an exception.', array( + $message = format_string('The datastream @dsid already exists on the object: @pid. + Returning FALSE on ingestDatastream() is deprecated in 7.x-1.10. See https://github.com/Islandora/islandora/pull/680/.', array( '@dsid' => $datastream->id, '@pid' => $object->id, )); From 13d87d49bd0332888c7d85e2140bbc7d66c19d63 Mon Sep 17 00:00:00 2001 From: Brandon Weigel Date: Tue, 21 May 2019 14:30:51 +0000 Subject: [PATCH 04/15] Another attempt to fix travis --- includes/tuque_wrapper.inc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/tuque_wrapper.inc b/includes/tuque_wrapper.inc index 29139e0b..bf742ee8 100644 --- a/includes/tuque_wrapper.inc +++ b/includes/tuque_wrapper.inc @@ -254,11 +254,11 @@ class IslandoraFedoraObject extends FedoraObject { } catch (Exception $e) { if ($e instanceof DatastreamExistsException && variable_get('islandora_deprecation_return_false_when_datastream_exists', TRUE)) { - $message = format_string('The datastream @dsid already exists on the object: @pid. - Returning FALSE on ingestDatastream() is deprecated in 7.x-1.10. See https://github.com/Islandora/islandora/pull/680/.', array( - '@dsid' => $datastream->id, - '@pid' => $object->id, - )); + $message = format_string('Returning FALSE on ingestDatastream() is deprecated in 7.x-1.10. See https://github.com/Islandora/islandora/pull/680/. + The datastream @dsid already exists on the object: @pid.', array( + '@dsid' => $datastream->id, + '@pid' => $object->id, + )); trigger_error(filter_xss($message), E_USER_DEPRECATED); return FALSE; } From 147dc7302cd9febb666e4e250c7de12c7d2bf3ab Mon Sep 17 00:00:00 2001 From: Brandon Weigel Date: Tue, 21 May 2019 15:06:32 +0000 Subject: [PATCH 05/15] Last try at travis --- includes/tuque_wrapper.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/tuque_wrapper.inc b/includes/tuque_wrapper.inc index bf742ee8..a73cadb3 100644 --- a/includes/tuque_wrapper.inc +++ b/includes/tuque_wrapper.inc @@ -255,7 +255,7 @@ class IslandoraFedoraObject extends FedoraObject { catch (Exception $e) { if ($e instanceof DatastreamExistsException && variable_get('islandora_deprecation_return_false_when_datastream_exists', TRUE)) { $message = format_string('Returning FALSE on ingestDatastream() is deprecated in 7.x-1.10. See https://github.com/Islandora/islandora/pull/680/. - The datastream @dsid already exists on the object: @pid.', array( + The datastream @dsid already exists on the object: @pid.', array( '@dsid' => $datastream->id, '@pid' => $object->id, )); From acac16d4104ea141416e0a16b7408608103eafab Mon Sep 17 00:00:00 2001 From: Brandon Weigel Date: Wed, 22 May 2019 13:35:36 +0000 Subject: [PATCH 06/15] one more try with travis --- includes/tuque_wrapper.inc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/includes/tuque_wrapper.inc b/includes/tuque_wrapper.inc index a73cadb3..54c0b0d5 100644 --- a/includes/tuque_wrapper.inc +++ b/includes/tuque_wrapper.inc @@ -254,12 +254,13 @@ class IslandoraFedoraObject extends FedoraObject { } catch (Exception $e) { if ($e instanceof DatastreamExistsException && variable_get('islandora_deprecation_return_false_when_datastream_exists', TRUE)) { - $message = format_string('Returning FALSE on ingestDatastream() is deprecated in 7.x-1.10. See https://github.com/Islandora/islandora/pull/680/. - The datastream @dsid already exists on the object: @pid.', array( - '@dsid' => $datastream->id, - '@pid' => $object->id, - )); - trigger_error(filter_xss($message), E_USER_DEPRECATED); + $message_deprecated = format_string('Returning FALSE on ingestDatastream() is deprecated in islandora:7.x-1.10. See https://github.com/Islandora/islandora/pull/680/'); + $message_error = format_string('The datastream @dsid already exists on the object: @pid.', array( + '@dsid' => $datastream->id, + '@pid' => $object->id, + )); + trigger_error(filter_xss($message_error), E_USER_NOTICE); + trigger_error(filter_xss($message_deprecated), E_USER_DEPRECATED); return FALSE; } watchdog('islandora', 'Failed to ingest datastream @dsid on object: @pid
code: @code
message: @msg', array( From 5c32aee820b1ce43d9e1ef854f616c64ffc38188 Mon Sep 17 00:00:00 2001 From: Brandon Weigel Date: Wed, 22 May 2019 14:46:02 +0000 Subject: [PATCH 07/15] Try again with Travis --- includes/tuque_wrapper.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/tuque_wrapper.inc b/includes/tuque_wrapper.inc index 54c0b0d5..08b1a402 100644 --- a/includes/tuque_wrapper.inc +++ b/includes/tuque_wrapper.inc @@ -254,13 +254,13 @@ class IslandoraFedoraObject extends FedoraObject { } catch (Exception $e) { if ($e instanceof DatastreamExistsException && variable_get('islandora_deprecation_return_false_when_datastream_exists', TRUE)) { - $message_deprecated = format_string('Returning FALSE on ingestDatastream() is deprecated in islandora:7.x-1.10. See https://github.com/Islandora/islandora/pull/680/'); + @trigger_error('Expecting FALSE on ingestDatastream failing is deprecated in islandora:7.x-1.10. Throwing an EXCEPTION on failed + datastream ingest will be the norm in future. See https://jira.duraspace.org/browse/ISLANDORA-1995.', E_USER_DEPRECATED); $message_error = format_string('The datastream @dsid already exists on the object: @pid.', array( - '@dsid' => $datastream->id, - '@pid' => $object->id, + '@dsid' => $datastream->id, '@dsid' => $datastream->id, + '@pid' => $object->id, '@pid' => $object->id, )); trigger_error(filter_xss($message_error), E_USER_NOTICE); - trigger_error(filter_xss($message_deprecated), E_USER_DEPRECATED); return FALSE; } watchdog('islandora', 'Failed to ingest datastream @dsid on object: @pid
code: @code
message: @msg', array( From daffe538a7d9c3d69e216b8f8a25ecda2bfe949a Mon Sep 17 00:00:00 2001 From: Brandon Weigel Date: Wed, 22 May 2019 14:51:15 +0000 Subject: [PATCH 08/15] Final fix for Travis --- includes/tuque_wrapper.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/tuque_wrapper.inc b/includes/tuque_wrapper.inc index 08b1a402..4425d760 100644 --- a/includes/tuque_wrapper.inc +++ b/includes/tuque_wrapper.inc @@ -255,7 +255,7 @@ class IslandoraFedoraObject extends FedoraObject { catch (Exception $e) { if ($e instanceof DatastreamExistsException && variable_get('islandora_deprecation_return_false_when_datastream_exists', TRUE)) { @trigger_error('Expecting FALSE on ingestDatastream failing is deprecated in islandora:7.x-1.10. Throwing an EXCEPTION on failed - datastream ingest will be the norm in future. See https://jira.duraspace.org/browse/ISLANDORA-1995.', E_USER_DEPRECATED); + datastream ingest will be the norm in future. See https://jira.duraspace.org/browse/ISLANDORA-1995.', E_USER_DEPRECATED); $message_error = format_string('The datastream @dsid already exists on the object: @pid.', array( '@dsid' => $datastream->id, '@dsid' => $datastream->id, '@pid' => $object->id, '@pid' => $object->id, From ab0734eee12e0a367a08cd0a59daae0f0ac30299 Mon Sep 17 00:00:00 2001 From: Brandon Weigel Date: Wed, 22 May 2019 17:21:30 +0000 Subject: [PATCH 09/15] Dumb paste errors --- includes/tuque_wrapper.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/tuque_wrapper.inc b/includes/tuque_wrapper.inc index 4425d760..5e6515d4 100644 --- a/includes/tuque_wrapper.inc +++ b/includes/tuque_wrapper.inc @@ -257,8 +257,8 @@ class IslandoraFedoraObject extends FedoraObject { @trigger_error('Expecting FALSE on ingestDatastream failing is deprecated in islandora:7.x-1.10. Throwing an EXCEPTION on failed datastream ingest will be the norm in future. See https://jira.duraspace.org/browse/ISLANDORA-1995.', E_USER_DEPRECATED); $message_error = format_string('The datastream @dsid already exists on the object: @pid.', array( - '@dsid' => $datastream->id, '@dsid' => $datastream->id, - '@pid' => $object->id, '@pid' => $object->id, + '@dsid' => $datastream->id, + '@pid' => $object->id, )); trigger_error(filter_xss($message_error), E_USER_NOTICE); return FALSE; From 86719d154fa2168f6dc9b9d7c729ba3aefaaef93 Mon Sep 17 00:00:00 2001 From: Brandon Weigel Date: Wed, 22 May 2019 17:48:28 +0000 Subject: [PATCH 10/15] TRAVIS --- includes/tuque_wrapper.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/tuque_wrapper.inc b/includes/tuque_wrapper.inc index 5e6515d4..4b51bd39 100644 --- a/includes/tuque_wrapper.inc +++ b/includes/tuque_wrapper.inc @@ -259,7 +259,8 @@ class IslandoraFedoraObject extends FedoraObject { $message_error = format_string('The datastream @dsid already exists on the object: @pid.', array( '@dsid' => $datastream->id, '@pid' => $object->id, - )); + ) + ); trigger_error(filter_xss($message_error), E_USER_NOTICE); return FALSE; } From e165da1cd927b690a1bd9d10dfd7ce2be70f2df5 Mon Sep 17 00:00:00 2001 From: Brandon Weigel Date: Wed, 22 May 2019 20:15:05 +0000 Subject: [PATCH 11/15] Sigh travis --- includes/tuque_wrapper.inc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/includes/tuque_wrapper.inc b/includes/tuque_wrapper.inc index 4b51bd39..5e6515d4 100644 --- a/includes/tuque_wrapper.inc +++ b/includes/tuque_wrapper.inc @@ -259,8 +259,7 @@ class IslandoraFedoraObject extends FedoraObject { $message_error = format_string('The datastream @dsid already exists on the object: @pid.', array( '@dsid' => $datastream->id, '@pid' => $object->id, - ) - ); + )); trigger_error(filter_xss($message_error), E_USER_NOTICE); return FALSE; } From da2203f83d5f7d5b452f1f0f4728c54a6ebfa4b5 Mon Sep 17 00:00:00 2001 From: Brandon Weigel Date: Thu, 23 May 2019 13:40:58 +0000 Subject: [PATCH 12/15] Travis is very picky --- includes/tuque_wrapper.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/tuque_wrapper.inc b/includes/tuque_wrapper.inc index 5e6515d4..466d0c9e 100644 --- a/includes/tuque_wrapper.inc +++ b/includes/tuque_wrapper.inc @@ -254,8 +254,8 @@ class IslandoraFedoraObject extends FedoraObject { } catch (Exception $e) { if ($e instanceof DatastreamExistsException && variable_get('islandora_deprecation_return_false_when_datastream_exists', TRUE)) { - @trigger_error('Expecting FALSE on ingestDatastream failing is deprecated in islandora:7.x-1.10. Throwing an EXCEPTION on failed - datastream ingest will be the norm in future. See https://jira.duraspace.org/browse/ISLANDORA-1995.', E_USER_DEPRECATED); + @trigger_error('Expecting FALSE on ingestDatastream failing is deprecated in islandora:7.x-1.10. Throwing an EXCEPTION on failed ' . + 'datastream ingest will be the norm in future. See https://jira.duraspace.org/browse/ISLANDORA-1995.', E_USER_DEPRECATED); $message_error = format_string('The datastream @dsid already exists on the object: @pid.', array( '@dsid' => $datastream->id, '@pid' => $object->id, From d01c5a098e93b9feb7d20c3edc599f570e228b1e Mon Sep 17 00:00:00 2001 From: Brandon Weigel Date: Thu, 23 May 2019 14:33:08 +0000 Subject: [PATCH 13/15] See if Travis likes this --- includes/tuque_wrapper.inc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/includes/tuque_wrapper.inc b/includes/tuque_wrapper.inc index 466d0c9e..48b19d23 100644 --- a/includes/tuque_wrapper.inc +++ b/includes/tuque_wrapper.inc @@ -254,8 +254,7 @@ class IslandoraFedoraObject extends FedoraObject { } catch (Exception $e) { if ($e instanceof DatastreamExistsException && variable_get('islandora_deprecation_return_false_when_datastream_exists', TRUE)) { - @trigger_error('Expecting FALSE on ingestDatastream failing is deprecated in islandora:7.x-1.10. Throwing an EXCEPTION on failed ' . - 'datastream ingest will be the norm in future. See https://jira.duraspace.org/browse/ISLANDORA-1995.', E_USER_DEPRECATED); + @trigger_error('Expecting FALSE on ingestDatastream failing is deprecated in islandora:7.x-1.10. Throwing an EXCEPTION on failed datastream ingest will be the norm in future. See https://jira.duraspace.org/browse/ISLANDORA-1995.', E_USER_DEPRECATED); $message_error = format_string('The datastream @dsid already exists on the object: @pid.', array( '@dsid' => $datastream->id, '@pid' => $object->id, From 80481e6a0df2811667c2d2126b84da2db127f6bc Mon Sep 17 00:00:00 2001 From: Brandon Weigel Date: Fri, 24 May 2019 14:07:22 +0000 Subject: [PATCH 14/15] Tell dcs to ignore deprecation message --- includes/tuque_wrapper.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/includes/tuque_wrapper.inc b/includes/tuque_wrapper.inc index 48b19d23..9f0fbf61 100644 --- a/includes/tuque_wrapper.inc +++ b/includes/tuque_wrapper.inc @@ -254,6 +254,7 @@ class IslandoraFedoraObject extends FedoraObject { } catch (Exception $e) { if ($e instanceof DatastreamExistsException && variable_get('islandora_deprecation_return_false_when_datastream_exists', TRUE)) { + // @codingStandardsIgnoreLine @trigger_error('Expecting FALSE on ingestDatastream failing is deprecated in islandora:7.x-1.10. Throwing an EXCEPTION on failed datastream ingest will be the norm in future. See https://jira.duraspace.org/browse/ISLANDORA-1995.', E_USER_DEPRECATED); $message_error = format_string('The datastream @dsid already exists on the object: @pid.', array( '@dsid' => $datastream->id, From d48b756981123181c5aea073d55be8989622498b Mon Sep 17 00:00:00 2001 From: Brandon Weigel Date: Mon, 27 May 2019 13:48:38 +0000 Subject: [PATCH 15/15] get rid of deprecation stuff --- includes/tuque_wrapper.inc | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/includes/tuque_wrapper.inc b/includes/tuque_wrapper.inc index 9f0fbf61..3b08a9fd 100644 --- a/includes/tuque_wrapper.inc +++ b/includes/tuque_wrapper.inc @@ -253,16 +253,6 @@ class IslandoraFedoraObject extends FedoraObject { return $ret; } catch (Exception $e) { - if ($e instanceof DatastreamExistsException && variable_get('islandora_deprecation_return_false_when_datastream_exists', TRUE)) { - // @codingStandardsIgnoreLine - @trigger_error('Expecting FALSE on ingestDatastream failing is deprecated in islandora:7.x-1.10. Throwing an EXCEPTION on failed datastream ingest will be the norm in future. See https://jira.duraspace.org/browse/ISLANDORA-1995.', E_USER_DEPRECATED); - $message_error = format_string('The datastream @dsid already exists on the object: @pid.', array( - '@dsid' => $datastream->id, - '@pid' => $object->id, - )); - trigger_error(filter_xss($message_error), E_USER_NOTICE); - return FALSE; - } watchdog('islandora', 'Failed to ingest datastream @dsid on object: @pid
code: @code
message: @msg', array( '@pid' => $object->id, '@dsid' => $datastream->id,