Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enrich records with rvk from callNumber #2101

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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("@callNumberRvk[]")
do list(path:"hasItem[]","var":"$i")
if any_match("$i.callNumber","[A-Z][A-Z] \\d{3,6} .*")
copy_field("$i.callNumber","@callNumberRvk[].$append")
end
end

replace_all("@callNumberRvk[].*","([A-Z][A-Z] \\d{3,6}) .*","$1")

do list(path:"@callNumberRvk[]","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/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",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be wrong.

"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",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keine RVK scheinbar

"type" : [ "Concept" ],
"source" : {
"label" : "RVK (Regensburger Verbundklassifikation)",
"id" : "https://d-nb.info/gnd/4449787-8"
}
}, {
"notation" : "NB 2023",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No rvk notation

"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",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems correct.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With my last adjustment of the regex this is dropped now. Since the signature is not validly build after RVK Signatur rules: https://rvk.uni-regensburg.de/images/stories/fruit/sigreg/regeln_fr_die_signaturvergabe_version_2012_02_17.pdf

"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
Loading