Skip to content

Commit

Permalink
Adjust isPartOfTransformation order #2136
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasNx committed Jan 23, 2025
1 parent f2f0f59 commit 4941b88
Show file tree
Hide file tree
Showing 58 changed files with 139 additions and 136 deletions.
11 changes: 7 additions & 4 deletions src/main/resources/alma/fix/relatedRessourcesAndLinks.fix
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ unless any_match("leader", "^.{7}[ad].*")
do list(path: "773??", "var": "$i")
unless any_equal("$i.9","LOCAL")
do list(path: "$i.w", "var": "$j")
add_array("isPartOf[].$append.type[]", "IsPartOfRelation")
add_hash("isPartOf[].$append")
add_array("isPartOf[].$last.hasSuperordinate[]")
add_hash( "isPartOf[].$last.hasSuperordinate[].$append")
if all_match("$j", "^\\((?:DE-600|DE-605)\\)(.*)$")
Expand All @@ -108,7 +108,7 @@ end
# 490 with 1. Indicator 1 has an identical entry in 830. So only 490 with 1. Indicator 0

do list(path: "4900?", "var": "$i")
add_array("isPartOf[].$append.type[]", "IsPartOfRelation")
add_hash("isPartOf[].$append")
add_array("isPartOf[].$last.hasSuperordinate[]")
add_hash( "isPartOf[].$last.hasSuperordinate[].$append")
add_array("isPartOf[].$last.hasSuperordinate[].$last.label")
Expand All @@ -130,7 +130,7 @@ end
# Element can be repeatable with local entries they have subfield $M.

do list(path: "830??", "var": "$i")
add_array("isPartOf[].$append.type[]", "IsPartOfRelation")
add_hash("isPartOf[].$append")
add_array("isPartOf[].$last.hasSuperordinate[]")
add_hash( "isPartOf[].$last.hasSuperordinate[].$append")
if all_match("$i.w", "^\\((?:DE-600|DE-605)\\)(.*)$")
Expand Down Expand Up @@ -164,7 +164,7 @@ if any_match("leader", "^.{7}[ad].*")
do list(path: "773??", "var": "$i")
unless any_equal("$i.9","LOCAL")
do list(path: "$i.w", "var": "$j")
add_array("isPartOf[].$append.type[]", "IsPartOfRelation")
add_hash("isPartOf[].$append")
add_array("isPartOf[].$last.hasSuperordinate[]")
add_hash( "isPartOf[].$last.hasSuperordinate[].$append")
if all_match("$j", "^\\((?:DE-600|DE-605)\\)(.*)$")
Expand Down Expand Up @@ -205,8 +205,11 @@ replace_all("isPartOf[].*.numbering", "^[©]|\\s?[,.:;/=]?$", "")
do list(path:"isPartOf[]","var":"$i")
call_macro("lobidResourcesFallbackLabel",field:"$i.hasSuperordinate[]")
end
add_array("isPartOf[].*.type[]", "IsPartOfRelation")

uniq("isPartOf[]")


