Skip to content

Commit

Permalink
Merge #2031 from branch '2030-fallbackTypeRSWK' of github.com:hbz/lob…
Browse files Browse the repository at this point in the history
…id-resources
  • Loading branch information
dr0i committed Jun 17, 2024
2 parents da1d509 + 4a64a9d commit f50dfb3
Show file tree
Hide file tree
Showing 17 changed files with 33 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/resources/alma/fix/subjects.fix
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,11 @@ lookup("subject[].*.componentList[].*.type[].*","rswk-indicator")

do list (path: "subject[]", "var": "$i")
do list(path: "$i.componentList[]", "var": "$j")
if any_match("$j.label",".+") # Due to special cataloguing there can be empty label-properties. That are cleaned up at the end. These need to be skipped.
unless exists("$j.type[].1")
set_array("$j.type[]","SubjectHeading") # type: SubjectHeading as Fallback.
end
end
if any_match("$j.dateOfBirthAndDeath", "^([012][0-9]{3})-.*")
copy_field("$j.dateOfBirthAndDeath","$j.dateOfBirth")
replace_all("$j.dateOfBirth", "^([012][0-9]{3})-.*","$1")
Expand Down
1 change: 1 addition & 0 deletions src/test/resources/alma-fix/990026405480206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
"gndIdentifier" : "4009104-1",
"altLabel" : [ "Burgen" ]
}, {
"type" : [ "SubjectHeading" ],
"label" : "Geschichte"
} ]
} ],
Expand Down
1 change: 1 addition & 0 deletions src/test/resources/alma-fix/990054089950206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@
"gndIdentifier" : "4066562-8",
"altLabel" : [ "Bürgerliche Wissenschaft", "Wissenschaften" ]
}, {
"type" : [ "SubjectHeading" ],
"label" : "Geschichte"
} ]
} ],
Expand Down
1 change: 1 addition & 0 deletions src/test/resources/alma-fix/990054345550206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@
"gndIdentifier" : "4127794-6",
"altLabel" : [ "Heimatforschung", "Heimatgeschichte" ]
}, {
"type" : [ "SubjectHeading" ],
"label" : "Zeitschrift"
} ]
} ],
Expand Down
3 changes: 3 additions & 0 deletions src/test/resources/alma-fix/990055981810206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,10 @@
"gndIdentifier" : "4007328-2",
"altLabel" : [ "Stadt Bochum", "Baukem" ]
}, {
"type" : [ "SubjectHeading" ],
"label" : "Geschichte"
}, {
"type" : [ "SubjectHeading" ],
"label" : "Zeitschrift"
} ]
}, {
Expand All @@ -263,6 +265,7 @@
"gndIdentifier" : "4127794-6",
"altLabel" : [ "Heimatforschung", "Heimatgeschichte" ]
}, {
"type" : [ "SubjectHeading" ],
"label" : "Zeitschrift"
} ]
} ],
Expand Down
1 change: 1 addition & 0 deletions src/test/resources/alma-fix/990063549080206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
"gndIdentifier" : "4017754-3",
"altLabel" : [ "Föderatives System" ]
}, {
"type" : [ "SubjectHeading" ],
"label" : "Geschichte 1900-1990"
} ]
} ],
Expand Down
2 changes: 2 additions & 0 deletions src/test/resources/alma-fix/990170546170206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,10 @@
"gndIdentifier" : "4002851-3",
"altLabel" : [ "Baukunst" ]
}, {
"type" : [ "SubjectHeading" ],
"label" : "Geschichte"
}, {
"type" : [ "SubjectHeading" ],
"label" : "Zeitschrift"
} ]
} ],
Expand Down
1 change: 1 addition & 0 deletions src/test/resources/alma-fix/990173811970206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@
"type" : [ "ComplexSubject" ],
"label" : "Geschichte 1945-2003 | Geschichtsunterricht",
"componentList" : [ {
"type" : [ "SubjectHeading" ],
"label" : "Geschichte 1945-2003"
}, {
"type" : [ "SubjectHeading" ],
Expand Down
1 change: 1 addition & 0 deletions src/test/resources/alma-fix/990183054020206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@
"id" : "https://d-nb.info/gnd/16090142-X",
"gndIdentifier" : "16090142-X"
}, {
"type" : [ "SubjectHeading" ],
"label" : "Bericht"
} ]
} ],
Expand Down
1 change: 1 addition & 0 deletions src/test/resources/alma-fix/990183958380206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@
"id" : "https://d-nb.info/gnd/7733018-3",
"gndIdentifier" : "7733018-3"
}, {
"type" : [ "SubjectHeading" ],
"label" : "Geschichte"
} ]
} ],
Expand Down
2 changes: 2 additions & 0 deletions src/test/resources/alma-fix/990184127410206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,10 @@
"id" : "https://d-nb.info/gnd/4066794-7",
"gndIdentifier" : "4066794-7"
}, {
"type" : [ "SubjectHeading" ],
"label" : "Online-Publikation"
}, {
"type" : [ "SubjectHeading" ],
"label" : "Zeitschrift"
} ]
} ],
Expand Down
7 changes: 7 additions & 0 deletions src/test/resources/alma-fix/990193229450206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,10 @@
"gndIdentifier" : "4073972-7",
"altLabel" : [ "Regionalkunde" ]
}, {
"type" : [ "SubjectHeading" ],
"label" : "Bibliographie 1800-1940"
}, {
"type" : [ "SubjectHeading" ],
"label" : "Online-Publikation"
} ]
}, {
Expand All @@ -230,8 +232,10 @@
"gndIdentifier" : "4078937-8",
"altLabel" : [ "Empirische Kulturwissenschaft", "Ethnographie (Volkskunde)", "Ethnografie (Volkskunde)", "Europäische Ethnologie", "Folklore (Volkskunde)", "Gegenwartsvolkskunde", "Kulturanthropologie (Volkskunde)" ]
}, {
"type" : [ "SubjectHeading" ],
"label" : "Bibliographie 1800-1940"
}, {
"type" : [ "SubjectHeading" ],
"label" : "Online-Publikation"
} ]
}, {
Expand All @@ -248,10 +252,13 @@
"gndIdentifier" : "4065781-4",
"altLabel" : [ "Provinz Westfalen", "Herzogtum Westfalen", "Westphalen", "Westphalie" ]
}, {
"type" : [ "SubjectHeading" ],
"label" : "Geschichte"
}, {
"type" : [ "SubjectHeading" ],
"label" : "Bibliographie 1800-1940"
}, {
"type" : [ "SubjectHeading" ],
"label" : "Online-Publikation"
} ]
} ],
Expand Down
1 change: 1 addition & 0 deletions src/test/resources/alma-fix/990204246530206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@
"gndIdentifier" : "4059979-6",
"altLabel" : [ "Freistaat Thüringen", "Land Thüringen", "Thuringia", "Thüringer Land", "Großthüringen", "Grossthüringen", "Großgemarkung Thüringen", "Vereinigte Thüringische Staaten" ]
}, {
"type" : [ "SubjectHeading" ],
"label" : "Geschichte"
} ]
} ],
Expand Down
1 change: 1 addition & 0 deletions src/test/resources/alma-fix/990226763120206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
"gndIdentifier" : "4194363-6",
"altLabel" : [ "Grenzüberschreitende Zusammenarbeit", "Grenzüberschreitende Beziehungen" ]
}, {
"type" : [ "SubjectHeading" ],
"label" : "Geschichte 1958-2016"
} ]
} ],
Expand Down
2 changes: 2 additions & 0 deletions src/test/resources/alma-fix/990367731740206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@
"id" : "https://d-nb.info/gnd/4020588-5",
"gndIdentifier" : "4020588-5"
}, {
"type" : [ "SubjectHeading" ],
"label" : "Geschichte"
} ]
}, {
Expand Down Expand Up @@ -255,6 +256,7 @@
"gndIdentifier" : "4076308-0",
"altLabel" : [ "Verhütung", "Vorbeugung", "Prophylaxe", "Vorsorge (Prävention)" ]
}, {
"type" : [ "SubjectHeading" ],
"label" : "Geschichte"
} ]
} ],
Expand Down
2 changes: 2 additions & 0 deletions src/test/resources/alma-fix/99370682219806441.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@
"gndIdentifier" : "4170147-1",
"altLabel" : [ "Missionswerk", "Missionsverein" ]
}, {
"type" : [ "SubjectHeading" ],
"label" : "Zeitschrift"
} ]
}, {
Expand All @@ -173,6 +174,7 @@
"gndIdentifier" : "4170147-1",
"altLabel" : [ "Missionswerk", "Missionsverein" ]
}, {
"type" : [ "SubjectHeading" ],
"label" : "Zeitschrift"
} ]
} ],
Expand Down
1 change: 1 addition & 0 deletions src/test/resources/alma-fix/99373637266706441.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@
"gndIdentifier" : "7569204-1",
"altLabel" : [ "Westfälische Tageszeitung (Münster, Westfalen, 1940-1945)", "Münsterischer Anzeiger und Münsterische Volkszeitung", "Münsterischer Anzeiger", "Westfälische Nachrichten. Ausgabe M", "Westfälische Nachrichten. Ausgabe A" ]
}, {
"type" : [ "SubjectHeading" ],
"label" : "Geschichte 1852-1945"
} ]
} ],
Expand Down

0 comments on commit f50dfb3

Please sign in to comment.