From 853f26781bef30412d8b750091716121a8b251b3 Mon Sep 17 00:00:00 2001 From: TobiasNx Date: Thu, 14 Nov 2024 15:08:41 +0100 Subject: [PATCH 1/3] Add test 990217879290206441 #2095 --- .../alma-fix/990217879290206441.json | 170 ++++++++++++++++++ .../resources/alma-fix/990217879290206441.xml | 128 +++++++++++++ 2 files changed, 298 insertions(+) create mode 100644 src/test/resources/alma-fix/990217879290206441.json create mode 100644 src/test/resources/alma-fix/990217879290206441.xml diff --git a/src/test/resources/alma-fix/990217879290206441.json b/src/test/resources/alma-fix/990217879290206441.json new file mode 100644 index 000000000..7800b0c68 --- /dev/null +++ b/src/test/resources/alma-fix/990217879290206441.json @@ -0,0 +1,170 @@ +{ + "@context" : "http://lobid.org/resources/context.jsonld", + "id" : "http://lobid.org/resources/990217879290206441#!", + "type" : [ "BibliographicResource", "Series" ], + "medium" : [ { + "label" : "Print", + "id" : "http://rdaregistry.info/termList/RDAproductionMethod/1010" + } ], + "title" : "The history of Oriental studies", + "almaMmsId" : "990217879290206441", + "hbzId" : "HT018628300", + "deprecatedUri" : "http://lobid.org/resources/HT018628300#!", + "issn" : [ "24054488" ], + "oclcNumber" : [ "909716357" ], + "zdbId" : "2819760-4", + "publication" : [ { + "startDate" : "2015", + "type" : [ "PublicationEvent" ], + "location" : [ "Leiden", "Boston" ], + "publishedBy" : [ "Brill" ], + "publicationHistory" : "Volume 1-" + } ], + "describedBy" : { + "id" : "http://lobid.org/resources/990217879290206441", + "label" : "Webseite der hbz-Ressource 990217879290206441", + "type" : [ "BibliographicDescription" ], + "inDataset" : { + "id" : "http://lobid.org/resources/dataset#!", + "label" : "lobid-resources – Der hbz-Verbundkatalog als Linked Open Data" + }, + "resultOf" : { + "type" : [ "CreateAction" ], + "endTime" : "0000-00-00T00:00:00", + "instrument" : { + "id" : "https://github.com/hbz/lobid-resources", + "type" : [ "SoftwareApplication" ], + "label" : "Software lobid-resources" + }, + "object" : { + "id" : "https://lobid.org/marcxml/990217879290206441", + "dateCreated" : "2021-04-05", + "dateModified" : "2021-04-09", + "type" : [ "DataFeedItem" ], + "label" : "hbz-Ressource 990217879290206441 im Exportformat MARC21 XML", + "inDataset" : { + "id" : "https://datahub.io/dataset/hbz_unioncatalog", + "label" : "hbz_unioncatalog" + }, + "sourceOrganization" : { + "id" : "http://lobid.org/organisations/DE-6#!", + "label" : "Universitäts- und Landesbibliothek Münster, Zentralbibliothek" + }, + "provider" : { + "id" : "http://lobid.org/organisations/DE-101#!", + "label" : "Deutsche Nationalbibliothek" + } + } + }, + "license" : [ { + "id" : "http://creativecommons.org/publicdomain/zero/1.0", + "label" : "Creative Commons-Lizenz CC0 1.0 Universal" + } ] + }, + "sameAs" : [ { + "id" : "https://hub.culturegraph.org/resource/(DE-605)990217879290206441", + "label" : "Culturegraph Ressource" + }, { + "id" : "http://worldcat.org/oclc/909716357", + "label" : "OCLC Ressource" + }, { + "id" : "http://ld.zdb-services.de/resource/2819760-4", + "label" : "ZDB-Ressource" + } ], + "inCollection" : [ { + "id" : "https://nrw.digibib.net/search/hbzvk/", + "label" : "DigiBib hbz Verbundkatalog", + "type" : [ "Collection" ] + }, { + "id" : "http://lobid.org/organisations/DE-655#!", + "label" : "hbz - Hochschulbibliothekszentrum des Landes Nordrhein-Westfalen, Netzwerkzone", + "type" : [ "Collection" ] + }, { + "id" : "http://lobid.org/resources/HT014846970#!", + "label" : "Zeitschriftendatenbank (ZDB)", + "type" : [ "Collection" ] + } ], + "language" : [ { + "id" : "http://id.loc.gov/vocabulary/iso639-2/eng", + "label" : "Englisch" + } ], + "natureOfContent" : [ { + "label" : "Monografische Reihe", + "id" : "https://d-nb.info/gnd/4179998-7" + } ], + "hasItem" : [ { + "label" : "lobid Bestandsressource", + "type" : [ "Item", "NurTitel" ], + "seeAlso" : [ "https://katalog.dombibliothek-koeln.de/F/?local_base=edk01&find_code=ISN&request=24054488&func=find-b" ], + "heldBy" : { + "isil" : "DE-Kn28", + "id" : "http://lobid.org/organisations/DE-Kn28#!", + "label" : "Erzbischöfliche Diözesan- und Dombibliothek" + }, + "inCollection" : [ { + "id" : "http://lobid.org/organisations/DE-Kn28#!", + "label" : "Erzbischöfliche Diözesan- und Dombibliothek" + } ], + "id" : "http://lobid.org/items/990217879290206441:DE-Kn28:990008520920108971#!" + }, { + "label" : "lobid Bestandsressource", + "type" : [ "Item", "NurTitel" ], + "seeAlso" : [ "https://tricat.uni-trier.de/permalink/49HBZ_UBT/1hikhph/alma990217879290206441" ], + "heldBy" : { + "isil" : "DE-385", + "id" : "http://lobid.org/organisations/DE-385#!", + "label" : "Universitätsbibliothek Trier" + }, + "inCollection" : [ { + "id" : "http://lobid.org/organisations/DE-385#!", + "label" : "Universitätsbibliothek Trier" + } ], + "id" : "http://lobid.org/items/990217879290206441:DE-385:990024956400106470#!" + }, { + "label" : "lobid Bestandsressource", + "type" : [ "Item", "NurTitel" ], + "seeAlso" : [ "https://bonnus.ulb.uni-bonn.de/permalink/49HBZ_ULB/idtnkp/alma990217879290206441" ], + "heldBy" : { + "isil" : "DE-5", + "id" : "http://lobid.org/organisations/DE-5#!", + "label" : "Universitäts- und Landesbibliothek Bonn" + }, + "inCollection" : [ { + "id" : "http://lobid.org/organisations/DE-5#!", + "label" : "Universitäts- und Landesbibliothek Bonn" + } ], + "id" : "http://lobid.org/items/990217879290206441:DE-5:991032575069706467#!" + }, { + "label" : "lobid Bestandsressource", + "type" : [ "Item", "NurTitel" ], + "seeAlso" : [ "https://hbz-ubo.primo.exlibrisgroup.com/permalink/49HBZ_UBO/mnkbqv/alma990217879290206441" ], + "heldBy" : { + "isil" : "DE-294", + "id" : "http://lobid.org/organisations/DE-294#!", + "label" : "Ruhr-Universität Bochum, Universitätsbibliothek" + }, + "inCollection" : [ { + "id" : "http://lobid.org/organisations/DE-294#!", + "label" : "Ruhr-Universität Bochum, Universitätsbibliothek" + } ], + "id" : "http://lobid.org/items/990217879290206441:DE-294:991013019319706471#!" + }, { + "label" : "lobid Bestandsressource", + "type" : [ "Item", "NurTitel" ], + "seeAlso" : [ "https://hbz-ulbms.primo.exlibrisgroup.com/discovery/search?query=any,contains,990217879290206441&tab=Everything&search_scope=MyInst_and_CI&vid=49HBZ_ULM:VU2&offset=0" ], + "heldBy" : { + "isil" : "DE-6", + "id" : "http://lobid.org/organisations/DE-6#!", + "label" : "Universitäts- und Landesbibliothek Münster, Zentralbibliothek" + }, + "inCollection" : [ { + "id" : "http://lobid.org/organisations/DE-6#!", + "label" : "Universitäts- und Landesbibliothek Münster, Zentralbibliothek" + } ], + "id" : "http://lobid.org/items/990217879290206441:DE-6:991020175399706449#!" + } ], + "bibliographicLevel" : { + "label" : "Serial", + "id" : "https://www.loc.gov/marc/bibliographic/bdleader.html#Serial" + } +} diff --git a/src/test/resources/alma-fix/990217879290206441.xml b/src/test/resources/alma-fix/990217879290206441.xml new file mode 100644 index 000000000..f40b8be73 --- /dev/null +++ b/src/test/resources/alma-fix/990217879290206441.xml @@ -0,0 +1,128 @@ + + + 00836nas#a2200325#c#4500 + 20210409143542.0 + tu + 170331m20159999ne##|#m#######|####|eng#c + DE-605 + 990217879290206441 + + 909716357 + OCoLC + + + HT018628300 + DE-101b + + + 2405-4488 + http://worldcat.org/issn/{0}2405-4488 + + + (DE-605)HT019286510 + + + 6 + ger + DNB + rda + + + eng + + + XA-NL + XD-US + + + 900 + z + + + <<The>> history of Oriental studies + + + Leiden + Boston + Brill + 2015- + + + txt + + + n + + + nc + + + Volume 1- + + + Monografische Reihe + (DE-588)4179998-7 + gnd-content + + + 030 + a||dr||||||37 + + + 050 + a|a||||||||||| + + + 052 + r||||||a||||||| + + + (OCoLC)909716357 + + + (DE-599)ZDB2819760-4 + + + 49HBZ_NETWORK + 990217879290206441 + HBZ Network + + + 49HBZ_EDK + 990008520920108971 + Erzbischöfliche Diözesan- und Dombibliothek (EDK) - Bibliothek des Priesterseminars (BPS) + + + 49HBZ_UBT + 990024956400106470 + UB Trier + + + 49HBZ_ULB + 991032575069706467 + Universitaet Bonn + + + 49HBZ_UBO + 991013019319706471 + Universität Bochum + + + 49HBZ_ULM + 991020175399706449 + Universität Münster + + + System + ILS + marc21 + 62 + 01 + false + 2021-04-09 14:35:42 Europe/Berlin + 021787929-HBZ01 + 60 + import + 2021-04-05 10:26:58 Europe/Berlin + + From 9dff30bc213c930361c02693abaf137d44265994 Mon Sep 17 00:00:00 2001 From: TobiasNx Date: Thu, 14 Nov 2024 15:09:44 +0100 Subject: [PATCH 2/3] Do not overwrite existing hbzId with mapped ones #2095 --- src/main/resources/alma/fix/identifiers.fix | 14 ++++++++------ .../resources/alma-fix/990217879290206441.json | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/main/resources/alma/fix/identifiers.fix b/src/main/resources/alma/fix/identifiers.fix index 42917e5ed..e818a0198 100644 --- a/src/main/resources/alma/fix/identifiers.fix +++ b/src/main/resources/alma/fix/identifiers.fix @@ -158,11 +158,13 @@ do list(path:"028??", "var":"$i") copy_field("$i.a", "stockNumber[].$append") end -if exists("@inNZ") - copy_field("zdbId","@hbzId") - lookup("@hbzId","zdbId2oldHbzId",delete:"true") - if exists("@hbzId") - paste("deprecatedUri", "~http://lobid.org/resources/", "@hbzId", "~#!", join_char: "") +unless exists("hbzId") + if exists("@inNZ") + copy_field("zdbId","@hbzId") + lookup("@hbzId","zdbId2oldHbzId",delete:"true") + if exists("@hbzId") + paste("deprecatedUri", "~http://lobid.org/resources/", "@hbzId", "~#!", join_char: "") + end + copy_field("@hbzId","hbzId") end - copy_field("@hbzId","hbzId") end diff --git a/src/test/resources/alma-fix/990217879290206441.json b/src/test/resources/alma-fix/990217879290206441.json index 7800b0c68..29892017c 100644 --- a/src/test/resources/alma-fix/990217879290206441.json +++ b/src/test/resources/alma-fix/990217879290206441.json @@ -8,8 +8,8 @@ } ], "title" : "The history of Oriental studies", "almaMmsId" : "990217879290206441", - "hbzId" : "HT018628300", - "deprecatedUri" : "http://lobid.org/resources/HT018628300#!", + "hbzId" : "HT019286510", + "deprecatedUri" : "http://lobid.org/resources/HT019286510#!", "issn" : [ "24054488" ], "oclcNumber" : [ "909716357" ], "zdbId" : "2819760-4", From 4d3aa3976151e7867d215f38c71faec0c5ff3a2c Mon Sep 17 00:00:00 2001 From: TobiasNx Date: Thu, 14 Nov 2024 16:12:02 +0100 Subject: [PATCH 3/3] Update tests #2095 --- web/test/tests/IndexIntegrationTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/test/tests/IndexIntegrationTest.java b/web/test/tests/IndexIntegrationTest.java index d7e4ce2cc..7f3d55227 100644 --- a/web/test/tests/IndexIntegrationTest.java +++ b/web/test/tests/IndexIntegrationTest.java @@ -66,8 +66,8 @@ public static Collection data() { { "publication.startDate:1993", /*->*/ 3 }, { "publication.location:Berlin AND publication.startDate:1993", /*->*/ 1 }, { "publication.location:Berlin AND publication.startDate:[1992 TO 2017]", /*->*/ 5 }, - { "inCollection.id:\"http\\://lobid.org/organisations/DE-655#\\!\"", /*->*/ 140 }, - { "inCollection.id:\"https\\://nrw.digibib.net/search/hbzvk/\"", /*->*/ 158 }, + { "inCollection.id:\"http\\://lobid.org/organisations/DE-655#\\!\"", /*->*/ 141 }, + { "inCollection.id:\"https\\://nrw.digibib.net/search/hbzvk/\"", /*->*/ 159 }, { "inCollection.id:NWBib", /*->*/ 0 }, { "publication.publishedBy:Quedenfeldt", /*->*/ 2 }, { "publication.publishedBy:Quedenfeld", /*->*/ 2 },