Skip to content

Commit

Permalink
Add XX prefix for institutions that cannot be mapped #1438
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasNx committed May 24, 2024
1 parent b68c950 commit dc41f47
Show file tree
Hide file tree
Showing 15 changed files with 44 additions and 38 deletions.
8 changes: 7 additions & 1 deletion src/main/resources/alma/fix/macros.fix
Original file line number Diff line number Diff line change
Expand Up @@ -251,13 +251,19 @@ do put_macro("provenanceLinks")
end


unless any_match("$[field]","([A-Za-z]{2}-|http).*")
if any_match("$[field]","\\d*")
prepend("$[field]","DE-")
end

unless any_match("$[field]","http.*")
unless any_match("$[field]","[A-Za-z]{2}-.*")
prepend("$[field]","XX-")
end
prepend("$[field]", "http://lobid.org/organisations/")
append("$[field]", "#!")
end


end

# holding institution differentiating between library and sublibrary (libraryCode) and adding opacLink
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/alma-fix/990123613330206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@
"label" : "hbz_unioncatalog"
},
"sourceOrganization" : {
"id" : "http://lobid.org/organisations/DE-MHS#!",
"id" : "http://lobid.org/organisations/XX-MHS#!",
"label" : "lobid Organisation"
},
"provider" : {
"id" : "http://lobid.org/organisations/DE-MHS#!",
"id" : "http://lobid.org/organisations/XX-MHS#!",
"label" : "lobid Organisation"
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/alma-fix/990182814750206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"label" : "Universitäts- und Landesbibliothek Düsseldorf"
},
"provider" : {
"id" : "http://lobid.org/organisations/DE-NII#!",
"id" : "http://lobid.org/organisations/XX-NII#!",
"label" : "lobid Organisation"
},
"modifiedBy" : [ {
Expand Down
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 @@ -38,11 +38,11 @@
"label" : "hbz_unioncatalog"
},
"sourceOrganization" : {
"id" : "http://lobid.org/organisations/DE-OECD#!",
"id" : "http://lobid.org/organisations/XX-OECD#!",
"label" : "lobid Organisation"
},
"provider" : {
"id" : "http://lobid.org/organisations/DE-OECD#!",
"id" : "http://lobid.org/organisations/XX-OECD#!",
"label" : "lobid Organisation"
},
"modifiedBy" : [ {
Expand Down
6 changes: 3 additions & 3 deletions src/test/resources/alma-fix/991002103529706485.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@
"label" : "hbz_unioncatalog"
},
"sourceOrganization" : {
"id" : "http://lobid.org/organisations/DE-DEFHM#!",
"id" : "http://lobid.org/organisations/XX-DEFHM#!",
"label" : "lobid Organisation"
},
"provider" : {
"id" : "http://lobid.org/organisations/DE-DEFHM#!",
"id" : "http://lobid.org/organisations/XX-DEFHM#!",
"label" : "lobid Organisation"
},
"modifiedBy" : [ {
"id" : "http://lobid.org/organisations/DE-DEFHM#!",
"id" : "http://lobid.org/organisations/XX-DEFHM#!",
"label" : "lobid Organisation"
} ]
}
Expand Down
10 changes: 5 additions & 5 deletions src/test/resources/alma-fix/991005935279706485.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,19 @@
"id" : "http://lobid.org/organisations/DE-101#!",
"label" : "Deutsche Nationalbibliothek"
}, {
"id" : "http://lobid.org/organisations/DE-DEBBG#!",
"id" : "http://lobid.org/organisations/XX-DEBBG#!",
"label" : "lobid Organisation"
}, {
"id" : "http://lobid.org/organisations/DE-DEFHM#!",
"id" : "http://lobid.org/organisations/XX-DEFHM#!",
"label" : "lobid Organisation"
}, {
"id" : "http://lobid.org/organisations/DE-GEBAY#!",
"id" : "http://lobid.org/organisations/XX-GEBAY#!",
"label" : "lobid Organisation"
}, {
"id" : "http://lobid.org/organisations/DE-OCLCO#!",
"id" : "http://lobid.org/organisations/XX-OCLCO#!",
"label" : "lobid Organisation"
}, {
"id" : "http://lobid.org/organisations/DE-OCLCQ#!",
"id" : "http://lobid.org/organisations/XX-OCLCQ#!",
"label" : "lobid Organisation"
} ]
}
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/alma-fix/99370690532406441.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@
"label" : "hbz_unioncatalog"
},
"sourceOrganization" : {
"id" : "http://lobid.org/organisations/DE-NjHacI#!",
"id" : "http://lobid.org/organisations/XX-NjHacI#!",
"label" : "lobid Organisation"
},
"provider" : {
"id" : "http://lobid.org/organisations/DE-NjHacl#!",
"id" : "http://lobid.org/organisations/XX-NjHacl#!",
"label" : "lobid Organisation"
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/alma-fix/99370763882706441.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"label" : "hbz_unioncatalog"
},
"sourceOrganization" : {
"id" : "http://lobid.org/organisations/DE-PQKB#!",
"id" : "http://lobid.org/organisations/XX-PQKB#!",
"label" : "lobid Organisation"
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/alma-fix/99371123630706441.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"id" : "https://ebookcentral.proquest.com/",
"label" : "ebookcentral.proquest.com"
}, {
"id" : "http://lobid.org/organisations/DE-UkaJRU#!",
"id" : "http://lobid.org/organisations/XX-UkaJRU#!",
"label" : "lobid Organisation"
} ]
}
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 @@ -39,11 +39,11 @@
"label" : "hbz_unioncatalog"
},
"sourceOrganization" : {
"id" : "http://lobid.org/organisations/DE-EBA-Wiley#!",
"id" : "http://lobid.org/organisations/XX-EBA-Wiley#!",
"label" : "lobid Organisation"
},
"provider" : {
"id" : "http://lobid.org/organisations/DE-EBA-Wiley#!",
"id" : "http://lobid.org/organisations/XX-EBA-Wiley#!",
"label" : "lobid Organisation"
},
"modifiedBy" : [ {
Expand Down
24 changes: 12 additions & 12 deletions src/test/resources/alma-fix/99371447897606441.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,42 +39,42 @@
"label" : "hbz_unioncatalog"
},
"sourceOrganization" : {
"id" : "http://lobid.org/organisations/DE-YDX#!",
"id" : "http://lobid.org/organisations/XX-YDX#!",
"label" : "lobid Organisation"
},
"provider" : {
"id" : "http://lobid.org/organisations/DE-YDX#!",
"id" : "http://lobid.org/organisations/XX-YDX#!",
"label" : "lobid Organisation"
},
"modifiedBy" : [ {
"id" : "http://lobid.org/organisations/DE-TMC#!",
"id" : "http://lobid.org/organisations/XX-TMC#!",
"label" : "lobid Organisation"
}, {
"id" : "http://lobid.org/organisations/DE-COU#!",
"id" : "http://lobid.org/organisations/XX-COU#!",
"label" : "lobid Organisation"
}, {
"id" : "http://lobid.org/organisations/DE-OCLCO#!",
"id" : "http://lobid.org/organisations/XX-OCLCO#!",
"label" : "lobid Organisation"
}, {
"id" : "http://lobid.org/organisations/DE-USU#!",
"id" : "http://lobid.org/organisations/XX-USU#!",
"label" : "lobid Organisation"
}, {
"id" : "http://lobid.org/organisations/DE-INM#!",
"id" : "http://lobid.org/organisations/XX-INM#!",
"label" : "lobid Organisation"
}, {
"id" : "http://lobid.org/organisations/DE-MMU#!",
"id" : "http://lobid.org/organisations/XX-MMU#!",
"label" : "lobid Organisation"
}, {
"id" : "http://lobid.org/organisations/DE-UAB#!",
"id" : "http://lobid.org/organisations/XX-UAB#!",
"label" : "lobid Organisation"
}, {
"id" : "http://lobid.org/organisations/DE-UKMGB#!",
"id" : "http://lobid.org/organisations/XX-UKMGB#!",
"label" : "lobid Organisation"
}, {
"id" : "http://lobid.org/organisations/DE-CASUM#!",
"id" : "http://lobid.org/organisations/XX-CASUM#!",
"label" : "lobid Organisation"
}, {
"id" : "http://lobid.org/organisations/DE-UIU#!",
"id" : "http://lobid.org/organisations/XX-UIU#!",
"label" : "lobid Organisation"
}, {
"id" : "https://ebookcentral.proquest.com/",
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/alma-fix/99371449208306441.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"id" : "https://ebookcentral.proquest.com/",
"label" : "ebookcentral.proquest.com"
}, {
"id" : "http://lobid.org/organisations/DE-CaOWAL#!",
"id" : "http://lobid.org/organisations/XX-CaOWAL#!",
"label" : "lobid Organisation"
} ]
}
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/alma-fix/99371463467006441.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@
"label" : "hbz_unioncatalog"
},
"sourceOrganization" : {
"id" : "http://lobid.org/organisations/DE-NjHacI#!",
"id" : "http://lobid.org/organisations/XX-NjHacI#!",
"label" : "lobid Organisation"
},
"provider" : {
"id" : "http://lobid.org/organisations/DE-NjHacl#!",
"id" : "http://lobid.org/organisations/XX-NjHacl#!",
"label" : "lobid Organisation"
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/alma-fix/99371791018506441.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"label" : "hbz_unioncatalog"
},
"sourceOrganization" : {
"id" : "http://lobid.org/organisations/DE-OAPENFoundation#!",
"id" : "http://lobid.org/organisations/XX-OAPENFoundation#!",
"label" : "lobid Organisation"
},
"provider" : {
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 @@ -39,11 +39,11 @@
"label" : "hbz_unioncatalog"
},
"sourceOrganization" : {
"id" : "http://lobid.org/organisations/DE-EBA-UTB#!",
"id" : "http://lobid.org/organisations/XX-EBA-UTB#!",
"label" : "lobid Organisation"
},
"provider" : {
"id" : "http://lobid.org/organisations/DE-EBA-UTB#!",
"id" : "http://lobid.org/organisations/XX-EBA-UTB#!",
"label" : "lobid Organisation"
},
"modifiedBy" : [ {
Expand Down

0 comments on commit dc41f47

Please sign in to comment.