Skip to content

Commit

Permalink
Split currentLocation into two elements #1869
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasNx committed Aug 25, 2023
1 parent a290bb6 commit 70080aa
Show file tree
Hide file tree
Showing 87 changed files with 1,208 additions and 604 deletions.
6 changes: 4 additions & 2 deletions src/main/resources/alma/fix/item.fix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ do list(path:"ITM ", "var": "$i")
end
copy_field("$i.H", "@ITM-H.$append")
copy_field("$i.b", "hasItem[].$last.serialNumber")
paste("hasItem[].$last.currentLocation", "$i.w", "~/", "$i.x")
copy_field("$i.w","hasItem[].$last.currentLibrary")
copy_field("$i.x","hasItem[].$last.currentLocation")
copy_field("$i.w","$i.@sublibraryIsil")
lookup("$i.@sublibraryIsil", "hbzowner2sigel",delete:"true")
lookup("$i.@sublibraryIsil", "sigel2isilMap",delete:"true")
Expand Down Expand Up @@ -48,7 +49,8 @@ do list(path: "HOL ", "var": "$i")
set_array("hasItem[].$last.type[]", "Item","PhysikalischerTitel")
do list(path:"H52??", "var": "$H52")
if in("$i.8", "$H52.8")
paste("hasItem[].$last.currentLocation", "$H52.b", "~/", "$H52.c")
copy_field("$H52.b","hasItem[].$last.currentLibrary")
copy_field("$H52.c","hasItem[].$last.currentLocation")
copy_field("$H52.h", "hasItem[].$last.callNumber")
copy_field("$H52.b","$i.@sublibraryIsil")
lookup("$i.@sublibraryIsil", "hbzowner2sigel",delete:"true")
Expand Down
45 changes: 30 additions & 15 deletions src/test/resources/alma-fix/990001412590206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@
"type" : [ "Item", "PhysicalObject" ],
"callNumber" : "ZZV708205",
"serialNumber" : "W00348898",
"currentLocation" : "W0001 / 04",
"currentLibrary" : "W0001",
"currentLocation" : "04",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-468#!",
"isil" : "DE-468",
Expand All @@ -124,7 +125,8 @@
"type" : [ "Item", "PhysicalObject" ],
"callNumber" : "HYI/CLA",
"serialNumber" : "881294001",
"currentLocation" : "F0001 / 03",
"currentLibrary" : "F0001",
"currentLocation" : "03",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-708#!",
"isil" : "DE-708",
Expand All @@ -136,7 +138,8 @@
"type" : [ "Item", "PhysicalObject" ],
"callNumber" : "P = P I 15",
"serialNumber" : "02922183",
"currentLocation" : "R0001 / 00000000",
"currentLibrary" : "R0001",
"currentLocation" : "00000000",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-929#!",
"isil" : "DE-929",
Expand All @@ -148,7 +151,8 @@
"type" : [ "Item", "PhysicalObject" ],
"callNumber" : "P = P I 15",
"serialNumber" : "02922177",
"currentLocation" : "R0001 / 00000000",
"currentLibrary" : "R0001",
"currentLocation" : "00000000",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-929#!",
"isil" : "DE-929",
Expand All @@ -160,7 +164,8 @@
"type" : [ "Item", "PhysicalObject" ],
"callNumber" : "P = A 1985",
"serialNumber" : "0130003X",
"currentLocation" : "R0001 / 00000000",
"currentLibrary" : "R0001",
"currentLocation" : "00000000",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-929#!",
"isil" : "DE-929",
Expand All @@ -172,7 +177,8 @@
"type" : [ "Item", "PhysicalObject" ],
"callNumber" : "Nq 19/369",
"serialNumber" : ":94002663930",
"currentLocation" : "T0010 / kA",
"currentLibrary" : "T0010",
"currentLocation" : "kA",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-121#!",
"isil" : "DE-121",
Expand All @@ -184,7 +190,8 @@
"type" : [ "Item", "PhysicalObject" ],
"callNumber" : "PAA 120/43",
"serialNumber" : "50860674",
"currentLocation" : "EFB / Freihand",
"currentLibrary" : "EFB",
"currentLocation" : "Freihand",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-290#!",
"isil" : "DE-290",
Expand All @@ -196,7 +203,8 @@
"type" : [ "Item", "PhysicalObject" ],
"callNumber" : "LA076 H2D4V",
"serialNumber" : "160/3072426+01",
"currentLocation" : "UB_BI / 164_Mono",
"currentLibrary" : "UB_BI",
"currentLocation" : "164_Mono",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-361#!",
"isil" : "DE-361",
Expand All @@ -208,7 +216,8 @@
"type" : [ "Item", "PhysicalObject" ],
"callNumber" : "VLB-1C-156",
"serialNumber" : "408422401",
"currentLocation" : "X0001 / 00L",
"currentLibrary" : "X0001",
"currentLocation" : "00L",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-61#!",
"isil" : "DE-61",
Expand All @@ -220,7 +229,8 @@
"type" : [ "Item", "PhysicalObject" ],
"callNumber" : "48 QU 313",
"serialNumber" : "48 QU 313",
"currentLocation" : "ZB / ZB_GMAG",
"currentLibrary" : "ZB",
"currentLocation" : "ZB_GMAG",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-6#!",
"isil" : "DE-6",
Expand All @@ -232,7 +242,8 @@
"type" : [ "Item", "PhysicalObject" ],
"callNumber" : "20ICM1270",
"serialNumber" : "20ICM1270",
"currentLocation" : "S0001 / ERW",
"currentLibrary" : "S0001",
"currentLocation" : "ERW",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-467#!",
"isil" : "DE-467",
Expand All @@ -244,7 +255,8 @@
"type" : [ "Item", "PhysicalObject" ],
"callNumber" : "B 1252/640",
"serialNumber" : "B1252/640",
"currentLocation" : "Q0001 / 00000000",
"currentLibrary" : "Q0001",
"currentLocation" : "00000000",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-5#!",
"isil" : "DE-5",
Expand All @@ -256,7 +268,8 @@
"type" : [ "Item", "PhysicalObject" ],
"callNumber" : "PP4/111",
"serialNumber" : "PP4/111",
"currentLocation" : "K0001 / 00000001",
"currentLibrary" : "K0001",
"currentLocation" : "00000001",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-38#!",
"isil" : "DE-38",
Expand All @@ -268,7 +281,8 @@
"type" : [ "Item", "PhysicalObject" ],
"callNumber" : "ICM1034",
"serialNumber" : "ICM1034",
"currentLocation" : "P0001 / 11",
"currentLibrary" : "P0001",
"currentLocation" : "11",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-466#!",
"isil" : "DE-466",
Expand All @@ -278,7 +292,8 @@
}, {
"label" : "lobid Bestandsressource",
"type" : [ "Item", "PhysikalischerTitel" ],
"currentLocation" : "P0001 / UNASSIGNED",
"currentLibrary" : "P0001",
"currentLocation" : "UNASSIGNED",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-466#!",
"isil" : "DE-466",
Expand Down
6 changes: 4 additions & 2 deletions src/test/resources/alma-fix/990011470300206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@
"type" : [ "Item", "PhysicalObject" ],
"callNumber" : "G 3913/912",
"serialNumber" : "Z17-045835",
"currentLocation" : "PHIL / PHIL_PBIB",
"currentLibrary" : "PHIL",
"currentLocation" : "PHIL_PBIB",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-6-015#!",
"isil" : "DE-6-015",
Expand All @@ -106,7 +107,8 @@
"type" : [ "Item", "PhysicalObject" ],
"callNumber" : "EA/sb23773",
"serialNumber" : "0102.3750.19",
"currentLocation" : "T0011 / 38",
"currentLibrary" : "T0011",
"currentLocation" : "38",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-385#!",
"isil" : "DE-385",
Expand Down
9 changes: 6 additions & 3 deletions src/test/resources/alma-fix/990014830510206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@
"type" : [ "Item", "PhysicalObject" ],
"callNumber" : "KNLC1469",
"serialNumber" : "KNLC1469",
"currentLocation" : "E0001 / E07IM",
"currentLibrary" : "E0001",
"currentLocation" : "E07IM",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-465#!",
"isil" : "DE-465",
Expand All @@ -109,7 +110,8 @@
"type" : [ "Item", "PhysicalObject" ],
"callNumber" : "AP 51081 H889",
"serialNumber" : "SK-201407",
"currentLocation" : "Q1133 / 00042000",
"currentLibrary" : "Q1133",
"currentLocation" : "00042000",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-5-58#!",
"isil" : "DE-5-58",
Expand All @@ -121,7 +123,8 @@
"type" : [ "Item", "PhysicalObject" ],
"callNumber" : "MOC.C464/me2295",
"serialNumber" : "0017.4679.62",
"currentLocation" : "T0011 / 21",
"currentLibrary" : "T0011",
"currentLocation" : "21",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-385#!",
"isil" : "DE-385",
Expand Down
21 changes: 14 additions & 7 deletions src/test/resources/alma-fix/990016782920206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@
"type" : [ "Item", "PhysicalObject" ],
"callNumber" : "C 10 / MolU / Erle",
"serialNumber" : "E1000000037300",
"currentLocation" : "Z9036 / FHA",
"currentLibrary" : "Z9036",
"currentLocation" : "FHA",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-1156#!",
"isil" : "DE-1156",
Expand All @@ -98,7 +99,8 @@
"type" : [ "Item", "PhysicalObject" ],
"callNumber" : "NC 10 MolsU 2",
"serialNumber" : "57500000060809",
"currentLocation" : "Z9037 / 00000001",
"currentLibrary" : "Z9037",
"currentLocation" : "00000001",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-575#!",
"isil" : "DE-575",
Expand All @@ -110,7 +112,8 @@
"type" : [ "Item", "PhysicalObject" ],
"callNumber" : "Mus. 30018 + Beil.",
"serialNumber" : "012979677107",
"currentLocation" : "R0003 / 00001000",
"currentLibrary" : "R0003",
"currentLocation" : "00001000",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-107#!",
"isil" : "DE-107",
Expand All @@ -122,7 +125,8 @@
"type" : [ "Item", "PhysicalObject" ],
"callNumber" : "P KLS Mol 4.1",
"serialNumber" : "Z156-011049",
"currentLocation" : "MUPA / MUPA_BIB",
"currentLibrary" : "MUPA",
"currentLocation" : "MUPA_BIB",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-6-286#!",
"isil" : "DE-6-286",
Expand All @@ -132,7 +136,8 @@
}, {
"label" : "lobid Bestandsressource",
"type" : [ "Item", "PhysikalischerTitel" ],
"currentLocation" : "Z9029 / UNASSIGNED",
"currentLibrary" : "Z9029",
"currentLocation" : "UNASSIGNED",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-52#!",
"isil" : "DE-52",
Expand All @@ -142,7 +147,8 @@
}, {
"label" : "lobid Bestandsressource",
"type" : [ "Item", "PhysikalischerTitel" ],
"currentLocation" : "Z9031 / UNASSIGNED",
"currentLibrary" : "Z9031",
"currentLocation" : "UNASSIGNED",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-62#!",
"isil" : "DE-62",
Expand All @@ -152,7 +158,8 @@
}, {
"label" : "lobid Bestandsressource",
"type" : [ "Item", "PhysikalischerTitel" ],
"currentLocation" : "Z9030 / UNASSIGNED",
"currentLibrary" : "Z9030",
"currentLocation" : "UNASSIGNED",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-60#!",
"isil" : "DE-60",
Expand Down
12 changes: 8 additions & 4 deletions src/test/resources/alma-fix/990021367710206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@
"type" : [ "Item", "PhysicalObject" ],
"callNumber" : "5200/Mars",
"serialNumber" : "20098056",
"currentLocation" : "SFS / Freihand",
"currentLibrary" : "SFS",
"currentLocation" : "Freihand",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-290#!",
"isil" : "DE-290",
Expand All @@ -105,7 +106,8 @@
"type" : [ "Item", "PhysicalObject" ],
"callNumber" : "F 29772",
"serialNumber" : "186573",
"currentLocation" : "ZB / Freihand",
"currentLibrary" : "ZB",
"currentLocation" : "Freihand",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-290#!",
"isil" : "DE-290",
Expand All @@ -117,7 +119,8 @@
"type" : [ "Item", "PhysicalObject" ],
"callNumber" : "SL800 M367(3)",
"serialNumber" : "138/1155937+01",
"currentLocation" : "UB_BI / 13W_Mono",
"currentLibrary" : "UB_BI",
"currentLocation" : "13W_Mono",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-361#!",
"isil" : "DE-361",
Expand All @@ -129,7 +132,8 @@
"type" : [ "Item", "PhysicalObject" ],
"callNumber" : "t20962(3)",
"serialNumber" : "0012.7330.22",
"currentLocation" : "T0011 / kA",
"currentLibrary" : "T0011",
"currentLocation" : "kA",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-385#!",
"isil" : "DE-385",
Expand Down
21 changes: 14 additions & 7 deletions src/test/resources/alma-fix/990021974470206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@
"type" : [ "Item", "PhysicalObject" ],
"callNumber" : "604:Lp 1040",
"serialNumber" : "604:016874",
"currentLocation" : "604 / 0",
"currentLibrary" : "604",
"currentLocation" : "0",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-82-604#!",
"isil" : "DE-82-604",
Expand All @@ -117,7 +118,8 @@
"type" : [ "Item", "PhysicalObject" ],
"callNumber" : "Pk 10.01.30/4",
"serialNumber" : "TEMP306538",
"currentLocation" : "B2001 / 00011000",
"currentLibrary" : "B2001",
"currentLocation" : "00011000",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-294-11#!",
"isil" : "DE-294-11",
Expand All @@ -129,7 +131,8 @@
"type" : [ "Item", "PhysicalObject" ],
"callNumber" : "KV315.5 S9V5",
"serialNumber" : "110/0222498+01",
"currentLocation" : "UB_BI / 11_Mono",
"currentLibrary" : "UB_BI",
"currentLocation" : "11_Mono",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-361#!",
"isil" : "DE-361",
Expand All @@ -141,7 +144,8 @@
"type" : [ "Item", "PhysicalObject" ],
"callNumber" : "AuslÖR VIII B 13",
"serialNumber" : "Z25-033835",
"currentLocation" : "RWS1 / RWS1_BIB",
"currentLibrary" : "RWS1",
"currentLocation" : "RWS1_BIB",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-6-016#!",
"isil" : "DE-6-016",
Expand All @@ -153,7 +157,8 @@
"type" : [ "Item", "PhysicalObject" ],
"callNumber" : "208/VR/ÖR/SU41/1",
"serialNumber" : "208/0032920",
"currentLocation" : "K1056 / 00208003",
"currentLibrary" : "K1056",
"currentLocation" : "00208003",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-38-208#!",
"isil" : "DE-38-208",
Expand All @@ -165,7 +170,8 @@
"type" : [ "Item", "PhysicalObject" ],
"callNumber" : "Gc757",
"serialNumber" : "Gc757",
"currentLocation" : "K0001 / 00000001",
"currentLibrary" : "K0001",
"currentLocation" : "00000001",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-38#!",
"isil" : "DE-38",
Expand All @@ -177,7 +183,8 @@
"type" : [ "Item", "PhysicalObject" ],
"callNumber" : "r33034",
"serialNumber" : "0166.4021.80",
"currentLocation" : "T0011 / kA",
"currentLibrary" : "T0011",
"currentLocation" : "kA",
"heldBy" : {
"id" : "http://lobid.org/organisations/DE-385#!",
"isil" : "DE-385",
Expand Down
Loading

0 comments on commit 70080aa

Please sign in to comment.