From fbf66de82ba7f0b8c5f8c7e79e99f00481c9584b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20B=C3=BClte?= Date: Thu, 19 Oct 2023 12:47:44 +0200 Subject: [PATCH] Prioritize AlmaMmsId for opac links #1888 --- src/main/resources/alma/fix/macros.fix | 6 +++--- .../resources/alma-fix/990053976760206441.json | 2 +- .../resources/alma-fix/990054215550206441.json | 2 +- .../resources/alma-fix/990054301770206441.json | 2 +- .../resources/alma-fix/990054345550206441.json | 4 ++-- .../resources/alma-fix/990109712970206441.json | 6 +++--- .../resources/alma-fix/990133067580206441.json | 2 +- .../resources/alma-fix/990184127410206441.json | 6 +++--- .../resources/alma-fix/990193229450206441.json | 2 +- src/test/resources/alma-fix/99370678063606441.json | 14 +++++++------- src/test/resources/alma-fix/99370682219806441.json | 4 ++-- src/test/resources/alma-fix/99370694196806441.json | 2 +- src/test/resources/alma-fix/99370699582506441.json | 2 +- 13 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/main/resources/alma/fix/macros.fix b/src/main/resources/alma/fix/macros.fix index a761c757e..9262d3f85 100644 --- a/src/main/resources/alma/fix/macros.fix +++ b/src/main/resources/alma/fix/macros.fix @@ -309,12 +309,12 @@ do put_macro("opacLink") split_field("$i.@opacLinkZdbId","\\{isbn\\}") end set_array("hasItem[].$last.seeAlso[]") - if exists("$i.@opacLinkZdbId.1") + if exists("$i.@opacAlmaMmsId.1") + paste("hasItem[].$last.seeAlso[].$append","$i.@opacAlmaMmsId.1","almaMmsId","$i.@opacAlmaMmsId.2",join_char:"") + elsif exists("$i.@opacLinkZdbId.1") paste("hasItem[].$last.seeAlso[].$append","$i.@opacLinkZdbId.1","zdbId","$i.@opacLinkZdbId.2",join_char:"") elsif exists("$i.@opacLinkHbzId.1") paste("hasItem[].$last.seeAlso[].$append","$i.@opacLinkHbzId.1","hbzId","$i.@opacLinkHbzId.2",join_char:"") - elsif exists("$i.@opacAlmaMmsId.1") - paste("hasItem[].$last.seeAlso[].$append","$i.@opacAlmaMmsId.1","almaMmsId","$i.@opacAlmaMmsId.2",join_char:"") elsif exists("$i.@opacLinkIsbn.1") paste("hasItem[].$last.seeAlso[].$append","$i.@opacLinkIsbn.1","isbn[].1","$i.@opacLinkIsbn.2",join_char:"") elsif exists("$i.@opacLinkIssn.1") diff --git a/src/test/resources/alma-fix/990053976760206441.json b/src/test/resources/alma-fix/990053976760206441.json index 6aee68825..3636cb5cb 100644 --- a/src/test/resources/alma-fix/990053976760206441.json +++ b/src/test/resources/alma-fix/990053976760206441.json @@ -401,7 +401,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", diff --git a/src/test/resources/alma-fix/990054215550206441.json b/src/test/resources/alma-fix/990054215550206441.json index 2b41a0f31..71a6787e6 100644 --- a/src/test/resources/alma-fix/990054215550206441.json +++ b/src/test/resources/alma-fix/990054215550206441.json @@ -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", diff --git a/src/test/resources/alma-fix/990054301770206441.json b/src/test/resources/alma-fix/990054301770206441.json index cf5c8b30f..cab3f3679 100644 --- a/src/test/resources/alma-fix/990054301770206441.json +++ b/src/test/resources/alma-fix/990054301770206441.json @@ -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#!", diff --git a/src/test/resources/alma-fix/990054345550206441.json b/src/test/resources/alma-fix/990054345550206441.json index 496546b1b..e6fa88a1f 100644 --- a/src/test/resources/alma-fix/990054345550206441.json +++ b/src/test/resources/alma-fix/990054345550206441.json @@ -657,7 +657,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=%22619424-2%22" ], + "seeAlso" : [ "https://bonnus.ulb.uni-bonn.de/permalink/49HBZ_ULB/idtnkp/alma990054345550206441" ], "id" : "http://lobid.org/items/990054345550206441:DE-5:22214232350006467#!" }, { "label" : "lobid Bestandsressource", @@ -670,7 +670,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=%22619424-2%22" ], + "seeAlso" : [ "https://bonnus.ulb.uni-bonn.de/permalink/49HBZ_ULB/idtnkp/alma990054345550206441" ], "id" : "http://lobid.org/items/990054345550206441:DE-5:22214232360006467#!" }, { "label" : "lobid Bestandsressource", diff --git a/src/test/resources/alma-fix/990109712970206441.json b/src/test/resources/alma-fix/990109712970206441.json index 9e8c7090e..d3b06326d 100644 --- a/src/test/resources/alma-fix/990109712970206441.json +++ b/src/test/resources/alma-fix/990109712970206441.json @@ -641,7 +641,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=%222000012-1%22" ], + "seeAlso" : [ "https://bonnus.ulb.uni-bonn.de/permalink/49HBZ_ULB/idtnkp/alma990109712970206441" ], "id" : "http://lobid.org/items/990109712970206441:DE-5:22316628570006467#!" }, { "label" : "lobid Bestandsressource", @@ -654,7 +654,7 @@ "id" : "http://lobid.org/organisations/DE-Bo59#!", "label" : "Beethoven-Haus Bonn, Bibliothek" }, - "seeAlso" : [ "https://opac2.ulb.uni-bonn.de:8080/webOPACClient/start.do?Query=-1=%222000012-1%22" ], + "seeAlso" : [ "https://bonnus.ulb.uni-bonn.de/permalink/49HBZ_ULB/idtnkp/alma990109712970206441" ], "id" : "http://lobid.org/items/990109712970206441:DE-Bo59:22316628560006467#!" }, { "label" : "lobid Bestandsressource", @@ -667,7 +667,7 @@ "id" : "http://lobid.org/organisations/DE-Bo59#!", "label" : "Beethoven-Haus Bonn, Bibliothek" }, - "seeAlso" : [ "https://opac2.ulb.uni-bonn.de:8080/webOPACClient/start.do?Query=-1=%222000012-1%22" ], + "seeAlso" : [ "https://bonnus.ulb.uni-bonn.de/permalink/49HBZ_ULB/idtnkp/alma990109712970206441" ], "id" : "http://lobid.org/items/990109712970206441:DE-Bo59:22316628550006467#!" }, { "label" : "lobid Bestandsressource", diff --git a/src/test/resources/alma-fix/990133067580206441.json b/src/test/resources/alma-fix/990133067580206441.json index 0c8e58fde..fc053b6a4 100644 --- a/src/test/resources/alma-fix/990133067580206441.json +++ b/src/test/resources/alma-fix/990133067580206441.json @@ -252,7 +252,7 @@ "label" : "Electronic Portfolio", "electronicLocator" : "https://eu04.alma.exlibrisgroup.com/view/uresolver/49HBZ_ULB/openurl?u.ignore_date_coverage=true&portfolio_pid=53804555180006441&Force_direct=true", "sublocation" : "https://hbz-network.userservices.exlibrisgroup.com/view/uresolver/49HBZ_ULB/openurl?u.ignore_date_coverage=true&rft.mms_id=990133067580206441", - "seeAlso" : [ "https://opac2.ulb.uni-bonn.de:8080/webOPACClient/start.do?Query=-1=%222163340-X%22" ], + "seeAlso" : [ "https://bonnus.ulb.uni-bonn.de/permalink/49HBZ_ULB/idtnkp/alma990133067580206441" ], "heldBy" : { "isil" : "DE-5", "id" : "http://lobid.org/organisations/DE-5#!", diff --git a/src/test/resources/alma-fix/990184127410206441.json b/src/test/resources/alma-fix/990184127410206441.json index 378fe48e7..ceaa8f185 100644 --- a/src/test/resources/alma-fix/990184127410206441.json +++ b/src/test/resources/alma-fix/990184127410206441.json @@ -205,7 +205,7 @@ "label" : "Electronic Portfolio", "electronicLocator" : "https://eu04.alma.exlibrisgroup.com/view/uresolver/49HBZ_ULB/openurl?u.ignore_date_coverage=true&portfolio_pid=53738793900006441&Force_direct=true", "sublocation" : "https://hbz-network.userservices.exlibrisgroup.com/view/uresolver/49HBZ_ULB/openurl?u.ignore_date_coverage=true&rft.mms_id=990184127410206441", - "seeAlso" : [ "https://opac2.ulb.uni-bonn.de:8080/webOPACClient/start.do?Query=-1=%222594002-8%22" ], + "seeAlso" : [ "https://bonnus.ulb.uni-bonn.de/permalink/49HBZ_ULB/idtnkp/alma990184127410206441" ], "heldBy" : { "isil" : "DE-5", "id" : "http://lobid.org/organisations/DE-5#!", @@ -240,7 +240,7 @@ "label" : "Electronic Portfolio", "electronicLocator" : "https://eu04.alma.exlibrisgroup.com/view/uresolver/49HBZ_ULB/openurl?u.ignore_date_coverage=true&portfolio_pid=53738793940006441&Force_direct=true", "sublocation" : "https://hbz-network.userservices.exlibrisgroup.com/view/uresolver/49HBZ_ULB/openurl?u.ignore_date_coverage=true&rft.mms_id=990184127410206441", - "seeAlso" : [ "https://opac2.ulb.uni-bonn.de:8080/webOPACClient/start.do?Query=-1=%222594002-8%22" ], + "seeAlso" : [ "https://bonnus.ulb.uni-bonn.de/permalink/49HBZ_ULB/idtnkp/alma990184127410206441" ], "heldBy" : { "isil" : "DE-5", "id" : "http://lobid.org/organisations/DE-5#!", @@ -275,7 +275,7 @@ "label" : "Electronic Portfolio", "electronicLocator" : "https://eu04.alma.exlibrisgroup.com/view/uresolver/49HBZ_ULB/openurl?u.ignore_date_coverage=true&portfolio_pid=53804344220006441&Force_direct=true", "sublocation" : "https://hbz-network.userservices.exlibrisgroup.com/view/uresolver/49HBZ_ULB/openurl?u.ignore_date_coverage=true&rft.mms_id=990184127410206441", - "seeAlso" : [ "https://opac2.ulb.uni-bonn.de:8080/webOPACClient/start.do?Query=-1=%222594002-8%22" ], + "seeAlso" : [ "https://bonnus.ulb.uni-bonn.de/permalink/49HBZ_ULB/idtnkp/alma990184127410206441" ], "heldBy" : { "isil" : "DE-5", "id" : "http://lobid.org/organisations/DE-5#!", diff --git a/src/test/resources/alma-fix/990193229450206441.json b/src/test/resources/alma-fix/990193229450206441.json index 3fee57760..1ae17141a 100644 --- a/src/test/resources/alma-fix/990193229450206441.json +++ b/src/test/resources/alma-fix/990193229450206441.json @@ -297,7 +297,7 @@ "label" : "Electronic Portfolio", "electronicLocator" : "https://eu04.alma.exlibrisgroup.com/view/uresolver/49HBZ_ULB/openurl?u.ignore_date_coverage=true&portfolio_pid=53807024380006441&Force_direct=true", "sublocation" : "https://hbz-network.userservices.exlibrisgroup.com/view/uresolver/49HBZ_ULB/openurl?u.ignore_date_coverage=true&rft.mms_id=990193229450206441", - "seeAlso" : [ "https://opac2.ulb.uni-bonn.de:8080/webOPACClient/start.do?Query=-1=%222685248-2%22" ], + "seeAlso" : [ "https://bonnus.ulb.uni-bonn.de/permalink/49HBZ_ULB/idtnkp/alma990193229450206441" ], "heldBy" : { "isil" : "DE-5", "id" : "http://lobid.org/organisations/DE-5#!", diff --git a/src/test/resources/alma-fix/99370678063606441.json b/src/test/resources/alma-fix/99370678063606441.json index ade3ee4a1..c3627467a 100644 --- a/src/test/resources/alma-fix/99370678063606441.json +++ b/src/test/resources/alma-fix/99370678063606441.json @@ -332,7 +332,7 @@ "id" : "http://lobid.org/organisations/DE-1044#!", "label" : "Hochschul- und Kreisbibliothek Bonn-Rhein-Sieg" }, - "seeAlso" : [ "https://bib-sisis.bib.hochschule-bonn-rhein-sieg.de/webOPACClient/start.do?Query=-1=%222598795-1%22" ], + "seeAlso" : [ "https://bib-discover.bib.h-brs.de/discovery/fulldisplay?docid=alma99370678063606441" ], "id" : "http://lobid.org/items/99370678063606441:DE-1044:5352012540006452#!" }, { "type" : [ "Item", "DigitalDocument" ], @@ -549,7 +549,7 @@ "id" : "http://lobid.org/organisations/DE-290#!", "label" : "Universitätsbibliothek Dortmund" }, - "seeAlso" : [ "https://www.ub.tu-dortmund.de/webOPACClient/start.do?Query=-1=%222598795-1%22" ], + "seeAlso" : [ "https://katalog.ub.tu-dortmund.de/id/ir01388a:ubd.lobid:99370678063606441" ], "id" : "http://lobid.org/items/99370678063606441:DE-290:53206901250006445#!" }, { "type" : [ "Item", "DigitalDocument" ], @@ -561,7 +561,7 @@ "id" : "http://lobid.org/organisations/DE-290#!", "label" : "Universitätsbibliothek Dortmund" }, - "seeAlso" : [ "https://www.ub.tu-dortmund.de/webOPACClient/start.do?Query=-1=%222598795-1%22" ], + "seeAlso" : [ "https://katalog.ub.tu-dortmund.de/id/ir01388a:ubd.lobid:99370678063606441" ], "id" : "http://lobid.org/items/99370678063606441:DE-290:53230941160006445#!" }, { "type" : [ "Item", "DigitalDocument" ], @@ -573,7 +573,7 @@ "id" : "http://lobid.org/organisations/DE-290#!", "label" : "Universitätsbibliothek Dortmund" }, - "seeAlso" : [ "https://www.ub.tu-dortmund.de/webOPACClient/start.do?Query=-1=%222598795-1%22" ], + "seeAlso" : [ "https://katalog.ub.tu-dortmund.de/id/ir01388a:ubd.lobid:99370678063606441" ], "id" : "http://lobid.org/items/99370678063606441:DE-290:53216211500006445#!" }, { "type" : [ "Item", "DigitalDocument" ], @@ -609,7 +609,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=%222598795-1%22" ], + "seeAlso" : [ "https://bonnus.ulb.uni-bonn.de/permalink/49HBZ_ULB/idtnkp/alma99370678063606441" ], "id" : "http://lobid.org/items/99370678063606441:DE-5:53320721620006467#!" }, { "type" : [ "Item", "DigitalDocument" ], @@ -621,7 +621,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=%222598795-1%22" ], + "seeAlso" : [ "https://bonnus.ulb.uni-bonn.de/permalink/49HBZ_ULB/idtnkp/alma99370678063606441" ], "id" : "http://lobid.org/items/99370678063606441:DE-5:53349719870006467#!" }, { "type" : [ "Item", "DigitalDocument" ], @@ -633,7 +633,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=%222598795-1%22" ], + "seeAlso" : [ "https://bonnus.ulb.uni-bonn.de/permalink/49HBZ_ULB/idtnkp/alma99370678063606441" ], "id" : "http://lobid.org/items/99370678063606441:DE-5:53320689660006467#!" }, { "type" : [ "Item", "DigitalDocument" ], diff --git a/src/test/resources/alma-fix/99370682219806441.json b/src/test/resources/alma-fix/99370682219806441.json index 2a43b1381..beb32fc24 100644 --- a/src/test/resources/alma-fix/99370682219806441.json +++ b/src/test/resources/alma-fix/99370682219806441.json @@ -208,7 +208,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=%222745694-8%22" ], + "seeAlso" : [ "https://bonnus.ulb.uni-bonn.de/permalink/49HBZ_ULB/idtnkp/alma99370682219806441" ], "id" : "http://lobid.org/items/99370682219806441:DE-5:53346185050006467#!" }, { "type" : [ "Item", "DigitalDocument" ], @@ -220,7 +220,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=%222745694-8%22" ], + "seeAlso" : [ "https://bonnus.ulb.uni-bonn.de/permalink/49HBZ_ULB/idtnkp/alma99370682219806441" ], "id" : "http://lobid.org/items/99370682219806441:DE-5:53346309900006467#!" }, { "type" : [ "Item", "DigitalDocument" ], diff --git a/src/test/resources/alma-fix/99370694196806441.json b/src/test/resources/alma-fix/99370694196806441.json index 1b2cbca94..60fa8f8c5 100644 --- a/src/test/resources/alma-fix/99370694196806441.json +++ b/src/test/resources/alma-fix/99370694196806441.json @@ -188,7 +188,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=%222669828-6%22" ], + "seeAlso" : [ "https://bonnus.ulb.uni-bonn.de/permalink/49HBZ_ULB/idtnkp/alma99370694196806441" ], "id" : "http://lobid.org/items/99370694196806441:DE-5:53333829220006467#!" }, { "type" : [ "Item", "DigitalDocument" ], diff --git a/src/test/resources/alma-fix/99370699582506441.json b/src/test/resources/alma-fix/99370699582506441.json index 86ae02cf3..0a355b088 100644 --- a/src/test/resources/alma-fix/99370699582506441.json +++ b/src/test/resources/alma-fix/99370699582506441.json @@ -128,7 +128,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=%222508993-6%22" ], + "seeAlso" : [ "https://bonnus.ulb.uni-bonn.de/permalink/49HBZ_ULB/idtnkp/alma99370699582506441" ], "id" : "http://lobid.org/items/99370699582506441:DE-5:53355917830006467#!" }, { "type" : [ "Item", "DigitalDocument" ],