replace_all("containedIn[].*.id", "^\\(DE-605\\)(.*)$", "http://lobid.org/resources/$1#!")
replace_all("containedIn[].*.id", "^\\(DE-600\\)(.*)$", "http://lobid.org/resources/ZDB-$1#!")
replace_all("containedIn[].*.label","<<|>>","")
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/alma-fix/990011470300206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@
"label" : "OCLC Ressource"
} ],
"isPartOf" : [ {
"type" : [ "IsPartOfRelation" ],
"hasSuperordinate" : [ {
"label" : "SUNY series in political theory"
} ]
} ],
"type" : [ "IsPartOfRelation" ]
} ],
"inCollection" : [ {
"id" : "https://nrw.digibib.net/search/hbzvk/",
Expand Down
8 changes: 4 additions & 4 deletions src/test/resources/alma-fix/990051552280206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@
"label" : "Culturegraph Ressource"
} ],
"isPartOf" : [ {
"type" : [ "IsPartOfRelation" ],
"hasSuperordinate" : [ {
"label" : "Les films du losange"
} ]
} ],
"type" : [ "IsPartOfRelation" ]
}, {
"type" : [ "IsPartOfRelation" ],
"hasSuperordinate" : [ {
"label" : "Collection libre échange"
} ]
} ],
"type" : [ "IsPartOfRelation" ]
} ],
"inCollection" : [ {
"id" : "https://nrw.digibib.net/search/hbzvk/",
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/alma-fix/990058434730206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@
"label" : "OCLC Ressource"
} ],
"isPartOf" : [ {
"type" : [ "IsPartOfRelation" ],
"hasSuperordinate" : [ {
"id" : "http://lobid.org/resources/HT001247609#!",
"label" : "Studia Judaica"
} ],
"numbering" : "4"
"numbering" : "4",
"type" : [ "IsPartOfRelation" ]
} ],
"tableOfContents" : [ {
"label" : "Inhaltsverzeichnis",
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/alma-fix/990058567920206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@
"label" : "OCLC Ressource"
} ],
"isPartOf" : [ {
"type" : [ "IsPartOfRelation" ],
"hasSuperordinate" : [ {
"id" : "http://lobid.org/resources/HT001237175#!",
"label" : "Wege der Forschung"
} ],
"numbering" : "239"
"numbering" : "239",
"type" : [ "IsPartOfRelation" ]
} ],
"inCollection" : [ {
"id" : "https://nrw.digibib.net/search/hbzvk/",
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/alma-fix/990059571560206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@
"label" : "OCLC Ressource"
} ],
"isPartOf" : [ {
"type" : [ "IsPartOfRelation" ],
"hasSuperordinate" : [ {
"id" : "http://lobid.org/resources/HT002156469#!",
"label" : "DIN-Taschenbuch"
} ],
"numbering" : "29"
"numbering" : "29",
"type" : [ "IsPartOfRelation" ]
} ],
"inCollection" : [ {
"id" : "https://nrw.digibib.net/search/hbzvk/",
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/alma-fix/990063549080206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@
"label" : "OCLC Ressource"
} ],
"isPartOf" : [ {
"type" : [ "IsPartOfRelation" ],
"hasSuperordinate" : [ {
"id" : "http://lobid.org/resources/ZDB-328-1#!",
"label" : "The annals of the American Academy of Political and Social Science"
} ],
"numbering" : "509"
"numbering" : "509",
"type" : [ "IsPartOfRelation" ]
} ],
"inCollection" : [ {
"id" : "https://nrw.digibib.net/search/hbzvk/",
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/alma-fix/990065341720206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@
"label" : "OCLC Ressource"
} ],
"isPartOf" : [ {
"type" : [ "IsPartOfRelation" ],
"hasSuperordinate" : [ {
"id" : "http://lobid.org/resources/ZDB-208844-7#!",
"label" : "Netherlands journal of zoology"
} ],
"numbering" : "42,2,3"
"numbering" : "42,2,3",
"type" : [ "IsPartOfRelation" ]
} ],
"inCollection" : [ {
"id" : "https://nrw.digibib.net/search/hbzvk/",
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/alma-fix/990075429930206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@
"label" : "OCLC Ressource"
} ],
"isPartOf" : [ {
"type" : [ "IsPartOfRelation" ],
"hasSuperordinate" : [ {
"id" : "http://lobid.org/resources/HT003004165#!",
"label" : "Sitzungsberichte der Bayerischen Akademie der Wissenschaften, Philosophisch-Historische Abteilung"
} ],
"numbering" : "1934,4"
"numbering" : "1934,4",
"type" : [ "IsPartOfRelation" ]
} ],
"inCollection" : [ {
"id" : "https://nrw.digibib.net/search/hbzvk/",
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/alma-fix/990075538650206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@
"label" : "OCLC Ressource"
} ],
"isPartOf" : [ {
"type" : [ "IsPartOfRelation" ],
"hasSuperordinate" : [ {
"id" : "http://lobid.org/resources/HT003184101#!",
"label" : "Sports injury management"
} ],
"numbering" : "1,2"
"numbering" : "1,2",
"type" : [ "IsPartOfRelation" ]
} ],
"inCollection" : [ {
"id" : "https://nrw.digibib.net/search/hbzvk/",
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/alma-fix/990109712970206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@
"label" : "NWBib-Ressource"
} ],
"isPartOf" : [ {
"type" : [ "IsPartOfRelation" ],
"hasSuperordinate" : [ {
"label" : "Veröffentlichungen des Beethoven-Hauses Bonn : Reihe 5"
} ]
} ],
"type" : [ "IsPartOfRelation" ]
} ],
"inCollection" : [ {
"id" : "https://nrw.digibib.net/search/hbzvk/",
Expand Down
8 changes: 4 additions & 4 deletions src/test/resources/alma-fix/990110509950206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,17 @@
"label" : "NWBib-Ressource"
} ],
"isPartOf" : [ {
"type" : [ "IsPartOfRelation" ],
"hasSuperordinate" : [ {
"label" : "Euro cart : Euro-Regionalkarte"
} ]
} ],
"type" : [ "IsPartOfRelation" ]
}, {
"type" : [ "IsPartOfRelation" ],
"hasSuperordinate" : [ {
"id" : "http://lobid.org/resources/BT000100437#!",
"label" : "Deutschland"
} ],
"numbering" : "2"
"numbering" : "2",
"type" : [ "IsPartOfRelation" ]
} ],
"inCollection" : [ {
"id" : "https://nrw.digibib.net/search/hbzvk/",
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/alma-fix/990114098170206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@
"label" : "OCLC Ressource"
} ],
"isPartOf" : [ {
"type" : [ "IsPartOfRelation" ],
"hasSuperordinate" : [ {
"label" : "Oxford India paperbacks"
} ]
} ],
"type" : [ "IsPartOfRelation" ]
} ],
"inCollection" : [ {
"id" : "https://nrw.digibib.net/search/hbzvk/",
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/alma-fix/990114617880206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@
"label" : "OCLC Ressource"
} ],
"isPartOf" : [ {
"type" : [ "IsPartOfRelation" ],
"hasSuperordinate" : [ {
"id" : "http://lobid.org/resources/ZDB-1118317-2#!",
"label" : "Programm der Realschule zu Rostock"
} ],
"numbering" : "1",
"note" : [ "Enthalten in" ]
"note" : [ "Enthalten in" ],
"type" : [ "IsPartOfRelation" ]
} ],
"secondaryForm" : [ {
"id" : "http://lobid.org/resources/CT003055819#!",
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/alma-fix/990118562160206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@
"label" : "Culturegraph Ressource"
} ],
"isPartOf" : [ {
"type" : [ "IsPartOfRelation" ],
"hasSuperordinate" : [ {
"id" : "http://lobid.org/resources/ZDB-795799-3#!",
"label" : "Die Rechtsprechung des Bundesverfassungsgerichts im Jahre ..."
} ],
"numbering" : "2001"
"numbering" : "2001",
"type" : [ "IsPartOfRelation" ]
} ],
"primaryForm" : [ {
"id" : "http://lobid.org/resources/HT013365271#!",
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/alma-fix/990123613330206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@
"label" : "Culturegraph Ressource"
} ],
"isPartOf" : [ {
"type" : [ "IsPartOfRelation" ],
"hasSuperordinate" : [ {
"id" : "http://lobid.org/resources/TT000034241#!",
"label" : "Die Sonnenblume [Medienkombination]"
} ],
"numbering" : "Tonkassette"
"numbering" : "Tonkassette",
"type" : [ "IsPartOfRelation" ]
} ],
"inCollection" : [ {
"id" : "https://nrw.digibib.net/search/hbzvk/",
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/alma-fix/990124590390206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@
"label" : "OCLC Ressource"
} ],
"isPartOf" : [ {
"type" : [ "IsPartOfRelation" ],
"hasSuperordinate" : [ {
"id" : "http://lobid.org/resources/HT013911051#!",
"label" : "Eutropia-CD"
} ],
"numbering" : "5"
"numbering" : "5",
"type" : [ "IsPartOfRelation" ]
} ],
"inCollection" : [ {
"id" : "https://nrw.digibib.net/search/hbzvk/",
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/alma-fix/990141342350206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@
"label" : "OCLC Ressource"
} ],
"isPartOf" : [ {
"type" : [ "IsPartOfRelation" ],
"hasSuperordinate" : [ {
"id" : "http://lobid.org/resources/TT001197763#!",
"label" : "[Bibliotheca Palatina"
} ],
"numbering" : "F,2001,1"
"numbering" : "F,2001,1",
"type" : [ "IsPartOfRelation" ]
} ],
"inCollection" : [ {
"id" : "https://nrw.digibib.net/search/hbzvk/",
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/alma-fix/990143325070206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@
"label" : "OCLC Ressource"
} ],
"isPartOf" : [ {
"type" : [ "IsPartOfRelation" ],
"hasSuperordinate" : [ {
"label" : "Royal Asiatic Society books"
} ]
} ],
"type" : [ "IsPartOfRelation" ]
} ],
"inCollection" : [ {
"id" : "https://nrw.digibib.net/search/hbzvk/",
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/alma-fix/990150856900206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@
"label" : "OCLC Ressource"
} ],
"isPartOf" : [ {
"type" : [ "IsPartOfRelation" ],
"hasSuperordinate" : [ {
"id" : "http://lobid.org/resources/HT001375579#!",
"label" : "Apollinaris von Laodicea und seine Schule"
} ],
"numbering" : "1"
"numbering" : "1",
"type" : [ "IsPartOfRelation" ]
} ],
"inCollection" : [ {
"id" : "https://nrw.digibib.net/search/hbzvk/",
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/alma-fix/990156060190206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@
"label" : "OCLC Ressource"
} ],
"isPartOf" : [ {
"type" : [ "IsPartOfRelation" ],
"hasSuperordinate" : [ {
"id" : "http://lobid.org/resources/HT012827392#!",
"label" : "BIT online : Innovativ"
} ],
"numbering" : "13"
"numbering" : "13",
"type" : [ "IsPartOfRelation" ]
} ],
"tableOfContents" : [ {
"label" : "Inhaltsverzeichnis",
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/alma-fix/990173811970206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@
"label" : "OCLC Ressource"
} ],
"isPartOf" : [ {
"type" : [ "IsPartOfRelation" ],
"hasSuperordinate" : [ {
"id" : "http://lobid.org/resources/HT013370531#!",
"label" : "Buchners Kollege Themen Geschichte"
} ],
"numbering" : "Vontei"
"numbering" : "Vontei",
"type" : [ "IsPartOfRelation" ]
} ],
"inCollection" : [ {
"id" : "https://nrw.digibib.net/search/hbzvk/",
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/alma-fix/990181275760206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@
"label" : "OCLC Ressource"
} ],
"isPartOf" : [ {
"type" : [ "IsPartOfRelation" ],
"hasSuperordinate" : [ {
"id" : "http://lobid.org/resources/HT006855611#!",
"label" : "Das gelbe Rechenbuch"
} ],
"numbering" : "1"
"numbering" : "1",
"type" : [ "IsPartOfRelation" ]
} ],
"inCollection" : [ {
"id" : "https://nrw.digibib.net/search/hbzvk/",
Expand Down
Loading

0 comments on commit 4941b88

Please sign in to comment.