Skip to content

Commit

Permalink
Merge #1870 from branch '1784-useNewSigelMapping' of https://github.c…
Browse files Browse the repository at this point in the history
  • Loading branch information
dr0i committed Aug 24, 2023
2 parents 05c0217 + d991462 commit 944cb5d
Show file tree
Hide file tree
Showing 63 changed files with 18,852 additions and 21,555 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,7 @@ public void run() {
fixVariables.put("classification.tsv", "./maps/classification.tsv");
fixVariables.put("formangabe.tsv", "./maps/formangabe.tsv");
fixVariables.put("almaMmsId2rpbId", "./maps/almaMmsId2rpbId.tsv");
fixVariables.put("lobidOrgLabels", "./maps/lobidOrgLabels.tsv");
fixVariables.put("sigel2isilMap.tsv", "./maps/sigel2isilMap.tsv");
fixVariables.put("lobidOrganisationsMapping.tsv", "./maps/lobidOrganisationsMapping.tsv");
fixVariables.put("hbzowner2sigel.tsv", "./maps/hbzowner2sigel.tsv");
fixVariables.put("isilRedirect.tsv", "./maps/isilRedirect.tsv");
fixVariables.put("rpb2.ttl", "./maps/rpb2.ttl");
Expand Down
14 changes: 14 additions & 0 deletions src/main/resources/alma/fix/macros.fix
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,18 @@ do put_macro("provenanceLinks")
replace_all("$[field]", "^.*$", "DE-605")
elsif any_match("$[field]","^NRW$|^NRW\\/Hist.Buch$")
replace_all("$[field]", "^.*$", "DE-605")
elsif any_equal("$[field]", "Springer")
replace_all("$[field]", "^.*$", "DE-He213")
elsif any_equal("$[field]", "BSZ")
replace_all("$[field]", "^.*$", "DE-576")
elsif any_equal("$[field]", "GBV")
replace_all("$[field]", "^.*$", "DE-601")
elsif any_equal("$[field]", "KOBV")
replace_all("$[field]", "^.*$", "DE-602")
elsif any_equal("$[field]", "HeBIS")
replace_all("$[field]", "^.*$", "DE-603")
elsif any_equal("$[field]", "BVB")
replace_all("$[field]", "^.*$", "DE-604")
elsif any_match("$[field]","^292$")
replace_all("$[field]", "^292$", "DE-101b")
elsif any_match("$[field]","(.*)\\/NWBib$")
Expand All @@ -87,6 +99,8 @@ do put_macro("provenanceLinks")
elsif any_match("$[field]", "^\\d{4}$")
lookup("$[field]", "picaCreatorId2Isil")
end


unless any_match("$[field]","[A-Za-z]{2}-.*")
prepend("$[field]","DE-")
end
Expand Down
11 changes: 5 additions & 6 deletions src/main/resources/alma/fix/maps.fix
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,20 @@ put_filemap("$[maps-institutions.tsv]","alma-institution-code-to-isil", sep_char

put_filemap("$[sublibraryIsil.tsv]","sublibraryIsil", sep_char:"\t")

put_filemap("$[sigel2isilMap.tsv]","sigel2isilMap", sep_char:"\t")
# lobid Organisations id -> label
put_filemap("$[lobidOrganisationsMapping.tsv]","lobidOrgLabels", sep_char:"\t",key_column:"0",value_column:"3",expected_columns:"-1")

put_filemap("$[lobidOrganisationsMapping.tsv]","sigel2isilMap", sep_char:"\t",key_column:"2",value_column:"1",expected_columns:"-1")
put_filemap("$[hbzowner2sigel.tsv]","hbzowner2sigel", sep_char:"\t",key_column:"0",value_column:"2",expected_columns:"-1")
put_filemap("$[isilRedirect.tsv]","isilRedirect", sep_char:"\t",key_column:"1",value_column:"0",expected_columns:"-1")


put_filemap("$[picaCreatorId2Isil.tsv]","picaCreatorId2Isil", sep_char:"\t", sep_char:"\t",key_column:"0",value_column:"2",expected_columns:"-1")

# NWbib-> Wikidata Lookup
put_filemap("$[nwbibWikidataLabelTypeCoords.tsv]","nwbibWikidataId", sep_char:"\t",key_column:"0",value_column:"1",expected_columns:"-1")
put_filemap("$[nwbibWikidataLabelTypeCoords.tsv]","nwbibWikidataLabel", sep_char:"\t",key_column:"0",value_column:"2",expected_columns:"-1")
put_filemap("$[nwbibWikidataLabelTypeCoords.tsv]","nwbibWikidataTypes", sep_char:"\t",key_column:"0",value_column:"3",expected_columns:"-1")
put_filemap("$[nwbibWikidataLabelTypeCoords.tsv]","nwbibWikidataGeodata", sep_char:"\t",key_column:"0",value_column:"4",expected_columns:"-1")
put_filemap("$[nwbibWikidataLabelTypeCoords.tsv]","nwbibWikidataGeodata", sep_char:"\t",key_column:"0",value_column:"4",expected_columns:"-1")

# Library Classifications
put_filemap("$[classification.tsv]","classificationCode2Label", sep_char:"\t",key_column:"0",value_column:"1",expected_columns:"-1")
Expand All @@ -32,9 +34,6 @@ put_filemap("$[formangabe.tsv]","formschlagwort2Gnd", sep_char:"\t",key_column:"
# almaMmsId -> rpbId
put_filemap("$[almaMmsId2rpbId]","almaMmsId2rpbId", sep_char:"\t",key_column:"0",value_column:"1",expected_columns:"-1")

# lobid Organisations id -> label
put_filemap("$[lobidOrgLabels]","lobidOrgLabels", sep_char:"\t",key_column:"0",value_column:"1",expected_columns:"-1")

# map zdbId to old hbzId(HT Nummer) based on the last aleph transformation
put_filemap("$[hbzId2zdbId.tsv]","zdbId2oldHbzId", sep_char:"\t",key_column:"1",value_column:"0",expected_columns:"-1")

Expand Down
18,640 changes: 0 additions & 18,640 deletions src/main/resources/alma/maps/lobidOrgLabels.tsv

This file was deleted.

18,682 changes: 18,682 additions & 0 deletions src/main/resources/alma/maps/lobidOrganisationsMapping.tsv

Large diffs are not rendered by default.

Loading

0 comments on commit 944cb5d

Please sign in to comment.