Skip to content

Commit

Permalink
Call the macro later in item.fix #1888
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasNx committed Sep 25, 2023
1 parent c2e348b commit d0e3745
Show file tree
Hide file tree
Showing 77 changed files with 511 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/resources/alma/fix/item.fix
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ 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")
call_macro("opacLink")
copy_field("$i.w","$i.@sublibraryIsil")
lookup("$i.@sublibraryIsil", "hbzowner2sigel",delete:"true")
lookup("$i.@sublibraryIsil", "sigel2isilMap",delete:"true")
Expand Down Expand Up @@ -61,9 +61,9 @@ 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")
call_macro("opacLink")
copy_field("$H52.b","$i.@sublibraryIsil")
lookup("$i.@sublibraryIsil", "hbzowner2sigel",delete:"true")
lookup("$i.@sublibraryIsil", "sigel2isilMap",delete:"true")
Expand Down
14 changes: 14 additions & 0 deletions src/test/resources/alma-fix/990001412590206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
"serialNumber" : "W00348898",
"currentLibrary" : "W0001",
"currentLocation" : "04",
"opacLink" : "https://katalog.bib.uni-wuppertal.de/F?func=item-cen-2&doc_library=WUP01&doc_001_number={hbzid}",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-468#!",
"isil" : "DE-468",
Expand All @@ -127,6 +128,7 @@
"serialNumber" : "881294001",
"currentLibrary" : "F0001",
"currentLocation" : "03",
"opacLink" : "http://ub-parma.fernuni-hagen.de/F/?func=find-b&request={hbzid}&find_code=IDN&adjacent=N&x=45&y=11&filter_code_2=WYR&filter_request_2=",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-708#!",
"isil" : "DE-708",
Expand All @@ -140,6 +142,7 @@
"serialNumber" : "02922183",
"currentLibrary" : "R0001",
"currentLocation" : "00000000",
"opacLink" : "http://kat.lbz-rlp.de/webOPACClient.lbzsis/start.do?Language=De&Query=010%3D%22{hbzid}%22&selectedViewBranchlib=0",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-929#!",
"isil" : "DE-929",
Expand All @@ -153,6 +156,7 @@
"serialNumber" : "02922177",
"currentLibrary" : "R0001",
"currentLocation" : "00000000",
"opacLink" : "http://kat.lbz-rlp.de/webOPACClient.lbzsis/start.do?Language=De&Query=010%3D%22{hbzid}%22&selectedViewBranchlib=0",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-929#!",
"isil" : "DE-929",
Expand All @@ -166,6 +170,7 @@
"serialNumber" : "0130003X",
"currentLibrary" : "R0001",
"currentLocation" : "00000000",
"opacLink" : "http://kat.lbz-rlp.de/webOPACClient.lbzsis/start.do?Language=De&Query=010%3D%22{hbzid}%22&selectedViewBranchlib=0",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-929#!",
"isil" : "DE-929",
Expand All @@ -179,6 +184,7 @@
"serialNumber" : ":94002663930",
"currentLibrary" : "T0010",
"currentLocation" : "kA",
"opacLink" : "https://www.dshs-koeln.de/aleph/F?func=item-cen-2&doc_library=STR01&doc_001_number={hbzid}&local_base=STR01",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-121#!",
"isil" : "DE-121",
Expand All @@ -192,6 +198,7 @@
"serialNumber" : "50860674",
"currentLibrary" : "EFB",
"currentLocation" : "Freihand",
"opacLink" : "https://www.ub.tu-dortmund.de/webOPACClient/start.do?Query=0010=%22{hbzid}%22",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-290#!",
"isil" : "DE-290",
Expand All @@ -205,6 +212,7 @@
"serialNumber" : "B1252/640",
"currentLibrary" : "0",
"currentLocation" : "0-MagAlt",
"opacLink" : "https://bonnus.ulb.uni-bonn.de/Summon/Search?referrerBonnus=portlet&lookfor={hbzid}",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-5#!",
"isil" : "DE-5",
Expand All @@ -231,6 +239,7 @@
"serialNumber" : "408422401",
"currentLibrary" : "X0001",
"currentLocation" : "00L",
"opacLink" : "https://katalog.ulb.hhu.de/Search/Results?lookfor=id_marc_001_txt:{hbzid}",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-61#!",
"isil" : "DE-61",
Expand All @@ -244,6 +253,7 @@
"serialNumber" : "PP4/111",
"currentLibrary" : "38",
"currentLocation" : "38-MAG",
"opacLink" : "http://www.ub.uni-koeln.de/cgi-bin/redirect.pl?referrer=hbzvk&service=showrecord&hbzid={hbzid}",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-38#!",
"isil" : "DE-38",
Expand All @@ -257,6 +267,7 @@
"serialNumber" : "48 QU 313",
"currentLibrary" : "ZB",
"currentLocation" : "ZB_GMAG",
"opacLink" : "https://hbz-ulbms.primo.exlibrisgroup.com/discovery/search?query=any,contains,{hbzid}&tab=Everything&search_scope=MyInst_and_CI&vid=49HBZ_ULM:VU2&offset=0",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-6#!",
"isil" : "DE-6",
Expand All @@ -270,6 +281,7 @@
"serialNumber" : "20ICM1270",
"currentLibrary" : "S0001",
"currentLocation" : "ERW",
"opacLink" : "https://ub-siegen.digibib.net/search/katalog/list?start=1&defaults=on&q-al={hbzid}",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-467#!",
"isil" : "DE-467",
Expand All @@ -283,6 +295,7 @@
"serialNumber" : "ICM1034",
"currentLibrary" : "P0001",
"currentLocation" : "11",
"opacLink" : "https://katalog.ub.uni-paderborn.de/local/s?sr%5Bq,any%5D={hbzid}",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-466#!",
"isil" : "DE-466",
Expand All @@ -294,6 +307,7 @@
"type" : [ "Item", "PhysikalischerTitel" ],
"currentLibrary" : "P0001",
"currentLocation" : "UNASSIGNED",
"opacLink" : "https://katalog.ub.uni-paderborn.de/local/s?sr%5Bq,any%5D={hbzid}",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-466#!",
"isil" : "DE-466",
Expand Down
3 changes: 3 additions & 0 deletions src/test/resources/alma-fix/990011470300206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
"serialNumber" : "0102.3750.19",
"currentLibrary" : "T0011",
"currentLocation" : "38",
"opacLink" : "http://primo.kobv.de/primo_library/libweb/action/dlSearch.do?vid=TRI_UB_I&institution=TRI_UB_I&search_scope=localude&bulkSize=10&lang=ger&indx=1&onCampus=false&query=any,contains,{hbzid}",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-385#!",
"isil" : "DE-385",
Expand All @@ -109,6 +110,7 @@
"serialNumber" : "Z17-045835",
"currentLibrary" : "PHIL",
"currentLocation" : "PHIL_PBIB",
"opacLink" : "https://hbz-ulbms.primo.exlibrisgroup.com/discovery/search?query=any,contains,{hbzid}&tab=Everything&search_scope=MyInst_and_CI&vid=49HBZ_ULM:VU2&offset=0",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-6-015#!",
"isil" : "DE-6-015",
Expand All @@ -120,6 +122,7 @@
"type" : [ "Item", "PhysikalischerTitel" ],
"currentLibrary" : "T0011",
"currentLocation" : "UNASSIGNED",
"opacLink" : "http://primo.kobv.de/primo_library/libweb/action/dlSearch.do?vid=TRI_UB_I&institution=TRI_UB_I&search_scope=localude&bulkSize=10&lang=ger&indx=1&onCampus=false&query=any,contains,{hbzid}",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-385#!",
"isil" : "DE-385",
Expand Down
4 changes: 4 additions & 0 deletions src/test/resources/alma-fix/990014830510206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
"serialNumber" : "0017.4679.62",
"currentLibrary" : "T0011",
"currentLocation" : "21",
"opacLink" : "http://primo.kobv.de/primo_library/libweb/action/dlSearch.do?vid=TRI_UB_I&institution=TRI_UB_I&search_scope=localude&bulkSize=10&lang=ger&indx=1&onCampus=false&query=any,contains,{hbzid}",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-385#!",
"isil" : "DE-385",
Expand All @@ -112,6 +113,7 @@
"serialNumber" : "SK-201407",
"currentLibrary" : "SM",
"currentLocation" : "SM-Frei",
"opacLink" : "https://bonnus.ulb.uni-bonn.de/Summon/Search?referrerBonnus=portlet&lookfor={hbzid}",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-5-58#!",
"isil" : "DE-5-58",
Expand All @@ -125,6 +127,7 @@
"serialNumber" : "KNLC1469",
"currentLibrary" : "E0001",
"currentLocation" : "E07IM",
"opacLink" : "https://primo.uni-due.de/discovery/search?query=any,contains,{hbzid}&tab=Everything&search_scope=MyInst_and_CI_custom&vid=49HBZ_UDE:UDE&offset=0",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-465#!",
"isil" : "DE-465",
Expand All @@ -136,6 +139,7 @@
"type" : [ "Item", "PhysikalischerTitel" ],
"currentLibrary" : "T0011",
"currentLocation" : "UNASSIGNED",
"opacLink" : "http://primo.kobv.de/primo_library/libweb/action/dlSearch.do?vid=TRI_UB_I&institution=TRI_UB_I&search_scope=localude&bulkSize=10&lang=ger&indx=1&onCampus=false&query=any,contains,{hbzid}",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-385#!",
"isil" : "DE-385",
Expand Down
3 changes: 3 additions & 0 deletions src/test/resources/alma-fix/990016782920206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
"serialNumber" : "E1000000037300",
"currentLibrary" : "Z9036",
"currentLocation" : "FHA",
"opacLink" : "https://www.dshs-koeln.de/aleph/F?func=item-cen-2&doc_library=MHE01&doc_001_number={hbzid}&local_base=MHE01",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-1156#!",
"isil" : "DE-1156",
Expand All @@ -114,6 +115,7 @@
"serialNumber" : "012979677107",
"currentLibrary" : "R0003",
"currentLocation" : "00001000",
"opacLink" : "http://kat.lbz-rlp.de/webOPACClient.lbzsis/start.do?Language=De&Query=010%3D%22{hbzid}%22&selectedViewBranchlib=0",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-107#!",
"isil" : "DE-107",
Expand All @@ -127,6 +129,7 @@
"serialNumber" : "Z156-011049",
"currentLibrary" : "MUPA",
"currentLocation" : "MUPA_BIB",
"opacLink" : "https://hbz-ulbms.primo.exlibrisgroup.com/discovery/search?query=any,contains,{hbzid}&tab=Everything&search_scope=MyInst_and_CI&vid=49HBZ_ULM:VU2&offset=0",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-6-286#!",
"isil" : "DE-6-286",
Expand Down
4 changes: 4 additions & 0 deletions src/test/resources/alma-fix/990021367710206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
"serialNumber" : "20098056",
"currentLibrary" : "SFS",
"currentLocation" : "Freihand",
"opacLink" : "https://www.ub.tu-dortmund.de/webOPACClient/start.do?Query=0010=%22{hbzid}%22",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-290#!",
"isil" : "DE-290",
Expand All @@ -108,6 +109,7 @@
"serialNumber" : "186573",
"currentLibrary" : "ZB",
"currentLocation" : "Freihand",
"opacLink" : "https://www.ub.tu-dortmund.de/webOPACClient/start.do?Query=0010=%22{hbzid}%22",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-290#!",
"isil" : "DE-290",
Expand All @@ -121,6 +123,7 @@
"serialNumber" : "0012.7330.22",
"currentLibrary" : "T0011",
"currentLocation" : "MAG",
"opacLink" : "http://primo.kobv.de/primo_library/libweb/action/dlSearch.do?vid=TRI_UB_I&institution=TRI_UB_I&search_scope=localude&bulkSize=10&lang=ger&indx=1&onCampus=false&query=any,contains,{hbzid}",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-385#!",
"isil" : "DE-385",
Expand All @@ -145,6 +148,7 @@
"type" : [ "Item", "PhysikalischerTitel" ],
"currentLibrary" : "T0011",
"currentLocation" : "UNASSIGNED",
"opacLink" : "http://primo.kobv.de/primo_library/libweb/action/dlSearch.do?vid=TRI_UB_I&institution=TRI_UB_I&search_scope=localude&bulkSize=10&lang=ger&indx=1&onCampus=false&query=any,contains,{hbzid}",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-385#!",
"isil" : "DE-385",
Expand Down
5 changes: 5 additions & 0 deletions src/test/resources/alma-fix/990021974470206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
"serialNumber" : "604:016874",
"currentLibrary" : "604",
"currentLocation" : "0",
"opacLink" : "https://katalog.ub.rwth-aachen.de/discovery/search?query=any,contains,{hbzid}&tab=BibNoArticle609&search_scope=BibliothekskatalogMOD&vid=49HBZ_UBA:VU1&offset=0",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-82-604#!",
"isil" : "DE-82-604",
Expand All @@ -120,6 +121,7 @@
"serialNumber" : "0166.4021.80",
"currentLibrary" : "T0011",
"currentLocation" : "MAG",
"opacLink" : "http://primo.kobv.de/primo_library/libweb/action/dlSearch.do?vid=TRI_UB_I&institution=TRI_UB_I&search_scope=localude&bulkSize=10&lang=ger&indx=1&onCampus=false&query=any,contains,{hbzid}",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-385#!",
"isil" : "DE-385",
Expand Down Expand Up @@ -159,6 +161,7 @@
"serialNumber" : "Gc757",
"currentLibrary" : "38",
"currentLocation" : "38-MAG",
"opacLink" : "http://www.ub.uni-koeln.de/cgi-bin/redirect.pl?referrer=hbzvk&service=showrecord&hbzid={hbzid}",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-38#!",
"isil" : "DE-38",
Expand All @@ -172,6 +175,7 @@
"serialNumber" : "208/0032920",
"currentLibrary" : "38-208",
"currentLocation" : "38-208-VR",
"opacLink" : "http://www.ub.uni-koeln.de/cgi-bin/redirect.pl?referrer=hbzvk&service=showrecord&hbzid={hbzid}",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-38-208#!",
"isil" : "DE-38-208",
Expand All @@ -185,6 +189,7 @@
"serialNumber" : "Z25-033835",
"currentLibrary" : "RWS1",
"currentLocation" : "RWS1_BIB",
"opacLink" : "https://hbz-ulbms.primo.exlibrisgroup.com/discovery/search?query=any,contains,{hbzid}&tab=Everything&search_scope=MyInst_and_CI&vid=49HBZ_ULM:VU2&offset=0",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-6-016#!",
"isil" : "DE-6-016",
Expand Down
7 changes: 7 additions & 0 deletions src/test/resources/alma-fix/990026405480206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
"serialNumber" : "40275409",
"currentLibrary" : "SIE",
"currentLocation" : "SIE_PRAES",
"opacLink" : "https://bib-sisis.bib.hochschule-bonn-rhein-sieg.de/webOPACClient/start.do?Query=0010=%22{hbzid}%22",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-Sie5#!",
"isil" : "DE-Sie5",
Expand All @@ -110,6 +111,7 @@
"serialNumber" : "006392301",
"currentLibrary" : "cdd",
"currentLocation" : "HB",
"opacLink" : "http://katalog.bibl.fh-duesseldorf.de/libero/WebopacOpenURL.cls?ACTION=DISPLAY&sid=Libero:DUE&RID={hbzid}",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-Due62#!",
"isil" : "DE-Due62",
Expand All @@ -123,6 +125,7 @@
"serialNumber" : "06542653",
"currentLibrary" : "R0002",
"currentLocation" : "00002000",
"opacLink" : "http://kat.lbz-rlp.de/webOPACClient.lbzsis/start.do?Language=De&Query=010%3D%22{hbzid}%22&selectedViewBranchlib=0",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-Zw1#!",
"isil" : "DE-Zw1",
Expand All @@ -136,6 +139,7 @@
"serialNumber" : "07258981",
"currentLibrary" : "R0002",
"currentLocation" : "00002000",
"opacLink" : "http://kat.lbz-rlp.de/webOPACClient.lbzsis/start.do?Language=De&Query=010%3D%22{hbzid}%22&selectedViewBranchlib=0",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-Zw1#!",
"isil" : "DE-Zw1",
Expand All @@ -162,6 +166,7 @@
"serialNumber" : "420/030051",
"currentLibrary" : "38-420",
"currentLocation" : "38-420-MAG",
"opacLink" : "http://www.ub.uni-koeln.de/cgi-bin/redirect.pl?referrer=hbzvk&service=showrecord&hbzid={hbzid}",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-38-420#!",
"isil" : "DE-38-420",
Expand All @@ -175,6 +180,7 @@
"serialNumber" : "WUJ1407(3)",
"currentLibrary" : "P0001",
"currentLocation" : "51",
"opacLink" : "https://katalog.ub.uni-paderborn.de/local/s?sr%5Bq,any%5D={hbzid}",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-466#!",
"isil" : "DE-466",
Expand All @@ -186,6 +192,7 @@
"type" : [ "Item", "PhysikalischerTitel" ],
"currentLibrary" : "P0001",
"currentLocation" : "UNASSIGNED",
"opacLink" : "https://katalog.ub.uni-paderborn.de/local/s?sr%5Bq,any%5D={hbzid}",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-466#!",
"isil" : "DE-466",
Expand Down
2 changes: 2 additions & 0 deletions src/test/resources/alma-fix/990030574430206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
"serialNumber" : "SL-031324",
"currentLibrary" : "SG",
"currentLocation" : "SG-Frei",
"opacLink" : "https://bonnus.ulb.uni-bonn.de/Summon/Search?referrerBonnus=portlet&lookfor={hbzid}",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-5-13#!",
"isil" : "DE-5-13",
Expand All @@ -85,6 +86,7 @@
"serialNumber" : "65/7293",
"currentLibrary" : "0",
"currentLocation" : "0-Mag",
"opacLink" : "https://bonnus.ulb.uni-bonn.de/Summon/Search?referrerBonnus=portlet&lookfor={hbzid}",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-5#!",
"isil" : "DE-5",
Expand Down
Loading

0 comments on commit d0e3745

Please sign in to comment.