Skip to content

Commit

Permalink
Enrich records with rvk from callNumber
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasNx committed Nov 27, 2024
1 parent ab7451b commit 2a89177
Show file tree
Hide file tree
Showing 9 changed files with 84 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/main/resources/alma/fix/item.fix
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,21 @@ do list(path: "hasItem[]","var":"$i")
add_field("$i.inCollection[].1.label","Bibliotheken ohne zentrale Katalogisierung (IZ Bridge)")
end
end

set_array("rvk[]")
do list(path:"hasItem[]","var":"$i")
if any_match("$i.callNumber","[A-Z][A-Z] \\d* .*")
copy_field("$i.callNumber","rvk[].$append")
end
end

replace_all("rvk[].*","([A-Z][A-Z] \\d*) .*","$1")

do list(path:"rvk[]","var":"$i")
copy_field("$i","subject[].$append.notation")
set_array("subject[].$last.type[]","Concept")
add_field("subject[].$last.source.label","RVK (Regensburger Verbundklassifikation)")
add_field("subject[].$last.source.id","https://d-nb.info/gnd/4449787-8")
end

uniq("subject[]")
7 changes: 7 additions & 0 deletions src/test/resources/alma-fix/990014830510206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,13 @@
"dateOfDeath" : "1977",
"altLabel" : [ "Chaplin, Charles S.", "Spencer Chaplin, Charles", "Chaplin, Charly", "Tsaplin, Tsarl Spenser", "Sa-plin, Sác-li", "Cāplin, Cārlī", "Čaplin, Č'arlz", "Chaplin, Charles Spencer", "Chaplin, Charles", "Čaplin, Čarl'z Spenser", "Spencer-Chaplin, Charles", "Чаплин, Чарльз", "Zhuobielin", "Sarlō", "Charlot", "Sac-lô" ]
} ]
}, {
"notation" : "AP 51081",
"type" : [ "Concept" ],
"source" : {
"label" : "RVK (Regensburger Verbundklassifikation)",
"id" : "https://d-nb.info/gnd/4449787-8"
}
} ],
"subjectslabels" : [ "Chaplin, Charlie" ],
"hasItem" : [ {
Expand Down
7 changes: 7 additions & 0 deletions src/test/resources/alma-fix/990016782920206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@
"id" : "https://www.wikidata.org/wiki/Q47524318"
},
"label" : "Klavier / Lehrmittel"
}, {
"notation" : "NC 10",
"type" : [ "Concept" ],
"source" : {
"label" : "RVK (Regensburger Verbundklassifikation)",
"id" : "https://d-nb.info/gnd/4449787-8"
}
} ],
"subjectslabels" : [ "Klavier / Lehrmittel" ],
"hasItem" : [ {
Expand Down
7 changes: 7 additions & 0 deletions src/test/resources/alma-fix/990058434730206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,13 @@
"dateOfDeath" : "0039",
"altLabel" : [ "Herodes Antipatros", "Herodes, Antipas" ]
} ]
}, {
"notation" : "BC 8740",
"type" : [ "Concept" ],
"source" : {
"label" : "RVK (Regensburger Verbundklassifikation)",
"id" : "https://d-nb.info/gnd/4449787-8"
}
} ],
"subjectslabels" : [ "Herodes <Judäa, König, I.>", "Makkabäer", "Herrschaftssystem", "Neues Testament / Zeithintergrund", "Herodes Antipas, Galiläa, Tetrarch" ],
"hasItem" : [ {
Expand Down
8 changes: 8 additions & 0 deletions src/test/resources/alma-fix/990075429930206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,14 @@
"label" : "Deutsch"
} ],
"extent" : "64 S.",
"subject" : [ {
"notation" : "BO 4075",
"type" : [ "Concept" ],
"source" : {
"label" : "RVK (Regensburger Verbundklassifikation)",
"id" : "https://d-nb.info/gnd/4449787-8"
}
} ],
"hasItem" : [ {
"label" : "lobid Bestandsressource",
"type" : [ "Item", "PhysicalObject" ],
Expand Down
7 changes: 7 additions & 0 deletions src/test/resources/alma-fix/990109712970206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,13 @@
"gndIdentifier" : "2085343-9",
"altLabel" : [ "Beethoven-Haus", "Bonner Beethoven-Haus", "Bonner Beethovenhaus" ]
} ]
}, {
"notation" : "BM 800",
"type" : [ "Concept" ],
"source" : {
"label" : "RVK (Regensburger Verbundklassifikation)",
"id" : "https://d-nb.info/gnd/4449787-8"
}
} ],
"spatial" : [ {
"id" : "https://nwbib.de/spatial#Q586",
Expand Down
8 changes: 8 additions & 0 deletions src/test/resources/alma-fix/990122511970206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@
"type" : [ "Work" ]
},
"extent" : "2 CD : DDD + Beih.",
"subject" : [ {
"notation" : "CD 2410",
"type" : [ "Concept" ],
"source" : {
"label" : "RVK (Regensburger Verbundklassifikation)",
"id" : "https://d-nb.info/gnd/4449787-8"
}
} ],
"hasItem" : [ {
"label" : "lobid Bestandsressource",
"type" : [ "Item", "PhysicalObject" ],
Expand Down
15 changes: 15 additions & 0 deletions src/test/resources/alma-fix/990210237770206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,21 @@
} ],
"extent" : "1 Partitur (12 Seiten)",
"note" : [ "Hier auch später erschienene, unveränderte Nachdrucke" ],
"subject" : [ {
"notation" : "NV 102",
"type" : [ "Concept" ],
"source" : {
"label" : "RVK (Regensburger Verbundklassifikation)",
"id" : "https://d-nb.info/gnd/4449787-8"
}
}, {
"notation" : "NB 2023",
"type" : [ "Concept" ],
"source" : {
"label" : "RVK (Regensburger Verbundklassifikation)",
"id" : "https://d-nb.info/gnd/4449787-8"
}
} ],
"hasItem" : [ {
"label" : "lobid Bestandsressource",
"type" : [ "Item", "PhysicalObject" ],
Expand Down
7 changes: 7 additions & 0 deletions src/test/resources/alma-fix/99370771475306441.json
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,13 @@
"id" : "https://d-nb.info/gnd/4181939-1",
"gndIdentifier" : "4181939-1"
} ]
}, {
"notation" : "MS 6020",
"type" : [ "Concept" ],
"source" : {
"label" : "RVK (Regensburger Verbundklassifikation)",
"id" : "https://d-nb.info/gnd/4449787-8"
}
} ],
"subjectslabels" : [ "Altern", "Berufliche Stellung", "Bildung", "Einkommensungleichheit", "Gesundheit", "Gesundheitspolitik", "Krankheit", "Soziale Benachteiligung", "Soziale Gerechtigkeit", "Soziale Ungleichheit, Armut, Rassismus", "Gesundheitssoziologie, Medizinsoziologie", "Wirtschaftssoziologie, Arbeitssoziologie, Organisationssoziologie", "Soziale Ungleichheit", "Teilhabe", "Gesundheitswesen", "Sozialer Friede" ],
"hasItem" : [ {
Expand Down

0 comments on commit 2a89177

Please sign in to comment.