diff --git a/src/main/resources/alma/fix/otherFields.fix b/src/main/resources/alma/fix/otherFields.fix index 4a0e436de..45d1c5ca0 100644 --- a/src/main/resources/alma/fix/otherFields.fix +++ b/src/main/resources/alma/fix/otherFields.fix @@ -27,9 +27,10 @@ unless exists("130??|240??") 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 -lookup("exampleOfWork.language[].*.label","ISO639-2-to-GND") -prepend("exampleOfWork.language[].*.id", "http://id.loc.gov/vocabulary/iso639-2/") + # 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 f21854be5..da16ed67b 100644 --- a/src/main/resources/alma/fix/relatedRessourcesAndLinks.fix +++ b/src/main/resources/alma/fix/relatedRessourcesAndLinks.fix @@ -620,9 +620,10 @@ if exists("130??|240??") 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 -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: # 700 - Added Entry-Personal Name (R) diff --git a/src/test/resources/alma-fix/99371530278506441.json b/src/test/resources/alma-fix/99371530278506441.json index dda12a91a..67bce9763 100644 --- a/src/test/resources/alma-fix/99371530278506441.json +++ b/src/test/resources/alma-fix/99371530278506441.json @@ -103,11 +103,8 @@ "id" : "https://d-nb.info/gnd/4117209-7", "type" : [ "Work" ], "language" : [ { - "id" : "http://id.loc.gov/vocabulary/iso639-2/http://id.loc.gov/vocabulary/iso639-2/lat", + "id" : "http://id.loc.gov/vocabulary/iso639-2/lat", "label" : "Latein" - }, { - "id" : "http://id.loc.gov/vocabulary/iso639-2/http://id.loc.gov/vocabulary/iso639-2/rom", - "label" : "Romani" } ] }, "language" : [ {