From 04d8f4a816c08b04d7286eecf0ece5acbed40334 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20B=C3=BClte?= Date: Wed, 27 Nov 2024 11:56:20 +0100 Subject: [PATCH] Enrich records with rvk from callNumber --- src/main/resources/alma/fix/item.fix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/main/resources/alma/fix/item.fix b/src/main/resources/alma/fix/item.fix index 8f39a3fb3..1e91c19cd 100644 --- a/src/main/resources/alma/fix/item.fix +++ b/src/main/resources/alma/fix/item.fix @@ -125,3 +125,21 @@ do list(path: "hasItem[]","var":"$i") add_field("$i.inCollection[].1.label","Bibliotheken ohne zentrale Katalogisierung (IZ Bridge)") end end + +set_array("rvk[]") +do list(path:"hasItem[]","var":"$i") + if any_match("$i.callNumber","[A-Z][A-Z] \\d* .*") + copy_field("$i.callNumber","rvk[].$append") + end +end + +replace_all("rvk[].*","([A-Z][A-Z] \\d*) .*","$1") + +do list(path:"rvk[]","var":"$i") + copy_field("$i","subject[].$append.notation") + set_array("subject[].$last.type[]","Concept") + add_field("subject[].$last.source.label","RVK (Regensburger Verbundklassifikation)") + add_field("subject[].$last.source.id","https://d-nb.info/gnd/4449787-8") +end + +uniq("subject[]")