Skip to content

Commit

Permalink
Map publication frequency label with lookup #2106
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasNx committed Jan 10, 2025
1 parent 3167793 commit bf844c0
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 786 deletions.
18 changes: 16 additions & 2 deletions src/main/resources/alma/fix/maps.fix
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,22 @@ put_map("rswk-indicator",
"s": "SubjectHeading"
)



put_map("marc-publication-frequency-label",
"http://marc21rdf.info/terms/continuingfre#d" : "täglich",
"http://marc21rdf.info/terms/continuingfre#i" : "dreimal wöchentlich",
"http://marc21rdf.info/terms/continuingfre#c" : "zweimal wöchentlich",
"http://marc21rdf.info/terms/continuingfre#w" : "wöchentlich",
"http://marc21rdf.info/terms/continuingfre#e" : "vierzehntägig",
"http://marc21rdf.info/terms/continuingfre#s" : "halbmonatlich",
"http://marc21rdf.info/terms/continuingfre#m" : "monatlich",
"http://marc21rdf.info/terms/continuingfre#b" : "alle zwei Monate",
"http://marc21rdf.info/terms/continuingfre#q" : "vierteljährlich",
"http://marc21rdf.info/terms/continuingfre#f" : "halbjährlich",
"http://marc21rdf.info/terms/continuingfre#a" : "jährlich",
"http://marc21rdf.info/terms/continuingfre#g" : "alle zwei Jahre",
"http://marc21rdf.info/terms/continuingfre#h" : "alle drei Jahre",
"http://marc21rdf.info/terms/continuingfre#z" : "unregelmäßig oder sonstige Erscheinungsfrequenz"
)

put_map("medium-id-to-label",
"Audio-Dokument": "http://purl.org/ontology/bibo/AudioDocument",
Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/alma/fix/titleRelatedFields.fix
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,17 @@ if exists("publication[].$first")
unless any_match("008","^.{18}[#\\| u].*$") # filters out not matching values and also the value unknown
copy_field("008","publication[].$first.frequency[].$append.id")
replace_all("publication[].$first.frequency[].$last.id", "^.{18}(.).*$", "http://marc21rdf.info/terms/continuingfre#$1")
copy_field("publication[].$first.frequency[].$last.id","publication[].$first.frequency[].$last.label")
lookup("publication[].$first.frequency[].$last.label","marc-publication-frequency-label")
end
elsif any_match("006","^s.*$")
do list(path: "006", "var":"$z")
if any_match("$z","^s.*$")
unless any_match("$z","^.[#\\| u].*$")
copy_field("$z","publication[].$first.frequency[].$append.id")
replace_all("publication[].$first.frequency[].$last.id", "^.(.).*$", "http://marc21rdf.info/terms/continuingfre#$1")
copy_field("publication[].$first.frequency[].$last.id","publication[].$first.frequency[].$last.label")
lookup("publication[].$first.frequency[].$last.label","marc-publication-frequency-label")
end
end
end
Expand Down
Loading

0 comments on commit bf844c0

Please sign in to comment.