diff --git a/src/main/resources/alma/fix/relatedRessourcesAndLinks.fix b/src/main/resources/alma/fix/relatedRessourcesAndLinks.fix index aa6c97570..0c5451238 100644 --- a/src/main/resources/alma/fix/relatedRessourcesAndLinks.fix +++ b/src/main/resources/alma/fix/relatedRessourcesAndLinks.fix @@ -272,22 +272,24 @@ end set_array("fulltextOnline[]") do list(path: "8564?", "var":"$i") - unless any_match("$i.u",".*(doi.org|nbn-resolving).*") - if all_equal("$i.z", "kostenfrei") # kostenfrei, added Digitalisierung not only Verlag or Agentur as filter - if all_match("$i.x", "Verlag|Agentur|Digitalisierung") + if exists("$i.u") + unless any_match("$i.u",".*(doi.org|nbn-resolving).*") + if all_equal("$i.z", "kostenfrei") # kostenfrei, added Digitalisierung not only Verlag or Agentur as filter + if all_match("$i.x", "Verlag|Agentur|Digitalisierung") + copy_field("$i.x", "fulltextOnline[].$append.label") + copy_field("$i.u", "fulltextOnline[].$last.id") + end + end + if all_match("$i.x", ".*(Archivierte Online|EZB|Online-Ausg|Resolving-System|Volltext).*") copy_field("$i.x", "fulltextOnline[].$append.label") copy_field("$i.u", "fulltextOnline[].$last.id") end + if all_match("$i.3", "^[vV][oO][lL].*") # Volltext + copy_field("$i.3", "fulltextOnline[].$append.label") + copy_field("$i.u", "fulltextOnline[].$last.id") + end end - if all_match("$i.x", ".*(Archivierte Online|EZB|Online-Ausg|Resolving-System|Volltext).*") - copy_field("$i.x", "fulltextOnline[].$append.label") - copy_field("$i.u", "fulltextOnline[].$last.id") - end - if all_match("$i.3", "^[vV][oO][lL].*") # Volltext - copy_field("$i.3", "fulltextOnline[].$append.label") - copy_field("$i.u", "fulltextOnline[].$last.id") - end - end + end end # doi for fullTextOnline and sameAs diff --git a/src/test/resources/alma-fix/99370970534006441.json b/src/test/resources/alma-fix/99370970534006441.json index dae2e34fe..7f2e511b2 100644 --- a/src/test/resources/alma-fix/99370970534006441.json +++ b/src/test/resources/alma-fix/99370970534006441.json @@ -70,8 +70,6 @@ "fulltextOnline" : [ { "label" : "Archivierte Online-Ressource", "id" : "https://www.edoweb-rlp.de/resource/edoweb:7042958" - }, { - "label" : "Volltext" }, { "id" : "https://nbn-resolving.de/urn:nbn:de:hbz:929:02-edoweb:70429580", "label" : "URN-Link"