Skip to content

Commit

Permalink
Draft opac link lookup #1888
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasNx committed Sep 25, 2023
1 parent 225091b commit ce0346b
Show file tree
Hide file tree
Showing 9 changed files with 749 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ public void run() {
fixVariables.put("rpb-spatial.ttl", "./maps/rpb-spatial.ttl");
fixVariables.put("rpb.ttl", "./maps/rpb.ttl");
fixVariables.put("hbzId2zdbId.tsv", "./maps/hbzId2zdbId.tsv.gz");
fixVariables.put("isil2opac_hbzId.tsv", "./maps/isil2opac_hbzId.tsv");
fixVariables.put("isil2opac_isbn.tsv", "./maps/isil2opac_hbzId.tsv");
fixVariables.put("isil2opac_issn.tsv", "./maps/isil2opac_hbzId.tsv");
fixVariables.put("isil2opac_zdbId.tsv", "./maps/isil2opac_hbzId.tsv");


XmlElementSplitter xmlElementSplitter = new XmlElementSplitter();
xmlElementSplitter.setElementName("record");
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/alma/fix/item.fix
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ do list(path:"ITM ", "var": "$i")
copy_field("$i.w","hasItem[].$last.currentLibrary")
copy_field("$i.x","hasItem[].$last.currentLocation")
copy_field("$i.a", "$i.@iz")
call_macro("opacLink")
replace_all("$i.@iz",".*(\\d{4})$","$1")
lookup("$i.@iz", "alma-institution-code-to-isil")
copy_field("$i.w","$i.@sublibraryIsil")
Expand Down Expand Up @@ -60,6 +61,7 @@ do list(path: "HOL ", "var": "$i")
copy_field("$H52.c","hasItem[].$last.currentLocation")
copy_field("$H52.h", "hasItem[].$last.callNumber")
copy_field("$i.8", "$i.@iz")
call_macro("opacLink")
replace_all("$i.@iz",".*(\\d{4})$","$1")
lookup("$i.@iz", "alma-institution-code-to-isil")
copy_field("$H52.b","$i.@sublibraryIsil")
Expand Down
19 changes: 19 additions & 0 deletions src/main/resources/alma/fix/macros.fix
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,25 @@ do put_macro("provenanceLinks")
append("$[field]", "#!")
end

# opacLink

do put_macro("opacLink")
copy_field("$.@iz", "$i.@opacLink")
if exists("zdbId")
lookup("$i.@opacLink","isil2opac_zdbId", delete:"true")
split_field("$i.@opacLink","{zdbid}")
if exists("$i.@opacLink.1")
paste("hasItem[].$last.opacLink","$i.@opacLink.1","zdbId","$i.@opacLink.2",join_char:"")
end
else
lookup("$i.@opacLink","isil2opac_hbzId", delete:"true")
split_field("$i.@opacLink","{hbzid}")
if exists("$i.@opacLink.1")
paste("hasItem[].$last.opacLink","$i.@opacLink.1","hbzId","$i.@opacLink.2",join_char:"")
end
end
end

# for Schlagwortfolgen

do put_macro("schlagwortfolge")
Expand Down
7 changes: 7 additions & 0 deletions src/main/resources/alma/fix/maps.fix
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ put_filemap("$[almaMmsId2rpbId]","almaMmsId2rpbId", sep_char:"\t",key_column:"0"
# 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")

# opac links
put_filemap("$[isil2opac_hbzId.tsv]","isil2opac_hbzId", sep_char:"\t")
put_filemap("$[isil2opac_isbn.tsv]","isil2opac_isbn", sep_char:"\t")
put_filemap("$[isil2opac_issn.tsv]","isil2opac_issn", sep_char:"\t")
put_filemap("$[isil2opac_zdbId.tsv]","isil2opac_zdbId", sep_char:"\t")


put_map("rswk-indicator",
"p": "Person",
"b": "CorporateBody",
Expand Down
185 changes: 185 additions & 0 deletions src/main/resources/alma/maps/isil2opac_hbzId.tsv

Large diffs are not rendered by default.

228 changes: 228 additions & 0 deletions src/main/resources/alma/maps/isil2opac_isbn.tsv

Large diffs are not rendered by default.

228 changes: 228 additions & 0 deletions src/main/resources/alma/maps/isil2opac_issn.tsv

Large diffs are not rendered by default.

71 changes: 71 additions & 0 deletions src/main/resources/alma/maps/isil2opac_zdbId.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
DE-5 https://opac2.ulb.uni-bonn.de:8080/webOPACClient/start.do?Query=-1=%22{zdbid}%22
DE-107 https://kat.lbz-rlp.de/webOPACClient.lbzsis/start.do?Query=-1=%22{zdbid}%22
DE-290 https://www.ub.tu-dortmund.de/webOPACClient/start.do?Query=-1=%22{zdbid}%22
DE-294 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-7 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-8 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-9 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-10 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-11 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-13 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-14 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-15 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-16 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-17 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-18 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-19 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-20 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-21 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-22 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-23 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-24 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-25 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-26 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-27 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-28 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-29 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-30 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-31 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-32 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-33 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-34 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-35 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-36 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-37 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-38 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-39 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-42 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-43 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-45 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-46 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-47 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-48 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-49 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-50 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-51 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-52 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-53 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-55 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-56 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-57 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-58 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-59 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-60 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-61 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-62 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-63 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-64 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-66 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-67 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-68 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-70 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-71 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-294-140 https://suchen.ub.rub.de/zdbid/{zdbid}
DE-829 http://seth7.hs-niederrhein.de/webOPACClient/start.do?Query=-1=%22{zdbid}%22
DE-836 https://hb063.fh-muenster.de/webOPACClient/start.do?Query=-1=%22{zdbid}%22
DE-1044 https://bib-sisis.bib.hochschule-bonn-rhein-sieg.de/webOPACClient/start.do?Query=-1=%22{zdbid}%22
DE-1393 https://katalog.hs-ruhrwest.de/webOPACClient.nmbsis/start.do?Query=-1=%22{zdbid}%22
DE-1393-BOT https://katalog.hs-ruhrwest.de/webOPACClient.nmbsis/start.do?Query=-1=%22{zdbid}%22
DE-A96 https://onlinekatalog.bibliothek.fh-aachen.de/webOPACClient/start.do?Query=-1=%22{zdbid}%22
DE-Bi10 https://biblio.fh-bielefeld.de/webOPACClient/start.do?Query=-1=%22{zdbid}%22
DE-Dm13 http://193.25.18.8/webOPACClient/start.do?Query=-1=%22{zdbid}%22
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ public void setup() {
fixVariables.put("rpb-spatial.ttl", "src/main/resources/alma/maps/rpb-spatial.ttl");
fixVariables.put("rpb.ttl", "src/main/resources/alma/maps/rpb.ttl");
fixVariables.put("hbzId2zdbId.tsv", "src/main/resources/alma/maps/hbzId2zdbId.tsv.gz");
fixVariables.put("isil2opac_hbzId.tsv", "src/main/resources/alma/maps/isil2opac_hbzId.tsv");
fixVariables.put("isil2opac_isbn.tsv", "src/main/resources/alma/maps/isil2opac_hbzId.tsv");
fixVariables.put("isil2opac_issn.tsv", "src/main/resources/alma/maps/isil2opac_hbzId.tsv");
fixVariables.put("isil2opac_zdbId.tsv", "src/main/resources/alma/maps/isil2opac_hbzId.tsv");
}

/**
Expand Down

0 comments on commit ce0346b

Please sign in to comment.