Skip to content

Commit

Permalink
Merge #1909 from remote-tracking branch 'origin/logErrorInAlternative…
Browse files Browse the repository at this point in the history
…GraphicRepresentation'
  • Loading branch information
dr0i committed Sep 26, 2023
2 parents 078eac9 + 7672f5a commit 915536f
Show file tree
Hide file tree
Showing 3 changed files with 327 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/resources/alma/fix/macros.fix
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ do put_macro("alternateGraphicRepresationIsPartOf")
end
else
copy_field("[email protected]","alternateGraphicRepresentation[].$append.script.id")
copy_field("[email protected]","alternateGraphicRepresentation[].$last.script.label")
set_array("alternateGraphicRepresentation[].$last.record.isPartOf[].$last.hasSuperordinate[].$append")
copy_field("[email protected]","alternateGraphicRepresentation[].$last.script.label")
set_array("alternateGraphicRepresentation[].$last.record.isPartOf[]")
set_array("alternateGraphicRepresentation[].$last.record.isPartOf[].$append.hasSuperordinate[]")
copy_field("$880.a","alternateGraphicRepresentation[].$last.record.isPartOf[].$last.hasSuperordinate[].$append.label")
copy_field("$880.v", "alternateGraphicRepresentation[].$last.record.isPartOf[].$last.numbering")
end
Expand Down
142 changes: 142 additions & 0 deletions src/test/resources/alma-fix/99372680948006441.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
{
"@context" : "http://lobid.org/resources/context.jsonld",
"alternateGraphicRepresentation" : [ {
"script" : {
"id" : "https://unicode.org/iso15924/iso15924.txt#(B",
"label" : "Lateinisch"
},
"record" : {
"isPartOf" : [ {
"hasSuperordinate" : [ {
"label" : "Hot Spots in Global Politics"
} ]
} ]
}
} ],
"almaMmsId" : "99372680948006441",
"isbn" : [ "0745656722", "9780745656724", "0745674275", "9780745674278" ],
"oclcNumber" : [ "843639961" ],
"title" : "Congo",
"edition" : [ "1st ed" ],
"publication" : [ {
"startDate" : "2013",
"type" : [ "PublicationEvent" ],
"location" : [ "Cambridge :" ],
"publishedBy" : [ "Polity" ]
} ],
"describedBy" : {
"id" : "http://lobid.org/resources/99372680948006441",
"label" : "Webseite der hbz-Ressource 99372680948006441",
"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/99372680948006441",
"dateCreated" : "2023-07-07",
"dateModified" : "2023-08-30",
"type" : [ "DataFeedItem" ],
"label" : "hbz-Ressource 99372680948006441 im Exportformat MARC21 XML",
"inDataset" : {
"id" : "https://datahub.io/dataset/hbz_unioncatalog",
"label" : "hbz_unioncatalog"
},
"sourceOrganization" : {
"id" : "http://lobid.org/organisations/DE-MiAaPQ#!",
"label" : "lobid Organisation"
},
"provider" : {
"id" : "http://lobid.org/organisations/DE-MiAaPQ#!",
"label" : "lobid Organisation"
},
"modifiedBy" : [ {
"id" : "http://lobid.org/organisations/DE-MiAaPQ#!",
"label" : "lobid Organisation"
} ]
}
},
"license" : [ {
"id" : "http://creativecommons.org/publicdomain/zero/1.0",
"label" : "Creative Commons-Lizenz CC0 1.0 Universal"
} ]
},
"sameAs" : [ {
"id" : "http://worldcat.org/oclc/843639961",
"label" : "OCLC Ressource"
} ],
"isPartOf" : [ {
"type" : [ "IsPartOfRelation" ],
"hasSuperordinate" : [ {
"label" : "Hot Spots in Global Politics"
} ]
}, {
"type" : [ "IsPartOfRelation" ],
"hasSuperordinate" : [ {
"label" : "Global Political Hot Spots"
} ]
} ],
"related" : [ {
"isbn" : [ "9780745648439", "0745648436" ]
}, {
"isbn" : [ "9780745648446", "0745648444" ]
} ],
"language" : [ {
"id" : "http://id.loc.gov/vocabulary/iso639-2/eng",
"label" : "Englisch"
} ],
"extent" : "1 online resource (262 p.)",
"note" : [ "Description based upon print version of record." ],
"abstract" : [ "The Democratic Republic of Congo has become one of the world's bloodiest hot spots. 2003 saw the end of a five-year war in which millions lost their lives - one of the deadliest conflicts since World War II. Despite recent peace agreements and democratic elections, the country is still plagued by army and militia violence. Congo remains deeply troubled, since the deep-rooted causes of conflict have not been adequately addressed. The conflict in the DRC has divided opinion; some call it a civil war, or a war of aggression by the country's neighbours; others a continuation of Rwanda's" ],
"langNote" : [ "English" ],
"subject" : [ {
"type" : [ "Concept" ],
"source" : {
"label" : "Library of Congress Subject Headings",
"id" : "https://id.loc.gov/authorities/subjects.html"
},
"label" : "Congo (Democratic Republic) / Politics and government."
}, {
"type" : [ "Concept" ],
"source" : {
"label" : "Dewey-Dezimalklassifikation",
"id" : "https://d-nb.info/gnd/4149423-4"
},
"label" : "967.51034",
"notation" : "967.51034"
} ],
"subjectslabels" : [ "Congo (Democratic Republic) / Politics and government." ],
"medium" : [ {
"label" : "Datenträger",
"id" : "http://rdaregistry.info/termList/RDAMediaType/1003"
}, {
"label" : "Online-Ressource",
"id" : "http://rdaregistry.info/termList/RDACarrierType/1018"
} ],
"bibliographicLevel" : {
"label" : "Monograph/Item",
"id" : "https://www.loc.gov/marc/bibliographic/bdleader.html#Monograph_Item"
},
"type" : [ "BibliographicResource", "Bibliography", "Book" ],
"responsibilityStatement" : [ "Thomas Turner." ],
"contribution" : [ {
"agent" : {
"label" : "Turner, Thomas",
"type" : [ "Person" ]
},
"role" : {
"id" : "http://id.loc.gov/vocabulary/relators/cre",
"label" : "Schöpfer/in"
},
"type" : [ "Contribution" ]
} ],
"id" : "http://lobid.org/resources/99372680948006441#!"
}
182 changes: 182 additions & 0 deletions src/test/resources/alma-fix/99372680948006441.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
<?xml version="1.0" encoding="UTF-8"?>
<record>
<leader>01234nam 2200349 a 4500</leader>
<controlfield tag="001">99372680948006441</controlfield>
<controlfield tag="005">20200520144314.0</controlfield>
<controlfield tag="006">m o d | </controlfield>
<controlfield tag="007">cr -n---------</controlfield>
<controlfield tag="008">130507s2013 enkb ob 001 0 eng d</controlfield>
<datafield tag="020" ind1=" " ind2=" ">
<subfield code="a">0-7456-5672-2</subfield>
</datafield>
<datafield tag="020" ind1=" " ind2=" ">
<subfield code="a">0-7456-7427-5</subfield>
</datafield>
<datafield tag="035" ind1=" " ind2=" ">
<subfield code="a">(CKB)2670000000352596</subfield>
</datafield>
<datafield tag="035" ind1=" " ind2=" ">
<subfield code="a">(EBL)1174299</subfield>
</datafield>
<datafield tag="035" ind1=" " ind2=" ">
<subfield code="a">(OCoLC)843639961</subfield>
</datafield>
<datafield tag="035" ind1=" " ind2=" ">
<subfield code="a">(SSID)ssj0000906587</subfield>
</datafield>
<datafield tag="035" ind1=" " ind2=" ">
<subfield code="a">(PQKBManifestationID)12401336</subfield>
</datafield>
<datafield tag="035" ind1=" " ind2=" ">
<subfield code="a">(PQKBTitleCode)TC0000906587</subfield>
</datafield>
<datafield tag="035" ind1=" " ind2=" ">
<subfield code="a">(PQKBWorkID)10855450</subfield>
</datafield>
<datafield tag="035" ind1=" " ind2=" ">
<subfield code="a">(PQKB)10724264</subfield>
</datafield>
<datafield tag="035" ind1=" " ind2=" ">
<subfield code="a">(MiAaPQ)EBC1174299</subfield>
</datafield>
<datafield tag="035" ind1=" " ind2=" ">
<subfield code="a">(MiAaPQ)EBC4029480</subfield>
</datafield>
<datafield tag="035" ind1=" " ind2=" ">
<subfield code="a">(Au-PeEL)EBL4029480</subfield>
</datafield>
<datafield tag="035" ind1=" " ind2=" ">
<subfield code="a">(CaPaEBR)ebr11106405</subfield>
</datafield>
<datafield tag="035" ind1=" " ind2=" ">
<subfield code="a">(JP-MeL)3000112781</subfield>
</datafield>
<datafield tag="035" ind1=" " ind2=" ">
<subfield code="a">(Au-PeEL)EBL1174299</subfield>
</datafield>
<datafield tag="035" ind1=" " ind2=" ">
<subfield code="a">(CaPaEBR)ebr10691457</subfield>
</datafield>
<datafield tag="035" ind1=" " ind2=" ">
<subfield code="a">(CaONFJC)MIL484671</subfield>
</datafield>
<datafield tag="035" ind1=" " ind2=" ">
<subfield code="a">(EXLCZ)992670000000352596</subfield>
</datafield>
<datafield tag="040" ind1=" " ind2=" ">
<subfield code="a">MiAaPQ</subfield>
<subfield code="c">MiAaPQ</subfield>
<subfield code="d">MiAaPQ</subfield>
</datafield>
<datafield tag="041" ind1=" " ind2=" ">
<subfield code="a">eng</subfield>
</datafield>
<datafield tag="043" ind1=" " ind2=" ">
<subfield code="a">f-cg---</subfield>
</datafield>
<datafield tag="050" ind1=" " ind2="4">
<subfield code="a">DT653</subfield>
<subfield code="b">.T87 2013</subfield>
</datafield>
<datafield tag="082" ind1="0" ind2="0">
<subfield code="a">967.51034</subfield>
</datafield>
<datafield tag="100" ind1="1" ind2=" ">
<subfield code="a">Turner, Thomas.</subfield>
</datafield>
<datafield tag="245" ind1="1" ind2="0">
<subfield code="a">Congo</subfield>
<subfield code="h">[electronic resource] /</subfield>
<subfield code="c">Thomas Turner.</subfield>
</datafield>
<datafield tag="250" ind1=" " ind2=" ">
<subfield code="a">1st ed.</subfield>
</datafield>
<datafield tag="260" ind1=" " ind2=" ">
<subfield code="a">Cambridge :</subfield>
<subfield code="b">Polity,</subfield>
<subfield code="c">2013.</subfield>
</datafield>
<datafield tag="300" ind1=" " ind2=" ">
<subfield code="a">1 online resource (262 p.)</subfield>
</datafield>
<datafield tag="336" ind1=" " ind2=" ">
<subfield code="a">text</subfield>
<subfield code="b">txt</subfield>
</datafield>
<datafield tag="337" ind1=" " ind2=" ">
<subfield code="a">computer</subfield>
<subfield code="b">c</subfield>
</datafield>
<datafield tag="338" ind1=" " ind2=" ">
<subfield code="a">online resource</subfield>
<subfield code="b">cr</subfield>
</datafield>
<datafield tag="490" ind1="0" ind2=" ">
<subfield code="6">880-03</subfield>
<subfield code="a">Hot Spots in Global Politics</subfield>
</datafield>
<datafield tag="880" ind1="0" ind2=" ">
<subfield code="6">490-03/(B</subfield>
<subfield code="a">Hot Spots in Global Politics</subfield>
</datafield>
<datafield tag="500" ind1=" " ind2=" ">
<subfield code="a">Description based upon print version of record.</subfield>
</datafield>
<datafield tag="505" ind1="0" ind2=" ">
<subfield code="a">Contents; Maps; Abbreviations; Preface; Author's Note; Introduction: Congo, a Perennial Hot Spot; 1: Congo as a Playing Field; 2: African Players on the Congo Field; 3: Identity as a Driver of Conflict; 4: Congo's War Against Women; 5: Congo's "Resource Curse"; 6: The Responsibility to Protect; Notes; Bibliography; Index</subfield>
</datafield>
<datafield tag="520" ind1=" " ind2=" ">
<subfield code="a">The Democratic Republic of Congo has become one of the world's bloodiest hot spots. 2003 saw the end of a five-year war in which millions lost their lives - one of the deadliest conflicts since World War II. Despite recent peace agreements and democratic elections, the country is still plagued by army and militia violence. Congo remains deeply troubled, since the deep-rooted causes of conflict have not been adequately addressed. The conflict in the DRC has divided opinion; some call it a civil war, or a war of aggression by the country's neighbours; others a continuation of Rwanda's </subfield>
</datafield>
<datafield tag="546" ind1=" " ind2=" ">
<subfield code="a">English</subfield>
</datafield>
<datafield tag="504" ind1=" " ind2=" ">
<subfield code="a">Includes bibliographical references and index.</subfield>
</datafield>
<datafield tag="651" ind1=" " ind2="0">
<subfield code="a">Congo (Democratic Republic)</subfield>
<subfield code="x">Politics and government.</subfield>
</datafield>
<datafield tag="776" ind1=" " ind2=" ">
<subfield code="z">0-7456-4843-6</subfield>
</datafield>
<datafield tag="776" ind1=" " ind2=" ">
<subfield code="z">0-7456-4844-4</subfield>
</datafield>
<datafield tag="720" ind1=" " ind2=" ">
<subfield code="6">880-04</subfield>
<subfield code="a">Turner, Thomas</subfield>
</datafield>
<datafield tag="880" ind1="0" ind2="0">
<subfield code="6">245-01/(B</subfield>
<subfield code="a">Congo</subfield>
</datafield>
<datafield tag="880" ind1=" " ind2=" ">
<subfield code="6">260-02/(B</subfield>
<subfield code="b">Wairīpaburisshingujapan,</subfield>
<subfield code="c">2013.4.</subfield>
</datafield>
<datafield tag="830" ind1=" " ind2="0">
<subfield code="a">Global Political Hot Spots</subfield>
</datafield>
<datafield tag="906" ind1=" " ind2=" ">
<subfield code="a">BOOK</subfield>
</datafield>
<datafield tag="MBD" ind1=" " ind2=" ">
<subfield code="M">49HBZ_NETWORK</subfield>
<subfield code="i">99372680948006441</subfield>
<subfield code="n">HBZ Network</subfield>
</datafield>
<datafield tag="MNG" ind1=" " ind2=" ">
<subfield code="c">system</subfield>
<subfield code="f">EBC</subfield>
<subfield code="i">marc21</subfield>
<subfield code="e">false</subfield>
<subfield code="d">2023-08-30 11:54:28 Europe/Berlin</subfield>
<subfield code="g">992670000000352596</subfield>
<subfield code="a">CKB</subfield>
<subfield code="b">2023-07-07 20:24:04 Europe/Berlin</subfield>
</datafield>
</record>

0 comments on commit 915536f

Please sign in to comment.