Skip to content

Commit

Permalink
Add related property for 505 elements with hbzId in $6 #2033
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasNx committed Jul 31, 2024
1 parent 8ce34ff commit 36ce935
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/main/resources/alma/fix/relatedRessourcesAndLinks.fix
Original file line number Diff line number Diff line change
Expand Up @@ -368,11 +368,22 @@ do list(path:"related[]", "var":"$i")
replace_all("$i.issn[].*","-","")
end



do list(path: "50580", "var":"$i")
if any_match("$i.6","[A-Z]{2}\\d*")
set_hash("related[].$append")
paste("related[].$last.id","~http://lobid.org/resources/","$i.6","~#!",join_char:"")
copy_field("$i.t","related[].$last.label")
set_array("related[].$last.note[]")
copy_field("$i.g","related[].$last.note[].$append")
end
end

replace_all("related[].*.id", "^\\(DE-605\\)(.*)$", "http://lobid.org/resources/$1#!")
replace_all("related[].*.id", "^\\(DE-600\\)(.*)$", "http://lobid.org/resources/ZDB-$1#!")
replace_all("related[].*.label","<<|>>","")


set_array("inCollection[]")

# hbz NZ
Expand Down
5 changes: 5 additions & 0 deletions src/test/resources/alma-fix/99374022974006441.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@
"id" : "https://hub.culturegraph.org/resource/(DE-605)99374022974006441",
"label" : "Culturegraph Ressource"
} ],
"related" : [ {
"id" : "http://lobid.org/resources/HT030748024#!",
"label" : "The paradox of phase transitions",
"note" : [ "zweiter Teil der Dissertation, nicht im Verlag erschienen" ]
} ],
"inCollection" : [ {
"id" : "https://nrw.digibib.net/search/hbzvk/",
"label" : "DigiBib hbz Verbundkatalog",
Expand Down

0 comments on commit 36ce935

Please sign in to comment.