From 87811601bd7bb0cc1398f047f20f8035b560ad02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20B=C3=BClte?= Date: Fri, 24 May 2024 13:14:49 +0200 Subject: [PATCH] Map 007t to medium Print if not manuscript #2009 --- src/main/resources/alma/fix/mediumAndType.fix | 16 +++++++++------- .../resources/alma-fix/990054089950206441.json | 3 +++ .../resources/alma-fix/990104908070206441.json | 3 +++ .../resources/alma-fix/990118562160206441.json | 3 +++ .../resources/alma-fix/990123613330206441.json | 3 +++ .../resources/alma-fix/990185619180206441.json | 3 +++ .../resources/alma-fix/990196925330206441.json | 3 +++ 7 files changed, 27 insertions(+), 7 deletions(-) diff --git a/src/main/resources/alma/fix/mediumAndType.fix b/src/main/resources/alma/fix/mediumAndType.fix index dc6c65755..74ca0a85a 100644 --- a/src/main/resources/alma/fix/mediumAndType.fix +++ b/src/main/resources/alma/fix/mediumAndType.fix @@ -172,17 +172,19 @@ end #if any_match("006", "^[op].*") # add_field("medium[].$append.label","Print") - -if any_match("007", "(^k[fhjs]|^t[ab]).*") # I excluded ^o (Kit) and added all Pos01 for text except Braille. - add_field("medium[].$append.label","Print") -elsif any_match("@leaderTyp+008", "(Book|Music|Continuing Resources|Mixed materials)(.{23})[dr].*") # Pos23 +unless any_match("@leaderPos06-07","[dftgij].") + if any_match("007", "(^k[fhjs]|^t.).*") # I excluded ^o (Kit) and added all Pos01 for text except Braille. + add_field("medium[].$append.label","Print") + end +end +if any_match("@leaderTyp+008", "(Book|Music|Continuing Resources|Mixed materials)(.{23})[dr].*") # Pos23 add_field("medium[].$append.label","Print") elsif any_match("@leaderTyp+008", "(Map|Visual materials)(.{29})[dr].*") # Pos29 add_field("medium[].$append.label","Print") elsif any_match("@leaderTyp+008", "Map.*") -unless any_match("337.b","c") # add medium "print" if map is non-electronic (337b code b computermedia) - add_field("medium[].$append.label","Print") -end + unless any_match("337.b","c") # add medium "print" if map is non-electronic (337b code b computermedia) + add_field("medium[].$append.label","Print") + end # elsif any_match("@leaderTyp+008", "(Visual materials)(.{33})b.*") # Pos33 I excluded Kit # add_field("medium[].$append.label","Print") elsif any_match("006", "[acdpst]](.{5})[dr].*") # Pos00+06 Added Print for pos 006. diff --git a/src/test/resources/alma-fix/990054089950206441.json b/src/test/resources/alma-fix/990054089950206441.json index d0e57e6ae..0b4d046cc 100644 --- a/src/test/resources/alma-fix/990054089950206441.json +++ b/src/test/resources/alma-fix/990054089950206441.json @@ -60149,6 +60149,9 @@ "id" : "http://lobid.org/items/990054089950206441:DE-1032:991001285599706474#!" } ], "medium" : [ { + "label" : "Print", + "id" : "http://rdaregistry.info/termList/RDAproductionMethod/1010" + }, { "label" : "Mikroformat", "id" : "http://rdaregistry.info/termList/RDAMediaType/1002" } ], diff --git a/src/test/resources/alma-fix/990104908070206441.json b/src/test/resources/alma-fix/990104908070206441.json index b1098757f..6dad853fa 100644 --- a/src/test/resources/alma-fix/990104908070206441.json +++ b/src/test/resources/alma-fix/990104908070206441.json @@ -117,6 +117,9 @@ "version" : "sdnb" } ], "medium" : [ { + "label" : "Print", + "id" : "http://rdaregistry.info/termList/RDAproductionMethod/1010" + }, { "label" : "Mikroformat", "id" : "http://rdaregistry.info/termList/RDAMediaType/1002" } ], diff --git a/src/test/resources/alma-fix/990118562160206441.json b/src/test/resources/alma-fix/990118562160206441.json index c54550bb5..fc24c2907 100644 --- a/src/test/resources/alma-fix/990118562160206441.json +++ b/src/test/resources/alma-fix/990118562160206441.json @@ -109,6 +109,9 @@ "id" : "http://lobid.org/items/990118562160206441:DE-465:23420787060006446#!" } ], "medium" : [ { + "label" : "Print", + "id" : "http://rdaregistry.info/termList/RDAproductionMethod/1010" + }, { "label" : "Mikroformat", "id" : "http://rdaregistry.info/termList/RDAMediaType/1002" } ], diff --git a/src/test/resources/alma-fix/990123613330206441.json b/src/test/resources/alma-fix/990123613330206441.json index 904d3e502..b34437e0d 100644 --- a/src/test/resources/alma-fix/990123613330206441.json +++ b/src/test/resources/alma-fix/990123613330206441.json @@ -77,6 +77,9 @@ }, { "label" : "Audio-Kassette", "id" : "http://id.loc.gov/vocabulary/carriers/ss" + }, { + "label" : "Print", + "id" : "http://rdaregistry.info/termList/RDAproductionMethod/1010" } ], "bibliographicLevel" : { "label" : "Monographic component part", diff --git a/src/test/resources/alma-fix/990185619180206441.json b/src/test/resources/alma-fix/990185619180206441.json index 599ce4ba5..5bf952e57 100644 --- a/src/test/resources/alma-fix/990185619180206441.json +++ b/src/test/resources/alma-fix/990185619180206441.json @@ -102,6 +102,9 @@ "medium" : [ { "label" : "Audio-Dokument", "id" : "http://purl.org/ontology/bibo/AudioDocument" + }, { + "label" : "Print", + "id" : "http://rdaregistry.info/termList/RDAproductionMethod/1010" }, { "label" : "Datenträger", "id" : "http://rdaregistry.info/termList/RDAMediaType/1003" diff --git a/src/test/resources/alma-fix/990196925330206441.json b/src/test/resources/alma-fix/990196925330206441.json index 478a85b4d..580fc109d 100644 --- a/src/test/resources/alma-fix/990196925330206441.json +++ b/src/test/resources/alma-fix/990196925330206441.json @@ -122,6 +122,9 @@ "version" : "sdnb" } ], "medium" : [ { + "label" : "Print", + "id" : "http://rdaregistry.info/termList/RDAproductionMethod/1010" + }, { "label" : "Mikroformat", "id" : "http://rdaregistry.info/termList/RDAMediaType/1002" } ],