diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 8e3210fc9..26b6a9d2b 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -30,7 +30,7 @@ jobs:
cd ..
git clone https://github.com/metafacture/metafacture-fix.git
cd metafacture-fix
- git checkout 1.1.2
+ git checkout 1.2.0
./gradlew publishToMavenLocal
cd -
- name: Build with Maven
diff --git a/pom.xml b/pom.xml
index 2c1eff2fc..d00465cbe 100644
--- a/pom.xml
+++ b/pom.xml
@@ -15,17 +15,17 @@
org.metafacture
metafacture-io
- 6.1.2
+ 6.2.0
org.metafacture
metafacture-files
- 6.1.2
+ 6.2.0
org.metafacture
metafacture-json
- 6.1.2
+ 6.2.0
commons-logging
@@ -40,72 +40,72 @@
org.metafacture
metafacture-biblio
- 6.1.2
+ 6.2.0
org.metafacture
metafacture-formeta
- 6.1.2
+ 6.2.0
org.metafacture
metafacture-monitoring
- 6.1.2
+ 6.2.0
org.metafacture
metafacture-strings
- 6.1.2
+ 6.2.0
org.metafacture
metafacture-formatting
- 6.1.2
+ 6.2.0
org.metafacture
metafacture-elasticsearch
- 6.1.2
+ 6.2.0
org.metafacture
metafacture-csv
- 6.1.2
+ 6.2.0
org.metafacture
metafacture-flowcontrol
- 6.1.2
+ 6.2.0
org.metafacture
metamorph
- 6.1.2
+ 6.2.0
org.metafacture
metafacture-plumbing
- 6.1.2
+ 6.2.0
org.metafacture
metamorph-test
- 6.1.2
+ 6.2.0
org.metafacture
metafacture-xml
- 6.1.2
+ 6.2.0
org.metafacture
metafacture-mangling
- 6.1.2
+ 6.2.0
org.metafacture
metafix
- 1.1.2
+ 1.2.0
log4j
diff --git a/src/main/resources/alma/alma.fix b/src/main/resources/alma/alma.fix
index 79394bc33..0451bcf57 100644
--- a/src/main/resources/alma/alma.fix
+++ b/src/main/resources/alma/alma.fix
@@ -25,8 +25,8 @@ add_field("@context","http://lobid.org/resources/context.jsonld")
# Set empty elements to manipulate the order winthin the record.
add_field("id","")
-set_array("type[]")
-set_array("medium[]")
+add_array("type[]")
+add_array("medium[]")
add_field("title","")
do list(path:"880??","var":"$i")
@@ -38,7 +38,7 @@ do list(path:"880??","var":"$i")
replace_all("$i.@script.label","(\\d{3}-\\d{2})/(.*)","$2")
lookup("$i.@script.label","ISO15924-to-script")
end
-set_array("alternateGraphicRepresentation[]")
+add_array("alternateGraphicRepresentation[]")
include ("./fix/identifiers.fix")
include ("./fix/titleRelatedFields.fix")
diff --git a/src/main/resources/alma/fix/contribution.fix b/src/main/resources/alma/fix/contribution.fix
index 75aba401e..c76a39927 100644
--- a/src/main/resources/alma/fix/contribution.fix
+++ b/src/main/resources/alma/fix/contribution.fix
@@ -1,9 +1,9 @@
# 245 - Title Statement (NR) - Subfield: $c (NR)
-set_array("responsibilityStatement[]")
+add_array("responsibilityStatement[]")
copy_field("245??.c", "responsibilityStatement[].$append")
-set_array("contribution[]")
+add_array("contribution[]")
# 100 and 700
@@ -31,7 +31,7 @@ do list(path:"100[01] ", "var":"$i")
end
end
do list(path: "$i.4", "var":"$j")
- set_hash("contribution[].$append.agent")
+ add_hash("contribution[].$append.agent")
do list(path:"$i.0","var":"$k")
if all_match("$k", "^\\(DE-588\\).*$")
# GND identifier
@@ -58,7 +58,7 @@ do list(path:"100[01] ", "var":"$i")
call_macro("gndPersonCombinedLabel",field:"$i")
copy_field("$i.@combinedLabel","contribution[].$last.agent.label")
# type
- set_array("contribution[].$last.agent.type[]","Person")
+ add_array("contribution[].$last.agent.type[]","Person")
# role
copy_field("$j","contribution[].$last.role.id")
# dateOfBirthAndDeath #will be split on a later stage
@@ -83,7 +83,7 @@ do list(path:"700[01] ", "var":"$i")
add_field("$i.4","ctb")
end
do list(path: "$i.4", "var":"$j")
- set_hash("contribution[].$append.agent")
+ add_hash("contribution[].$append.agent")
do list(path:"$i.0","var":"$k")
if all_match("$k", "^\\(DE-588\\).*$")
# GND identifier
@@ -110,7 +110,7 @@ do list(path:"700[01] ", "var":"$i")
call_macro("gndPersonCombinedLabel",field:"$i")
copy_field("$i.@combinedLabel","contribution[].$last.agent.label")
# type
- set_array("contribution[].$last.agent.type[]","Person")
+ add_array("contribution[].$last.agent.type[]","Person")
# role
copy_field("$j","contribution[].$last.role.id")
# dateOfBirthAndDeath #will be split on a later stage
@@ -145,7 +145,7 @@ do list(path:"110[012] ", "var":"$i")
end
end
do list(path: "$i.4", "var":"$j")
- set_hash("contribution[].$append.agent")
+ add_hash("contribution[].$append.agent")
do list(path:"$i.0","var":"$k")
if all_match("$k", "^\\(DE-588\\).*$")
# GND identifier
@@ -172,7 +172,7 @@ do list(path:"110[012] ", "var":"$i")
call_macro("gndOtherCombinedLabel",field:"$i")
copy_field("$i.@combinedLabel", "contribution[].$last.agent.label")
# type
- set_array("contribution[].$last.agent.type[]","CorporateBody")
+ add_array("contribution[].$last.agent.type[]","CorporateBody")
# role
copy_field("$j","contribution[].$last.role.id")
call_macro("alternateGraphicRepresationArrayOfObjects",targetArray:"contribution[]",targetField:".agent",variable:"$i")
@@ -194,7 +194,7 @@ do list(path:"710[012] ", "var":"$i")
add_field("$i.4","ctb")
end
do list(path: "$i.4", "var":"$j")
- set_hash("contribution[].$append.agent")
+ add_hash("contribution[].$append.agent")
do list(path:"$i.0","var":"$k")
if all_match("$k", "^\\(DE-588\\).*$")
# GND identifier
@@ -221,7 +221,7 @@ do list(path:"710[012] ", "var":"$i")
call_macro("gndOtherCombinedLabel",field:"$i")
copy_field("$i.@combinedLabel", "contribution[].$last.agent.label")
# type
- set_array("contribution[].$last.agent.type[]","CorporateBody")
+ add_array("contribution[].$last.agent.type[]","CorporateBody")
# role
copy_field("$j","contribution[].$last.role.id")
call_macro("alternateGraphicRepresationArrayOfObjects",targetArray:"contribution[]",targetField:".agent",variable:"$i")
@@ -242,7 +242,7 @@ do list(path:"111[012] |711[012] ", "var":"$i")
add_field("$i.4","oth")
end
do list(path: "$i.4", "var":"$j")
- set_hash("contribution[].$append.agent")
+ add_hash("contribution[].$append.agent")
do list(path:"$i.0","var":"$k")
if all_match("$k", "^\\(DE-588\\).*$")
# GND identifier
@@ -269,7 +269,7 @@ do list(path:"111[012] |711[012] ", "var":"$i")
call_macro("gndEventCombinedLabel",field:"$i")
copy_field("$i.@combinedLabel", "contribution[].$last.agent.label")
# type
- set_array("contribution[].$last.agent.type[]","ConferenceOrEvent")
+ add_array("contribution[].$last.agent.type[]","ConferenceOrEvent")
# role
copy_field("$j","contribution[].$last.role.id")
call_macro("alternateGraphicRepresationArrayOfObjects",targetArray:"contribution[]",targetField:".agent",variable:"$i")
@@ -278,7 +278,7 @@ do list(path:"111[012] |711[012] ", "var":"$i")
end
-set_array("contribution[].*.type[]", "Contribution")
+add_array("contribution[].*.type[]", "Contribution")
replace_all("contribution[].*.agent.id","^\\(DE-588\\)(.*$)","https://d-nb.info/gnd/$1")
replace_all("contribution[].*.agent.gndIdentifier","^\\(DE-588\\)(.*$)","$1")
replace_all("contribution[].*.agent.label","(?>","")
# it describes the relation between a published ressource and its superordinate series or collection.
# in contrast to containedIn it is a standalone publication
-set_array("isPartOf[]")
+add_array("isPartOf[]")
# 773 - Host Item Entry (R) Subfield: $w (NR), $t (NR), $q (NR)
@@ -85,16 +85,16 @@ unless any_match("leader", "^.{7}[ad].*")
do list(path: "773??", "var": "$i")
unless any_equal("$i.9","LOCAL")
do list(path: "$i.w", "var": "$j")
- set_array("isPartOf[].$append.type[]", "IsPartOfRelation")
- set_array("isPartOf[].$last.hasSuperordinate[]")
- set_hash( "isPartOf[].$last.hasSuperordinate[].$append")
+ add_array("isPartOf[].$append.type[]", "IsPartOfRelation")
+ add_array("isPartOf[].$last.hasSuperordinate[]")
+ add_hash( "isPartOf[].$last.hasSuperordinate[].$append")
if all_match("$j", "^\\((?:DE-600|DE-605)\\)(.*)$")
copy_field("$j", "isPartOf[].$last.hasSuperordinate[].$last.id")
end
copy_field("$i.t", "isPartOf[].$last.hasSuperordinate[].$last.label")
call_macro("alternateGraphicRepresationIsPartOf",variable:"$i")
copy_field("$i.q", "isPartOf[].$last.numbering")
- set_array("isPartOf[].$last.note[]")
+ add_array("isPartOf[].$last.note[]")
do list(path:"$i.i","var":"$j")
copy_field("$j","isPartOf[].$last.note[].$append")
end
@@ -107,17 +107,17 @@ end
# 490 with 1. Indicator 1 has an identical entry in 830. So only 490 with 1. Indicator 0
do list(path: "4900?", "var": "$i")
- set_array("isPartOf[].$append.type[]", "IsPartOfRelation")
- set_array("isPartOf[].$last.hasSuperordinate[]")
- set_hash( "isPartOf[].$last.hasSuperordinate[].$append")
- set_array("isPartOf[].$last.hasSuperordinate[].$last.label")
+ add_array("isPartOf[].$append.type[]", "IsPartOfRelation")
+ add_array("isPartOf[].$last.hasSuperordinate[]")
+ add_hash( "isPartOf[].$last.hasSuperordinate[].$append")
+ add_array("isPartOf[].$last.hasSuperordinate[].$last.label")
do list(path:"$i.a", "var":"$j")
copy_field("$j", "isPartOf[].$last.hasSuperordinate[].$last.label.$append")
end
join_field("isPartOf[].$last.hasSuperordinate[].$last.label", " / ")
call_macro("alternateGraphicRepresationIsPartOf",variable:"$i")
- set_array("isPartOf[].$last.numbering")
+ add_array("isPartOf[].$last.numbering")
do list(path:"$i.v", "var":"$j")
copy_field("$j", "isPartOf[].$last.numbering.$append")
end
@@ -129,13 +129,13 @@ end
# Element can be repeatable with local entries they have subfield $M.
do list(path: "830??", "var": "$i")
- set_array("isPartOf[].$append.type[]", "IsPartOfRelation")
- set_array("isPartOf[].$last.hasSuperordinate[]")
- set_hash( "isPartOf[].$last.hasSuperordinate[].$append")
+ add_array("isPartOf[].$append.type[]", "IsPartOfRelation")
+ add_array("isPartOf[].$last.hasSuperordinate[]")
+ add_hash( "isPartOf[].$last.hasSuperordinate[].$append")
if all_match("$i.w", "^\\((?:DE-600|DE-605)\\)(.*)$")
copy_field("$i.w", "isPartOf[].$last.hasSuperordinate[].$last.id")
end
- set_array("isPartOf[].$last.hasSuperordinate[].$last.label")
+ add_array("isPartOf[].$last.hasSuperordinate[].$last.label")
do list(path:"$i.a", "var":"$j")
copy_field("$j", "isPartOf[].$last.hasSuperordinate[].$last.label.$append")
end
@@ -154,7 +154,7 @@ replace_all("isPartOf[].*.hasSuperordinate[].*.label","<<|>>","")
# containedIn
# containedIn only states ressources that are not published by them self but as part of a host ressource.
-set_array("containedIn[]")
+add_array("containedIn[]")
# 773 - Host Item Entry (R) - $w (R)
@@ -163,15 +163,15 @@ if any_match("leader", "^.{7}[ad].*")
do list(path: "773??", "var": "$i")
unless any_equal("$i.9","LOCAL")
do list(path: "$i.w", "var": "$j")
- set_array("isPartOf[].$append.type[]", "IsPartOfRelation")
- set_array("isPartOf[].$last.hasSuperordinate[]")
- set_hash( "isPartOf[].$last.hasSuperordinate[].$append")
+ add_array("isPartOf[].$append.type[]", "IsPartOfRelation")
+ add_array("isPartOf[].$last.hasSuperordinate[]")
+ add_hash( "isPartOf[].$last.hasSuperordinate[].$append")
if all_match("$j", "^\\((?:DE-600|DE-605)\\)(.*)$")
copy_field("$j", "isPartOf[].$last.hasSuperordinate[].$last.id")
end
copy_field("$i.t", "isPartOf[].$last.hasSuperordinate[].$last.label")
copy_field("$i.q", "isPartOf[].$last.numbering")
- set_array("isPartOf[].$last.note[]")
+ add_array("isPartOf[].$last.note[]")
do list(path:"$i.i","var":"$j")
copy_field("$j","isPartOf[].$last.note[].$append")
end
@@ -182,7 +182,7 @@ if any_match("leader", "^.{7}[ad].*")
do list(path:"773??", "var":"$i")
do list(path:"$i.w", "var":"$j")
if any_match("$j","^\\(DE-(600|605)\\).*")
- set_hash( "containedIn[].$append")
+ add_hash( "containedIn[].$append")
copy_field("$j","containedIn[].$last.id")
copy_field("$i.t","containedIn[].$last.label")
end
@@ -212,17 +212,17 @@ uniq("containedIn[]")
# 776 - Additional Physical Form Entry (R) - $i (R), $w (R)
-set_array("primaryForm[]")
+add_array("primaryForm[]")
do list(path: "77608", "var":"$i")
if any_match ("$i.i", ".*eproduktion von.*")
- set_hash( "primaryForm[].$append")
+ add_hash( "primaryForm[].$append")
if all_match("$i.w", "^\\((?:DE-600|DE-605)\\)(.*)$")
copy_field("$i.w", "primaryForm[].$last.id")
end
paste("primaryForm[].$last.label", "$i.i", "$i.w")
replace_all("primaryForm[].$last.label", "\\((?:DE-600|DE-605)\\)", "")
- set_array("primaryForm[].$last.note[]")
+ add_array("primaryForm[].$last.note[]")
do list(path:"$i.i","var":"$j")
copy_field("$j","primaryForm[].$last.note[].$append")
end
@@ -234,11 +234,11 @@ replace_all("primaryForm[].*.id", "^\\(DE-600\\)(.*)$", "http://lobid.org/resour
# secondaryForm
-set_array("secondaryForm[]")
+add_array("secondaryForm[]")
do list(path: "77608", "var":"$i")
if any_match ("$i.i", ".*eproduktion")
- set_hash( "secondaryForm[].$append")
+ add_hash( "secondaryForm[].$append")
if all_match("$i.w", "^\\((?:DE-600|DE-605)\\)(.*)$")
do list(path:"$i.w", "var":"$j")
replace_all("$j", "^\\(DE-605\\)(.*)$", "http://lobid.org/resources/$1#!")
@@ -254,7 +254,7 @@ end
# 856 - Electronic Location and Access (R) - Subfield: $u (R) $3 (NR)
# 1. Indicator: 4 = HTTP
-set_array("tableOfContents[]")
+add_array("tableOfContents[]")
do list(path: "856??", "var":"$i")
if all_match("$i.3", "^[Ii][Nn][Hh][aA][lL][tT][sS][vV].*") # Inhaltsverzeichnis
@@ -263,7 +263,7 @@ do list(path: "856??", "var":"$i")
end
end
-set_array("description[]")
+add_array("description[]")
do list(path: "856??", "var":"$i")
if all_match("$i.3", "^[Ii][Nn][Hh][aA][lL][tT][sS][tT].*") # Inhaltstext
@@ -272,7 +272,7 @@ do list(path: "856??", "var":"$i")
end
end
-set_array("seeAlso[]")
+add_array("seeAlso[]")
do list(path: "856??", "var":"$i")
if all_match("$i.3", "^[zZ][uU][sS].*") # Zusätzliche Angaben
@@ -281,7 +281,7 @@ do list(path: "856??", "var":"$i")
end
end
-set_array("fulltextOnline[]")
+add_array("fulltextOnline[]")
do list(path: "856??", "var":"$i")
if exists("$i.u")
@@ -361,22 +361,22 @@ end
# 775 - Other Edition Entry (R) - Subfield: $w (R), $t (NR), $i (R), $n (R), $x(NR), $z (R)
# 776 - Additional Physical Form Entry (R) - Subfield: $w (R), $t (NR), $i (R), $n (R), $x (NR), $z (R)
-set_array("related[]")
+add_array("related[]")
do list(path:"775??|776??", "var":"$i")
unless any_match ("$i.i", ".*eproduktion von.*|.*eproduktion")
do list_as("$hbzId":"$i.w", "$isbn":"$i.z", "$label":"$i.t", "$note":"$i.n", "$issn":"$i.x", "$info":"$i.i")
unless in("$isbn", "related[].*.isbn[]") # Skip duplicates
- set_hash("related[].$append")
+ add_hash("related[].$append")
if all_match("$hbzId", "^\\((DE-600|DE-605)\\).*$")
copy_field("$hbzId", "related[].$last.id")
end
- set_array("related[].$last.note[]")
+ add_array("related[].$last.note[]")
paste("related[].$last.note[].$append","$info", "$note")
replace_all("related[].$last.note[].$last", "Erscheint auch als ","")
copy_field("$label", "related[].$last.label")
- set_array("related[].$last.issn[]")
+ add_array("related[].$last.issn[]")
copy_field("$issn", "related[].$last.issn[].$append")
- set_array("related[].$last.isbn[]")
+ add_array("related[].$last.isbn[]")
isbn("$isbn", to:"isbn13")
copy_field("$isbn", "related[].$last.isbn[].$append")
isbn("$isbn", to:"isbn10")
@@ -395,10 +395,10 @@ end
do list(path: "50580", "var":"$i")
if any_match("$i.6","[A-Z]{2}\\d*")
- set_hash("related[].$append")
+ add_hash("related[].$append")
paste("related[].$last.id","~http://lobid.org/resources/","$i.6","~#!",join_char:"")
copy_field("$i.t","related[].$last.label")
- set_array("related[].$last.note[]")
+ add_array("related[].$last.note[]")
copy_field("$i.g","related[].$last.note[].$append")
end
end
@@ -407,7 +407,7 @@ replace_all("related[].*.id", "^\\(DE-605\\)(.*)$", "http://lobid.org/resources/
replace_all("related[].*.id", "^\\(DE-600\\)(.*)$", "http://lobid.org/resources/ZDB-$1#!")
replace_all("related[].*.label","<<|>>","")
-set_array("inCollection[]")
+add_array("inCollection[]")
# hbz NZ
# digiBib hbz Vk
@@ -577,17 +577,17 @@ end
# end
-set_array("inCollection[].*.type[]","Collection")
+add_array("inCollection[].*.type[]","Collection")
# predecessor
# 780 - Preceding Entry (R) - Subfield: $t (NR), $w (R)
-set_array("predecessor[]")
+add_array("predecessor[]")
do list(path:"780??", "var":"$i")
- set_hash( "predecessor[].$append")
+ add_hash( "predecessor[].$append")
copy_field("$i.t", "predecessor[].$last.label")
do list(path:"$i.w", "var":"$j")
if all_match("$j", "^\\((?:DE-600|DE-605)\\)(.*)$")
@@ -595,7 +595,7 @@ do list(path:"780??", "var":"$i")
end
end
replace_all("predecessor[].$last.label", "\\((?:DE-600|DE-605)\\)", "")
- set_array("predecessor[].$last.note[]")
+ add_array("predecessor[].$last.note[]")
do list(path:"$i.i","var":"$j")
copy_field("$j","predecessor[].$last.note[].$append")
end
@@ -611,17 +611,17 @@ replace_all("predecessor[].*.label","Vorg. ---> ","")
# 785 - Succeeding Entry (R) - Subfield: $t (NR), $w (R)
-set_array("successor[]")
+add_array("successor[]")
do list(path:"785??", "var":"$i")
- set_hash( "successor[].$append")
+ add_hash( "successor[].$append")
copy_field("$i.t", "successor[].$last.label")
do list(path:"$i.w", "var":"$j")
if all_match("$j", "^\\((?:DE-600|DE-605)\\)(.*)$")
copy_field("$j", "successor[].$last.id")
end
end
- set_array("successor[].$last.note[]")
+ add_array("successor[].$last.note[]")
do list(path:"$i.i","var":"$j")
copy_field("$j","successor[].$last.note[].$append")
end
@@ -633,7 +633,7 @@ replace_all("successor[].*.id", "^\\(DE-600\\)(.*)$", "http://lobid.org/resource
# 130 - Main Entry-Uniform Title (NR)
-set_array("exampleOfWork.label")
+add_array("exampleOfWork.label")
copy_field("1300 .a", "exampleOfWork.label.$append")
copy_field("1300 .g", "exampleOfWork.label.$append")
do list(path: "1300 .0", "var":"$i")
@@ -654,16 +654,16 @@ end
join_field("exampleOfWork.label", " ")
unless any_equal("exampleOfWork.label", "")
- set_array("exampleOfWork.type[]","Work")
+ add_array("exampleOfWork.type[]","Work")
end
replace_all("exampleOfWork.label","<<|>>","")
# 041 h|k - Language code of original and/or intermediate translations of text
-set_array("lang_temp")
+add_array("lang_temp")
copy_field("041[ 01] .[hk]", "lang_temp.$append")
-set_array("exampleOfWork.language[]")
+add_array("exampleOfWork.language[]")
do list(path:"lang_temp", "var": "$i")
copy_field("$i","exampleOfWork.language[].$append.id")
copy_field("$i","exampleOfWork.language[].$last.label")
@@ -679,10 +679,10 @@ prepend("exampleOfWork.language[].*.id", "http://id.loc.gov/vocabulary/iso639-2/
# 711 - Added Entry-Meeting Name (R)
# 730 - Added Entry-Uniform Title (R)
-set_array("containsExampleOfWork[]")
+add_array("containsExampleOfWork[]")
do list(path:"700?2|710?2|711?2|730?2", "var": "$i")
- set_array("containsExampleOfWork[].$append.label")
- set_array("containsExampleOfWork[].$last.creatorOfWork")
+ add_array("containsExampleOfWork[].$append.label")
+ add_array("containsExampleOfWork[].$last.creatorOfWork")
copy_field("$i.a","containsExampleOfWork[].$last.creatorOfWork.$append")
copy_field("$i.d","containsExampleOfWork[].$last.creatorOfWork.$append")
copy_field("$i.t","containsExampleOfWork[].$last.label.$append")
@@ -693,8 +693,8 @@ do list(path:"700?2|710?2|711?2|730?2", "var": "$i")
join_field("containsExampleOfWork[].$last.creatorOfWork", " ")
copy_field("$i.n","containsExampleOfWork[].$last.workNumbering")
copy_field("$i.r","containsExampleOfWork[].$last.musicalKey")
- set_array("containsExampleOfWork[].$last.type[]","Work")
- set_array("containsExampleOfWork[].$last.instrumentation[]")
+ add_array("containsExampleOfWork[].$last.type[]","Work")
+ add_array("containsExampleOfWork[].$last.instrumentation[]")
do list(path:"$i.m","var":"$j")
copy_field("$j","containsExampleOfWork[].$last.instrumentation[].$append")
end
diff --git a/src/main/resources/alma/fix/subjects.fix b/src/main/resources/alma/fix/subjects.fix
index eb23c4315..b0aeb537a 100644
--- a/src/main/resources/alma/fix/subjects.fix
+++ b/src/main/resources/alma/fix/subjects.fix
@@ -1,6 +1,6 @@
# natureOfContent combines Formschlagwörter (`689 $A: f`) and Formangaben (`655`)
-set_array("natureOfContent[]")
+add_array("natureOfContent[]")
# 655 - Index Term-Genre/Form (R), Subfield: $a (NR), $0 (R)
@@ -51,7 +51,7 @@ do list(path: "natureOfContent[]", "var":"$i")
end
end
-set_array("subject[]")
+add_array("subject[]")
# I change the approach from element oriented (all 630) to a subject/concept kind oriented approach (all LCSH, all GND, all keywords, etc.)
@@ -67,7 +67,7 @@ set_array("subject[]")
do list(path:"600?4|610?4|611?4|630?4|648?4|650?4|651?4|653??|688??", "var":"$i")
- set_array("subject[].$append.type[]","Concept")
+ add_array("subject[].$append.type[]","Concept")
add_field("subject[].$last.source.label","Freie Verschlagwortung")
add_field("subject[].$last.source.id","https://www.wikidata.org/wiki/Q47524318")
call_macro("subjectLabel")
@@ -75,7 +75,7 @@ do list(path:"600?4|610?4|611?4|630?4|648?4|650?4|651?4|653??|688??", "var":"$i"
end
do list(path:"600?0|610?0|611?0|630?0|648?0|650?0|651?0", "var":"$i")
- set_array("subject[].$append.type[]","Concept")
+ add_array("subject[].$append.type[]","Concept")
add_field("subject[].$last.source.label","Library of Congress Subject Headings")
add_field("subject[].$last.source.id","https://id.loc.gov/authorities/subjects.html")
call_macro("subjectLabel")
@@ -84,7 +84,7 @@ end
do list(path:"600?7|610?7|611?7|630?7|648?7|650?7|651?7", "var":"$i")
if any_match("$i.2",".*fast.*")
- set_array("subject[].$append.type[]","Concept")
+ add_array("subject[].$append.type[]","Concept")
add_field("subject[].$last.source.label","FAST (Faceted Application of Subject Terminology)")
add_field("subject[].$last.source.id","http://fast.oclc.org/")
call_macro("subjectLabel")
@@ -93,7 +93,7 @@ do list(path:"600?7|610?7|611?7|630?7|648?7|650?7|651?7", "var":"$i")
end
do list(path:"600?2|610?2|611?2|630?2|648?2|650?2|651?2", "var":"$i")
- set_array("subject[].$append.type[]","Concept")
+ add_array("subject[].$append.type[]","Concept")
add_field("subject[].$last.source.label","Medical Subject Headings")
add_field("subject[].$last.source.id","https://www.nlm.nih.gov/mesh/meshhome.html")
call_macro("subjectLabel")
@@ -102,7 +102,7 @@ end
do list(path:"600?7|610?7|611?7|630?7|648?7|650?7|651?7", "var":"$i")
if any_match("$i.2",".*(mesh|MeSH).*")
- set_array("subject[].$append.type[]","Concept")
+ add_array("subject[].$append.type[]","Concept")
add_field("subject[].$last.source.label","Medical Subject Headings")
add_field("subject[].$last.source.id","https://www.nlm.nih.gov/mesh/meshhome.html")
call_macro("subjectLabel")
@@ -114,7 +114,7 @@ end
do list(path:"600??", "var":"$i")
if any_match("$i.0","^\\(DE-588\\)(.*)$")
- set_array("subject[].$append.type[]","Concept")
+ add_array("subject[].$append.type[]","Concept")
add_field("subject[].$last.source.label","Gemeinsame Normdatei (GND)")
add_field("subject[].$last.source.id","https://d-nb.info/gnd/7749153-1")
call_macro("gndPersonCombinedLabel",field:"$i")
@@ -147,7 +147,7 @@ end
do list(path:"611??", "var":"$i")
if any_match("$i.0","^\\(DE-588\\)(.*)$")
- set_array("subject[].$append.type[]","Concept")
+ add_array("subject[].$append.type[]","Concept")
add_field("subject[].$last.source.label","Gemeinsame Normdatei (GND)")
add_field("subject[].$last.source.id","https://d-nb.info/gnd/7749153-1")
call_macro("gndEventCombinedLabel",field:"$i")
@@ -180,7 +180,7 @@ end
do list(path:"610??|630??|648??|650??|651??", "var":"$i")
if any_match("$i.0","^\\(DE-588\\)(.*)$")
- set_array("subject[].$append.type[]","Concept")
+ add_array("subject[].$append.type[]","Concept")
add_field("subject[].$last.source.label","Gemeinsame Normdatei (GND)")
add_field("subject[].$last.source.id","https://d-nb.info/gnd/7749153-1")
call_macro("gndOtherCombinedLabel",field:"$i")
@@ -214,7 +214,7 @@ end
# compare GND identifier (idn) with ALMA GND enrichment elements:
do list(path:"subject[]", "var":"$i")
- set_array("$i.altLabel[]")
+ add_array("$i.altLabel[]")
do list(path:"GPN??", "var": "$z")
if in ("$i.@gndIdn", "$z.B") # Person labels have no character between $a (Name) and $b (Number).
call_macro("gndPersonCombinedLabel",field:"$z")
@@ -244,7 +244,7 @@ end
do list(path:"0820 |08200", "var":"$i")
do list(path:"$i.a", "var": "$j")
- set_array("subject[].$append.type[]","Concept")
+ add_array("subject[].$append.type[]","Concept")
add_field("subject[].$last.source.label","Dewey-Dezimalklassifikation")
add_field("subject[].$last.source.id","https://d-nb.info/gnd/4149423-4")
copy_field("$j","subject[].$last.label")
@@ -267,7 +267,7 @@ do list(path:"084??", "var":"$i")
copy_field("$j", "subject[].$last.notation")
replace_all("subject[].$last.notation","https://nwbib.de/subjects#N(.*)$","$1")
end
- set_array("subject[].$last.type[]","Concept")
+ add_array("subject[].$last.type[]","Concept")
add_field("subject[].$last.source.id","https://nwbib.de/subjects")
add_field("subject[].$last.source.label","Sachsystematik der Nordrhein-Westfälischen Bibliographie")
end
@@ -277,7 +277,7 @@ do list(path:"084??", "var":"$i")
unless any_match("$i.2", "z") # filter out any z Other - Classification
do list(path:"$i.a", "var":"$j")
copy_field("$j", "subject[].$append.notation")
- set_array("subject[].$last.type[]","Concept")
+ add_array("subject[].$last.type[]","Concept")
# LBZ-Notationen fka rpb2 fka RPB-Sachgruppen und Zusätze
if any_match("$i.2", "rpb")
if any_match("$j","\\d{3}")
@@ -314,7 +314,7 @@ do list(path:"084??", "var":"$i")
copy_field("$j","subject[].$last.label")
lookup("subject[].$last.label", "dnbSachgruppen")
# Also use all DNB and ZDB Sachgruppen as DDC too.
- set_array("subject[].$append.type[]","Concept")
+ add_array("subject[].$append.type[]","Concept")
add_field("subject[].$last.source.label","Dewey-Dezimalklassifikation")
add_field("subject[].$last.source.id","https://d-nb.info/gnd/4149423-4")
copy_field("$j","subject[].$last.label")
@@ -344,7 +344,7 @@ lookup("@rvkNotations","rvk",delete:"true")
split_field("@rvkNotations", ",")
do list(path: "@rvkNotations","var":"$i")
copy_field("$i","subject[].$append.notation")
- set_array("subject[].$last.type[]","Concept")
+ add_array("subject[].$last.type[]","Concept")
add_field("subject[].$last.source.label","RVK (Regensburger Verbundklassifikation)")
add_field("subject[].$last.source.id","https://d-nb.info/gnd/4449787-8")
end
@@ -370,7 +370,7 @@ do list (path: "subject[]", "var": "$i")
do list(path: "$i.componentList[]", "var": "$j")
if any_match("$j.label",".+") # Due to special cataloguing there can be empty label-properties. That are cleaned up at the end. These need to be skipped.
unless exists("$j.type[].1")
- set_array("$j.type[]","SubjectHeading") # type: SubjectHeading as Fallback.
+ add_array("$j.type[]","SubjectHeading") # type: SubjectHeading as Fallback.
end
end
if any_match("$j.dateOfBirthAndDeath", "^([012][0-9]{3})-.*")
@@ -428,7 +428,7 @@ do list (path: "subject[]", "var": "$i")
end
replace_all("$j.label","<<|>>","")
# compare GND identifier (idn) with ALMA GND enrichment elements:
- set_array("$j.altLabel[]")
+ add_array("$j.altLabel[]")
do list(path:"GPN??", "var": "$z")
if in ("$j.@gndIdn", "$z.B") # Person labels have no character between $a (Name) and $b (Number).
call_macro("gndPersonCombinedLabel",field:"$z")
@@ -461,7 +461,7 @@ uniq("subject[]")
# spatial
-set_array("spatial[]")
+add_array("spatial[]")
do list(path:"084??", "var":"$i")
do list(path:"$i.0", "var":"$j")
@@ -474,7 +474,7 @@ do list(path:"084??", "var":"$i")
if any_match("$j", "https://nwbib.de/spatial#N(.*)$")
copy_field("$j", "spatial[].$last.notation")
end
- set_array("spatial[].$last.type[]","Concept")
+ add_array("spatial[].$last.type[]","Concept")
add_field("spatial[].$last.source.id","https://nwbib.de/spatial")
add_field("spatial[].$last.source.label","Raumsystematik der Nordrhein-Westfälischen Bibliographie")
copy_field("$j", "spatial[].$last.focus.id")
@@ -483,7 +483,7 @@ do list(path:"084??", "var":"$i")
do list(path:"$i.a", "var":"$j")
# RPB spatial
if any_match("$j","^rpbr.*")
- set_array("spatial[].$append.type[]","Concept")
+ add_array("spatial[].$append.type[]","Concept")
copy_field("$j","$i.@rpbrNotationId")
replace_all("$i.@rpbrNotationId","rpbr_(99_o)?(.*)_","https://rpb.lobid.org/spatial#n$2")
copy_field("$i.@rpbrNotationId","spatial[].$last.id")
@@ -500,7 +500,7 @@ do list(path:"spatial[]", "var":"$i")
if any_contain("$i.source.id","https://nwbib.de/spatial")
replace_all("$i.notation","https://nwbib.de/spatial#N(.*)$","$1")
copy_field("$i.focus.id","$i.focus.label")
- set_array("$i.focus.type[]")
+ add_array("$i.focus.type[]")
copy_field("$i.focus.id","$i.focus.type[].$append")
copy_field("$i.focus.id","$i.focus.@geoData")
lookup("$i.focus.id","nwbibWikidataId",delete:"true")
@@ -519,7 +519,7 @@ do list(path:"spatial[]", "var":"$i")
end
end
-set_array("subjectslabels[]")
+add_array("subjectslabels[]")
do list(path:"subject[]","var":"$i")
if any_match("$i.type[]","Concept")
unless exists("$i.notation")
diff --git a/src/main/resources/alma/fix/titleRelatedFields.fix b/src/main/resources/alma/fix/titleRelatedFields.fix
index 514b789c8..464ec5e9c 100644
--- a/src/main/resources/alma/fix/titleRelatedFields.fix
+++ b/src/main/resources/alma/fix/titleRelatedFields.fix
@@ -7,7 +7,7 @@ end
replace_all("@title","<<|>>","")
-set_array("@titleOfSubSeries_n") # Subvolume numbering
+add_array("@titleOfSubSeries_n") # Subvolume numbering
do list(path:"245??.n", "var":"$i")
unless all_equal("$i","[...]")
copy_field("$i","@titleOfSubSeries_n.$append")
@@ -15,7 +15,7 @@ do list(path:"245??.n", "var":"$i")
end
join_field("@titleOfSubSeries_n", ". ")
-set_array("@titleOfSubSeries_p")
+add_array("@titleOfSubSeries_p")
do list(path:"245??.p", "var":"$i") # Subvolume title
unless all_equal("$i","[...]")
@@ -59,15 +59,15 @@ do list(path:"245??","var":"$i")
copy_field("$880.a","$AGR.record.@title")
copy_field("$880.n","$AGR.record.@titleOfSubSeries_n")
unless exists("$AGR.record.@titleOfSubSeries_p")
- set_array("$AGR.record.@titleOfSubSeries_p")
+ add_array("$AGR.record.@titleOfSubSeries_p")
end
copy_field("$880.p","$AGR.record.@titleOfSubSeries_p.$append")
unless exists("$AGR.record.otherTitleInformation[]")
- set_array("$AGR.record.otherTitleInformation[]")
+ add_array("$AGR.record.otherTitleInformation[]")
end
copy_field("$880.b","$AGR.record.otherTitleInformation[].$append")
unless exists("$AGR.record.responsibilityStatement[]")
- set_array("$AGR.record.responsibilityStatement[]")
+ add_array("$AGR.record.responsibilityStatement[]")
end
copy_field("$880.c","$AGR.record.responsibilityStatement[].$append")
end
@@ -77,11 +77,11 @@ do list(path:"245??","var":"$i")
copy_field("$880.@script.label","alternateGraphicRepresentation[].$last.script.label")
copy_field("$880.a","alternateGraphicRepresentation[].$last.record.@title")
copy_field("$880.n","alternateGraphicRepresentation[].$last.record.@titleOfSubSeries_n")
- set_array("alternateGraphicRepresentation[].$last.record.@titleOfSubSeries_p")
+ add_array("alternateGraphicRepresentation[].$last.record.@titleOfSubSeries_p")
copy_field("$880.p","alternateGraphicRepresentation[].$last.record.@titleOfSubSeries_p.$append")
- set_array("alternateGraphicRepresentation[].$last.record.otherTitleInformation[]")
+ add_array("alternateGraphicRepresentation[].$last.record.otherTitleInformation[]")
copy_field("$880.b","alternateGraphicRepresentation[].$last.record.otherTitleInformation[].$append")
- set_array("alternateGraphicRepresentation[].$last.record.responsibilityStatement[]")
+ add_array("alternateGraphicRepresentation[].$last.record.responsibilityStatement[]")
copy_field("$880.c","alternateGraphicRepresentation[].$last.record.responsibilityStatement[].$append")
end
end
@@ -140,7 +140,7 @@ end
# 246 - Varying Form of Title (R) - Subfields: $a (NR)
-set_array("alternativeTitle[]")
+add_array("alternativeTitle[]")
copy_field("246?[ 345678].a","alternativeTitle[].$append")
do list(path:"246?[ 345678]","var":"$i")
@@ -159,7 +159,7 @@ end
replace_all("alternativeTitle[].*","<<|>>","")
-set_array("otherTitleInformation[]")
+add_array("otherTitleInformation[]")
copy_field("245??.b","otherTitleInformation[].$append")
@@ -174,7 +174,7 @@ end
# 250 - Edition Statement (R) - Subfields: $a (NR)
-set_array("edition[]")
+add_array("edition[]")
copy_field("250 .a","edition[].$append")
replace_all("edition[].*","\\s?[./]\\s?$","")
@@ -189,7 +189,7 @@ end
# 515 - Numbering Peculiarities Note (R)
# Prefer 264 over 260 since it can create duplicate info and 260 is discontinued in RDA.
-set_array("publication[]")
+add_array("publication[]")
if exists("264[ 23][ 1]")
call_macro("publication",field:"2643[ 1]") # 3 - Current/Latest
call_macro("publication",field:"2642[ 1]") # 2 - Intervening
@@ -200,7 +200,7 @@ else
call_macro("publication",field:"260 [ 1]") # # - Not applicable/No information provided/Earliest
end
-set_array("manufacture[]")
+add_array("manufacture[]")
if exists("264[ 23]3")
call_macro("manufacture",field:"26433") # 3 - Current/Latest
call_macro("manufacture",field:"26423") # 2 - Intervening
@@ -211,7 +211,7 @@ end
if exists("publication[].$first")
copy_field("362??.a","publication[].$first.publicationHistory")
- set_array("publication[].$first.frequency[]")
+ add_array("publication[].$first.frequency[]")
if any_match("leader","^.{6}(a[bis]|m[bis]).*$") # checks if continous ressource
unless any_match("008","^.{18}[#\\| u].*$") # filters out not matching values and also the value unknown
copy_field("008","publication[].$first.frequency[].$append.id")
@@ -227,7 +227,7 @@ if exists("publication[].$first")
end
end
end
- set_array("publication[].$first.note[]")
+ add_array("publication[].$first.note[]")
copy_field("515??.a","publication[].$first.note[].$append")
do list(path:"500 ", "var":"$i")
if any_match("$i.a", "^.*saṃ. \\d{4}=(\\d{4}).*Chr.*")
@@ -283,15 +283,15 @@ end
# 533 - Reproduction Note (R)
do list(path:"533 ", "var": "$i")
- set_hash( "publication[].$append")
- set_array("publication[].$last.type[]","SecondaryPublicationEvent")
- set_array("publication[].$last.location[]")
+ add_hash( "publication[].$append")
+ add_array("publication[].$last.type[]","SecondaryPublicationEvent")
+ add_array("publication[].$last.location[]")
do list(path:"$i.b","var":"$j")
copy_field("$j", "publication[].$last.location[].$append")
end
- set_array("publication[].$last.description[]")
+ add_array("publication[].$last.description[]")
copy_field("$i.a", "publication[].$last.description[].$append")
- set_array("publication[].$last.publishedBy[]")
+ add_array("publication[].$last.publishedBy[]")
copy_field("$i.c", "publication[].$last.publishedBy[].$append")
do list(path: "$i.d", "var":"$j")
replace_all("$j", "\\[|\\]|ca. |c ", "")
@@ -328,14 +328,14 @@ end
# 246 - Varying Form of Title (R) - $a - Title proper/short title (NR)
-set_array("titleKeyword[]")
+add_array("titleKeyword[]")
do list(path: "24610", "var": "$i")
copy_field("$i.a","titleKeyword[].$append")
end
# 210 - Abbreviated Title (R) - $a - Abbreviated title (NR)
-set_array("shortTitle[]")
+add_array("shortTitle[]")
do list(path: "210??", "var": "$i")
copy_field("$i.a","shortTitle[].$append")
end
diff --git a/src/main/resources/rvk/cg-to-rvk-json.fix b/src/main/resources/rvk/cg-to-rvk-json.fix
index b070cd6f9..7f5dbb6e1 100644
--- a/src/main/resources/rvk/cg-to-rvk-json.fix
+++ b/src/main/resources/rvk/cg-to-rvk-json.fix
@@ -1,4 +1,4 @@
-set_array("rvk[]")
+add_array("rvk[]")
do list(path: "084??", "var": "$i")
if any_match("$i.2", "rvk")
@@ -6,7 +6,7 @@ do list(path: "084??", "var": "$i")
end
end
uniq("rvk[]")
-set_array("id")
+add_array("id")
do list(path: "035??", "var": "$i")
if any_match("$i.a", "^\\(DE-605\\)(.*)")
copy_field("$i.a","id.$append")
diff --git a/src/main/resources/rvk/cg-to-rvk-tsv.fix b/src/main/resources/rvk/cg-to-rvk-tsv.fix
index 345ebb85c..bd117c6b9 100644
--- a/src/main/resources/rvk/cg-to-rvk-tsv.fix
+++ b/src/main/resources/rvk/cg-to-rvk-tsv.fix
@@ -1,6 +1,6 @@
-set_array("records[]")
-set_array("@id[]")
-set_array("rvk[]")
+add_array("records[]")
+add_array("@id[]")
+add_array("rvk[]")
do list(path: "084??", "var": "$i")
if any_match("$i.2", "rvk")