Skip to content

Commit

Permalink
Merge #1924 from branch '1888-prioritizeAlmaMmsIdAsOpacLink' of https…
Browse files Browse the repository at this point in the history
  • Loading branch information
dr0i committed Oct 19, 2023
2 parents 9858ed8 + 6291551 commit f798719
Show file tree
Hide file tree
Showing 17 changed files with 42 additions and 106 deletions.
34 changes: 17 additions & 17 deletions src/main/resources/alma/fix/macros.fix
Original file line number Diff line number Diff line change
Expand Up @@ -298,27 +298,27 @@ do put_macro("opacLink")
copy_field("$i.$[field]", "$i.@opacAlmaMmsId")
lookup("$i.@opacAlmaMmsId","isil2opac_almaMmsId", delete:"true")
split_field("$i.@opacAlmaMmsId","\\{almaMmsId\\}")
if exists("issn[].1")
copy_field("$i.$[field]", "$i.@opacLinkIssn")
lookup("$i.@opacLinkIssn","isil2opac_issn", delete:"true")
split_field("$i.@opacLinkIssn","\\{issn\\}")
end
if exists("isbn[].1")
copy_field("$i.$[field]", "$i.@opacLinkIsbn")
lookup("$i.@opacLinkIsbn","isil2opac_isbn", delete:"true")
split_field("$i.@opacLinkZdbId","\\{isbn\\}")
end
# if exists("issn[].1")
# copy_field("$i.$[field]", "$i.@opacLinkIssn")
# lookup("$i.@opacLinkIssn","isil2opac_issn", delete:"true")
# split_field("$i.@opacLinkIssn","\\{issn\\}")
# end
# if exists("isbn[].1")
# copy_field("$i.$[field]", "$i.@opacLinkIsbn")
# lookup("$i.@opacLinkIsbn","isil2opac_isbn", delete:"true")
# split_field("$i.@opacLinkZdbId","\\{isbn\\}")
# end
set_array("hasItem[].$last.seeAlso[]")
if exists("[email protected]")
if exists("[email protected]")
paste("hasItem[].$last.seeAlso[].$append","[email protected]","almaMmsId","[email protected]",join_char:"")
elsif exists("[email protected]")
paste("hasItem[].$last.seeAlso[].$append","[email protected]","zdbId","[email protected]",join_char:"")
elsif exists("[email protected]")
paste("hasItem[].$last.seeAlso[].$append","[email protected]","hbzId","[email protected]",join_char:"")
elsif exists("[email protected]")
paste("hasItem[].$last.seeAlso[].$append","[email protected]","almaMmsId","[email protected]",join_char:"")
elsif exists("[email protected]")
paste("hasItem[].$last.seeAlso[].$append","[email protected]","isbn[].1","[email protected]",join_char:"")
elsif exists("[email protected]")
paste("hasItem[].$last.seeAlso[].$append","[email protected]","issn[].1","[email protected]",join_char:"")
# elsif exists("[email protected]")
# paste("hasItem[].$last.seeAlso[].$append","[email protected]","isbn[].1","[email protected]",join_char:"")
# elsif exists("[email protected]")
# paste("hasItem[].$last.seeAlso[].$append","[email protected]","issn[].1","[email protected]",join_char:"")
end
end

