Skip to content

Commit

Permalink
Merge #2096 from remote-tracking branch 'origin/2095-noOverwritingHbzId'
Browse files Browse the repository at this point in the history
  • Loading branch information
dr0i committed Nov 15, 2024
2 parents c056d0c + 4d3aa39 commit 7605172
Show file tree
Hide file tree
Showing 4 changed files with 308 additions and 8 deletions.
14 changes: 8 additions & 6 deletions src/main/resources/alma/fix/identifiers.fix
Original file line number Diff line number Diff line change
Expand Up @@ -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
170 changes: 170 additions & 0 deletions src/test/resources/alma-fix/990217879290206441.json
Original file line number Diff line number Diff line change
@@ -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" : "HT019286510",
"deprecatedUri" : "http://lobid.org/resources/HT019286510#!",
"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"
}
}
128 changes: 128 additions & 0 deletions src/test/resources/alma-fix/990217879290206441.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
<?xml version="1.0" encoding="UTF-8"?>
<record>
<leader>00836nas#a2200325#c#4500</leader>
<controlfield tag="005">20210409143542.0</controlfield>
<controlfield tag="007">tu</controlfield>
<controlfield tag="008">170331m20159999ne##|#m#######|####|eng#c</controlfield>
<controlfield tag="003">DE-605</controlfield>
<controlfield tag="001">990217879290206441</controlfield>
<datafield tag="016" ind1="7" ind2=" ">
<subfield code="a">909716357</subfield>
<subfield code="2">OCoLC</subfield>
</datafield>
<datafield tag="016" ind1="7" ind2=" ">
<subfield code="a">HT018628300</subfield>
<subfield code="2">DE-101b</subfield>
</datafield>
<datafield tag="022" ind1=" " ind2=" ">
<subfield code="a">2405-4488</subfield>
<subfield code="0">http://worldcat.org/issn/{0}2405-4488</subfield>
</datafield>
<datafield tag="035" ind1=" " ind2=" ">
<subfield code="a">(DE-605)HT019286510</subfield>
</datafield>
<datafield tag="040" ind1=" " ind2=" ">
<subfield code="a">6</subfield>
<subfield code="b">ger</subfield>
<subfield code="c">DNB</subfield>
<subfield code="e">rda</subfield>
</datafield>
<datafield tag="041" ind1=" " ind2=" ">
<subfield code="a">eng</subfield>
</datafield>
<datafield tag="044" ind1=" " ind2=" ">
<subfield code="c">XA-NL</subfield>
<subfield code="c">XD-US</subfield>
</datafield>
<datafield tag="084" ind1=" " ind2=" ">
<subfield code="a">900</subfield>
<subfield code="2">z</subfield>
</datafield>
<datafield tag="245" ind1="0" ind2="0">
<subfield code="a">&lt;&lt;The&gt;&gt; history of Oriental studies</subfield>
</datafield>
<datafield tag="264" ind1=" " ind2="1">
<subfield code="a">Leiden</subfield>
<subfield code="a">Boston</subfield>
<subfield code="b">Brill</subfield>
<subfield code="c">2015-</subfield>
</datafield>
<datafield tag="336" ind1=" " ind2=" ">
<subfield code="b">txt</subfield>
</datafield>
<datafield tag="337" ind1=" " ind2=" ">
<subfield code="b">n</subfield>
</datafield>
<datafield tag="338" ind1=" " ind2=" ">
<subfield code="b">nc</subfield>
</datafield>
<datafield tag="362" ind1="0" ind2=" ">
<subfield code="a">Volume 1-</subfield>
</datafield>
<datafield tag="655" ind1=" " ind2="7">
<subfield code="a">Monografische Reihe</subfield>
<subfield code="0">(DE-588)4179998-7</subfield>
<subfield code="2">gnd-content</subfield>
</datafield>
<datafield tag="964" ind1="0" ind2="s">
<subfield code="F">030</subfield>
<subfield code="A">a||dr||||||37</subfield>
</datafield>
<datafield tag="964" ind1="0" ind2="s">
<subfield code="F">050</subfield>
<subfield code="A">a|a|||||||||||</subfield>
</datafield>
<datafield tag="964" ind1="0" ind2="s">
<subfield code="F">052</subfield>
<subfield code="A">r||||||a|||||||</subfield>
</datafield>
<datafield tag="035" ind1=" " ind2=" ">
<subfield code="a">(OCoLC)909716357</subfield>
</datafield>
<datafield tag="035" ind1=" " ind2=" ">
<subfield code="a">(DE-599)ZDB2819760-4</subfield>
</datafield>
<datafield tag="MBD" ind1=" " ind2=" ">
<subfield code="M">49HBZ_NETWORK</subfield>
<subfield code="i">990217879290206441</subfield>
<subfield code="n">HBZ Network</subfield>
</datafield>
<datafield tag="MBD" ind1=" " ind2=" ">
<subfield code="M">49HBZ_EDK</subfield>
<subfield code="i">990008520920108971</subfield>
<subfield code="n">Erzbischöfliche Diözesan- und Dombibliothek (EDK) - Bibliothek des Priesterseminars (BPS)</subfield>
</datafield>
<datafield tag="MBD" ind1=" " ind2=" ">
<subfield code="M">49HBZ_UBT</subfield>
<subfield code="i">990024956400106470</subfield>
<subfield code="n">UB Trier</subfield>
</datafield>
<datafield tag="MBD" ind1=" " ind2=" ">
<subfield code="M">49HBZ_ULB</subfield>
<subfield code="i">991032575069706467</subfield>
<subfield code="n">Universitaet Bonn</subfield>
</datafield>
<datafield tag="MBD" ind1=" " ind2=" ">
<subfield code="M">49HBZ_UBO</subfield>
<subfield code="i">991013019319706471</subfield>
<subfield code="n">Universität Bochum</subfield>
</datafield>
<datafield tag="MBD" ind1=" " ind2=" ">
<subfield code="M">49HBZ_ULM</subfield>
<subfield code="i">991020175399706449</subfield>
<subfield code="n">Universität Münster</subfield>
</datafield>
<datafield tag="MNG" ind1=" " ind2=" ">
<subfield code="c">System</subfield>
<subfield code="f">ILS</subfield>
<subfield code="i">marc21</subfield>
<subfield code="l">62</subfield>
<subfield code="k">01</subfield>
<subfield code="e">false</subfield>
<subfield code="d">2021-04-09 14:35:42 Europe/Berlin</subfield>
<subfield code="g">021787929-HBZ01</subfield>
<subfield code="j">60</subfield>
<subfield code="a">import</subfield>
<subfield code="b">2021-04-05 10:26:58 Europe/Berlin</subfield>
</datafield>
</record>
4 changes: 2 additions & 2 deletions web/test/tests/IndexIntegrationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ public static Collection<Object[]> 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 },
Expand Down

0 comments on commit 7605172

Please sign in to comment.