bulkrax 9.3.5 → 9.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -1
  3. data/app/assets/javascripts/bulkrax/application.js +2 -1
  4. data/app/assets/javascripts/bulkrax/bulkrax.js +13 -4
  5. data/app/assets/javascripts/bulkrax/bulkrax_utils.js +96 -0
  6. data/app/assets/javascripts/bulkrax/datatables.js +1 -0
  7. data/app/assets/javascripts/bulkrax/entries.js +17 -10
  8. data/app/assets/javascripts/bulkrax/importers.js.erb +9 -2
  9. data/app/assets/javascripts/bulkrax/importers_stepper.js +2420 -0
  10. data/app/assets/stylesheets/bulkrax/application.css +1 -1
  11. data/app/assets/stylesheets/bulkrax/stepper/_header.scss +83 -0
  12. data/app/assets/stylesheets/bulkrax/stepper/_mixins.scss +26 -0
  13. data/app/assets/stylesheets/bulkrax/stepper/_navigation.scss +103 -0
  14. data/app/assets/stylesheets/bulkrax/stepper/_responsive.scss +46 -0
  15. data/app/assets/stylesheets/bulkrax/stepper/_review.scss +92 -0
  16. data/app/assets/stylesheets/bulkrax/stepper/_settings.scss +106 -0
  17. data/app/assets/stylesheets/bulkrax/stepper/_success.scss +26 -0
  18. data/app/assets/stylesheets/bulkrax/stepper/_summary.scss +171 -0
  19. data/app/assets/stylesheets/bulkrax/stepper/_upload.scss +339 -0
  20. data/app/assets/stylesheets/bulkrax/stepper/_validation.scss +237 -0
  21. data/app/assets/stylesheets/bulkrax/stepper/_variables.scss +46 -0
  22. data/app/assets/stylesheets/bulkrax/stepper.scss +32 -0
  23. data/app/controllers/bulkrax/guided_imports_controller.rb +175 -0
  24. data/app/controllers/bulkrax/importers_controller.rb +28 -31
  25. data/app/controllers/concerns/bulkrax/guided_import_demo_scenarios.rb +201 -0
  26. data/app/controllers/concerns/bulkrax/importer_file_handler.rb +217 -0
  27. data/app/factories/bulkrax/object_factory.rb +3 -2
  28. data/app/factories/bulkrax/valkyrie_object_factory.rb +61 -17
  29. data/app/jobs/bulkrax/importer_job.rb +11 -4
  30. data/app/models/bulkrax/csv_entry.rb +27 -7
  31. data/app/models/bulkrax/entry.rb +4 -0
  32. data/app/models/bulkrax/importer.rb +31 -1
  33. data/app/models/concerns/bulkrax/has_matchers.rb +2 -2
  34. data/app/models/concerns/bulkrax/importer_exporter_behavior.rb +6 -5
  35. data/app/parsers/bulkrax/application_parser.rb +31 -5
  36. data/app/parsers/bulkrax/csv_parser.rb +42 -10
  37. data/app/parsers/concerns/bulkrax/csv_parser/csv_template_generation.rb +73 -0
  38. data/app/parsers/concerns/bulkrax/csv_parser/csv_validation.rb +133 -0
  39. data/app/parsers/concerns/bulkrax/csv_parser/csv_validation_helpers.rb +282 -0
  40. data/app/parsers/concerns/bulkrax/csv_parser/csv_validation_hierarchy.rb +96 -0
  41. data/app/services/bulkrax/csv_template/column_builder.rb +60 -0
  42. data/app/services/bulkrax/csv_template/column_descriptor.rb +58 -0
  43. data/app/services/bulkrax/csv_template/csv_builder.rb +83 -0
  44. data/app/services/bulkrax/csv_template/explanation_builder.rb +57 -0
  45. data/app/services/bulkrax/csv_template/field_analyzer.rb +56 -0
  46. data/app/services/bulkrax/csv_template/file_path_generator.rb +47 -0
  47. data/app/services/bulkrax/csv_template/file_validator.rb +68 -0
  48. data/app/services/bulkrax/csv_template/mapping_manager.rb +55 -0
  49. data/app/services/bulkrax/csv_template/model_loader.rb +50 -0
  50. data/app/services/bulkrax/csv_template/row_builder.rb +35 -0
  51. data/app/services/bulkrax/csv_template/schema_analyzer.rb +70 -0
  52. data/app/services/bulkrax/csv_template/split_formatter.rb +44 -0
  53. data/app/services/bulkrax/csv_template/value_determiner.rb +68 -0
  54. data/app/services/bulkrax/stepper_response_formatter.rb +347 -0
  55. data/app/services/bulkrax/validation_error_csv_builder.rb +99 -0
  56. data/app/validators/bulkrax/csv_row/child_reference.rb +56 -0
  57. data/app/validators/bulkrax/csv_row/circular_reference.rb +71 -0
  58. data/app/validators/bulkrax/csv_row/controlled_vocabulary.rb +74 -0
  59. data/app/validators/bulkrax/csv_row/duplicate_identifier.rb +63 -0
  60. data/app/validators/bulkrax/csv_row/missing_source_identifier.rb +31 -0
  61. data/app/validators/bulkrax/csv_row/parent_reference.rb +59 -0
  62. data/app/validators/bulkrax/csv_row/required_values.rb +64 -0
  63. data/app/views/bulkrax/guided_imports/new.html.erb +567 -0
  64. data/app/views/bulkrax/importers/index.html.erb +6 -1
  65. data/app/views/bulkrax/importers/new.html.erb +1 -1
  66. data/app/views/bulkrax/importers/show.html.erb +17 -1
  67. data/config/i18n-tasks.yml +195 -0
  68. data/config/locales/bulkrax.de.yml +504 -0
  69. data/config/locales/bulkrax.en.yml +459 -233
  70. data/config/locales/bulkrax.es.yml +504 -0
  71. data/config/locales/bulkrax.fr.yml +504 -0
  72. data/config/locales/bulkrax.it.yml +504 -0
  73. data/config/locales/bulkrax.pt-BR.yml +504 -0
  74. data/config/locales/bulkrax.zh.yml +503 -0
  75. data/config/routes.rb +10 -1
  76. data/lib/bulkrax/data/demo_scenarios.json +2235 -0
  77. data/lib/bulkrax/version.rb +1 -1
  78. data/lib/bulkrax.rb +31 -0
  79. metadata +55 -16
  80. data/app/services/bulkrax/sample_csv_service/column_builder.rb +0 -58
  81. data/app/services/bulkrax/sample_csv_service/column_descriptor.rb +0 -56
  82. data/app/services/bulkrax/sample_csv_service/csv_builder.rb +0 -82
  83. data/app/services/bulkrax/sample_csv_service/explanation_builder.rb +0 -51
  84. data/app/services/bulkrax/sample_csv_service/field_analyzer.rb +0 -54
  85. data/app/services/bulkrax/sample_csv_service/file_path_generator.rb +0 -16
  86. data/app/services/bulkrax/sample_csv_service/mapping_manager.rb +0 -36
  87. data/app/services/bulkrax/sample_csv_service/model_loader.rb +0 -40
  88. data/app/services/bulkrax/sample_csv_service/row_builder.rb +0 -33
  89. data/app/services/bulkrax/sample_csv_service/schema_analyzer.rb +0 -69
  90. data/app/services/bulkrax/sample_csv_service/split_formatter.rb +0 -42
  91. data/app/services/bulkrax/sample_csv_service/value_determiner.rb +0 -67
  92. data/app/services/bulkrax/sample_csv_service.rb +0 -78
  93. /data/{app/services → lib}/wings/custom_queries/find_by_source_identifier.rb +0 -0
