@@ -144,7 +144,7 @@ public void inlineDotNotationNested() {
144
144
@ Test
145
145
public void shouldLookupInternalArrayWithAsterisk () {
146
146
MetafixTestHelpers .assertFix (streamReceiver , Arrays .asList (
147
- "add_array ('title', 'Aloha')" ,
147
+ "set_array ('title', 'Aloha')" ,
148
148
LOOKUP + " Aloha: Alohaeha)"
149
149
),
150
150
i -> {
@@ -162,7 +162,7 @@ public void shouldLookupInternalArrayWithAsterisk() {
162
162
@ Test
163
163
public void shouldLookupDeduplicatedInternalArrayWithAsterisk () {
164
164
MetafixTestHelpers .assertFix (streamReceiver , Arrays .asList (
165
- "add_array ('title', 'Aloha', 'Aloha')" ,
165
+ "set_array ('title', 'Aloha', 'Aloha')" ,
166
166
"uniq('title')" ,
167
167
LOOKUP + " Aloha: Alohaeha)"
168
168
),
@@ -182,8 +182,8 @@ public void shouldLookupDeduplicatedInternalArrayWithAsterisk() {
182
182
public void shouldNotLookupCopiedInternalArrayWithAsterisk () {
183
183
MetafixTestHelpers .assertExecutionException (IllegalStateException .class , "Expected Array or Hash, got String" , () ->
184
184
MetafixTestHelpers .assertFix (streamReceiver , Arrays .asList (
185
- "add_array ('data', 'Aloha')" ,
186
- "add_array ('title')" ,
185
+ "set_array ('data', 'Aloha')" ,
186
+ "set_array ('title')" ,
187
187
"copy_field('data', 'title')" ,
188
188
LOOKUP + " Aloha: Alohaeha)"
189
189
),
@@ -200,8 +200,8 @@ public void shouldNotLookupCopiedInternalArrayWithAsterisk() {
200
200
@ Test
201
201
public void shouldLookupCopiedInternalArrayWithAsteriskExplicitAppend () {
202
202
MetafixTestHelpers .assertFix (streamReceiver , Arrays .asList (
203
- "add_array ('data', 'Aloha')" ,
204
- "add_array ('title')" ,
203
+ "set_array ('data', 'Aloha')" ,
204
+ "set_array ('title')" ,
205
205
"copy_field('data', 'title.$append')" ,
206
206
LOOKUP + " Aloha: Alohaeha)"
207
207
),
@@ -222,9 +222,9 @@ public void shouldLookupCopiedInternalArrayWithAsteriskExplicitAppend() {
222
222
public void shouldNotLookupCopiedDeduplicatedInternalArrayWithAsterisk () {
223
223
MetafixTestHelpers .assertExecutionException (IllegalStateException .class , "Expected Array or Hash, got String" , () ->
224
224
MetafixTestHelpers .assertFix (streamReceiver , Arrays .asList (
225
- "add_array ('data', 'Aloha', 'Aloha')" ,
225
+ "set_array ('data', 'Aloha', 'Aloha')" ,
226
226
"uniq('data')" ,
227
- "add_array ('title')" ,
227
+ "set_array ('title')" ,
228
228
"copy_field('data', 'title')" ,
229
229
LOOKUP + " Aloha: Alohaeha)"
230
230
),
@@ -241,9 +241,9 @@ public void shouldNotLookupCopiedDeduplicatedInternalArrayWithAsterisk() {
241
241
@ Test
242
242
public void shouldLookupCopiedDeduplicatedInternalArrayWithAsteriskExplicitAppend () {
243
243
MetafixTestHelpers .assertFix (streamReceiver , Arrays .asList (
244
- "add_array ('data', 'Aloha', 'Aloha')" ,
244
+ "set_array ('data', 'Aloha', 'Aloha')" ,
245
245
"uniq('data')" ,
246
- "add_array ('title')" ,
246
+ "set_array ('title')" ,
247
247
"copy_field('data', 'title.$append')" ,
248
248
LOOKUP + " Aloha: Alohaeha)"
249
249
),
@@ -263,7 +263,7 @@ public void shouldLookupCopiedDeduplicatedInternalArrayWithAsteriskExplicitAppen
263
263
@ Test
264
264
public void shouldLookupCopiedExternalArrayWithAsteriskExplicitAppend () {
265
265
MetafixTestHelpers .assertFix (streamReceiver , Arrays .asList (
266
- "add_array ('title')" ,
266
+ "set_array ('title')" ,
267
267
"copy_field('data', 'title.$append')" ,
268
268
LOOKUP + " Aloha: Alohaeha)"
269
269
),
@@ -285,7 +285,7 @@ public void shouldLookupCopiedExternalArrayWithAsteriskExplicitAppend() {
285
285
public void shouldLookupCopiedDeduplicatedExternalArrayWithAsteriskExplicitAppend () {
286
286
MetafixTestHelpers .assertFix (streamReceiver , Arrays .asList (
287
287
"uniq('data')" ,
288
- "add_array ('title')" ,
288
+ "set_array ('title')" ,
289
289
"copy_field('data', 'title.$append')" ,
290
290
LOOKUP + " Aloha: Alohaeha)"
291
291
),
@@ -309,7 +309,7 @@ public void shouldNotLookupMovedDeduplicatedExternalArrayWithAsterisk() {
309
309
MetafixTestHelpers .assertExecutionException (IllegalStateException .class , "Expected Array or Hash, got String" , () ->
310
310
MetafixTestHelpers .assertFix (streamReceiver , Arrays .asList (
311
311
"uniq('data')" ,
312
- "add_array ('title')" ,
312
+ "set_array ('title')" ,
313
313
"move_field('data', 'title')" ,
314
314
LOOKUP + " Aloha: Alohaeha)"
315
315
),
@@ -329,7 +329,7 @@ public void shouldNotLookupMovedDeduplicatedExternalArrayWithAsterisk() {
329
329
public void shouldLookupMovedDeduplicatedExternalArrayWithAsteriskExplicitAppend () {
330
330
MetafixTestHelpers .assertFix (streamReceiver , Arrays .asList (
331
331
"uniq('data')" ,
332
- "add_array ('title')" ,
332
+ "set_array ('title')" ,
333
333
"move_field('data', 'title.$append')" ,
334
334
LOOKUP + " Aloha: Alohaeha)"
335
335
),
@@ -351,7 +351,7 @@ public void shouldLookupMovedDeduplicatedExternalArrayWithAsteriskExplicitAppend
351
351
public void shouldNotLookupMovedExternalArrayWithAsterisk () {
352
352
MetafixTestHelpers .assertExecutionException (IllegalStateException .class , "Expected Array or Hash, got String" , () ->
353
353
MetafixTestHelpers .assertFix (streamReceiver , Arrays .asList (
354
- "add_array ('title')" ,
354
+ "set_array ('title')" ,
355
355
"move_field('data', 'title')" ,
356
356
LOOKUP + " Aloha: Alohaeha)"
357
357
),
@@ -369,7 +369,7 @@ public void shouldNotLookupMovedExternalArrayWithAsterisk() {
369
369
@ Test
370
370
public void shouldLookupMovedExternalArrayWithAsteriskExplicitAppend () {
371
371
MetafixTestHelpers .assertFix (streamReceiver , Arrays .asList (
372
- "add_array ('title')" ,
372
+ "set_array ('title')" ,
373
373
"move_field('data', 'title.$append')" ,
374
374
LOOKUP + " Aloha: Alohaeha)"
375
375
),
@@ -994,9 +994,9 @@ public void shouldLookupInCopiedNestedArraysCreatedWithPrepend() {
994
994
private void shouldLookupInCopiedNestedArraysCreatedWith (final String reservedField ) {
995
995
MetafixTestHelpers .assertFix (streamReceiver , Arrays .asList (
996
996
"put_map('rswk-indicator', s: 'SubjectHeading')" ,
997
- "add_array ('subject[]')" ,
998
- "add_array ('subject[]." + reservedField + ".componentList[]')" ,
999
- "add_array ('subject[].$last.componentList[]." + reservedField + ".type[]')" ,
997
+ "set_array ('subject[]')" ,
998
+ "set_array ('subject[]." + reservedField + ".componentList[]')" ,
999
+ "set_array ('subject[].$last.componentList[]." + reservedField + ".type[]')" ,
1000
1000
"do list(path: 'D', 'var': '$i')" ,
1001
1001
" copy_field('$i', 'subject[].$last.componentList[].$last.type[]." + reservedField + "')" ,
1002
1002
"end" ,
@@ -1247,7 +1247,7 @@ public void shouldExplicitLookupRdfUrlWithRedirection() {
1247
1247
@ Test // Scenario 1
1248
1248
public void shouldLookupInExternalRdfMapGetObjectOfSubjectWithTargetedPredicateOfSpecificLanguage () {
1249
1249
MetafixTestHelpers .assertFix (streamReceiver , Arrays .asList (
1250
- "add_array ('prefLabel', 'https://w3id.org/kim/hochschulfaechersystematik/n4')" ,
1250
+ "set_array ('prefLabel', 'https://w3id.org/kim/hochschulfaechersystematik/n4')" ,
1251
1251
"put_rdfmap('" + RDF_MAP + "', 'rdfmap', target: 'skos:prefLabel', select_language: 'de')" ,
1252
1252
"lookup('prefLabel.*', 'rdfmap')"
1253
1253
),
@@ -1266,7 +1266,7 @@ public void shouldLookupInExternalRdfMapGetObjectOfSubjectWithTargetedPredicateO
1266
1266
@ Test // Scenario 2
1267
1267
public void shouldLookupInExternalRdfMapGetSubjectWithTargetedPredicateOfSpecificLanguage () {
1268
1268
MetafixTestHelpers .assertFix (streamReceiver , Arrays .asList (
1269
- "add_array ('id', 'Mathematics, Natural Sciences')" ,
1269
+ "set_array ('id', 'Mathematics, Natural Sciences')" ,
1270
1270
"put_rdfmap('" + RDF_MAP + "', 'rdfmap', target: 'skos:prefLabel', select_language: 'en')" ,
1271
1271
"lookup('id.*', 'rdfmap')"
1272
1272
),
@@ -1408,7 +1408,7 @@ public void shouldLookupRdfDefinedPropertyToSubject() {
1408
1408
1409
1409
private void shouldLookupInExternalRdfMapGetObjectWithTargetedPredicateOfSpecificLanguage (final String target ) {
1410
1410
MetafixTestHelpers .assertFix (streamReceiver , Arrays .asList (
1411
- "add_array ('prefLabel', 'Mathematics, Natural Sciences')" ,
1411
+ "set_array ('prefLabel', 'Mathematics, Natural Sciences')" ,
1412
1412
"put_rdfmap('" + RDF_MAP + "', 'rdfmap', target: '" + target + "', select_language: 'de')" ,
1413
1413
"lookup('prefLabel.*', 'rdfmap')"
1414
1414
),
0 commit comments