Expand Down
14 changes: 2 additions & 12 deletions src/test/resources/alma-fix/990053976760206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@
"id" : "http://lobid.org/organisations/DE-Kob7#!",
"label" : "Universitätsbibliothek Koblenz"
},
"seeAlso" : [ "http://aleph1.uni-koblenz.de/F/?func=find-b&request=00319244&find_code=ISN&adjacent=N&local_base=KOL01&x=45&y=11&filter_code_2=WYR&filter_request_2=" ],
"id" : "http://lobid.org/items/990053976760206441:DE-Kob7:2332332670008057#!"
}, {
"label" : "lobid Bestandsressource",
Expand All @@ -254,7 +253,6 @@
"id" : "http://lobid.org/organisations/DE-Kob7#!",
"label" : "Universitätsbibliothek Koblenz"
},
"seeAlso" : [ "http://aleph1.uni-koblenz.de/F/?func=find-b&request=00319244&find_code=ISN&adjacent=N&local_base=KOL01&x=45&y=11&filter_code_2=WYR&filter_request_2=" ],
"id" : "http://lobid.org/items/990053976760206441:DE-Kob7:2332332740008057#!"
}, {
"label" : "lobid Bestandsressource",
Expand All @@ -268,7 +266,6 @@
"id" : "http://lobid.org/organisations/DE-Kob7#!",
"label" : "Universitätsbibliothek Koblenz"
},
"seeAlso" : [ "http://aleph1.uni-koblenz.de/F/?func=find-b&request=00319244&find_code=ISN&adjacent=N&local_base=KOL01&x=45&y=11&filter_code_2=WYR&filter_request_2=" ],
"id" : "http://lobid.org/items/990053976760206441:DE-Kob7:2332332700008057#!"
}, {
"label" : "lobid Bestandsressource",
Expand All @@ -282,7 +279,6 @@
"id" : "http://lobid.org/organisations/DE-Kob7#!",
"label" : "Universitätsbibliothek Koblenz"
},
"seeAlso" : [ "http://aleph1.uni-koblenz.de/F/?func=find-b&request=00319244&find_code=ISN&adjacent=N&local_base=KOL01&x=45&y=11&filter_code_2=WYR&filter_request_2=" ],
"id" : "http://lobid.org/items/990053976760206441:DE-Kob7:2332332710008057#!"
}, {
"label" : "lobid Bestandsressource",
Expand All @@ -296,7 +292,6 @@
"id" : "http://lobid.org/organisations/DE-Kob7#!",
"label" : "Universitätsbibliothek Koblenz"
},
"seeAlso" : [ "http://aleph1.uni-koblenz.de/F/?func=find-b&request=00319244&find_code=ISN&adjacent=N&local_base=KOL01&x=45&y=11&filter_code_2=WYR&filter_request_2=" ],
"id" : "http://lobid.org/items/990053976760206441:DE-Kob7:2332332720008057#!"
}, {
"label" : "lobid Bestandsressource",
Expand All @@ -310,7 +305,6 @@
"id" : "http://lobid.org/organisations/DE-Kob7#!",
"label" : "Universitätsbibliothek Koblenz"
},
"seeAlso" : [ "http://aleph1.uni-koblenz.de/F/?func=find-b&request=00319244&find_code=ISN&adjacent=N&local_base=KOL01&x=45&y=11&filter_code_2=WYR&filter_request_2=" ],
"id" : "http://lobid.org/items/990053976760206441:DE-Kob7:2332332730008057#!"
}, {
"label" : "lobid Bestandsressource",
Expand All @@ -324,7 +318,6 @@
"id" : "http://lobid.org/organisations/DE-467#!",
"label" : "Universitätsbibliothek Siegen"
},
"seeAlso" : [ "http://obelix.ub.uni-siegen.de/F/?func=find-b&request=00319244&find_code=ISN&adjacent=N&x=45&y=11&filter_code_2=WYR&filter_request_2=" ],
"id" : "http://lobid.org/items/990053976760206441:DE-467:2379886190006462#!"
}, {
"label" : "lobid Bestandsressource",
Expand Down Expand Up @@ -375,7 +368,7 @@
"id" : "http://lobid.org/organisations/DE-Lan1#!",
"label" : "Universitätsbibliothek der RPTU in Landau"
},
"seeAlso" : [ "http://aleph1.uni-koblenz.de/F/?func=find-b&request=00319244&find_code=ISN&adjacent=N&local_base=KOL01&x=45&y=11&filter_code_2=WYR&filter_request_2=" ],
"seeAlso" : [ "https://hbz-rptu.primo.exlibrisgroup.com/permalink/49HBZ_RTU/11q51gp/alma990053976760206441" ],
"id" : "http://lobid.org/items/990053976760206441:DE-Lan1:2266381790007476#!"
}, {
"label" : "lobid Bestandsressource",
Expand All @@ -401,7 +394,7 @@
"id" : "http://lobid.org/organisations/DE-290#!",
"label" : "Universitätsbibliothek Dortmund"
},
"seeAlso" : [ "https://www.ub.tu-dortmund.de/webOPACClient/start.do?Query=-1=%22123550-3%22" ],
"seeAlso" : [ "https://katalog.ub.tu-dortmund.de/id/ir01388a:ubd.lobid:990053976760206441" ],
"id" : "http://lobid.org/items/990053976760206441:DE-290:22189310720006445#!"
}, {
"label" : "lobid Bestandsressource",
Expand All @@ -414,7 +407,6 @@
"id" : "http://lobid.org/organisations/DE-361#!",
"label" : "Universitätsbibliothek Bielefeld"
},
"seeAlso" : [ "http://katalogplus.ub.uni-bielefeld.de/cgi-bin/new_search.cgi?kat1=is&var1=00319244&kat2=ti&var2=&kat3=aup&var3=&bestand=lok&sprache=GER&art=f&fsubmit=1&vr=1&opt=&pagesize=10" ],
"id" : "http://lobid.org/items/990053976760206441:DE-361:22274254620006442#!"
}, {
"label" : "lobid Bestandsressource",
Expand All @@ -440,7 +432,6 @@
"id" : "http://lobid.org/organisations/DE-61#!",
"label" : "Universitäts- und Landesbibliothek Düsseldorf"
},
"seeAlso" : [ "https://katalog.ulb.hhu.de/Search/Results?join=AND&bool0%5B%5D=AND&type0%5B%5D=ISN&lookfor0%5B%5D=00319244" ],
"id" : "http://lobid.org/items/990053976760206441:DE-61:22302058760006443#!"
}, {
"label" : "lobid Bestandsressource",
Expand Down Expand Up @@ -504,7 +495,6 @@
"id" : "http://lobid.org/organisations/DE-466#!",
"label" : "Universitätsbibliothek Paderborn"
},
"seeAlso" : [ "https://katalog.ub.uni-paderborn.de/searches?on_campus=false&query_terms%5B%5D%5Bif%5D=issn&query_terms%5B%5D%5Bpo%5D=contains&query_terms%5B%5D%5Bq%5D=00319244&scope=catalog&sf=rank" ],
"id" : "http://lobid.org/items/990053976760206441:DE-466:22131234930006463#!"
} ],
"medium" : [ {
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/alma-fix/990054215550206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
"id" : "http://lobid.org/organisations/DE-5#!",
"label" : "Universitäts- und Landesbibliothek Bonn"
},
"seeAlso" : [ "https://opac2.ulb.uni-bonn.de:8080/webOPACClient/start.do?Query=-1=%221257-9%22" ],
"seeAlso" : [ "https://bonnus.ulb.uni-bonn.de/permalink/49HBZ_ULB/idtnkp/alma990054215550206441" ],
"id" : "http://lobid.org/items/990054215550206441:DE-5:22235621980006467#!"
}, {
"label" : "lobid Bestandsressource",
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/alma-fix/990054301770206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@
}, {
"label" : "lobid Bestandsressource",
"type" : [ "Item", "NurTitel" ],
"seeAlso" : [ "https://www.ub.tu-dortmund.de/webOPACClient/start.do?Query=-1=%22133469-4%22" ],
"seeAlso" : [ "https://katalog.ub.tu-dortmund.de/id/ir01388a:ubd.lobid:990054301770206441" ],
"heldBy" : {
"isil" : "DE-290",
"id" : "http://lobid.org/organisations/DE-290#!",
Expand Down
Loading

0 comments on commit f798719

Please sign in to comment.