diff --git a/src/main/resources/alma/fix/titleRelatedFields.fix b/src/main/resources/alma/fix/titleRelatedFields.fix index e06924c32..b6ef3bd7e 100644 --- a/src/main/resources/alma/fix/titleRelatedFields.fix +++ b/src/main/resources/alma/fix/titleRelatedFields.fix @@ -342,8 +342,15 @@ do list(path:"533 ", "var": "$i") end # Cleaning up dates of publicaton [] +copy_field("leader","@leaderPos07") +substring("@leaderPos07","7","1") do list(path: "publication[]", "var": "$i") replace_all("$i.startDate", ".*?([01]\\d{3}|20\\d{2}).*", "$1") + if any_match("@leaderPos07","s") + if any_contain("$i.startDate","0000") + remove_field("$i.startDate") + end + end replace_all("$i.endDate", ".*-[ ]?([01]\\d{3}|20\\d{2})$", "$1") replace_all("$i.location[].*", "^\\[(.*)\\]$", "$1") replace_all("$i.location[].*", "\\s?[,:;]$", "") diff --git a/src/test/resources/alma-fix/990119186660206441.json b/src/test/resources/alma-fix/990119186660206441.json new file mode 100644 index 000000000..26a0bd0e4 --- /dev/null +++ b/src/test/resources/alma-fix/990119186660206441.json @@ -0,0 +1,131 @@ +{ + "@context" : "http://lobid.org/resources/context.jsonld", + "almaMmsId" : "990119186660206441", + "oclcNumber" : [ "1057478173" ], + "zdbId" : "2102077-2", + "dnbId" : "024334561", + "deprecatedUri" : "http://lobid.org/resources/HT013595767#!", + "hbzId" : "HT013595767", + "title" : "Know your world extra", + "publication" : [ { + "type" : [ "PublicationEvent" ], + "location" : [ "Middletown, CT" ], + "publishedBy" : [ "Xerox Education Publications" ] + } ], + "describedBy" : { + "id" : "http://lobid.org/resources/990119186660206441", + "label" : "Webseite der hbz-Ressource 990119186660206441", + "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/990119186660206441", + "dateCreated" : "2021-04-05", + "dateModified" : "2023-05-25", + "type" : [ "DataFeedItem" ], + "label" : "hbz-Ressource 990119186660206441 im Exportformat MARC21 XML", + "inDataset" : { + "id" : "https://datahub.io/dataset/hbz_unioncatalog", + "label" : "hbz_unioncatalog" + }, + "sourceOrganization" : { + "id" : "http://lobid.org/organisations/DE-600#!", + "label" : "Zeitschriftendatenbank (ZDB)" + }, + "provider" : { + "id" : "http://lobid.org/organisations/DE-101#!", + "label" : "Deutsche Nationalbibliothek" + }, + "modifiedBy" : [ { + "id" : "http://lobid.org/organisations/DE-600#!", + "label" : "Zeitschriftendatenbank (ZDB)" + } ] + } + }, + "license" : [ { + "id" : "http://creativecommons.org/publicdomain/zero/1.0", + "label" : "Creative Commons-Lizenz CC0 1.0 Universal" + } ] + }, + "sameAs" : [ { + "id" : "http://worldcat.org/oclc/1057478173", + "label" : "OCLC Ressource" + }, { + "id" : "http://ld.zdb-services.de/resource/2102077-2", + "label" : "ZDB-Ressource" + }, { + "id" : "https://d-nb.info/024334561", + "label" : "DNB-Ressource" + } ], + "fulltextOnline" : [ { + "label" : "EZB", + "id" : "http://www.bibliothek.uni-regensburg.de/ezeit/?2102077" + } ], + "related" : [ { + "note" : [ "Druck-Ausgabe" ], + "label" : "Know your world extra", + "issn" : "0163-4844" + } ], + "inCollection" : [ { + "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" ] + }, { + "id" : "http://lobid.org/resources/HT016356466#!", + "label" : "Elektronische Zeitschriftenbibliothek (EZB)", + "type" : [ "Collection" ] + } ], + "language" : [ { + "id" : "http://id.loc.gov/vocabulary/iso639-2/eng", + "label" : "Englisch" + } ], + "extent" : "Online-Ressource", + "natureOfContent" : [ { + "label" : "Zeitschrift", + "id" : "https://d-nb.info/gnd/4067488-5" + } ], + "subject" : [ { + "notation" : "050", + "type" : [ "Concept" ], + "source" : { + "label" : "DDC-Sachgruppen der ZDB" + }, + "label" : "Zeitschriften, fortlaufende Sammelwerke" + }, { + "type" : [ "Concept" ], + "source" : { + "label" : "Dewey-Dezimalklassifikation", + "id" : "https://d-nb.info/gnd/4149423-4" + }, + "label" : "Allgemeine fortlaufende Sammelwerke", + "notation" : "050", + "version" : "sdnb" + } ], + "medium" : [ { + "label" : "Datenträger", + "id" : "http://rdaregistry.info/termList/RDAMediaType/1003" + }, { + "label" : "Online-Ressource", + "id" : "http://rdaregistry.info/termList/RDACarrierType/1018" + } ], + "bibliographicLevel" : { + "label" : "Serial", + "id" : "https://www.loc.gov/marc/bibliographic/bdleader.html#Serial" + }, + "type" : [ "BibliographicResource", "Periodical" ], + "id" : "http://lobid.org/resources/990119186660206441#!" +} diff --git a/src/test/resources/alma-fix/990119186660206441.xml b/src/test/resources/alma-fix/990119186660206441.xml new file mode 100644 index 000000000..2549f57ce --- /dev/null +++ b/src/test/resources/alma-fix/990119186660206441.xml @@ -0,0 +1,121 @@ + + + 00000nas a2200000#c 4500 + 20230525135732.0 + cr|||||||||||| + 030218c00009999xxuu||p|o ||| 0||||1eng c + DE-605 + 990119186660206441 + + 2102077-2 + DE-600 + + + 024334561 + DE-101 + + + (DE-599)ZDB2102077-2 + + + (OCoLC)1057478173 + + + (DE-600)2102077-2 + + + (DE-101)024334561 + + + 9001 + ger + DE-101 + 9001 + + + eng + + + XD-US + + + 050 + DE-600 + sdnb + + + Know your world extra + + + Middletown, CT + Xerox Education Publications + 0000- + + + Online-Ressource + + + txt + + + c + + + cr + + + http://www.bibliothek.uni-regensburg.de/ezeit/?2102077 + EZB + + + Erscheint auch als + Druck-Ausgabe + Know your world extra + 0163-4844 + http://worldcat.org/issn/0163-4844 + + + Zeitschrift + (DE-588)4067488-5 + gnd-content + GND-040674886 + + + 49HBZ_NETWORK + 990119186660206441 + HBZ Network + + + System + ZDB + marc21 + 20230525135732.0 + 01 + false + 2023-05-25 14:20:35 Europe/Berlin + 011918666-HBZ01 + 90 + import + 2021-04-05 09:58:24 Europe/Berlin + + + Periodikum + GND-CONTENT + GND-040674886 + 450 + + + Zeitschriften + GND-CONTENT + GND-040674886 + 450 + + + 4067488-5 + http://d-nb.info/gnd/4067488-5 + gnd + GND-CONTENT + GND-040674886 + 024 + + diff --git a/web/test/tests/IndexIntegrationTest.java b/web/test/tests/IndexIntegrationTest.java index add6a8e72..272ba809a 100644 --- a/web/test/tests/IndexIntegrationTest.java +++ b/web/test/tests/IndexIntegrationTest.java @@ -66,7 +66,7 @@ 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]", /*->*/ 4 }, - { "inCollection.id:\"http\\://lobid.org/organisations/DE-655#\\!\"", /*->*/ 129 }, + { "inCollection.id:\"http\\://lobid.org/organisations/DE-655#\\!\"", /*->*/ 130 }, { "inCollection.id:NWBib", /*->*/ 0 }, { "publication.publishedBy:Quedenfeldt", /*->*/ 2 }, { "publication.publishedBy:Quedenfeld", /*->*/ 2 },