From 55d1af5b30d13afa93a788f77d8ff24e7337843c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20B=C3=BClte?= Date: Wed, 14 Aug 2024 13:19:22 +0200 Subject: [PATCH 1/5] Add vivo:Database to context-labels.json #1864 --- src/main/resources/labels/context-labels.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/resources/labels/context-labels.json b/src/main/resources/labels/context-labels.json index feccc176f..bf9eb055d 100644 --- a/src/main/resources/labels/context-labels.json +++ b/src/main/resources/labels/context-labels.json @@ -1012,5 +1012,11 @@ "name": "Thesis", "multilangLabel": {}, "uri": "http://purl.org/ontology/bibo/Thesis" + }, + { + "name": "Database", + "uri": "http://vivoweb.org/ontology/core#Database", + "label": "Datenbank", + "multilangLabel": {} } ] From 5e3dfc2587feca367257dbd7e6619aae6c87cf4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20B=C3=BClte?= Date: Wed, 14 Aug 2024 13:23:39 +0200 Subject: [PATCH 2/5] Add simple mapping for database #1864 --- src/main/resources/alma/fix/mediumAndType.fix | 5 +++++ src/test/resources/alma-fix/990133067580206441.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/resources/alma/fix/mediumAndType.fix b/src/main/resources/alma/fix/mediumAndType.fix index 0ed34b072..9eb2a2d6e 100644 --- a/src/main/resources/alma/fix/mediumAndType.fix +++ b/src/main/resources/alma/fix/mediumAndType.fix @@ -398,6 +398,11 @@ end # TODO: HT018860300 should also be tagged as Biography but it seems that 008 has no info for Biografie and is not transformed properly. +# type: "Database +if any_match("natureOfContent[].*.label", ".*[Da]tenbank.*") + add_field("type[].$append", "Database") +end + # type: "EditedVolume" if any_match("natureOfContent[].*.label", ".*Aufsatzsammlung.*") diff --git a/src/test/resources/alma-fix/990133067580206441.json b/src/test/resources/alma-fix/990133067580206441.json index f4f44ef8f..7167528b0 100644 --- a/src/test/resources/alma-fix/990133067580206441.json +++ b/src/test/resources/alma-fix/990133067580206441.json @@ -1,7 +1,7 @@ { "@context" : "http://lobid.org/resources/context.jsonld", "id" : "http://lobid.org/resources/990133067580206441#!", - "type" : [ "BibliographicResource", "Bibliography", "Periodical" ], + "type" : [ "BibliographicResource", "Bibliography", "Database", "Periodical" ], "medium" : [ { "label" : "Datenträger", "id" : "http://rdaregistry.info/termList/RDAMediaType/1003" From c467a88d0c46bb2128dd931575439db330e8e67f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20B=C3=BClte?= Date: Wed, 14 Aug 2024 14:00:54 +0200 Subject: [PATCH 3/5] Use portfolio type for Database mapping #1864 --- src/main/resources/alma/fix/mediumAndType.fix | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/main/resources/alma/fix/mediumAndType.fix b/src/main/resources/alma/fix/mediumAndType.fix index 9eb2a2d6e..da6c9f2f0 100644 --- a/src/main/resources/alma/fix/mediumAndType.fix +++ b/src/main/resources/alma/fix/mediumAndType.fix @@ -51,6 +51,12 @@ end paste("@leaderTyp+008","@leaderTyp","008", join_char:"") +# Collects Portfolio resource types +set_array("@PORtype") +do list(path: "POR ","var":"$i") + copy_field("$i.f","@PORtype.$append") +end + # medium (Mappings based on old ALEPH-morph, Introx Mapping and 050 Mapping from Verbund) # https://service-wiki.hbz-nrw.de/display/VDBE/ALT+-+Mapping+MAB2+-+MARC+21+-++Segmente+0---%2C+001+-+088+-+Kurzform @@ -401,6 +407,8 @@ end # type: "Database if any_match("natureOfContent[].*.label", ".*[Da]tenbank.*") add_field("type[].$append", "Database") +elsif any_equal("@PORtype","DATABASE") + add_field("type[].$append","Database") end # type: "EditedVolume" @@ -576,15 +584,9 @@ elsif any_match("natureOfContent[].*.label", "(?i).*(Zeitschrift|Periodical).*") add_field("type[].$append", "Periodical") elsif any_equal("906", "JOURNAL") add_field("type[].$append","Periodical") -else - set_array("@PORtype") - do list(path: "POR ","var":"$i") - copy_field("$i.f","@PORtype.$append") - end - if any_equal("@PORtype","JOURNAL") - unless any_equal("@PORtype","BOOK") - add_field("type[].$append","Periodical") - end +elsif any_equal("@PORtype","JOURNAL") + unless any_equal("@PORtype","BOOK") + add_field("type[].$append","Periodical") end end From 5a5bbc3d67ae5c64f82b7043eb61c0e0741d3355 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20B=C3=BClte?= Date: Wed, 14 Aug 2024 14:16:00 +0200 Subject: [PATCH 4/5] Add additional Database mappings #1864 Based on https://service-wiki.hbz-nrw.de/display/VDBE/ALT+-+Mapping+MAB2+-+MARC+21+-++Segmente+0---%2C+001+-+088+-+Kurzform https://service-wiki.hbz-nrw.de/pages/viewpage.action?pageId=483000321 --- src/main/resources/alma/fix/mediumAndType.fix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/resources/alma/fix/mediumAndType.fix b/src/main/resources/alma/fix/mediumAndType.fix index da6c9f2f0..45581e1b5 100644 --- a/src/main/resources/alma/fix/mediumAndType.fix +++ b/src/main/resources/alma/fix/mediumAndType.fix @@ -405,10 +405,14 @@ end # TODO: HT018860300 should also be tagged as Biography but it seems that 008 has no info for Biografie and is not transformed properly. # type: "Database -if any_match("natureOfContent[].*.label", ".*[Da]tenbank.*") +if any_match("@leaderTyp+008", "(Continuing Resources)(.{21})d.*") # Pos21 # d - Updating database + add_field("type[].$append","Database") +elsif any_match("natureOfContent[].*.label", ".*[Da]tenbank.*") add_field("type[].$append", "Database") elsif any_equal("@PORtype","DATABASE") add_field("type[].$append","Database") +elsif any_match("090 .g", "a") + add_field("type[].$append","Database") end # type: "EditedVolume" From 38827e7638eb17feeb04e23107b21fd9ecf86aa9 Mon Sep 17 00:00:00 2001 From: TobiasNx Date: Thu, 15 Aug 2024 12:08:53 +0200 Subject: [PATCH 5/5] Add Data base as type-class #1864 --- src/test/resources/schemas/type.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/resources/schemas/type.json b/src/test/resources/schemas/type.json index 012b33c6c..3183e5562 100644 --- a/src/test/resources/schemas/type.json +++ b/src/test/resources/schemas/type.json @@ -41,7 +41,8 @@ "Image", "Map", "Standard", - "MusicalRecording" + "MusicalRecording", + "Database" ] } }