From 17bcc7a57c4c7408eea7b447002aa461c49ea2e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20B=C3=BClte?= Date: Thu, 6 Feb 2025 17:17:55 +0100 Subject: [PATCH] Exclude delibris and edoweb-articles RPB-232 --- conf/output/test-output-0.json | 4 +--- conf/output/test-output-1.json | 4 +--- conf/output/test-output-2.json | 4 +--- conf/rpb-titel-to-lobid.fix | 6 ++++-- 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/conf/output/test-output-0.json b/conf/output/test-output-0.json index a9861af..c6d736f 100644 --- a/conf/output/test-output-0.json +++ b/conf/output/test-output-0.json @@ -3,6 +3,7 @@ "type" : [ "BibliographicResource", "Article" ], "rpbId" : "929t112200", "id" : "https://lobid.org/resources/929t112200", + "hbzId" : "CT003010348", "inCollection" : [ { "id" : "http://lobid.org/resources/HT013494180#!", "type" : [ "Collection" ], @@ -73,9 +74,6 @@ }, "type" : [ "Contribution" ] } ], - "containedIn" : [ { - "id" : "https://lobid.org/resources/CT003010348#!" - } ], "bibliographicCitation" : "Bertius, Petrus : P. Bertii Tabularum geographicarum contractarum libri septem; 456", "fulltextOnline" : [ { "id" : "https://nbn-resolving.org/urn:nbn:de:hbz:061:1-68551", diff --git a/conf/output/test-output-1.json b/conf/output/test-output-1.json index 4962005..72b4c80 100644 --- a/conf/output/test-output-1.json +++ b/conf/output/test-output-1.json @@ -3,6 +3,7 @@ "type" : [ "BibliographicResource", "Article" ], "rpbId" : "929t112201", "id" : "https://lobid.org/resources/929t112201", + "hbzId" : "CT003010543", "inCollection" : [ { "id" : "http://lobid.org/resources/HT013494180#!", "type" : [ "Collection" ], @@ -73,9 +74,6 @@ }, "type" : [ "Contribution" ] } ], - "containedIn" : [ { - "id" : "https://lobid.org/resources/CT003010543#!" - } ], "bibliographicCitation" : "Bertius, Petrus : P. Bertii Tabularum geographicarum contractarum libri septem; 380", "fulltextOnline" : [ { "id" : "https://nbn-resolving.org/urn:nbn:de:hbz:061:1-70507", diff --git a/conf/output/test-output-2.json b/conf/output/test-output-2.json index 14f681e..868f614 100644 --- a/conf/output/test-output-2.json +++ b/conf/output/test-output-2.json @@ -3,6 +3,7 @@ "type" : [ "BibliographicResource", "Article" ], "rpbId" : "929t112202", "id" : "https://lobid.org/resources/929t112202", + "hbzId" : "CT003010542", "inCollection" : [ { "id" : "http://lobid.org/resources/HT013494180#!", "type" : [ "Collection" ], @@ -73,9 +74,6 @@ }, "type" : [ "Contribution" ] } ], - "containedIn" : [ { - "id" : "https://lobid.org/resources/CT003010542#!" - } ], "bibliographicCitation" : "Bertius, Petrus : P. Bertii Tabularum geographicarum contractarum libri septem; 378", "fulltextOnline" : [ { "id" : "https://nbn-resolving.org/urn:nbn:de:hbz:061:1-70495", diff --git a/conf/rpb-titel-to-lobid.fix b/conf/rpb-titel-to-lobid.fix index ee7138c..78682c6 100644 --- a/conf/rpb-titel-to-lobid.fix +++ b/conf/rpb-titel-to-lobid.fix @@ -361,8 +361,10 @@ end if any_equal("type[]", "Article") if exists("hbzId") - paste("containedIn[].$append.id","~https://lobid.org/resources/","hbzId","~#!", join_char:"") - remove_field("hbzId") + unless any_match("hbzId","CT.*") # exclude delibris and edoweb. See: https://jira.hbz-nrw.de/browse/RPB-232?focusedId=330532&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-330532 + paste("containedIn[].$append.id","~https://lobid.org/resources/","hbzId","~#!", join_char:"") + remove_field("hbzId") + end end end