Skip to content

Commit

Permalink
Replace lobid Organisation Fallback for ZDB Collection wih fix mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasNx committed Jan 13, 2025
1 parent dd889c9 commit 348dd38
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
3 changes: 3 additions & 0 deletions src/main/resources/alma/fix/relatedRessourcesAndLinks.fix
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,9 @@ do list(path:"912 ", "var":"$i")
replace_all("inCollection[].$last.id", "(ZDB-[0-9]{1,6}-[a-zA-Z|0-9\\-]*).*", "http://lobid.org/organisations/$1#!")
copy_field("inCollection[].$last.id","$i.@label")
lookup("$i.@label","lobidOrgLabels",delete:"true")
unless exists("$i.@label")
add_field("$i.@label","lobid Organisation ZDB Collection")
end
move_field("$i.@label","inCollection[].$last.label")
end
end
Expand Down
6 changes: 0 additions & 6 deletions src/main/resources/labels/labels.json

This file was deleted.

4 changes: 2 additions & 2 deletions src/test/resources/alma-fix/990365842280206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@
"type" : [ "Collection" ]
}, {
"id" : "http://lobid.org/organisations/ZDB-13-SOC-article#!",
"type" : [ "Collection" ],
"label" : "lobid Organisation"
"label" : "lobid Organisation ZDB Collection",
"type" : [ "Collection" ]
} ],
"language" : [ {
"id" : "http://id.loc.gov/vocabulary/iso639-2/fre",
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/alma-fix/99371314897806441.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@
"type" : [ "Collection" ]
}, {
"id" : "http://lobid.org/organisations/ZDB-35-Wiley-EBA#!",
"type" : [ "Collection" ],
"label" : "lobid Organisation"
"label" : "lobid Organisation ZDB Collection",
"type" : [ "Collection" ]
} ],
"language" : [ {
"id" : "http://id.loc.gov/vocabulary/iso639-2/eng",
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/alma-fix/99371964653806441.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@
"type" : [ "Collection" ]
}, {
"id" : "http://lobid.org/organisations/ZDB-41-UTB-EBA#!",
"type" : [ "Collection" ],
"label" : "lobid Organisation"
"label" : "lobid Organisation ZDB Collection",
"type" : [ "Collection" ]
} ],
"extent" : "1 Online-Ressource",
"subject" : [ {
Expand Down

0 comments on commit 348dd38

Please sign in to comment.