diff --git a/src/main/resources/alma/fix/titleRelatedFields.fix b/src/main/resources/alma/fix/titleRelatedFields.fix index c84308729..781bd3770 100644 --- a/src/main/resources/alma/fix/titleRelatedFields.fix +++ b/src/main/resources/alma/fix/titleRelatedFields.fix @@ -59,7 +59,10 @@ do list(path:"245??","var":"$i") if in ("$880.@script.id","$AGR.script.id") copy_field("$880.a","$AGR.record.@title") copy_field("$880.n","$AGR.record.@titleOfSubSeries_n") - copy_field("$880.p","$AGR.record.@titleOfSubSeries_p") + unless exists("$AGR.record.@titleOfSubSeries_p") + set_array("$AGR.record.@titleOfSubSeries_p") + end + copy_field("$880.p","$AGR.record.@titleOfSubSeries_p.$append") unless exists("$AGR.record.otherTitleInformation[]") set_array("$AGR.record.otherTitleInformation[]") end @@ -75,7 +78,8 @@ do list(path:"245??","var":"$i") copy_field("$880.@script.label","alternateGraphicRepresentation[].$last.script.label") copy_field("$880.a","alternateGraphicRepresentation[].$last.record.@title") copy_field("$880.n","alternateGraphicRepresentation[].$last.record.@titleOfSubSeries_n") - copy_field("$880.p","alternateGraphicRepresentation[].$last.record.@titleOfSubSeries_p") + set_array("alternateGraphicRepresentation[].$last.record.@titleOfSubSeries_p") + copy_field("$880.p","alternateGraphicRepresentation[].$last.record.@titleOfSubSeries_p.$append") set_array("alternateGraphicRepresentation[].$last.record.otherTitleInformation[]") copy_field("$880.b","alternateGraphicRepresentation[].$last.record.otherTitleInformation[].$append") set_array("alternateGraphicRepresentation[].$last.record.responsibilityStatement[]") @@ -92,10 +96,16 @@ do list(path:"alternateGraphicRepresentation[]","var":"$AGR") unless exists("$AGR.record.@titleOfSubSeries_n") copy_field("@titleOfSubSeries_n","$AGR.record.@titleOfSubSeries_n") end + join_field("$AGR.record.@titleOfSubSeries_p", ". ") + if is_empty("$AGR.record.@titleOfSubSeries_p") + remove_field("$AGR.record.@titleOfSubSeries_p") + end if exists("$AGR.record.@titleOfSubSeries_n") # separate subvolume numbering and title with : prepend("$AGR.record.@titleOfSubSeries_p", ": ") end - + if is_empty("$AGR.record.@titleOfSubSeries_n") + remove_field("$AGR.record.@titleOfSubSeries_n") + end paste("$AGR.record.@titleOfSubSeries", "$AGR.record.@titleOfSubSeries_n", "$AGR.record.@titleOfSubSeries_p", join_char: "") if is_empty("$AGR.record.@titleOfSubSeries") @@ -110,6 +120,13 @@ do list(path:"alternateGraphicRepresentation[]","var":"$AGR") remove_field("$AGR.record.@titleOfSubSeries_n") remove_field("$AGR.record.@titleOfSubSeries_p") elsif exists("$AGR.record.@titleOfSubSeries_p") # We have an appearance where there is no title $a is given as alternateGraphicRepresentation + join_field("$AGR.record.@titleOfSubSeries_p", ". ") + if is_empty("$AGR.record.@titleOfSubSeries_p") + remove_field("$AGR.record.@titleOfSubSeries_p") + end + if exists("$AGR.record.@titleOfSubSeries_n") # separate subvolume numbering and title with : + prepend("$AGR.record.@titleOfSubSeries_p", ": ") + end unless exists("$AGR.record.@titleOfSubSeries_n") copy_field("@titleOfSubSeries_n","$AGR.record.@titleOfSubSeries_n") end diff --git a/src/test/resources/alma-fix/990218189790206441.json b/src/test/resources/alma-fix/990218189790206441.json new file mode 100644 index 000000000..56b0b3bf8 --- /dev/null +++ b/src/test/resources/alma-fix/990218189790206441.json @@ -0,0 +1,214 @@ +{ + "@context" : "http://lobid.org/resources/context.jsonld", + "alternateGraphicRepresentation" : [ { + "script" : { + "id" : "https://unicode.org/iso15924/iso15924.txt#Jpan", + "label" : "Japanisch (Kanji, Hiragana und Katakana)" + }, + "record" : { + "responsibilityStatement" : [ "企画委員 安藤彦太郎・榎一雄・日比野丈夫・宮川寅雄" ], + "title" : "図説中国の歴史, 1: よみがえる古代. 伊藤道治", + "contribution" : [ { + "agent" : { + "label" : "伊藤, 道治" + } + }, { + "agent" : { + "label" : "安藤, 彦太郎" + } + }, { + "agent" : { + "label" : "榎, 一雄" + } + }, { + "agent" : { + "label" : "日比野, 丈夫" + } + }, { + "agent" : { + "label" : "宮川, 寅雄" + } + } ] + } + } ], + "almaMmsId" : "990218189790206441", + "hbzId" : "HT019317250", + "deprecatedUri" : "http://lobid.org/resources/HT019317250#!", + "title" : "Zusetsu chūgoku no rekishi, 1: Yomigaeru kodai / Itō Michiharu", + "publication" : [ { + "startDate" : "1976", + "type" : [ "PublicationEvent" ], + "location" : [ "Tōkyō" ], + "publishedBy" : [ "Kōdansha" ] + } ], + "describedBy" : { + "id" : "http://lobid.org/resources/990218189790206441", + "label" : "Webseite der hbz-Ressource 990218189790206441", + "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/990218189790206441", + "dateCreated" : "2021-04-05", + "dateModified" : "2023-09-04", + "type" : [ "DataFeedItem" ], + "label" : "hbz-Ressource 990218189790206441 im Exportformat MARC21 XML", + "inDataset" : { + "id" : "https://datahub.io/dataset/hbz_unioncatalog", + "label" : "hbz_unioncatalog" + }, + "sourceOrganization" : { + "id" : "http://lobid.org/organisations/DE-294-15#!", + "label" : "Ruhr-Universität Bochum, Fakultät für Ostasienwissenschaften, Bibliothek" + } + } + }, + "license" : [ { + "id" : "http://creativecommons.org/publicdomain/zero/1.0", + "label" : "Creative Commons-Lizenz CC0 1.0 Universal" + } ] + }, + "sameAs" : [ { + "id" : "http://hub.culturegraph.org/resource/HBZ-HT019317250", + "label" : "Culturegraph Ressource" + } ], + "isPartOf" : [ { + "type" : [ "IsPartOfRelation" ], + "hasSuperordinate" : [ { + "id" : "http://lobid.org/resources/HT019316012#!", + "label" : "Zusetsu chūgoku no rekishi" + } ], + "numbering" : "1" + } ], + "inCollection" : [ { + "id" : "http://lobid.org/organisations/DE-655#!", + "label" : "hbz - Hochschulbibliothekszentrum des Landes Nordrhein-Westfalen, Netzwerkzone", + "type" : [ "Collection" ] + } ], + "language" : [ { + "id" : "http://id.loc.gov/vocabulary/iso639-2/jpn", + "label" : "Japanisch" + } ], + "extent" : "198 Seiten : Zahlreiche Illustrationen, Karten ; Begleitheft \"Geppō 1\"", + "note" : [ "Hier auch später erschienene, unveränderte Nachdrucke", "Index" ], + "langNote" : [ "Japanischer Text", "Japanische Schrift" ], + "hasItem" : [ { + "label" : "lobid Bestandsressource", + "type" : [ "Item", "PhysicalObject" ], + "callNumber" : "Blb 182-1", + "serialNumber" : "115207346", + "currentLibrary" : "B4004", + "currentLocation" : "00015000", + "heldBy" : { + "id" : "http://lobid.org/organisations/DE-294-15#!", + "isil" : "DE-294-15", + "label" : "Ruhr-Universität Bochum, Fakultät für Ostasienwissenschaften, Bibliothek" + }, + "id" : "http://lobid.org/items/990218189790206441:DE-294-15:23118170880007503#!" + }, { + "label" : "lobid Bestandsressource", + "type" : [ "Item", "PhysicalObject" ], + "callNumber" : "951 Z96 C559 1976 (1)", + "serialNumber" : "AJ-1019284", + "currentLibrary" : "AJ", + "currentLocation" : "AJ--Mag", + "heldBy" : { + "id" : "http://lobid.org/organisations/DE-5-141#!", + "isil" : "DE-5-141", + "label" : "Universität Bonn, Institut für Orient- und Asienwissenschaften, Bibliothek" + }, + "id" : "http://lobid.org/items/990218189790206441:DE-5-141:23264785760006467#!" + } ], + "medium" : [ { + "label" : "Print", + "id" : "http://rdaregistry.info/termList/RDAproductionMethod/1010" + } ], + "bibliographicLevel" : { + "label" : "Monograph/Item", + "id" : "https://www.loc.gov/marc/bibliographic/bdleader.html#Monograph_Item" + }, + "type" : [ "BibliographicResource", "Book" ], + "responsibilityStatement" : [ "Kikaku iin Andō Hikotarō, Enoki Kazuo, Hibino Takeo, Miyagawa Torao" ], + "contribution" : [ { + "agent" : { + "label" : "Itō, Michiharu", + "type" : [ "Person" ] + }, + "role" : { + "id" : "http://id.loc.gov/vocabulary/relators/aut", + "label" : "Autor/in" + }, + "type" : [ "Contribution" ] + }, { + "agent" : { + "gndIdentifier" : "1032941693", + "id" : "https://d-nb.info/gnd/1032941693", + "label" : "Andō, Hikotarō", + "type" : [ "Person" ], + "dateOfBirth" : "1917", + "dateOfDeath" : "2009", + "altLabel" : [ "Andō Hikotarō", "安藤彦太郎" ] + }, + "role" : { + "id" : "http://id.loc.gov/vocabulary/relators/edt", + "label" : "Herausgeber/in" + }, + "type" : [ "Contribution" ] + }, { + "agent" : { + "gndIdentifier" : "172063590", + "id" : "https://d-nb.info/gnd/172063590", + "label" : "Enoki, Kazuo", + "type" : [ "Person" ], + "dateOfBirth" : "1913", + "dateOfDeath" : "1989", + "altLabel" : [ "Enoki Kazuo", "榎一雄" ] + }, + "role" : { + "id" : "http://id.loc.gov/vocabulary/relators/edt", + "label" : "Herausgeber/in" + }, + "type" : [ "Contribution" ] + }, { + "agent" : { + "gndIdentifier" : "172137330", + "id" : "https://d-nb.info/gnd/172137330", + "label" : "Hibino, Takeo", + "type" : [ "Person" ], + "dateOfBirth" : "1914", + "dateOfDeath" : "2007", + "altLabel" : [ "日比野丈夫", "Hibino, Jōbu" ] + }, + "role" : { + "id" : "http://id.loc.gov/vocabulary/relators/edt", + "label" : "Herausgeber/in" + }, + "type" : [ "Contribution" ] + }, { + "agent" : { + "gndIdentifier" : "172277140", + "id" : "https://d-nb.info/gnd/172277140", + "label" : "Miyagawa, Torao", + "type" : [ "Person" ], + "dateOfBirth" : "1908", + "dateOfDeath" : "1984", + "altLabel" : [ "Miyagawa Torao", "宮川寅雄", "宮川, 寅雄 (*)" ] + }, + "role" : { + "id" : "http://id.loc.gov/vocabulary/relators/edt", + "label" : "Herausgeber/in" + }, + "type" : [ "Contribution" ] + } ], + "id" : "http://lobid.org/resources/990218189790206441#!" +} diff --git a/src/test/resources/alma-fix/990218189790206441.xml b/src/test/resources/alma-fix/990218189790206441.xml new file mode 100644 index 000000000..5063de33f --- /dev/null +++ b/src/test/resources/alma-fix/990218189790206441.xml @@ -0,0 +1,601 @@ + + + 02276nam#a2200493#cc4500 + 20210409130135.0 + tu + 170504|1976####ja############|||#|#jpn#c + DE-605 + 990218189790206441 + + (DE-605)HT019317250 + + + 294/15 + ger + rda + + + jpn + + + XB-JP + + + 880-02 + Itō, Michiharu + aut + + + 100-02/Jpan + 伊藤, 道治 + + + 880-01 + Zusetsu chūgoku no rekishi + 1 + Yomigaeru kodai / Itō Michiharu + Kikaku iin Andō Hikotarō, Enoki Kazuo, Hibino Takeo, Miyagawa Torao + + + 245-01/Jpan + 図説中国の歴史 + O:H + F:331 + + + 245-01/Jpan + 企画委員 安藤彦太郎・榎一雄・日比野丈夫・宮川寅雄 + O:H + F:359 + + + 245-01/Jpan + 1 + F:089 + + + 245-01/Jpan + よみがえる古代 + F:331 + + + 245-01/Jpan + 伊藤道治 + F:359 + + + Tōkyō + Kōdansha + 1976 + + + 198 Seiten + Zahlreiche Illustrationen, Karten + Begleitheft "Geppō 1" + + + txt + + + n + + + nc + + + Hier auch später erschienene, unveränderte Nachdrucke + F:501 + + + Index + F:501 + + + Japanischer Text + + + Japanische Schrift + + + 880-03 + Andō, Hikotarō + 1917-2009 + (DE-588)1032941693 + edt + O:H + https://portal.dnb.de/opac.htm?method=simpleSearch&cqlMode=true&query=idn=1032941693 + http://viaf.org/viaf/sourceID/DNB|1032941693 + + + 700-03/Jpan + 安藤, 彦太郎 + O:H + + + 880-04 + Enoki, Kazuo + 1913-1989 + (DE-588)172063590 + edt + O:H + https://portal.dnb.de/opac.htm?method=simpleSearch&cqlMode=true&query=idn=172063590 + http://viaf.org/viaf/sourceID/DNB|172063590 + + + 700-04/Jpan + 榎, 一雄 + O:H + + + Hibino, Takeo + 1914-2007 + 880-05 + (DE-588)172137330 + edt + O:H + https://portal.dnb.de/opac.htm?method=simpleSearch&cqlMode=true&query=idn=172137330 + http://viaf.org/viaf/sourceID/DNB|172137330 + + + 700-05/Jpan + 日比野, 丈夫 + O:H + + + 880-06 + Miyagawa, Torao + 1908-1984 + (DE-588)172277140 + edt + O:H + https://portal.dnb.de/opac.htm?method=simpleSearch&cqlMode=true&query=idn=172277140 + http://viaf.org/viaf/sourceID/DNB|172277140 + + + 700-06/Jpan + 宮川, 寅雄 + O:H + + + (DE-605)HT019316012 + 1 + + + jap + + + 030 + a|zur|||||||| + + + 050 + a|a||||||||||| + + + (DE-599)HBZHT019317250 + + + 49HBZ_NETWORK + 990218189790206441 + HBZ Network + + + 49HBZ_BRIDGE_UBO + 99277104907503 + Ruhr-Universität Bochum + + + 245-01/Jpan + 図説中国の歴史 + O:H + F:331 + 49HBZ_BRIDGE_UBO + + + 245-01/Jpan + 企画委員 安藤彦太郎・榎一雄・日比野丈夫・宮川寅雄 + O:H + F:359 + 49HBZ_BRIDGE_UBO + + + 245-01/Jpan + 1 + F:089 + 49HBZ_BRIDGE_UBO + + + 245-01/Jpan + よみがえる古代 + F:331 + 49HBZ_BRIDGE_UBO + + + 245-01/Jpan + 伊藤道治 + F:359 + 49HBZ_BRIDGE_UBO + + + Hier auch später erschienene, unveränderte Nachdrucke + F:501 + 49HBZ_BRIDGE_UBO + + + Index + F:501 + 49HBZ_BRIDGE_UBO + + + 880-03 + Andō, Hikotarō + 1917-2009 + (DE-588)1032941693 + edt + O:H + 49HBZ_BRIDGE_UBO + + + 700-03/Jpan + 安藤, 彦太郎 + O:H + 49HBZ_BRIDGE_UBO + + + 880-04 + Enoki, Kazuo + 1913-1989 + (DE-588)172063590 + edt + O:H + 49HBZ_BRIDGE_UBO + + + 700-04/Jpan + 榎, 一雄 + O:H + 49HBZ_BRIDGE_UBO + + + 880-05 + Hibino, Takeo + 1914-2007 + (DE-588)172137330 + edt + O:H + 49HBZ_BRIDGE_UBO + + + 700-05/Jpan + 日比野, 丈夫 + O:H + 49HBZ_BRIDGE_UBO + + + 880-06 + Miyagawa, Torao + 1908-1984 + (DE-588)172277140 + edt + O:H + 49HBZ_BRIDGE_UBO + + + 700-06/Jpan + 宮川, 寅雄 + O:H + 49HBZ_BRIDGE_UBO + + + 49HBZ_ULB + 991021273389706467 + Universitaet Bonn + + + 245-01/Jpan + 図説中国の歴史 + O:H + F:331 + 49HBZ_ULB + + + 245-01/Jpan + 企画委員 安藤彦太郎・榎一雄・日比野丈夫・宮川寅雄 + O:H + F:359 + 49HBZ_ULB + + + 245-01/Jpan + 1 + F:089 + 49HBZ_ULB + + + 245-01/Jpan + よみがえる古代 + F:331 + 49HBZ_ULB + + + 245-01/Jpan + 伊藤道治 + F:359 + 49HBZ_ULB + + + Hier auch später erschienene, unveränderte Nachdrucke + F:501 + 49HBZ_ULB + + + Index + F:501 + 49HBZ_ULB + + + 880-03 + Andō, Hikotarō + 1917-2009 + (DE-588)1032941693 + edt + O:H + 49HBZ_ULB + + + 700-03/Jpan + 安藤, 彦太郎 + O:H + 49HBZ_ULB + + + 880-04 + Enoki, Kazuo + 1913-1989 + (DE-588)172063590 + edt + O:H + 49HBZ_ULB + + + 700-04/Jpan + 榎, 一雄 + O:H + 49HBZ_ULB + + + 880-05 + Hibino, Takeo + 1914-2007 + (DE-588)172137330 + edt + O:H + 49HBZ_ULB + + + 700-05/Jpan + 日比野, 丈夫 + O:H + 49HBZ_ULB + + + 880-06 + Miyagawa, Torao + 1908-1984 + (DE-588)172277140 + edt + O:H + 49HBZ_ULB + + + 700-06/Jpan + 宮川, 寅雄 + O:H + 49HBZ_ULB + + + HBZ + LOCAL + 49HBZ_ULB + + + (DE-5)4543272 + LOCAL + 49HBZ_ULB + + + 20200323 + LOCAL + 49HBZ_ULB + + + System + ILS + marc21 + 01 + false + 2023-09-04 16:08:07 Europe/Berlin + 021818979-HBZ01 + 60 + import + 2021-04-05 18:49:58 Europe/Berlin + + + B4004 + 00015000 + Blb 182-1 + 22118170900007503 + + + 2023-02-21 17:39:47 + 22118170900007503 + 2023-02-21 17:39:47 + 49HBZ_BRIDGE_UBO + false + System + System + + + 22118170900007503 + 00015000 + BOOK + 00015000 + 04 + System + 2018-10-31 01:00:00 Europe/Berlin + Blb 182-1 + 49HBZ_BRIDGE_UBO + 1 + 0 + System + 115207346 + 23118170880007503 + Blb 182-1 + 2023-02-21 18:39:47 Europe/Berlin + B4004 + B4004 + + + AJ + AJ--Mag + 951 Z96 C559 1976 (1) + 22264785770006467 + + + 2023-07-24 09:10:51 + 22264785770006467 + 49HBZ_ULB + false + import + + + 22264785770006467 + AJ--Mag + BOOK + AJ--Mag + AMO_TL2_FIX + 2023-07-23 12:59:00 Europe/Berlin + 2023-07-25 08:01:39 Europe/Berlin + false + 951 Z96 C559 1976 (1) + 1 + 49HBZ_ULB + 1 + # + import + SGC-9246 + AJ-1019284 + SISIS-Ausleihzähler Migrationsjahr: 0 | SISIS-Ausleihzähler Vor-Migrationsjahr: 0 | SISIS-Ausleihzähler vorletztes Migrationsjahr: 0 | SISIS-Vormerkzähler Migrationsjahr: 0 | SISIS-Buchdaten-Aufnahmedatum: 2020-03-23 + SISIS-ULBSystematik: 0 | SISIS-Magazindrucker: 0 | SISIS-Fernleihkonditionen: 3 | SISIS-Medientyp: 0 | Sigel: 5/141 | SISIS-Entleihbarkeit: X | SISIS-Zweigstelle: 91 + 23264785760006467 + 951 Z96 C559 1976 (1) + 2023-07-24 11:10:51 Europe/Berlin + AJ + AJ + + + Enoki Kazuo + 1913-1989 + GND + GND-172063590 + 400 + + + U:Jpan + 榎一雄 + 1913-1989 + GND + GND-172063590 + 400 + + + http://d-nb.info/gnd/172063590 + uri + GND + GND-172063590 + 024 + + + Andō Hikotarō + 1917-2009 + GND + GND-1032941693 + 400 + + + U:Jpan + 安藤彦太郎 + 1917-2009 + GND + GND-1032941693 + 400 + + + U:Hans + 安藤彦太郎 + 1917-2009 + GND + GND-1032941693 + 400 + + + http://d-nb.info/gnd/1032941693 + uri + GND + GND-1032941693 + 024 + + + Miyagawa Torao + 1908-1984 + GND + GND-172277140 + 400 + + + U:Jpan + 宮川寅雄 + 1908-1984 + GND + GND-172277140 + 400 + + + U:Jpan + 宮川, 寅雄 (*) + 1908-1984 + GND + GND-172277140 + 400 + + + http://d-nb.info/gnd/172277140 + uri + GND + GND-172277140 + 024 + + + Hibino, Jōbu + 1914-2007 + GND + GND-172137330 + 400 + + + U:Jpan + 日比野丈夫 + 1914-2007 + GND + GND-172137330 + 400 + + + 172137330 + http://d-nb.info/gnd/172137330 + gnd + GND + GND-172137330 + 024 + + diff --git a/web/test/tests/IndexIntegrationTest.java b/web/test/tests/IndexIntegrationTest.java index 48b9164c5..534fd5a74 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]", /*->*/ 5 }, - { "inCollection.id:\"http\\://lobid.org/organisations/DE-655#\\!\"", /*->*/ 123 }, + { "inCollection.id:\"http\\://lobid.org/organisations/DE-655#\\!\"", /*->*/ 124 }, { "inCollection.id:NWBib", /*->*/ 0 }, { "publication.publishedBy:Quedenfeldt", /*->*/ 2 }, { "publication.publishedBy:Quedenfeld", /*->*/ 2 },