Skip to content

Commit

Permalink
Exclude records with only suppressed holdings/items/portfolios from "…
Browse files Browse the repository at this point in the history
…DigiBib hbz Verbundkatalog" collection.

Mimics similar behaviour in DigiBib IntrOX (Limetrans; relevant Jira issues: DOX-1354, DOX-1568, DOX-1622).

See #2077 for alternate proposal (skip these records altogether).
  • Loading branch information
blackwinter committed Sep 26, 2024
1 parent ddcd72b commit 962e4b0
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
15 changes: 13 additions & 2 deletions src/main/resources/alma/fix/item.fix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ set_array("@ITM-H") # Helper element for creating Holding from HOL ("Physikalisc
do list(path:"ITM ", "var": "$i")
paste("$i.supressedLocation", "$i.M", "~+", "$i.x",join_char:"")
lookup("$i.supressedLocation","suppressedLocations",delete:"true")
unless exists("$i.supressedLocation") # Test if location is suppressed with mapping provided by the libraries.
if exists("$i.supressedLocation") # Test if location is suppressed with mapping provided by the libraries.
add_field("@suppressed", "true")
else
add_field("@unsuppressed", "true")
set_hash( "hasItem[].$append")
add_field("hasItem[].$last.label", "lobid Bestandsressource")
set_array("hasItem[].$last.type[]", "Item","PhysicalObject")
Expand Down Expand Up @@ -31,7 +34,10 @@ do list(path: "HOL ", "var": "$i")
if exists("$H52.b")
paste("$H52.supressedLocation", "$i.M", "~+", "$H52.c",join_char:"")
lookup("$H52.supressedLocation","suppressedLocations",delete:"true")
unless exists("$H52.supressedLocation") # Test if location is suppressed with mapping provided by the libraries.
if exists("$H52.supressedLocation") # Test if location is suppressed with mapping provided by the libraries.
add_field("@suppressed", "true")
else
add_field("@unsuppressed", "true")
set_hash( "hasItem[].$append")
add_field("hasItem[].$last.label", "lobid Bestandsressource")
set_array("hasItem[].$last.type[]", "Item","PhysikalischerTitel")
Expand All @@ -55,6 +61,11 @@ do list(path: "HOL ", "var": "$i")
end

do list(path:"POR ", "var": "$i")
if none_equal("$i.b", "Not Available")
add_field("@unsuppressed", "true")
else
add_field("@suppressed", "true")
end
copy_field("$i.M","@HOL-M_POR-M.$append")
# entity for every POR .a without POR .A
unless any_match("$i.a",".*6441$") # filter out hbz
Expand Down
11 changes: 9 additions & 2 deletions src/main/resources/alma/fix/relatedRessourcesAndLinks.fix
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,15 @@ set_array("inCollection[]")
# digiBib hbz Vk

if any_equal("MBD .M", "49HBZ_NETWORK")
add_field("inCollection[].$append.id", "https://nrw.digibib.net/search/hbzvk/")
add_field("inCollection[].$last.label", "DigiBib hbz Verbundkatalog")
if exists("@suppressed")
if exists("@unsuppressed")
add_field("inCollection[].$append.id", "https://nrw.digibib.net/search/hbzvk/")
add_field("inCollection[].$last.label", "DigiBib hbz Verbundkatalog")
end
else
add_field("inCollection[].$append.id", "https://nrw.digibib.net/search/hbzvk/")
add_field("inCollection[].$last.label", "DigiBib hbz Verbundkatalog")
end
if any_match("POR .A", ".*")
add_field("@inNZ", "true")
else
Expand Down

0 comments on commit 962e4b0

Please sign in to comment.