From d3bcd0c3d5551bdc7f06f218a13c54bac83aac9e Mon Sep 17 00:00:00 2001 From: Petra Maier Date: Thu, 15 Feb 2024 15:15:37 +0100 Subject: [PATCH] Remove redundant code (#1823) --- src/main/resources/alma/fix/otherFields.fix | 13 ------------ .../alma/fix/relatedRessourcesAndLinks.fix | 20 +++++++++---------- 2 files changed, 10 insertions(+), 23 deletions(-) diff --git a/src/main/resources/alma/fix/otherFields.fix b/src/main/resources/alma/fix/otherFields.fix index 45d1c5ca0..46a8d92fb 100644 --- a/src/main/resources/alma/fix/otherFields.fix +++ b/src/main/resources/alma/fix/otherFields.fix @@ -19,19 +19,6 @@ end lookup("language[].*.label","ISO639-2-to-GND") prepend("language[].*.id", "http://id.loc.gov/vocabulary/iso639-2/") -unless exists("130??|240??") - set_array("lang_temp") - copy_field("041[ 01] .[hk]", "lang_temp.$append") - set_array("exampleOfWork.language[]") - do list(path:"lang_temp", "var": "$i") - copy_field("$i","exampleOfWork.language[].$append.id") - copy_field("$i","exampleOfWork.language[].$last.label") - end - lookup("exampleOfWork.language[].*.label","ISO639-2-to-GND") - prepend("exampleOfWork.language[].*.id", "http://id.loc.gov/vocabulary/iso639-2/") -end - - # 300 - Physical Description (R) # We reuse the introx transformation here. diff --git a/src/main/resources/alma/fix/relatedRessourcesAndLinks.fix b/src/main/resources/alma/fix/relatedRessourcesAndLinks.fix index da16ed67b..b9388b5cb 100644 --- a/src/main/resources/alma/fix/relatedRessourcesAndLinks.fix +++ b/src/main/resources/alma/fix/relatedRessourcesAndLinks.fix @@ -612,17 +612,17 @@ end replace_all("exampleOfWork.label","<<|>>","") # 041 h|k - Language code of original and/or intermediate translations of text -if exists("130??|240??") - set_array("lang_temp") - copy_field("041[ 01] .[hk]", "lang_temp.$append") - set_array("exampleOfWork.language[]") - do list(path:"lang_temp", "var": "$i") - copy_field("$i","exampleOfWork.language[].$append.id") - copy_field("$i","exampleOfWork.language[].$last.label") - end - lookup("exampleOfWork.language[].*.label","ISO639-2-to-GND") - prepend("exampleOfWork.language[].*.id", "http://id.loc.gov/vocabulary/iso639-2/") + +set_array("lang_temp") +copy_field("041[ 01] .[hk]", "lang_temp.$append") +set_array("exampleOfWork.language[]") +do list(path:"lang_temp", "var": "$i") + copy_field("$i","exampleOfWork.language[].$append.id") + copy_field("$i","exampleOfWork.language[].$last.label") end +lookup("exampleOfWork.language[].*.label","ISO639-2-to-GND") +prepend("exampleOfWork.language[].*.id", "http://id.loc.gov/vocabulary/iso639-2/") + # following only with second indicator 2 for analytical entries: