From f992bb46f5a6bc391f7e987ef101e41fb171c809 Mon Sep 17 00:00:00 2001 From: Jens Wille Date: Tue, 6 Jun 2023 15:23:22 +0200 Subject: [PATCH] Prepare for Metafix destructive `add_field()`. (metafacture/metafacture-fix#116) --- src/main/resources/transformation/alma.fix | 287 +++++++++++---------- 1 file changed, 144 insertions(+), 143 deletions(-) diff --git a/src/main/resources/transformation/alma.fix b/src/main/resources/transformation/alma.fix index d276dd89..9c25ad77 100644 --- a/src/main/resources/transformation/alma.fix +++ b/src/main/resources/transformation/alma.fix @@ -99,163 +99,163 @@ paste("@type__008Pos34", "@type", "@008Pos34", join_char: "#") # MARC/337, MARC/338 set_array("@facet_format") if any_match("@LeaderPos06", "[ij]") - add_field("@facet_format", "Audio") + add_field("@facet_format.$append", "Audio") elsif any_match("@006Pos00", "[ij]") - add_field("@facet_format", "Audio") + add_field("@facet_format.$append", "Audio") elsif any_equal("@007Pos00", "s") - add_field("@facet_format", "Audio") + add_field("@facet_format.$append", "Audio") elsif any_equal("337 .a", "audio") - add_field("@facet_format", "Audio") + add_field("@facet_format.$append", "Audio") elsif any_equal("337 .b", "s") - add_field("@facet_format", "Audio") + add_field("@facet_format.$append", "Audio") elsif any_equal("338 .a", "Audiodisk") - add_field("@facet_format", "Audio") + add_field("@facet_format.$append", "Audio") elsif any_equal("@type__008Pos26", "CF#h") - add_field("@facet_format", "Audio") + add_field("@facet_format.$append", "Audio") elsif any_equal("@006Pos00__006Pos09", "m#h") - add_field("@facet_format", "Audio") + add_field("@facet_format.$append", "Audio") end if any_equal("@007Pos00", "r") - add_field("@facet_format", "Bild") + add_field("@facet_format.$append", "Bild") elsif any_match("@007Pos00__007Pos01", "k#[cdefhijklnpqrsuvz]") - add_field("@facet_format", "Bild") + add_field("@facet_format.$append", "Bild") elsif any_match("@type__008Pos33|@type__008Pos34", "M#[jo]") - add_field("@facet_format", "Bild") + add_field("@facet_format.$append", "Bild") elsif any_match("@006Pos00__006Pos16|@006Pos00__006Pos17", "[ef]#[jo]") - add_field("@facet_format", "Bild") + add_field("@facet_format.$append", "Bild") elsif any_match("@type__008Pos33", "VM#[dikln]") - add_field("@facet_format", "Bild") + add_field("@facet_format.$append", "Bild") elsif any_match("@006Pos00__006Pos16", "[gkor]#[dikln]") - add_field("@facet_format", "Bild") + add_field("@facet_format.$append", "Bild") end # MARC/337, MARC/338 if any_equal("@LeaderPos06|@006Pos00", "m") - add_field("@facet_format", "Elektronische Ressource") + add_field("@facet_format.$append", "Elektronische Ressource") elsif any_match("337 .a", "Computermedien|computer|computermedien|informatique") - add_field("@facet_format", "Elektronische Ressource") + add_field("@facet_format.$append", "Elektronische Ressource") elsif any_equal("337 .b", "c") - add_field("@facet_format", "Elektronische Ressource") + add_field("@facet_format.$append", "Elektronische Ressource") elsif any_match("338 .a", "Computerdisk|computer disc") - add_field("@facet_format", "Elektronische Ressource") + add_field("@facet_format.$append", "Elektronische Ressource") elsif any_equal("338 .b", "cd") - add_field("@facet_format", "Elektronische Ressource") + add_field("@facet_format.$append", "Elektronische Ressource") elsif any_equal("@007Pos00", "c") - add_field("@facet_format", "Elektronische Ressource") + add_field("@facet_format.$append", "Elektronische Ressource") elsif any_match("@type__008Pos23", "(?:B|Mu|CR|MX)#[sq]") - add_field("@facet_format", "Elektronische Ressource") + add_field("@facet_format.$append", "Elektronische Ressource") elsif any_match("@006Pos00__006Pos06", "[acdijpst]#[qs]") - add_field("@facet_format", "Bild") + add_field("@facet_format.$append", "Bild") elsif any_match("@006Pos00__006Pos12", "[efgkor]#[qs]") - add_field("@facet_format", "Bild") + add_field("@facet_format.$append", "Bild") elsif any_match("@type__008Pos29", "(?:M|VM)#[sq]") - add_field("@facet_format", "Elektronische Ressource") + add_field("@facet_format.$append", "Elektronische Ressource") end # MARC/337, MARC/338 if any_match("@007Pos00", "[gmv]") - add_field("@facet_format", "Film, Dia, Video") + add_field("@facet_format.$append", "Film, Dia, Video") elsif any_equal("337 .a", "video") - add_field("@facet_format", "Film, Dia, Video") + add_field("@facet_format.$append", "Film, Dia, Video") elsif any_equal("337 .b", "v") - add_field("@facet_format", "Film, Dia, Video") + add_field("@facet_format.$append", "Film, Dia, Video") elsif any_match("338 .a", "Videodisk|videodisc") - add_field("@facet_format", "Film, Dia, Video") + add_field("@facet_format.$append", "Film, Dia, Video") elsif any_equal("338 .b", "vd") - add_field("@facet_format", "Film, Dia, Video") + add_field("@facet_format.$append", "Film, Dia, Video") elsif any_match("@type__008Pos33", "VM#[fmstv]") - add_field("@facet_format", "Film, Dia, Video") + add_field("@facet_format.$append", "Film, Dia, Video") elsif any_match("@006Pos00__006Pos16", "[gkor]#[fmstv]") - add_field("@facet_format", "Film, Dia, Video") + add_field("@facet_format.$append", "Film, Dia, Video") end if any_match("@LeaderPos06|@006Pos00", "[op]") - add_field("@facet_format", "Gedruckte Ressource") + add_field("@facet_format.$append", "Gedruckte Ressource") elsif any_equal("@007Pos00", "o") - add_field("@facet_format", "Gedruckte Ressource") + add_field("@facet_format.$append", "Gedruckte Ressource") elsif any_match("@007Pos00__007Pos01", "k#[fjs]|t#[ab]") - add_field("@facet_format", "Gedruckte Ressource") + add_field("@facet_format.$append", "Gedruckte Ressource") elsif any_match("@type__008Pos23", "(?:B|Mu|CR|MX)#[dr]") - add_field("@facet_format", "Gedruckte Ressource") + add_field("@facet_format.$append", "Gedruckte Ressource") elsif any_match("@006Pos00__006Pos06", "[acdijpst]#[dr]") - add_field("@facet_format", "Gedruckte Ressource") + add_field("@facet_format.$append", "Gedruckte Ressource") elsif any_match("@type__008Pos29", "(?:M|VM)#[dr]") - add_field("@facet_format", "Gedruckte Ressource") + add_field("@facet_format.$append", "Gedruckte Ressource") elsif any_match("@006Pos00__006Pos12", "[efgkor]#[dr]") - add_field("@facet_format", "Gedruckte Ressource") + add_field("@facet_format.$append", "Gedruckte Ressource") elsif any_equal("@type__008Pos33", "VM#b") - add_field("@facet_format", "Gedruckte Ressource") + add_field("@facet_format.$append", "Gedruckte Ressource") elsif any_match("@006Pos00__006Pos16", "[gkor]#b") - add_field("@facet_format", "Gedruckte Ressource") + add_field("@facet_format.$append", "Gedruckte Ressource") end if any_match("@LeaderPos06|@006Pos00", "[ef]") - add_field("@facet_format", "Landkarte") + add_field("@facet_format.$append", "Landkarte") elsif any_match("@007Pos00", "[ad]") - add_field("@facet_format", "Landkarte") + add_field("@facet_format.$append", "Landkarte") end # MARC/337, MARC/338 if any_equal("@007Pos00", "h") - add_field("@facet_format", "Mikroform") + add_field("@facet_format.$append", "Mikroform") elsif any_match("337 .a", "Mikroform|microform") - add_field("@facet_format", "Mikroform") + add_field("@facet_format.$append", "Mikroform") elsif any_equal("337 .b", "h") - add_field("@facet_format", "Mikroform") + add_field("@facet_format.$append", "Mikroform") elsif any_match("338 .a", "microfiche|microfilm roll") - add_field("@facet_format", "Mikroform") + add_field("@facet_format.$append", "Mikroform") elsif any_match("338 .b", "h[ej]") - add_field("@facet_format", "Mikroform") + add_field("@facet_format.$append", "Mikroform") elsif any_match("@type__008Pos29", "(?:M|VM)#[abc]") - add_field("@facet_format", "Mikroform") + add_field("@facet_format.$append", "Mikroform") elsif any_match("@006Pos00__006Pos12", "[efgkor]#[abc]") - add_field("@facet_format", "Mikroform") + add_field("@facet_format.$append", "Mikroform") elsif any_match("@006Pos00__006Pos06", "[acdijpst]#[abc]") - add_field("@facet_format", "Mikroform") + add_field("@facet_format.$append", "Mikroform") elsif any_match("@type__008Pos23", "(?:B|Mu|CR|MX)#[abc]") - add_field("@facet_format", "Mikroform") + add_field("@facet_format.$append", "Mikroform") end # MARC/338 if any_match("338 .a", "online bron|online resource|online-ressource|Online-Ressource|ressource en ligne") - add_field("@facet_format", "Online-Ressource") + add_field("@facet_format.$append", "Online-Ressource") elsif any_equal("338 .b", "cr") - add_field("@facet_format", "Online-Ressource") + add_field("@facet_format.$append", "Online-Ressource") elsif any_match("@type__008Pos23", "(?:B|Mu|CF|CR|MX)#o") - add_field("@facet_format", "Online-Ressource") + add_field("@facet_format.$append", "Online-Ressource") elsif any_match("@type__008Pos29", "(?:M|VM)#o") - add_field("@facet_format", "Online-Ressource") + add_field("@facet_format.$append", "Online-Ressource") elsif any_match("@006Pos00__006Pos06", "[acdijpstm]#o") - add_field("@facet_format", "Online-Ressource") + add_field("@facet_format.$append", "Online-Ressource") elsif any_match("@006Pos00__006Pos12", "[efgkor]#o") - add_field("@facet_format", "Online-Ressource") + add_field("@facet_format.$append", "Online-Ressource") end # MARC/338 if any_match("338 .a", "Gegenstand|Karte") - add_field("@facet_format", "Sonstiges") + add_field("@facet_format.$append", "Sonstiges") elsif any_match("338 .b", "n[or]") - add_field("@facet_format", "Sonstiges") + add_field("@facet_format.$append", "Sonstiges") elsif any_equal("@007Pos00__007Pos01", "t#c") - add_field("@facet_format", "Sonstiges") + add_field("@facet_format.$append", "Sonstiges") elsif any_match("@006Pos00__006Pos06", "[acdijpst]#f") - add_field("@facet_format", "Sonstiges") + add_field("@facet_format.$append", "Sonstiges") elsif any_match("@type__008Pos23", "(?:B|CR|Mu|MX)#f") - add_field("@facet_format", "Sonstiges") + add_field("@facet_format.$append", "Sonstiges") elsif any_match("@type__008Pos29", "(?:M|VM)#f") - add_field("@facet_format", "Sonstiges") + add_field("@facet_format.$append", "Sonstiges") elsif any_match("@006Pos00__006Pos12", "[efgkor]#f") - add_field("@facet_format", "Sonstiges") + add_field("@facet_format.$append", "Sonstiges") elsif any_equal("@type__008Pos33", "VM#p") - add_field("@facet_format", "Sonstiges") + add_field("@facet_format.$append", "Sonstiges") elsif any_equal("@006Pos00__006Pos16", "[gkor]#p") - add_field("@facet_format", "Sonstiges") + add_field("@facet_format.$append", "Sonstiges") end if any_equal("@006Pos00__006Pos09", "m#g") - add_field("@facet_format", "Spiel") + add_field("@facet_format.$append", "Spiel") elsif any_equal("@type__008Pos26", "CF#g") - add_field("@facet_format", "Spiel") + add_field("@facet_format.$append", "Spiel") elsif any_match("@type__008Pos33|@type__008Pos34", "M#[pn]") - add_field("@facet_format", "Spiel") + add_field("@facet_format.$append", "Spiel") elsif any_match("@006Pos00__006Pos16|@006Pos00__006Pos17", "[ef]#[pn]") - add_field("@facet_format", "Spiel") + add_field("@facet_format.$append", "Spiel") elsif any_equal("@type__008Pos33", "VM#g") - add_field("@facet_format", "Spiel") + add_field("@facet_format.$append", "Spiel") elsif any_match("@006Pos00__006Pos16", "[gkor]#g") - add_field("@facet_format", "Spiel") + add_field("@facet_format.$append", "Spiel") end # MARC/336 @@ -414,32 +414,32 @@ do list(path: "340??", "var": "$i") copy_field("$j", "@facet_format") end if any_match("$i.a", ".*(?:Audio|CD|Compact-Disc|Compact-Disk|Kompaktkassette|Magnetbandkassette|Schallpl\\.|Schallplatte|Tonkassette).*") - add_field("TypeMediaSpecial[]", "Audio") - add_field("@facet_format", "Audio") + add_field("TypeMediaSpecial[].$append", "Audio") + add_field("@facet_format.$append", "Audio") end if any_match("$i.a", ".*(?:Computerdatei|Diskette|E-Books|Einsteckmodul|Elektron\\. Ressource|Funknetz-Karte|Optische Speicherplatte|Optischer Datentraeger|Optischer Datenträger|USB-Stick).*") - add_field("TypeMediaSpecial[]", "Elektronische Ressource") - add_field("@facet_format", "Elektronische Ressource") + add_field("TypeMediaSpecial[].$append", "Elektronische Ressource") + add_field("@facet_format.$append", "Elektronische Ressource") end if any_match("$i.a", ".*(?:Blu-ray Disc|Blu-ray-Disc|Blue-Ray|BlueRay|Tonbildreihe|VHS|Video).*") - add_field("TypeMediaSpecial[]", "Film, Dia, Video") - add_field("@facet_format", "Film, Dia, Video") + add_field("TypeMediaSpecial[].$append", "Film, Dia, Video") + add_field("@facet_format.$append", "Film, Dia, Video") end if any_match("$i.a", ".*Musikdruck.*") - add_field("TypeMediaSpecial[]", "Gedruckte Ressource") - add_field("@facet_format", "Gedruckte Ressource") + add_field("TypeMediaSpecial[].$append", "Gedruckte Ressource") + add_field("@facet_format.$append", "Gedruckte Ressource") end if any_match("$i.a", ".*(?:Microfiche|Mikrofiche|Mikrofilm).*") - add_field("TypeMediaSpecial[]", "Mikroform") - add_field("@facet_format", "Mikroform") + add_field("TypeMediaSpecial[].$append", "Mikroform") + add_field("@facet_format.$append", "Mikroform") end if any_match("$i.a", ".*(?:Computerdatei im Fernzugriff|Internet|Online Ressource|Online-Ausg\\.|Online-Resource|Online-Ressource).*") - add_field("TypeMediaSpecial[]", "Online-Ressource") - add_field("@facet_format", "Online-Ressource") + add_field("TypeMediaSpecial[].$append", "Online-Ressource") + add_field("@facet_format.$append", "Online-Ressource") end if any_match("$i.a", ".*Arbeitstransparent.*") - add_field("TypeMediaSpecial[]", "Sonstiges") - add_field("@facet_format", "Sonstiges") + add_field("TypeMediaSpecial[].$append", "Sonstiges") + add_field("@facet_format.$append", "Sonstiges") end end # MARC/538, MARC/583 @@ -454,136 +454,136 @@ uniq("TypeMonograph[]") uniq("introx.music[]") if any_match("@type__008Pos28", "(?:B|CF|CR|M|VM)#[acfilmosz]") - add_field("@facet_type", "Amtliche Druckschrift") + add_field("@facet_type.$append", "Amtliche Druckschrift") elsif any_match("@006Pos00__006Pos11", "[aefgkmorst]#[acfilmosz]") - add_field("@facet_type", "Amtliche Druckschrift") + add_field("@facet_type.$append", "Amtliche Druckschrift") end if any_equal("@type__008Pos33", "B#e") - add_field("@facet_type", "Aufsatz") + add_field("@facet_type.$append", "Aufsatz") elsif any_match("@006Pos00__006Pos16", "[at]#e") - add_field("@facet_type", "Aufsatz") + add_field("@facet_type.$append", "Aufsatz") elsif any_match("@type__008Pos24|@type__008Pos25|@type__008Pos26|@type__008Pos27", "(?:B|CR)#g") - add_field("@facet_type", "Aufsatz") + add_field("@facet_type.$append", "Aufsatz") elsif any_match("@006Pos00__006Pos07|@006Pos00__006Pos08|@006Pos00__006Pos09|@006Pos00__006Pos10", "[ast]#g") - add_field("@facet_type", "Aufsatz") + add_field("@facet_type.$append", "Aufsatz") end if any_match("@type__008Pos24|@type__008Pos25|@type__008Pos26|@type__008Pos27", "(?:B|CR)#[bknq]") - add_field("@facet_type", "Bibliografie") + add_field("@facet_type.$append", "Bibliografie") elsif any_match("@006Pos00__006Pos07|@006Pos00__006Pos08|@006Pos00__006Pos09|@006Pos00__006Pos10", "[ast]#[bknq]") - add_field("@facet_type", "Bibliografie") + add_field("@facet_type.$append", "Bibliografie") elsif any_equal("@type__008Pos26", "CF#e") - add_field("@facet_type", "Bibliografie") + add_field("@facet_type.$append", "Bibliografie") elsif any_equal("@006Pos00__006Pos09", "m#e") - add_field("@facet_type", "Bibliografie") + add_field("@facet_type.$append", "Bibliografie") end if any_match("@type__008Pos34", "B#[abc]") - add_field("@facet_type", "Biografie") + add_field("@facet_type.$append", "Biografie") elsif any_match("@006Pos00__006Pos17", "[at]#[abc]") - add_field("@facet_type", "Biografie") + add_field("@facet_type.$append", "Biografie") elsif any_match("@type__008Pos30|@type__008Pos31", "Mu#[ab]") - add_field("@facet_type", "Biografie") + add_field("@facet_type.$append", "Biografie") elsif any_match("@006Pos00__006Pos13|@006Pos00__006Pos14", "[cdij]#[ab]") - add_field("@facet_type", "Biografie") + add_field("@facet_type.$append", "Biografie") elsif any_equal("@type__008Pos24|@type__008Pos25|@type__008Pos26|@type__008Pos27", "CR#h") - add_field("@facet_type", "Biografie") + add_field("@facet_type.$append", "Biografie") elsif any_equal("@006Pos00__006Pos07|@006Pos00__006Pos08|@006Pos00__006Pos09|@006Pos00__006Pos10", "s#h") - add_field("@facet_type", "Biografie") + add_field("@facet_type.$append", "Biografie") end if any_equal("@type__008Pos30", "B#1") - add_field("@facet_type", "Festschrift") + add_field("@facet_type.$append", "Festschrift") elsif any_match("@006Pos00__006Pos13", "[at]#1") - add_field("@facet_type", "Festschrift") + add_field("@facet_type.$append", "Festschrift") end if any_match("@type__008Pos24|@type__008Pos25|@type__008Pos26|@type__008Pos27", "(?:B|CR)#l") - add_field("@facet_type", "Gesetz") + add_field("@facet_type.$append", "Gesetz") elsif any_match("@006Pos00__006Pos07|@006Pos00__006Pos08|@006Pos00__006Pos09|@006Pos00__006Pos10", "[ast]#l") - add_field("@facet_type", "Gesetz") + add_field("@facet_type.$append", "Gesetz") end if any_match("@type__008Pos24|@type__008Pos25|@type__008Pos26|@type__008Pos27", "(?:B|CR)#m") - add_field("@facet_type", "Hochschulschrift") + add_field("@facet_type.$append", "Hochschulschrift") elsif any_match("@006Pos00__006Pos07|@006Pos00__006Pos08|@006Pos00__006Pos09|@006Pos00__006Pos10", "[ast]#m") - add_field("@facet_type", "Hochschulschrift") + add_field("@facet_type.$append", "Hochschulschrift") end if any_match("@type__008Pos29", "(?:B|CR)#1") - add_field("@facet_type", "Konferenzschrift") + add_field("@facet_type.$append", "Konferenzschrift") elsif any_match("@006Pos00__006Pos12", "[ast]#1") - add_field("@facet_type", "Konferenzschrift") + add_field("@facet_type.$append", "Konferenzschrift") elsif any_equal("@type__008Pos30|@type__008Pos31", "Mu#c") - add_field("@facet_type", "Konferenzschrift") + add_field("@facet_type.$append", "Konferenzschrift") elsif any_match("@006Pos00__006Pos13|@006Pos00__006Pos14", "[cdij]#c") - add_field("@facet_type", "Konferenzschrift") + add_field("@facet_type.$append", "Konferenzschrift") end if any_match("@LeaderPos07", "[adm]") if none_equal("@LeaderPos19", "a") - add_field("@facet_type", "Monographie") + add_field("@facet_type.$append", "Monographie") end end if any_match("@LeaderPos06|@006Pos00", "[cdj]") - add_field("@facet_type", "Musikalia") + add_field("@facet_type.$append", "Musikalia") elsif any_equal("@007Pos00", "q") - add_field("@facet_type", "Musikalia") + add_field("@facet_type.$append", "Musikalia") end if any_match("@type__008Pos24|@type__008Pos25|@type__008Pos26|@type__008Pos27", "(?:B|CR)#[der]") - add_field("@facet_type", "Nachschlagewerk") + add_field("@facet_type.$append", "Nachschlagewerk") elsif any_match("@006Pos00__006Pos07|@006Pos00__006Pos08|@006Pos00__006Pos09|@006Pos00__006Pos10", "[ast]#[der]") - add_field("@facet_type", "Nachschlagewerk") + add_field("@facet_type.$append", "Nachschlagewerk") end if any_match("@type__008Pos24|@type__008Pos25|@type__008Pos26|@type__008Pos27", "(?:B|CR)#u") - add_field("@facet_type", "Norm") + add_field("@facet_type.$append", "Norm") elsif any_match("@006Pos00__006Pos07|@006Pos00__006Pos08|@006Pos00__006Pos09|@006Pos00__006Pos10", "[ast]#u") - add_field("@facet_type", "Norm") + add_field("@facet_type.$append", "Norm") end if any_equal("@LeaderPos07", "c") - add_field("@facet_type", "Schriftenreihe") + add_field("@facet_type.$append", "Schriftenreihe") elsif any_equal("@LeaderPos19", "a") - add_field("@facet_type", "Schriftenreihe") + add_field("@facet_type.$append", "Schriftenreihe") elsif any_equal("@type__008Pos21", "CR#m") - add_field("@facet_type", "Schriftenreihe") + add_field("@facet_type.$append", "Schriftenreihe") elsif any_equal("@006Pos00__006Pos04", "s#m") - add_field("@facet_type", "Schriftenreihe") + add_field("@facet_type.$append", "Schriftenreihe") end if any_equal("@007Pos00__007Pos01", "t#d") - add_field("@facet_type", "Sonstiges") + add_field("@facet_type.$append", "Sonstiges") elsif any_equal("@type__008Pos33|@type__008Pos34", "M#r") - add_field("@facet_type", "Sonstiges") + add_field("@facet_type.$append", "Sonstiges") elsif any_match("@006Pos00__006Pos16|@006Pos00__006Pos17", "[ef]#r") - add_field("@facet_type", "Sonstiges") + add_field("@facet_type.$append", "Sonstiges") elsif any_match("@type__008Pos24|@type__008Pos25|@type__008Pos26|@type__008Pos27", "(?:B|CR)#[acis]") - add_field("@facet_type", "Sonstiges") + add_field("@facet_type.$append", "Sonstiges") elsif any_match("@006Pos00__006Pos07|@006Pos00__006Pos08|@006Pos00__006Pos09|@006Pos00__006Pos10", "[ast]#[acis]") - add_field("@facet_type", "Sonstiges") + add_field("@facet_type.$append", "Sonstiges") elsif any_match("@type__008Pos24|@type__008Pos25|@type__008Pos26|@type__008Pos27", "B#[j2]") - add_field("@facet_type", "Sonstiges") + add_field("@facet_type.$append", "Sonstiges") elsif any_match("@006Pos00__006Pos07|@006Pos00__006Pos08|@006Pos00__006Pos09|@006Pos00__006Pos10", "[at]#[j2]") - add_field("@facet_type", "Sonstiges") + add_field("@facet_type.$append", "Sonstiges") elsif any_equal("@type__008Pos33", "B#m") - add_field("@facet_type", "Sonstiges") + add_field("@facet_type.$append", "Sonstiges") elsif any_match("@006Pos00__006Pos16", "[at]#m") - add_field("@facet_type", "Sonstiges") + add_field("@facet_type.$append", "Sonstiges") elsif any_equal("@type__008Pos21", "CR#l") - add_field("@facet_type", "Sonstiges") + add_field("@facet_type.$append", "Sonstiges") elsif any_equal("@006Pos00__006Pos04", "s#l") - add_field("@facet_type", "Sonstiges") + add_field("@facet_type.$append", "Sonstiges") end if any_match("@type__008Pos21", "CR#[np]") - add_field("@facet_type", "Zeitschrift") + add_field("@facet_type.$append", "Zeitschrift") elsif any_equal("@type__008Pos24|@type__008Pos25|@type__008Pos26|@type__008Pos27", "CR#y") - add_field("@facet_type", "Zeitschrift") + add_field("@facet_type.$append", "Zeitschrift") elsif any_match("@006Pos00__006Pos04", "s#[np]") - add_field("@facet_type", "Zeitschrift") + add_field("@facet_type.$append", "Zeitschrift") elsif any_equal("@006Pos00__006Pos07|@006Pos00__006Pos08|@006Pos00__006Pos09|@006Pos00__006Pos10", "s#y") - add_field("@facet_type", "Zeitschrift") + add_field("@facet_type.$append", "Zeitschrift") end if exists("700??") unless exists("100??") - add_field("@facet_type", "Sammelwerk") + add_field("@facet_type.$append", "Sammelwerk") filter("@facet_type", "^Monographie$", invert: "true") end end if any_equal("@facet_type", "Datenbank") - add_field("@facet_format", "Datenbank") + add_field("@facet_format.$append", "Datenbank") if exists("@facet_type.1") filter("@facet_type", "^Datenbank$", invert: "true") else @@ -751,7 +751,7 @@ end do list(path: "245??.n", "var": "$i") unless exists("VolumeDesignation.volumeDesignation") - add_field("@facet_type", "Teil eines Werkes") + add_field("@facet_type.$append", "Teil eines Werkes") replace_all("$i", "\\s?[,./:=]?\\s?$", "") copy_field("$i", "VolumeDesignation.volumeDesignation") end @@ -762,7 +762,7 @@ set_array("RecordIdentifierSuper[]") set_array("SortableVolumeDesignation[]") do list(path: "7730?", "var": "$i") if exists("$i.q") - add_field("@facet_type", "Teil eines Werkes") + add_field("@facet_type.$append", "Teil eines Werkes") add_field("SortableVolumeDesignation[].$append.__dummy__", "") copy_field("$i.q", "SortableVolumeDesignation[].$last.volumeDesignation") end @@ -782,10 +782,11 @@ end if exists("@facet_format") uniq("@facet_format") + set_array("dc.format[]") copy_field("@facet_format", "dc.format[]") if any_equal("@facet_format", "Online-Ressource") if none_equal("@facet_format", "Elektronische Ressource") - add_field("dc.format[]", "Elektronische Ressource") + add_field("dc.format[].$append", "Elektronische Ressource") end end else