diff --git a/src/main/resources/alma/fix/relatedRessourcesAndLinks.fix b/src/main/resources/alma/fix/relatedRessourcesAndLinks.fix index 00b7e01d6..0e15e5dd5 100644 --- a/src/main/resources/alma/fix/relatedRessourcesAndLinks.fix +++ b/src/main/resources/alma/fix/relatedRessourcesAndLinks.fix @@ -368,11 +368,22 @@ do list(path:"related[]", "var":"$i") replace_all("$i.issn[].*","-","") end + + +do list(path: "50580", "var":"$i") + if any_match("$i.6","[A-Z]{2}\\d*") + set_hash("related[].$append") + paste("related[].$last.id","~http://lobid.org/resources/","$i.6","~#!",join_char:"") + copy_field("$i.t","related[].$last.label") + set_array("related[].$last.note[]") + copy_field("$i.g","related[].$last.note[].$append") + end +end + replace_all("related[].*.id", "^\\(DE-605\\)(.*)$", "http://lobid.org/resources/$1#!") replace_all("related[].*.id", "^\\(DE-600\\)(.*)$", "http://lobid.org/resources/ZDB-$1#!") replace_all("related[].*.label","<<|>>","") - set_array("inCollection[]") # hbz NZ diff --git a/src/test/resources/alma-fix/99374022974006441.json b/src/test/resources/alma-fix/99374022974006441.json index 96a79bd69..0d525a1fc 100644 --- a/src/test/resources/alma-fix/99374022974006441.json +++ b/src/test/resources/alma-fix/99374022974006441.json @@ -67,6 +67,11 @@ "id" : "https://hub.culturegraph.org/resource/(DE-605)99374022974006441", "label" : "Culturegraph Ressource" } ], + "related" : [ { + "id" : "http://lobid.org/resources/HT030748024#!", + "label" : "The paradox of phase transitions", + "note" : [ "zweiter Teil der Dissertation, nicht im Verlag erschienen" ] + } ], "inCollection" : [ { "id" : "https://nrw.digibib.net/search/hbzvk/", "label" : "DigiBib hbz Verbundkatalog",