@@ -0,0 +1,2235 @@
1
+ {
2
+ "_meta": {
3
+ "description": "Demo validation scenarios for the Bulkrax guided import stepper",
4
+ "schemaRef": "docs/VALIDATION_RESPONSE_QUICK_REF.json"
5
+ },
6
+ "scenarios": {
7
+ "success_no_issues": {
8
+ "label": "CSV with Nested Collections and Works",
9
+ "category": "success",
10
+ "files": [
11
+ {
12
+ "id": 1,
13
+ "name": "metadata.csv",
14
+ "size": "142 KB",
15
+ "fileType": "csv",
16
+ "fromZip": false
17
+ }
18
+ ],
19
+ "response": {
20
+ "collections": [
21
+ {
22
+ "id": "col-1",
23
+ "title": "Historical Photographs Collection",
24
+ "type": "collection",
25
+ "parentIds": []
26
+ },
27
+ {
28
+ "id": "col-2",
29
+ "title": "Manuscripts & Letters",
30
+ "type": "collection",
31
+ "parentIds": []
32
+ },
33
+ {
34
+ "id": "col-3",
35
+ "title": "Audio Recordings",
36
+ "type": "collection",
37
+ "parentIds": []
38
+ },
39
+ {
40
+ "id": "col-1a",
41
+ "title": "Landscapes",
42
+ "type": "collection",
43
+ "parentIds": [
44
+ "col-1"
45
+ ]
46
+ },
47
+ {
48
+ "id": "col-1b",
49
+ "title": "Portraits",
50
+ "type": "collection",
51
+ "parentIds": [
52
+ "col-1"
53
+ ]
54
+ }
55
+ ],
56
+ "works": [
57
+ {
58
+ "id": "work-1",
59
+ "title": "Sunset Over the Valley",
60
+ "type": "work",
61
+ "parentIds": [
62
+ "col-1"
63
+ ]
64
+ },
65
+ {
66
+ "id": "work-2",
67
+ "title": "Portrait of a Scholar",
68
+ "type": "work",
69
+ "parentIds": [
70
+ "col-1"
71
+ ]
72
+ },
73
+ {
74
+ "id": "work-3",
75
+ "title": "City Streets, 1920",
76
+ "type": "work",
77
+ "parentIds": [
78
+ "col-1"
79
+ ]
80
+ },
81
+ {
82
+ "id": "work-4",
83
+ "title": "Letter from John Adams",
84
+ "type": "work",
85
+ "parentIds": [
86
+ "col-2"
87
+ ]
88
+ },
89
+ {
90
+ "id": "work-5",
91
+ "title": "Medieval Manuscript Fragment",
92
+ "type": "work",
93
+ "parentIds": [
94
+ "col-2"
95
+ ]
96
+ },
97
+ {
98
+ "id": "work-6",
99
+ "title": "Interview with Jane Doe",
100
+ "type": "work",
101
+ "parentIds": [
102
+ "col-3"
103
+ ]
104
+ },
105
+ {
106
+ "id": "work-7",
107
+ "title": "Field Recording, Summer 1985",
108
+ "type": "work",
109
+ "parentIds": [
110
+ "col-3"
111
+ ]
112
+ },
113
+ {
114
+ "id": "work-8",
115
+ "title": "Untitled Photograph",
116
+ "type": "work",
117
+ "parentIds": []
118
+ },
119
+ {
120
+ "id": "work-9",
121
+ "title": "Miscellaneous Notes",
122
+ "type": "work",
123
+ "parentIds": []
124
+ },
125
+ {
126
+ "id": "work-10",
127
+ "title": "Mountain Vista at Dawn",
128
+ "type": "work",
129
+ "parentIds": [
130
+ "col-1a"
131
+ ]
132
+ },
133
+ {
134
+ "id": "work-11",
135
+ "title": "Coastal Sunset",
136
+ "type": "work",
137
+ "parentIds": [
138
+ "col-1a"
139
+ ]
140
+ },
141
+ {
142
+ "id": "work-12",
143
+ "title": "The Librarian",
144
+ "type": "work",
145
+ "parentIds": [
146
+ "col-1b"
147
+ ]
148
+ },
149
+ {
150
+ "id": "work-13",
151
+ "title": "Parent Work",
152
+ "type": "work",
153
+ "parentIds": []
154
+ },
155
+ {
156
+ "id": "work-14",
157
+ "title": "Child Work",
158
+ "type": "work",
159
+ "parentIds": [
160
+ "work-13"
161
+ ]
162
+ },
163
+ {
164
+ "id": "work-15",
165
+ "title": "Parent Work with Collection Parent",
166
+ "type": "work",
167
+ "parentIds": [
168
+ "col-1"
169
+ ]
170
+ },
171
+ {
172
+ "id": "work-16",
173
+ "title": "Child Work of Work with Collection Parent",
174
+ "type": "work",
175
+ "parentIds": [
176
+ "work-15"
177
+ ]
178
+ },
179
+ {
180
+ "id": "work-17",
181
+ "title": "Work Shared by a Collection and another Work",
182
+ "type": "work",
183
+ "parentIds": [
184
+ "col-1",
185
+ "work-13"
186
+ ]
187
+ },
188
+ {
189
+ "id": "work-18",
190
+ "title": "Child Work of a Child Work",
191
+ "type": "work",
192
+ "parentIds": [
193
+ "work-16"
194
+ ]
195
+ }
196
+ ],
197
+ "fileSets": [
198
+ {
199
+ "id": "fs-1",
200
+ "title": "sunset_valley.tiff",
201
+ "type": "file_set"
202
+ },
203
+ {
204
+ "id": "fs-2",
205
+ "title": "portrait_scholar.jpg",
206
+ "type": "file_set"
207
+ },
208
+ {
209
+ "id": "fs-3",
210
+ "title": "city_streets.png",
211
+ "type": "file_set"
212
+ }
213
+ ],
214
+ "totalItems": 20,
215
+ "headers": [
216
+ "source_identifier",
217
+ "title",
218
+ "creator",
219
+ "model",
220
+ "parents",
221
+ "file"
222
+ ],
223
+ "missingRequired": [],
224
+ "unrecognized": [],
225
+ "rowCount": 50,
226
+ "isValid": true,
227
+ "hasWarnings": false,
228
+ "fileReferences": 0,
229
+ "missingFiles": [],
230
+ "foundFiles": 0,
231
+ "zipIncluded": false,
232
+ "messages": {
233
+ "validationStatus": {
234
+ "severity": "success",
235
+ "icon": "fa-check-circle",
236
+ "title": "Validation Passed",
237
+ "summary": "6 columns detected · 50 records found",
238
+ "details": "Recognized fields: source_identifier, title, creator, model, parents, file",
239
+ "defaultOpen": true
240
+ },
241
+ "issues": []
242
+ }
243
+ }
244
+ },
245
+ "success_with_files": {
246
+ "label": "CSV and ZIP",
247
+ "category": "success",
248
+ "files": [
249
+ {
250
+ "id": 2,
251
+ "name": "metadata.csv",
252
+ "size": "142 KB",
253
+ "fileType": "csv",
254
+ "fromZip": false
255
+ },
256
+ {
257
+ "id": 3,
258
+ "name": "files_package.zip",
259
+ "size": "1.2 GB",
260
+ "fileType": "zip",
261
+ "fromZip": false,
262
+ "subtitle": "contains files"
263
+ }
264
+ ],
265
+ "response": {
266
+ "collections": [
267
+ {
268
+ "id": "col-1",
269
+ "title": "Historical Photographs Collection",
270
+ "type": "collection",
271
+ "parentIds": []
272
+ },
273
+ {
274
+ "id": "col-2",
275
+ "title": "Manuscripts & Letters",
276
+ "type": "collection",
277
+ "parentIds": []
278
+ },
279
+ {
280
+ "id": "col-3",
281
+ "title": "Audio Recordings",
282
+ "type": "collection",
283
+ "parentIds": []
284
+ },
285
+ {
286
+ "id": "col-1a",
287
+ "title": "Landscapes",
288
+ "type": "collection",
289
+ "parentIds": [
290
+ "col-1"
291
+ ]
292
+ },
293
+ {
294
+ "id": "col-1b",
295
+ "title": "Portraits",
296
+ "type": "collection",
297
+ "parentIds": [
298
+ "col-1"
299
+ ]
300
+ }
301
+ ],
302
+ "works": [
303
+ {
304
+ "id": "work-1",
305
+ "title": "Sunset Over the Valley",
306
+ "type": "work",
307
+ "parentIds": [
308
+ "col-1"
309
+ ]
310
+ },
311
+ {
312
+ "id": "work-2",
313
+ "title": "Portrait of a Scholar",
314
+ "type": "work",
315
+ "parentIds": [
316
+ "col-1"
317
+ ]
318
+ },
319
+ {
320
+ "id": "work-3",
321
+ "title": "City Streets, 1920",
322
+ "type": "work",
323
+ "parentIds": [
324
+ "col-1"
325
+ ]
326
+ },
327
+ {
328
+ "id": "work-4",
329
+ "title": "Letter from John Adams",
330
+ "type": "work",
331
+ "parentIds": [
332
+ "col-2"
333
+ ]
334
+ },
335
+ {
336
+ "id": "work-5",
337
+ "title": "Medieval Manuscript Fragment",
338
+ "type": "work",
339
+ "parentIds": [
340
+ "col-2"
341
+ ]
342
+ },
343
+ {
344
+ "id": "work-6",
345
+ "title": "Interview with Jane Doe",
346
+ "type": "work",
347
+ "parentIds": [
348
+ "col-3"
349
+ ]
350
+ },
351
+ {
352
+ "id": "work-7",
353
+ "title": "Field Recording, Summer 1985",
354
+ "type": "work",
355
+ "parentIds": [
356
+ "col-3"
357
+ ]
358
+ },
359
+ {
360
+ "id": "work-8",
361
+ "title": "Untitled Photograph",
362
+ "type": "work",
363
+ "parentIds": []
364
+ },
365
+ {
366
+ "id": "work-9",
367
+ "title": "Miscellaneous Notes",
368
+ "type": "work",
369
+ "parentIds": []
370
+ },
371
+ {
372
+ "id": "work-10",
373
+ "title": "Mountain Vista at Dawn",
374
+ "type": "work",
375
+ "parentIds": [
376
+ "col-1a"
377
+ ]
378
+ },
379
+ {
380
+ "id": "work-11",
381
+ "title": "Coastal Sunset",
382
+ "type": "work",
383
+ "parentIds": [
384
+ "col-1a"
385
+ ]
386
+ },
387
+ {
388
+ "id": "work-12",
389
+ "title": "The Librarian",
390
+ "type": "work",
391
+ "parentIds": [
392
+ "col-1b"
393
+ ]
394
+ }
395
+ ],
396
+ "fileSets": [
397
+ {
398
+ "id": "fs-1",
399
+ "title": "sunset_valley.tiff",
400
+ "type": "file_set"
401
+ },
402
+ {
403
+ "id": "fs-2",
404
+ "title": "portrait_scholar.jpg",
405
+ "type": "file_set"
406
+ },
407
+ {
408
+ "id": "fs-3",
409
+ "title": "city_streets.png",
410
+ "type": "file_set"
411
+ }
412
+ ],
413
+ "totalItems": 20,
414
+ "headers": [
415
+ "source_identifier",
416
+ "title",
417
+ "creator",
418
+ "model",
419
+ "file"
420
+ ],
421
+ "missingRequired": [],
422
+ "unrecognized": [],
423
+ "rowCount": 25,
424
+ "isValid": true,
425
+ "hasWarnings": false,
426
+ "fileReferences": 25,
427
+ "missingFiles": [],
428
+ "foundFiles": 25,
429
+ "zipIncluded": true,
430
+ "messages": {
431
+ "validationStatus": {
432
+ "severity": "success",
433
+ "icon": "fa-check-circle",
434
+ "title": "Validation Passed",
435
+ "summary": "5 columns detected · 25 records found",
436
+ "details": "Recognized fields: source_identifier, title, creator, model, file",
437
+ "defaultOpen": true
438
+ },
439
+ "issues": [
440
+ {
441
+ "type": "file_references",
442
+ "severity": "info",
443
+ "icon": "fa-info-circle",
444
+ "title": "File References",
445
+ "count": 25,
446
+ "summary": "25 of 25 files found in ZIP.",
447
+ "description": null,
448
+ "items": [],
449
+ "defaultOpen": false
450
+ }
451
+ ]
452
+ }
453
+ }
454
+ },
455
+ "success_multi_parent": {
456
+ "label": "Success with multi-parent works",
457
+ "category": "success",
458
+ "files": [
459
+ {
460
+ "id": 10,
461
+ "name": "metadata.csv",
462
+ "size": "142 KB",
463
+ "fileType": "csv",
464
+ "fromZip": false
465
+ }
466
+ ],
467
+ "response": {
468
+ "collections": [
469
+ {
470
+ "id": "col-1",
471
+ "title": "Historical Photographs Collection",
472
+ "type": "collection",
473
+ "parentIds": []
474
+ },
475
+ {
476
+ "id": "col-2",
477
+ "title": "Manuscripts & Letters",
478
+ "type": "collection",
479
+ "parentIds": []
480
+ },
481
+ {
482
+ "id": "col-3",
483
+ "title": "Audio Recordings",
484
+ "type": "collection",
485
+ "parentIds": []
486
+ }
487
+ ],
488
+ "works": [
489
+ {
490
+ "id": "work-1",
491
+ "title": "Sunset Over the Valley",
492
+ "type": "work",
493
+ "parentIds": [
494
+ "col-1"
495
+ ]
496
+ },
497
+ {
498
+ "id": "work-2",
499
+ "title": "Portrait of a Scholar",
500
+ "type": "work",
501
+ "parentIds": [
502
+ "col-1"
503
+ ]
504
+ },
505
+ {
506
+ "id": "work-3",
507
+ "title": "Letter from John Adams",
508
+ "type": "work",
509
+ "parentIds": [
510
+ "col-2"
511
+ ]
512
+ },
513
+ {
514
+ "id": "work-4",
515
+ "title": "Interview with Jane Doe",
516
+ "type": "work",
517
+ "parentIds": [
518
+ "col-3"
519
+ ]
520
+ },
521
+ {
522
+ "id": "work-5",
523
+ "title": "Cross-Collection Photograph",
524
+ "type": "work",
525
+ "parentIds": [
526
+ "col-1",
527
+ "col-2"
528
+ ]
529
+ },
530
+ {
531
+ "id": "work-6",
532
+ "title": "Interdisciplinary Recording",
533
+ "type": "work",
534
+ "parentIds": [
535
+ "col-2",
536
+ "col-3"
537
+ ]
538
+ },
539
+ {
540
+ "id": "work-7",
541
+ "title": "Universal Archive Item",
542
+ "type": "work",
543
+ "parentIds": [
544
+ "col-1",
545
+ "col-2",
546
+ "col-3"
547
+ ]
548
+ },
549
+ {
550
+ "id": "work-8",
551
+ "title": "Orphan Document",
552
+ "type": "work",
553
+ "parentIds": []
554
+ }
555
+ ],
556
+ "fileSets": [
557
+ {
558
+ "id": "fs-1",
559
+ "title": "sunset_valley.tiff",
560
+ "type": "file_set"
561
+ },
562
+ {
563
+ "id": "fs-2",
564
+ "title": "portrait_scholar.jpg",
565
+ "type": "file_set"
566
+ }
567
+ ],
568
+ "totalItems": 13,
569
+ "headers": [
570
+ "source_identifier",
571
+ "title",
572
+ "creator",
573
+ "model",
574
+ "parents",
575
+ "file"
576
+ ],
577
+ "missingRequired": [],
578
+ "unrecognized": [],
579
+ "rowCount": 30,
580
+ "isValid": true,
581
+ "hasWarnings": false,
582
+ "fileReferences": 0,
583
+ "missingFiles": [],
584
+ "foundFiles": 0,
585
+ "zipIncluded": false,
586
+ "messages": {
587
+ "validationStatus": {
588
+ "severity": "success",
589
+ "icon": "fa-check-circle",
590
+ "title": "Validation Passed",
591
+ "summary": "6 columns detected · 30 records found",
592
+ "details": "Recognized fields: source_identifier, title, creator, model, parents, file",
593
+ "defaultOpen": true
594
+ },
595
+ "issues": []
596
+ }
597
+ }
598
+ },
599
+ "success_children_ids": {
600
+ "label": "Children IDs define hierarchy",
601
+ "category": "success",
602
+ "files": [
603
+ {
604
+ "id": 11,
605
+ "name": "metadata.csv",
606
+ "size": "98 KB",
607
+ "fileType": "csv",
608
+ "fromZip": false
609
+ }
610
+ ],
611
+ "response": {
612
+ "collections": [
613
+ {
614
+ "id": "col-1",
615
+ "title": "Photographs (uses childrenIds)",
616
+ "type": "collection",
617
+ "parentIds": [],
618
+ "childrenIds": [
619
+ "work-1",
620
+ "work-2",
621
+ "work-3"
622
+ ]
623
+ },
624
+ {
625
+ "id": "col-2",
626
+ "title": "Manuscripts (uses parentIds on children)",
627
+ "type": "collection",
628
+ "parentIds": [],
629
+ "childrenIds": []
630
+ },
631
+ {
632
+ "id": "col-3",
633
+ "title": "Mixed Collection (both approaches)",
634
+ "type": "collection",
635
+ "parentIds": [],
636
+ "childrenIds": [
637
+ "work-6"
638
+ ]
639
+ }
640
+ ],
641
+ "works": [
642
+ {
643
+ "id": "work-1",
644
+ "title": "Sunset Over the Valley",
645
+ "type": "work",
646
+ "parentIds": [],
647
+ "childrenIds": []
648
+ },
649
+ {
650
+ "id": "work-2",
651
+ "title": "City Streets, 1920",
652
+ "type": "work",
653
+ "parentIds": [],
654
+ "childrenIds": []
655
+ },
656
+ {
657
+ "id": "work-3",
658
+ "title": "Portrait of a Scholar",
659
+ "type": "work",
660
+ "parentIds": [],
661
+ "childrenIds": []
662
+ },
663
+ {
664
+ "id": "work-4",
665
+ "title": "Letter from John Adams",
666
+ "type": "work",
667
+ "parentIds": [
668
+ "col-2"
669
+ ],
670
+ "childrenIds": []
671
+ },
672
+ {
673
+ "id": "work-5",
674
+ "title": "Medieval Manuscript Fragment",
675
+ "type": "work",
676
+ "parentIds": [
677
+ "col-2"
678
+ ],
679
+ "childrenIds": []
680
+ },
681
+ {
682
+ "id": "work-6",
683
+ "title": "Cross-Referenced Recording",
684
+ "type": "work",
685
+ "parentIds": [
686
+ "col-2"
687
+ ],
688
+ "childrenIds": []
689
+ },
690
+ {
691
+ "id": "work-7",
692
+ "title": "Orphan Document",
693
+ "type": "work",
694
+ "parentIds": [],
695
+ "childrenIds": []
696
+ }
697
+ ],
698
+ "fileSets": [
699
+ {
700
+ "id": "fs-1",
701
+ "title": "sunset.tiff",
702
+ "type": "file_set"
703
+ }
704
+ ],
705
+ "totalItems": 11,
706
+ "headers": [
707
+ "source_identifier",
708
+ "title",
709
+ "creator",
710
+ "model",
711
+ "parents",
712
+ "children",
713
+ "file"
714
+ ],
715
+ "missingRequired": [],
716
+ "unrecognized": [],
717
+ "rowCount": 20,
718
+ "isValid": true,
719
+ "hasWarnings": false,
720
+ "fileReferences": 0,
721
+ "missingFiles": [],
722
+ "foundFiles": 0,
723
+ "zipIncluded": false,
724
+ "messages": {
725
+ "validationStatus": {
726
+ "severity": "success",
727
+ "icon": "fa-check-circle",
728
+ "title": "Validation Passed",
729
+ "summary": "7 columns detected · 20 records found",
730
+ "details": "Recognized fields: source_identifier, title, creator, model, parents, children, file",
731
+ "defaultOpen": true
732
+ },
733
+ "issues": []
734
+ }
735
+ }
736
+ },
737
+ "success_with_mixed_hierarchy": {
738
+ "label": "Each collection defines hierarchy differently",
739
+ "category": "success",
740
+ "files": [
741
+ {
742
+ "id": 11,
743
+ "name": "metadata.csv",
744
+ "size": "98 KB",
745
+ "fileType": "csv",
746
+ "fromZip": false
747
+ }
748
+ ],
749
+ "response": {
750
+ "collections": [
751
+ {
752
+ "id": "col-1",
753
+ "title": "Photographs (uses childrenIds)",
754
+ "type": "collection",
755
+ "parentIds": [],
756
+ "childrenIds": [
757
+ "work-1",
758
+ "work-2",
759
+ "work-3"
760
+ ]
761
+ },
762
+ {
763
+ "id": "col-2",
764
+ "title": "Manuscripts (uses parentIds on children)",
765
+ "type": "collection",
766
+ "parentIds": [],
767
+ "childrenIds": []
768
+ }
769
+ ],
770
+ "works": [
771
+ {
772
+ "id": "work-1",
773
+ "title": "Sunset Over the Valley",
774
+ "type": "work",
775
+ "parentIds": [],
776
+ "childrenIds": []
777
+ },
778
+ {
779
+ "id": "work-2",
780
+ "title": "City Streets, 1920",
781
+ "type": "work",
782
+ "parentIds": [],
783
+ "childrenIds": []
784
+ },
785
+ {
786
+ "id": "work-3",
787
+ "title": "Portrait of a Scholar",
788
+ "type": "work",
789
+ "parentIds": [],
790
+ "childrenIds": []
791
+ },
792
+ {
793
+ "id": "work-4",
794
+ "title": "Letter from John Adams",
795
+ "type": "work",
796
+ "parentIds": [
797
+ "col-2"
798
+ ],
799
+ "childrenIds": []
800
+ },
801
+ {
802
+ "id": "work-5",
803
+ "title": "Medieval Manuscript Fragment",
804
+ "type": "work",
805
+ "parentIds": [
806
+ "col-2"
807
+ ],
808
+ "childrenIds": []
809
+ },
810
+ {
811
+ "id": "work-6",
812
+ "title": "Cross-Referenced Recording",
813
+ "type": "work",
814
+ "parentIds": [
815
+ "col-2"
816
+ ],
817
+ "childrenIds": []
818
+ },
819
+ {
820
+ "id": "work-7",
821
+ "title": "Orphan Document",
822
+ "type": "work",
823
+ "parentIds": [],
824
+ "childrenIds": []
825
+ }
826
+ ],
827
+ "fileSets": [
828
+ {
829
+ "id": "fs-1",
830
+ "title": "sunset.tiff",
831
+ "type": "file_set"
832
+ }
833
+ ],
834
+ "totalItems": 11,
835
+ "headers": [
836
+ "source_identifier",
837
+ "title",
838
+ "creator",
839
+ "model",
840
+ "parents",
841
+ "children",
842
+ "file"
843
+ ],
844
+ "missingRequired": [],
845
+ "unrecognized": [],
846
+ "rowCount": 20,
847
+ "isValid": true,
848
+ "hasWarnings": false,
849
+ "fileReferences": 0,
850
+ "missingFiles": [],
851
+ "foundFiles": 0,
852
+ "zipIncluded": false,
853
+ "messages": {
854
+ "validationStatus": {
855
+ "severity": "success",
856
+ "icon": "fa-check-circle",
857
+ "title": "Validation Passed",
858
+ "summary": "7 columns detected · 20 records found",
859
+ "details": "Recognized fields: source_identifier, title, creator, model, parents, children, file",
860
+ "defaultOpen": true
861
+ },
862
+ "issues": []
863
+ }
864
+ }
865
+ },
866
+ "warning_unrecognized": {
867
+ "label": "Unrecognized fields",
868
+ "category": "warning",
869
+ "files": [
870
+ {
871
+ "id": 4,
872
+ "name": "metadata.csv",
873
+ "size": "142 KB",
874
+ "fileType": "csv",
875
+ "fromZip": false
876
+ },
877
+ {
878
+ "id": 5,
879
+ "name": "Archive.zip",
880
+ "size": "7.58 MB",
881
+ "fileType": "zip",
882
+ "fromZip": false,
883
+ "subtitle": "contains files"
884
+ }
885
+ ],
886
+ "response": {
887
+ "collections": [
888
+ {
889
+ "id": "col-1",
890
+ "title": "Historical Photographs Collection",
891
+ "type": "collection",
892
+ "parentIds": []
893
+ },
894
+ {
895
+ "id": "col-2",
896
+ "title": "Manuscripts & Letters",
897
+ "type": "collection",
898
+ "parentIds": []
899
+ },
900
+ {
901
+ "id": "col-3",
902
+ "title": "Audio Recordings",
903
+ "type": "collection",
904
+ "parentIds": []
905
+ },
906
+ {
907
+ "id": "col-1a",
908
+ "title": "Landscapes",
909
+ "type": "collection",
910
+ "parentIds": [
911
+ "col-1"
912
+ ]
913
+ },
914
+ {
915
+ "id": "col-1b",
916
+ "title": "Portraits",
917
+ "type": "collection",
918
+ "parentIds": [
919
+ "col-1"
920
+ ]
921
+ }
922
+ ],
923
+ "works": [
924
+ {
925
+ "id": "work-1",
926
+ "title": "Sunset Over the Valley",
927
+ "type": "work",
928
+ "parentIds": [
929
+ "col-1"
930
+ ]
931
+ },
932
+ {
933
+ "id": "work-2",
934
+ "title": "Portrait of a Scholar",
935
+ "type": "work",
936
+ "parentIds": [
937
+ "col-1"
938
+ ]
939
+ },
940
+ {
941
+ "id": "work-3",
942
+ "title": "City Streets, 1920",
943
+ "type": "work",
944
+ "parentIds": [
945
+ "col-1"
946
+ ]
947
+ },
948
+ {
949
+ "id": "work-4",
950
+ "title": "Letter from John Adams",
951
+ "type": "work",
952
+ "parentIds": [
953
+ "col-2"
954
+ ]
955
+ },
956
+ {
957
+ "id": "work-5",
958
+ "title": "Medieval Manuscript Fragment",
959
+ "type": "work",
960
+ "parentIds": [
961
+ "col-2"
962
+ ]
963
+ },
964
+ {
965
+ "id": "work-6",
966
+ "title": "Interview with Jane Doe",
967
+ "type": "work",
968
+ "parentIds": [
969
+ "col-3"
970
+ ]
971
+ },
972
+ {
973
+ "id": "work-7",
974
+ "title": "Field Recording, Summer 1985",
975
+ "type": "work",
976
+ "parentIds": [
977
+ "col-3"
978
+ ]
979
+ },
980
+ {
981
+ "id": "work-8",
982
+ "title": "Untitled Photograph",
983
+ "type": "work",
984
+ "parentIds": []
985
+ },
986
+ {
987
+ "id": "work-9",
988
+ "title": "Miscellaneous Notes",
989
+ "type": "work",
990
+ "parentIds": []
991
+ },
992
+ {
993
+ "id": "work-10",
994
+ "title": "Mountain Vista at Dawn",
995
+ "type": "work",
996
+ "parentIds": [
997
+ "col-1a"
998
+ ]
999
+ },
1000
+ {
1001
+ "id": "work-11",
1002
+ "title": "Coastal Sunset",
1003
+ "type": "work",
1004
+ "parentIds": [
1005
+ "col-1a"
1006
+ ]
1007
+ },
1008
+ {
1009
+ "id": "work-12",
1010
+ "title": "The Librarian",
1011
+ "type": "work",
1012
+ "parentIds": [
1013
+ "col-1b"
1014
+ ]
1015
+ }
1016
+ ],
1017
+ "fileSets": [
1018
+ {
1019
+ "id": "fs-1",
1020
+ "title": "sunset_valley.tiff",
1021
+ "type": "file_set"
1022
+ },
1023
+ {
1024
+ "id": "fs-2",
1025
+ "title": "portrait_scholar.jpg",
1026
+ "type": "file_set"
1027
+ },
1028
+ {
1029
+ "id": "fs-3",
1030
+ "title": "city_streets.png",
1031
+ "type": "file_set"
1032
+ }
1033
+ ],
1034
+ "totalItems": 20,
1035
+ "headers": [
1036
+ "source_identifier",
1037
+ "title",
1038
+ "creator",
1039
+ "model",
1040
+ "parents",
1041
+ "file",
1042
+ "description",
1043
+ "date_created",
1044
+ "legacy_id",
1045
+ "internal_notes",
1046
+ "subject"
1047
+ ],
1048
+ "missingRequired": [],
1049
+ "unrecognized": [
1050
+ "legacy_id",
1051
+ "internal_notes"
1052
+ ],
1053
+ "rowCount": 247,
1054
+ "isValid": true,
1055
+ "hasWarnings": true,
1056
+ "fileReferences": 0,
1057
+ "missingFiles": [],
1058
+ "foundFiles": 0,
1059
+ "zipIncluded": false,
1060
+ "messages": {
1061
+ "validationStatus": {
1062
+ "severity": "warning",
1063
+ "icon": "fa-exclamation-triangle",
1064
+ "title": "Validation Passed with Warnings",
1065
+ "summary": "11 columns detected · 247 records found",
1066
+ "details": "Recognized fields: source_identifier, title, creator, model, parents, file, description, date_created, subject",
1067
+ "defaultOpen": true
1068
+ },
1069
+ "issues": [
1070
+ {
1071
+ "type": "unrecognized_fields",
1072
+ "severity": "warning",
1073
+ "icon": "fa-exclamation-triangle",
1074
+ "title": "Unrecognized Fields",
1075
+ "count": 2,
1076
+ "description": "These columns will be ignored during import:",
1077
+ "items": [
1078
+ {
1079
+ "field": "legacy_id",
1080
+ "message": null
1081
+ },
1082
+ {
1083
+ "field": "internal_notes",
1084
+ "message": null
1085
+ }
1086
+ ],
1087
+ "defaultOpen": false
1088
+ }
1089
+ ]
1090
+ }
1091
+ }
1092
+ },
1093
+ "warning_missing_files": {
1094
+ "label": "Missing files from ZIP",
1095
+ "category": "warning",
1096
+ "files": [
1097
+ {
1098
+ "id": 4,
1099
+ "name": "metadata.csv",
1100
+ "size": "142 KB",
1101
+ "fileType": "csv",
1102
+ "fromZip": false
1103
+ },
1104
+ {
1105
+ "id": 5,
1106
+ "name": "Archive.zip",
1107
+ "size": "7.58 MB",
1108
+ "fileType": "zip",
1109
+ "fromZip": false,
1110
+ "subtitle": "contains files"
1111
+ }
1112
+ ],
1113
+ "response": {
1114
+ "collections": [
1115
+ {
1116
+ "id": "col-1",
1117
+ "title": "Historical Photographs Collection",
1118
+ "type": "collection",
1119
+ "parentIds": []
1120
+ },
1121
+ {
1122
+ "id": "col-2",
1123
+ "title": "Manuscripts & Letters",
1124
+ "type": "collection",
1125
+ "parentIds": []
1126
+ },
1127
+ {
1128
+ "id": "col-3",
1129
+ "title": "Audio Recordings",
1130
+ "type": "collection",
1131
+ "parentIds": []
1132
+ },
1133
+ {
1134
+ "id": "col-1a",
1135
+ "title": "Landscapes",
1136
+ "type": "collection",
1137
+ "parentIds": [
1138
+ "col-1"
1139
+ ]
1140
+ },
1141
+ {
1142
+ "id": "col-1b",
1143
+ "title": "Portraits",
1144
+ "type": "collection",
1145
+ "parentIds": [
1146
+ "col-1"
1147
+ ]
1148
+ }
1149
+ ],
1150
+ "works": [
1151
+ {
1152
+ "id": "work-1",
1153
+ "title": "Sunset Over the Valley",
1154
+ "type": "work",
1155
+ "parentIds": [
1156
+ "col-1"
1157
+ ]
1158
+ },
1159
+ {
1160
+ "id": "work-2",
1161
+ "title": "Portrait of a Scholar",
1162
+ "type": "work",
1163
+ "parentIds": [
1164
+ "col-1"
1165
+ ]
1166
+ },
1167
+ {
1168
+ "id": "work-3",
1169
+ "title": "City Streets, 1920",
1170
+ "type": "work",
1171
+ "parentIds": [
1172
+ "col-1"
1173
+ ]
1174
+ },
1175
+ {
1176
+ "id": "work-4",
1177
+ "title": "Letter from John Adams",
1178
+ "type": "work",
1179
+ "parentIds": [
1180
+ "col-2"
1181
+ ]
1182
+ },
1183
+ {
1184
+ "id": "work-5",
1185
+ "title": "Medieval Manuscript Fragment",
1186
+ "type": "work",
1187
+ "parentIds": [
1188
+ "col-2"
1189
+ ]
1190
+ },
1191
+ {
1192
+ "id": "work-6",
1193
+ "title": "Interview with Jane Doe",
1194
+ "type": "work",
1195
+ "parentIds": [
1196
+ "col-3"
1197
+ ]
1198
+ },
1199
+ {
1200
+ "id": "work-7",
1201
+ "title": "Field Recording, Summer 1985",
1202
+ "type": "work",
1203
+ "parentIds": [
1204
+ "col-3"
1205
+ ]
1206
+ },
1207
+ {
1208
+ "id": "work-8",
1209
+ "title": "Untitled Photograph",
1210
+ "type": "work",
1211
+ "parentIds": []
1212
+ },
1213
+ {
1214
+ "id": "work-9",
1215
+ "title": "Miscellaneous Notes",
1216
+ "type": "work",
1217
+ "parentIds": []
1218
+ },
1219
+ {
1220
+ "id": "work-10",
1221
+ "title": "Mountain Vista at Dawn",
1222
+ "type": "work",
1223
+ "parentIds": [
1224
+ "col-1a"
1225
+ ]
1226
+ },
1227
+ {
1228
+ "id": "work-11",
1229
+ "title": "Coastal Sunset",
1230
+ "type": "work",
1231
+ "parentIds": [
1232
+ "col-1a"
1233
+ ]
1234
+ },
1235
+ {
1236
+ "id": "work-12",
1237
+ "title": "The Librarian",
1238
+ "type": "work",
1239
+ "parentIds": [
1240
+ "col-1b"
1241
+ ]
1242
+ }
1243
+ ],
1244
+ "fileSets": [
1245
+ {
1246
+ "id": "fs-1",
1247
+ "title": "sunset_valley.tiff",
1248
+ "type": "file_set"
1249
+ },
1250
+ {
1251
+ "id": "fs-2",
1252
+ "title": "portrait_scholar.jpg",
1253
+ "type": "file_set"
1254
+ },
1255
+ {
1256
+ "id": "fs-3",
1257
+ "title": "city_streets.png",
1258
+ "type": "file_set"
1259
+ }
1260
+ ],
1261
+ "totalItems": 20,
1262
+ "headers": [
1263
+ "source_identifier",
1264
+ "title",
1265
+ "creator",
1266
+ "model",
1267
+ "parents",
1268
+ "file"
1269
+ ],
1270
+ "missingRequired": [],
1271
+ "unrecognized": [],
1272
+ "rowCount": 55,
1273
+ "isValid": true,
1274
+ "hasWarnings": true,
1275
+ "fileReferences": 55,
1276
+ "foundFiles": 52,
1277
+ "zipIncluded": true,
1278
+ "missingFiles": [
1279
+ "photo_087.tiff",
1280
+ "letter_scan_12.pdf",
1281
+ "recording_03.wav"
1282
+ ],
1283
+ "messages": {
1284
+ "validationStatus": {
1285
+ "severity": "warning",
1286
+ "icon": "fa-exclamation-triangle",
1287
+ "title": "Validation Passed with Warnings",
1288
+ "summary": "6 columns detected · 55 records found",
1289
+ "details": "Recognized fields: source_identifier, title, creator, model, parents, file",
1290
+ "defaultOpen": true
1291
+ },
1292
+ "issues": [
1293
+ {
1294
+ "type": "file_references",
1295
+ "severity": "warning",
1296
+ "icon": "fa-info-circle",
1297
+ "title": "File References",
1298
+ "count": 55,
1299
+ "summary": "52 of 55 files found in ZIP.",
1300
+ "description": "3 files are referenced in your CSV but missing from the ZIP:",
1301
+ "items": [
1302
+ {
1303
+ "field": "photo_087.tiff",
1304
+ "message": "missing from ZIP"
1305
+ },
1306
+ {
1307
+ "field": "letter_scan_12.pdf",
1308
+ "message": "missing from ZIP"
1309
+ },
1310
+ {
1311
+ "field": "recording_03.wav",
1312
+ "message": "missing from ZIP"
1313
+ }
1314
+ ],
1315
+ "defaultOpen": false
1316
+ }
1317
+ ]
1318
+ }
1319
+ }
1320
+ },
1321
+ "warning_no_zip": {
1322
+ "label": "Files referenced, no ZIP",
1323
+ "category": "warning",
1324
+ "files": [
1325
+ {
1326
+ "id": 6,
1327
+ "name": "metadata.csv",
1328
+ "size": "142 KB",
1329
+ "fileType": "csv",
1330
+ "fromZip": false
1331
+ }
1332
+ ],
1333
+ "response": {
1334
+ "collections": [
1335
+ {
1336
+ "id": "col-1",
1337
+ "title": "Historical Photographs Collection",
1338
+ "type": "collection",
1339
+ "parentIds": []
1340
+ },
1341
+ {
1342
+ "id": "col-2",
1343
+ "title": "Manuscripts & Letters",
1344
+ "type": "collection",
1345
+ "parentIds": []
1346
+ },
1347
+ {
1348
+ "id": "col-3",
1349
+ "title": "Audio Recordings",
1350
+ "type": "collection",
1351
+ "parentIds": []
1352
+ },
1353
+ {
1354
+ "id": "col-1a",
1355
+ "title": "Landscapes",
1356
+ "type": "collection",
1357
+ "parentIds": [
1358
+ "col-1"
1359
+ ]
1360
+ },
1361
+ {
1362
+ "id": "col-1b",
1363
+ "title": "Portraits",
1364
+ "type": "collection",
1365
+ "parentIds": [
1366
+ "col-1"
1367
+ ]
1368
+ }
1369
+ ],
1370
+ "works": [
1371
+ {
1372
+ "id": "work-1",
1373
+ "title": "Sunset Over the Valley",
1374
+ "type": "work",
1375
+ "parentIds": [
1376
+ "col-1"
1377
+ ]
1378
+ },
1379
+ {
1380
+ "id": "work-2",
1381
+ "title": "Portrait of a Scholar",
1382
+ "type": "work",
1383
+ "parentIds": [
1384
+ "col-1"
1385
+ ]
1386
+ },
1387
+ {
1388
+ "id": "work-3",
1389
+ "title": "City Streets, 1920",
1390
+ "type": "work",
1391
+ "parentIds": [
1392
+ "col-1"
1393
+ ]
1394
+ },
1395
+ {
1396
+ "id": "work-4",
1397
+ "title": "Letter from John Adams",
1398
+ "type": "work",
1399
+ "parentIds": [
1400
+ "col-2"
1401
+ ]
1402
+ },
1403
+ {
1404
+ "id": "work-5",
1405
+ "title": "Medieval Manuscript Fragment",
1406
+ "type": "work",
1407
+ "parentIds": [
1408
+ "col-2"
1409
+ ]
1410
+ },
1411
+ {
1412
+ "id": "work-6",
1413
+ "title": "Interview with Jane Doe",
1414
+ "type": "work",
1415
+ "parentIds": [
1416
+ "col-3"
1417
+ ]
1418
+ },
1419
+ {
1420
+ "id": "work-7",
1421
+ "title": "Field Recording, Summer 1985",
1422
+ "type": "work",
1423
+ "parentIds": [
1424
+ "col-3"
1425
+ ]
1426
+ },
1427
+ {
1428
+ "id": "work-8",
1429
+ "title": "Untitled Photograph",
1430
+ "type": "work",
1431
+ "parentIds": []
1432
+ },
1433
+ {
1434
+ "id": "work-9",
1435
+ "title": "Miscellaneous Notes",
1436
+ "type": "work",
1437
+ "parentIds": []
1438
+ },
1439
+ {
1440
+ "id": "work-10",
1441
+ "title": "Mountain Vista at Dawn",
1442
+ "type": "work",
1443
+ "parentIds": [
1444
+ "col-1a"
1445
+ ]
1446
+ },
1447
+ {
1448
+ "id": "work-11",
1449
+ "title": "Coastal Sunset",
1450
+ "type": "work",
1451
+ "parentIds": [
1452
+ "col-1a"
1453
+ ]
1454
+ },
1455
+ {
1456
+ "id": "work-12",
1457
+ "title": "The Librarian",
1458
+ "type": "work",
1459
+ "parentIds": [
1460
+ "col-1b"
1461
+ ]
1462
+ }
1463
+ ],
1464
+ "fileSets": [
1465
+ {
1466
+ "id": "fs-1",
1467
+ "title": "sunset_valley.tiff",
1468
+ "type": "file_set"
1469
+ },
1470
+ {
1471
+ "id": "fs-2",
1472
+ "title": "portrait_scholar.jpg",
1473
+ "type": "file_set"
1474
+ },
1475
+ {
1476
+ "id": "fs-3",
1477
+ "title": "city_streets.png",
1478
+ "type": "file_set"
1479
+ }
1480
+ ],
1481
+ "totalItems": 20,
1482
+ "headers": [
1483
+ "source_identifier",
1484
+ "title",
1485
+ "creator",
1486
+ "model",
1487
+ "file"
1488
+ ],
1489
+ "missingRequired": [],
1490
+ "unrecognized": [],
1491
+ "rowCount": 30,
1492
+ "isValid": true,
1493
+ "hasWarnings": true,
1494
+ "fileReferences": 30,
1495
+ "missingFiles": [],
1496
+ "foundFiles": 0,
1497
+ "zipIncluded": false,
1498
+ "messages": {
1499
+ "validationStatus": {
1500
+ "severity": "warning",
1501
+ "icon": "fa-exclamation-triangle",
1502
+ "title": "Validation Passed with Warnings",
1503
+ "summary": "5 columns detected · 30 records found",
1504
+ "details": "Recognized fields: source_identifier, title, creator, model, file",
1505
+ "defaultOpen": true
1506
+ },
1507
+ "issues": [
1508
+ {
1509
+ "type": "file_references",
1510
+ "severity": "warning",
1511
+ "icon": "fa-exclamation-triangle",
1512
+ "title": "File References",
1513
+ "count": 30,
1514
+ "summary": "30 files referenced in CSV.",
1515
+ "description": "No ZIP file uploaded. Ensure files are accessible on the server or upload a ZIP file containing the referenced files.",
1516
+ "items": [],
1517
+ "defaultOpen": false
1518
+ }
1519
+ ]
1520
+ }
1521
+ }
1522
+ },
1523
+ "warning_combined": {
1524
+ "label": "Combined warnings",
1525
+ "category": "warning",
1526
+ "files": [
1527
+ {
1528
+ "id": 4,
1529
+ "name": "metadata.csv",
1530
+ "size": "142 KB",
1531
+ "fileType": "csv",
1532
+ "fromZip": false
1533
+ },
1534
+ {
1535
+ "id": 5,
1536
+ "name": "Archive.zip",
1537
+ "size": "7.58 MB",
1538
+ "fileType": "zip",
1539
+ "fromZip": false,
1540
+ "subtitle": "contains files"
1541
+ }
1542
+ ],
1543
+ "response": {
1544
+ "collections": [
1545
+ {
1546
+ "id": "col-1",
1547
+ "title": "Historical Photographs Collection",
1548
+ "type": "collection",
1549
+ "parentIds": []
1550
+ },
1551
+ {
1552
+ "id": "col-2",
1553
+ "title": "Manuscripts & Letters",
1554
+ "type": "collection",
1555
+ "parentIds": []
1556
+ },
1557
+ {
1558
+ "id": "col-3",
1559
+ "title": "Audio Recordings",
1560
+ "type": "collection",
1561
+ "parentIds": []
1562
+ },
1563
+ {
1564
+ "id": "col-1a",
1565
+ "title": "Landscapes",
1566
+ "type": "collection",
1567
+ "parentIds": [
1568
+ "col-1"
1569
+ ]
1570
+ },
1571
+ {
1572
+ "id": "col-1b",
1573
+ "title": "Portraits",
1574
+ "type": "collection",
1575
+ "parentIds": [
1576
+ "col-1"
1577
+ ]
1578
+ }
1579
+ ],
1580
+ "works": [
1581
+ {
1582
+ "id": "work-1",
1583
+ "title": "Sunset Over the Valley",
1584
+ "type": "work",
1585
+ "parentIds": [
1586
+ "col-1"
1587
+ ]
1588
+ },
1589
+ {
1590
+ "id": "work-2",
1591
+ "title": "Portrait of a Scholar",
1592
+ "type": "work",
1593
+ "parentIds": [
1594
+ "col-1"
1595
+ ]
1596
+ },
1597
+ {
1598
+ "id": "work-3",
1599
+ "title": "City Streets, 1920",
1600
+ "type": "work",
1601
+ "parentIds": [
1602
+ "col-1"
1603
+ ]
1604
+ },
1605
+ {
1606
+ "id": "work-4",
1607
+ "title": "Letter from John Adams",
1608
+ "type": "work",
1609
+ "parentIds": [
1610
+ "col-2"
1611
+ ]
1612
+ },
1613
+ {
1614
+ "id": "work-5",
1615
+ "title": "Medieval Manuscript Fragment",
1616
+ "type": "work",
1617
+ "parentIds": [
1618
+ "col-2"
1619
+ ]
1620
+ },
1621
+ {
1622
+ "id": "work-6",
1623
+ "title": "Interview with Jane Doe",
1624
+ "type": "work",
1625
+ "parentIds": [
1626
+ "col-3"
1627
+ ]
1628
+ },
1629
+ {
1630
+ "id": "work-7",
1631
+ "title": "Field Recording, Summer 1985",
1632
+ "type": "work",
1633
+ "parentIds": [
1634
+ "col-3"
1635
+ ]
1636
+ },
1637
+ {
1638
+ "id": "work-8",
1639
+ "title": "Untitled Photograph",
1640
+ "type": "work",
1641
+ "parentIds": []
1642
+ },
1643
+ {
1644
+ "id": "work-9",
1645
+ "title": "Miscellaneous Notes",
1646
+ "type": "work",
1647
+ "parentIds": []
1648
+ },
1649
+ {
1650
+ "id": "work-10",
1651
+ "title": "Mountain Vista at Dawn",
1652
+ "type": "work",
1653
+ "parentIds": [
1654
+ "col-1a"
1655
+ ]
1656
+ },
1657
+ {
1658
+ "id": "work-11",
1659
+ "title": "Coastal Sunset",
1660
+ "type": "work",
1661
+ "parentIds": [
1662
+ "col-1a"
1663
+ ]
1664
+ },
1665
+ {
1666
+ "id": "work-12",
1667
+ "title": "The Librarian",
1668
+ "type": "work",
1669
+ "parentIds": [
1670
+ "col-1b"
1671
+ ]
1672
+ }
1673
+ ],
1674
+ "fileSets": [
1675
+ {
1676
+ "id": "fs-1",
1677
+ "title": "sunset_valley.tiff",
1678
+ "type": "file_set"
1679
+ },
1680
+ {
1681
+ "id": "fs-2",
1682
+ "title": "portrait_scholar.jpg",
1683
+ "type": "file_set"
1684
+ },
1685
+ {
1686
+ "id": "fs-3",
1687
+ "title": "city_streets.png",
1688
+ "type": "file_set"
1689
+ }
1690
+ ],
1691
+ "totalItems": 20,
1692
+ "headers": [
1693
+ "source_identifier",
1694
+ "title",
1695
+ "creator",
1696
+ "model",
1697
+ "parents",
1698
+ "file",
1699
+ "description",
1700
+ "date_created",
1701
+ "legacy_id",
1702
+ "subject"
1703
+ ],
1704
+ "missingRequired": [],
1705
+ "unrecognized": [
1706
+ "legacy_id"
1707
+ ],
1708
+ "rowCount": 247,
1709
+ "isValid": true,
1710
+ "hasWarnings": true,
1711
+ "fileReferences": 55,
1712
+ "foundFiles": 52,
1713
+ "zipIncluded": true,
1714
+ "missingFiles": [
1715
+ "photo_087.tiff",
1716
+ "letter_scan_12.pdf",
1717
+ "recording_03.wav"
1718
+ ],
1719
+ "messages": {
1720
+ "validationStatus": {
1721
+ "severity": "warning",
1722
+ "icon": "fa-exclamation-triangle",
1723
+ "title": "Validation Passed with Warnings",
1724
+ "summary": "10 columns detected · 247 records found",
1725
+ "details": "Recognized fields: source_identifier, title, creator, model, parents, file, description, date_created, subject",
1726
+ "defaultOpen": true
1727
+ },
1728
+ "issues": [
1729
+ {
1730
+ "type": "unrecognized_fields",
1731
+ "severity": "warning",
1732
+ "icon": "fa-exclamation-triangle",
1733
+ "title": "Unrecognized Fields",
1734
+ "count": 1,
1735
+ "description": "These columns will be ignored during import:",
1736
+ "items": [
1737
+ {
1738
+ "field": "legacy_id",
1739
+ "message": null
1740
+ }
1741
+ ],
1742
+ "defaultOpen": false
1743
+ },
1744
+ {
1745
+ "type": "file_references",
1746
+ "severity": "warning",
1747
+ "icon": "fa-info-circle",
1748
+ "title": "File References",
1749
+ "count": 55,
1750
+ "summary": "52 of 55 files found in ZIP.",
1751
+ "description": "3 files are referenced in your CSV but missing from the ZIP:",
1752
+ "items": [
1753
+ {
1754
+ "field": "photo_087.tiff",
1755
+ "message": "missing from ZIP"
1756
+ },
1757
+ {
1758
+ "field": "letter_scan_12.pdf",
1759
+ "message": "missing from ZIP"
1760
+ },
1761
+ {
1762
+ "field": "recording_03.wav",
1763
+ "message": "missing from ZIP"
1764
+ }
1765
+ ],
1766
+ "defaultOpen": false
1767
+ }
1768
+ ]
1769
+ }
1770
+ }
1771
+ },
1772
+ "error_missing_required": {
1773
+ "label": "Missing required fields",
1774
+ "category": "error",
1775
+ "files": [
1776
+ {
1777
+ "id": 7,
1778
+ "name": "incomplete.csv",
1779
+ "size": "42 KB",
1780
+ "fileType": "csv",
1781
+ "fromZip": false
1782
+ }
1783
+ ],
1784
+ "response": {
1785
+ "collections": [
1786
+ {
1787
+ "id": "col-1",
1788
+ "title": "Historical Photographs Collection",
1789
+ "type": "collection",
1790
+ "parentIds": []
1791
+ },
1792
+ {
1793
+ "id": "col-2",
1794
+ "title": "Manuscripts & Letters",
1795
+ "type": "collection",
1796
+ "parentIds": []
1797
+ },
1798
+ {
1799
+ "id": "col-3",
1800
+ "title": "Audio Recordings",
1801
+ "type": "collection",
1802
+ "parentIds": []
1803
+ },
1804
+ {
1805
+ "id": "col-1a",
1806
+ "title": "Landscapes",
1807
+ "type": "collection",
1808
+ "parentIds": [
1809
+ "col-1"
1810
+ ]
1811
+ },
1812
+ {
1813
+ "id": "col-1b",
1814
+ "title": "Portraits",
1815
+ "type": "collection",
1816
+ "parentIds": [
1817
+ "col-1"
1818
+ ]
1819
+ }
1820
+ ],
1821
+ "works": [
1822
+ {
1823
+ "id": "work-1",
1824
+ "title": "Sunset Over the Valley",
1825
+ "type": "work",
1826
+ "parentIds": [
1827
+ "col-1"
1828
+ ]
1829
+ },
1830
+ {
1831
+ "id": "work-2",
1832
+ "title": "Portrait of a Scholar",
1833
+ "type": "work",
1834
+ "parentIds": [
1835
+ "col-1"
1836
+ ]
1837
+ },
1838
+ {
1839
+ "id": "work-3",
1840
+ "title": "City Streets, 1920",
1841
+ "type": "work",
1842
+ "parentIds": [
1843
+ "col-1"
1844
+ ]
1845
+ },
1846
+ {
1847
+ "id": "work-4",
1848
+ "title": "Letter from John Adams",
1849
+ "type": "work",
1850
+ "parentIds": [
1851
+ "col-2"
1852
+ ]
1853
+ },
1854
+ {
1855
+ "id": "work-5",
1856
+ "title": "Medieval Manuscript Fragment",
1857
+ "type": "work",
1858
+ "parentIds": [
1859
+ "col-2"
1860
+ ]
1861
+ },
1862
+ {
1863
+ "id": "work-6",
1864
+ "title": "Interview with Jane Doe",
1865
+ "type": "work",
1866
+ "parentIds": [
1867
+ "col-3"
1868
+ ]
1869
+ },
1870
+ {
1871
+ "id": "work-7",
1872
+ "title": "Field Recording, Summer 1985",
1873
+ "type": "work",
1874
+ "parentIds": [
1875
+ "col-3"
1876
+ ]
1877
+ },
1878
+ {
1879
+ "id": "work-8",
1880
+ "title": "Untitled Photograph",
1881
+ "type": "work",
1882
+ "parentIds": []
1883
+ },
1884
+ {
1885
+ "id": "work-9",
1886
+ "title": "Miscellaneous Notes",
1887
+ "type": "work",
1888
+ "parentIds": []
1889
+ },
1890
+ {
1891
+ "id": "work-10",
1892
+ "title": "Mountain Vista at Dawn",
1893
+ "type": "work",
1894
+ "parentIds": [
1895
+ "col-1a"
1896
+ ]
1897
+ },
1898
+ {
1899
+ "id": "work-11",
1900
+ "title": "Coastal Sunset",
1901
+ "type": "work",
1902
+ "parentIds": [
1903
+ "col-1a"
1904
+ ]
1905
+ },
1906
+ {
1907
+ "id": "work-12",
1908
+ "title": "The Librarian",
1909
+ "type": "work",
1910
+ "parentIds": [
1911
+ "col-1b"
1912
+ ]
1913
+ }
1914
+ ],
1915
+ "fileSets": [
1916
+ {
1917
+ "id": "fs-1",
1918
+ "title": "sunset_valley.tiff",
1919
+ "type": "file_set"
1920
+ },
1921
+ {
1922
+ "id": "fs-2",
1923
+ "title": "portrait_scholar.jpg",
1924
+ "type": "file_set"
1925
+ },
1926
+ {
1927
+ "id": "fs-3",
1928
+ "title": "city_streets.png",
1929
+ "type": "file_set"
1930
+ }
1931
+ ],
1932
+ "totalItems": 20,
1933
+ "headers": [
1934
+ "title",
1935
+ "creator",
1936
+ "description",
1937
+ "date_created"
1938
+ ],
1939
+ "missingRequired": [
1940
+ "source_identifier",
1941
+ "rights_statement",
1942
+ "title"
1943
+ ],
1944
+ "unrecognized": [],
1945
+ "rowCount": 100,
1946
+ "isValid": false,
1947
+ "hasWarnings": false,
1948
+ "fileReferences": 0,
1949
+ "missingFiles": [],
1950
+ "foundFiles": 0,
1951
+ "zipIncluded": false,
1952
+ "messages": {
1953
+ "validationStatus": {
1954
+ "severity": "error",
1955
+ "icon": "fa-times-circle",
1956
+ "title": "Validation Failed",
1957
+ "summary": "4 columns detected · 100 records found",
1958
+ "details": "Critical errors must be fixed before import.",
1959
+ "defaultOpen": true
1960
+ },
1961
+ "issues": [
1962
+ {
1963
+ "type": "missing_required_fields",
1964
+ "severity": "error",
1965
+ "icon": "fa-times-circle",
1966
+ "title": "Missing Required Fields",
1967
+ "count": 5,
1968
+ "description": "These required columns must be added to your CSV:",
1969
+ "items": [
1970
+ {
1971
+ "model": "GenericWork",
1972
+ "field": "source_identifier"
1973
+ },
1974
+ {
1975
+ "model": "GenericWork",
1976
+ "field": "rights_statement"
1977
+ },
1978
+ {
1979
+ "model": "Collection",
1980
+ "field": "title"
1981
+ },
1982
+ {
1983
+ "model": "Collection",
1984
+ "field": "rights_statement"
1985
+ },
1986
+ {
1987
+ "model": "FileSet",
1988
+ "field": "source_identifier"
1989
+ }
1990
+ ],
1991
+ "defaultOpen": false
1992
+ }
1993
+ ]
1994
+ }
1995
+ }
1996
+ },
1997
+ "error_combined": {
1998
+ "label": "Errors + warnings",
1999
+ "category": "error",
2000
+ "files": [
2001
+ {
2002
+ "id": 7,
2003
+ "name": "incomplete.csv",
2004
+ "size": "42 KB",
2005
+ "fileType": "csv",
2006
+ "fromZip": false
2007
+ }
2008
+ ],
2009
+ "response": {
2010
+ "collections": [
2011
+ {
2012
+ "id": "col-1",
2013
+ "title": "Historical Photographs Collection",
2014
+ "type": "collection",
2015
+ "parentIds": []
2016
+ },
2017
+ {
2018
+ "id": "col-2",
2019
+ "title": "Manuscripts & Letters",
2020
+ "type": "collection",
2021
+ "parentIds": []
2022
+ },
2023
+ {
2024
+ "id": "col-3",
2025
+ "title": "Audio Recordings",
2026
+ "type": "collection",
2027
+ "parentIds": []
2028
+ },
2029
+ {
2030
+ "id": "col-1a",
2031
+ "title": "Landscapes",
2032
+ "type": "collection",
2033
+ "parentIds": [
2034
+ "col-1"
2035
+ ]
2036
+ },
2037
+ {
2038
+ "id": "col-1b",
2039
+ "title": "Portraits",
2040
+ "type": "collection",
2041
+ "parentIds": [
2042
+ "col-1"
2043
+ ]
2044
+ }
2045
+ ],
2046
+ "works": [
2047
+ {
2048
+ "id": "work-1",
2049
+ "title": "Sunset Over the Valley",
2050
+ "type": "work",
2051
+ "parentIds": [
2052
+ "col-1"
2053
+ ]
2054
+ },
2055
+ {
2056
+ "id": "work-2",
2057
+ "title": "Portrait of a Scholar",
2058
+ "type": "work",
2059
+ "parentIds": [
2060
+ "col-1"
2061
+ ]
2062
+ },
2063
+ {
2064
+ "id": "work-3",
2065
+ "title": "City Streets, 1920",
2066
+ "type": "work",
2067
+ "parentIds": [
2068
+ "col-1"
2069
+ ]
2070
+ },
2071
+ {
2072
+ "id": "work-4",
2073
+ "title": "Letter from John Adams",
2074
+ "type": "work",
2075
+ "parentIds": [
2076
+ "col-2"
2077
+ ]
2078
+ },
2079
+ {
2080
+ "id": "work-5",
2081
+ "title": "Medieval Manuscript Fragment",
2082
+ "type": "work",
2083
+ "parentIds": [
2084
+ "col-2"
2085
+ ]
2086
+ },
2087
+ {
2088
+ "id": "work-6",
2089
+ "title": "Interview with Jane Doe",
2090
+ "type": "work",
2091
+ "parentIds": [
2092
+ "col-3"
2093
+ ]
2094
+ },
2095
+ {
2096
+ "id": "work-7",
2097
+ "title": "Field Recording, Summer 1985",
2098
+ "type": "work",
2099
+ "parentIds": [
2100
+ "col-3"
2101
+ ]
2102
+ },
2103
+ {
2104
+ "id": "work-8",
2105
+ "title": "Untitled Photograph",
2106
+ "type": "work",
2107
+ "parentIds": []
2108
+ },
2109
+ {
2110
+ "id": "work-9",
2111
+ "title": "Miscellaneous Notes",
2112
+ "type": "work",
2113
+ "parentIds": []
2114
+ },
2115
+ {
2116
+ "id": "work-10",
2117
+ "title": "Mountain Vista at Dawn",
2118
+ "type": "work",
2119
+ "parentIds": [
2120
+ "col-1a"
2121
+ ]
2122
+ },
2123
+ {
2124
+ "id": "work-11",
2125
+ "title": "Coastal Sunset",
2126
+ "type": "work",
2127
+ "parentIds": [
2128
+ "col-1a"
2129
+ ]
2130
+ },
2131
+ {
2132
+ "id": "work-12",
2133
+ "title": "The Librarian",
2134
+ "type": "work",
2135
+ "parentIds": [
2136
+ "col-1b"
2137
+ ]
2138
+ }
2139
+ ],
2140
+ "fileSets": [
2141
+ {
2142
+ "id": "fs-1",
2143
+ "title": "sunset_valley.tiff",
2144
+ "type": "file_set"
2145
+ },
2146
+ {
2147
+ "id": "fs-2",
2148
+ "title": "portrait_scholar.jpg",
2149
+ "type": "file_set"
2150
+ },
2151
+ {
2152
+ "id": "fs-3",
2153
+ "title": "city_streets.png",
2154
+ "type": "file_set"
2155
+ }
2156
+ ],
2157
+ "totalItems": 20,
2158
+ "headers": [
2159
+ "title",
2160
+ "creator",
2161
+ "description",
2162
+ "legacy_id"
2163
+ ],
2164
+ "missingRequired": [
2165
+ "source_identifier",
2166
+ "model"
2167
+ ],
2168
+ "unrecognized": [
2169
+ "legacy_id"
2170
+ ],
2171
+ "rowCount": 75,
2172
+ "isValid": false,
2173
+ "hasWarnings": true,
2174
+ "fileReferences": 0,
2175
+ "missingFiles": [],
2176
+ "foundFiles": 0,
2177
+ "zipIncluded": false,
2178
+ "messages": {
2179
+ "validationStatus": {
2180
+ "severity": "error",
2181
+ "icon": "fa-times-circle",
2182
+ "title": "Validation Failed",
2183
+ "summary": "4 columns detected · 75 records found",
2184
+ "details": "Critical errors must be fixed before import.",
2185
+ "defaultOpen": true
2186
+ },
2187
+ "issues": [
2188
+ {
2189
+ "type": "missing_required_fields",
2190
+ "severity": "error",
2191
+ "icon": "fa-times-circle",
2192
+ "title": "Missing Required Fields",
2193
+ "count": 4,
2194
+ "description": "These required columns must be added to your CSV:",
2195
+ "items": [
2196
+ {
2197
+ "model": "GenericWork",
2198
+ "field": "source_identifier"
2199
+ },
2200
+ {
2201
+ "model": "GenericWork",
2202
+ "field": "model"
2203
+ },
2204
+ {
2205
+ "model": "Collection",
2206
+ "field": "source_identifier"
2207
+ },
2208
+ {
2209
+ "model": "Collection",
2210
+ "field": "model"
2211
+ }
2212
+ ],
2213
+ "defaultOpen": false
2214
+ },
2215
+ {
2216
+ "type": "unrecognized_fields",
2217
+ "severity": "warning",
2218
+ "icon": "fa-exclamation-triangle",
2219
+ "title": "Unrecognized Fields",
2220
+ "count": 1,
2221
+ "description": "These columns will be ignored during import:",
2222
+ "items": [
2223
+ {
2224
+ "field": "legacy_id",
2225
+ "message": null
2226
+ }
2227
+ ],
2228
+ "defaultOpen": false
2229
+ }
2230
+ ]
2231
+ }
2232
+ }
2233
+ }
2234
+ }
2235
+ }