@nfdi4plants/arctrl 2.1.0-alpha.4 → 2.2.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 (83) hide show
  1. package/CWL/CWLTypes.js +135 -0
  2. package/CWL/Decode.js +585 -0
  3. package/CWL/Inputs.js +62 -0
  4. package/CWL/Outputs.js +59 -0
  5. package/CWL/Requirements.js +72 -0
  6. package/CWL/ToolDescription.js +81 -0
  7. package/CWL/WorkflowDescription.js +81 -0
  8. package/CWL/WorkflowSteps.js +98 -0
  9. package/Core/ArcTypes.js +76 -87
  10. package/Core/Helper/Identifier.js +2 -2
  11. package/Core/OntologyAnnotation.js +8 -5
  12. package/Core/Table/ArcTable.js +15 -7
  13. package/Core/Table/CompositeHeader.js +4 -0
  14. package/Core/Template.js +8 -0
  15. package/Json/{ROCrateObject.js → LDObject.js} +66 -17
  16. package/JsonIO/LDObject.js +31 -0
  17. package/ROCrate/ArcROCrateMetadata.js +35 -0
  18. package/ROCrate/ISAProfile/Assay.js +30 -2
  19. package/ROCrate/ISAProfile/Data.js +32 -5
  20. package/ROCrate/ISAProfile/Dataset.js +3 -3
  21. package/ROCrate/ISAProfile/Investigation.js +30 -2
  22. package/ROCrate/ISAProfile/LabProcess.js +113 -5
  23. package/ROCrate/ISAProfile/LabProtocol.js +4 -4
  24. package/ROCrate/ISAProfile/Person.js +32 -5
  25. package/ROCrate/ISAProfile/PropertyValue.js +59 -5
  26. package/ROCrate/ISAProfile/Sample.js +32 -5
  27. package/ROCrate/ISAProfile/ScholarlyArticle.js +59 -5
  28. package/ROCrate/ISAProfile/Study.js +30 -2
  29. package/ROCrate/LDObject.js +105 -0
  30. package/Spreadsheet/AnnotationTable/ArcTable.js +8 -5
  31. package/Spreadsheet/Template.js +29 -11
  32. package/Yaml/ValidationPackage.js +6 -6
  33. package/Yaml/ValidationPackagesConfig.js +6 -6
  34. package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/DynObj.fs +4 -4
  35. package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/DynObj.fs.js +0 -44
  36. package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/HashCodes.fs +4 -1
  37. package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/HashCodes.fs.js +8 -3
  38. package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/obj/Debug/netstandard2.0/DynamicObj.AssemblyInfo.fs +1 -1
  39. package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/obj/Release/netstandard2.0/DynamicObj.AssemblyInfo.fs +3 -3
  40. package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Decode.fs +398 -373
  41. package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Decode.fs.js +35 -2
  42. package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/obj/Debug/netstandard2.0/YAMLicious.AssemblyInfo.fs +1 -1
  43. package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/obj/Release/netstandard2.0/YAMLicious.AssemblyInfo.fs +1 -1
  44. package/fable_modules/project_cracked.json +1 -1
  45. package/package.json +1 -1
  46. package/JsonIO/ROCrateObject.js +0 -146
  47. package/ROCrate/ROCrateObject.js +0 -61
  48. /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/DynamicObj.fableproj +0 -0
  49. /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/DynamicObj.fs +0 -0
  50. /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/DynamicObj.fs.js +0 -0
  51. /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/FableJS.fs +0 -0
  52. /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/FableJS.fs.js +0 -0
  53. /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/FablePy.fs +0 -0
  54. /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/PropertyHelper.fs +0 -0
  55. /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/PropertyHelper.fs.js +0 -0
  56. /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/ReflectionUtils.fs +0 -0
  57. /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/ReflectionUtils.fs.js +0 -0
  58. /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
  59. /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
  60. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Encode.fs +0 -0
  61. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Encode.fs.js +0 -0
  62. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Interop/JsInterop.fs +0 -0
  63. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Interop/JsInterop.fs.js +0 -0
  64. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Interop/PyInterop.fs +0 -0
  65. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Library.fs +0 -0
  66. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Library.fs.js +0 -0
  67. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Persil.fs +0 -0
  68. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Persil.fs.js +0 -0
  69. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Preprocessing.fs +0 -0
  70. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Preprocessing.fs.js +0 -0
  71. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Reader.fs +0 -0
  72. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Reader.fs.js +0 -0
  73. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Regex.fs +0 -0
  74. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Regex.fs.js +0 -0
  75. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/RegexActivePatterns.fs +0 -0
  76. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/RegexActivePatterns.fs.js +0 -0
  77. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Writer.fs +0 -0
  78. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Writer.fs.js +0 -0
  79. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/YAMLicious.fableproj +0 -0
  80. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/YAMLiciousTypes.fs +0 -0
  81. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/YAMLiciousTypes.fs.js +0 -0
  82. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
  83. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
package/Core/ArcTypes.js CHANGED
@@ -353,21 +353,10 @@ export class ArcAssay extends ArcTables {
353
353
  }
354
354
  Copy() {
355
355
  const this$ = this;
356
- const nextTables = [];
357
- let enumerator = getEnumerator(this$.Tables);
358
- try {
359
- while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
360
- const table = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
361
- const copy = table.Copy();
362
- void (nextTables.push(copy));
363
- }
364
- }
365
- finally {
366
- disposeSafe(enumerator);
367
- }
368
- const nextComments = ResizeArray_map((c) => c.Copy(), this$.Comments);
356
+ const nextTables = ResizeArray_map((c) => c.Copy(), this$.Tables);
357
+ const nextComments = ResizeArray_map((c_1) => c_1.Copy(), this$.Comments);
369
358
  const nextDataMap = map(DataMap__Copy, this$.DataMap);
370
- const nextPerformers = ResizeArray_map((c_1) => c_1.Copy(), this$.Performers);
359
+ const nextPerformers = ResizeArray_map((c_2) => c_2.Copy(), this$.Performers);
371
360
  const identifier = this$.Identifier;
372
361
  const measurementType = this$.MeasurementType;
373
362
  const technologyType = this$.TechnologyType;
@@ -622,27 +611,27 @@ export class ArcStudy extends ArcTables {
622
611
  const studyDesignDescriptors_1 = defaultArg(studyDesignDescriptors, []);
623
612
  const registeredAssayIdentifiers_1 = defaultArg(registeredAssayIdentifiers, []);
624
613
  const comments_1 = defaultArg(comments, []);
625
- this["identifier@536"] = ((identifier_1 = identifier.trim(), (checkValidCharacters(identifier_1), identifier_1)));
614
+ this["identifier@533"] = ((identifier_1 = identifier.trim(), (checkValidCharacters(identifier_1), identifier_1)));
626
615
  this.investigation = undefined;
627
- this["title@541"] = title;
628
- this["description@542"] = description;
629
- this["submissionDate@543"] = submissionDate;
630
- this["publicReleaseDate@544"] = publicReleaseDate;
631
- this["publications@545-1"] = publications_1;
632
- this["contacts@546-1"] = contacts_1;
633
- this["studyDesignDescriptors@547-1"] = studyDesignDescriptors_1;
634
- this["datamap@548"] = datamap;
635
- this["registeredAssayIdentifiers@549-1"] = registeredAssayIdentifiers_1;
636
- this["comments@550-1"] = comments_1;
616
+ this["title@538"] = title;
617
+ this["description@539"] = description;
618
+ this["submissionDate@540"] = submissionDate;
619
+ this["publicReleaseDate@541"] = publicReleaseDate;
620
+ this["publications@542-1"] = publications_1;
621
+ this["contacts@543-1"] = contacts_1;
622
+ this["studyDesignDescriptors@544-1"] = studyDesignDescriptors_1;
623
+ this["datamap@545"] = datamap;
624
+ this["registeredAssayIdentifiers@546-1"] = registeredAssayIdentifiers_1;
625
+ this["comments@547-1"] = comments_1;
637
626
  this.staticHash = 0;
638
627
  }
639
628
  get Identifier() {
640
629
  const this$ = this;
641
- return this$["identifier@536"];
630
+ return this$["identifier@533"];
642
631
  }
643
632
  set Identifier(i) {
644
633
  const this$ = this;
645
- this$["identifier@536"] = i;
634
+ this$["identifier@533"] = i;
646
635
  }
647
636
  get Investigation() {
648
637
  const this$ = this;
@@ -654,83 +643,83 @@ export class ArcStudy extends ArcTables {
654
643
  }
655
644
  get Title() {
656
645
  const this$ = this;
657
- return unwrap(this$["title@541"]);
646
+ return unwrap(this$["title@538"]);
658
647
  }
659
648
  set Title(n) {
660
649
  const this$ = this;
661
- this$["title@541"] = n;
650
+ this$["title@538"] = n;
662
651
  }
663
652
  get Description() {
664
653
  const this$ = this;
665
- return unwrap(this$["description@542"]);
654
+ return unwrap(this$["description@539"]);
666
655
  }
667
656
  set Description(n) {
668
657
  const this$ = this;
669
- this$["description@542"] = n;
658
+ this$["description@539"] = n;
670
659
  }
671
660
  get SubmissionDate() {
672
661
  const this$ = this;
673
- return unwrap(this$["submissionDate@543"]);
662
+ return unwrap(this$["submissionDate@540"]);
674
663
  }
675
664
  set SubmissionDate(n) {
676
665
  const this$ = this;
677
- this$["submissionDate@543"] = n;
666
+ this$["submissionDate@540"] = n;
678
667
  }
679
668
  get PublicReleaseDate() {
680
669
  const this$ = this;
681
- return unwrap(this$["publicReleaseDate@544"]);
670
+ return unwrap(this$["publicReleaseDate@541"]);
682
671
  }
683
672
  set PublicReleaseDate(n) {
684
673
  const this$ = this;
685
- this$["publicReleaseDate@544"] = n;
674
+ this$["publicReleaseDate@541"] = n;
686
675
  }
687
676
  get Publications() {
688
677
  const this$ = this;
689
- return this$["publications@545-1"];
678
+ return this$["publications@542-1"];
690
679
  }
691
680
  set Publications(n) {
692
681
  const this$ = this;
693
- this$["publications@545-1"] = n;
682
+ this$["publications@542-1"] = n;
694
683
  }
695
684
  get Contacts() {
696
685
  const this$ = this;
697
- return this$["contacts@546-1"];
686
+ return this$["contacts@543-1"];
698
687
  }
699
688
  set Contacts(n) {
700
689
  const this$ = this;
701
- this$["contacts@546-1"] = n;
690
+ this$["contacts@543-1"] = n;
702
691
  }
703
692
  get StudyDesignDescriptors() {
704
693
  const this$ = this;
705
- return this$["studyDesignDescriptors@547-1"];
694
+ return this$["studyDesignDescriptors@544-1"];
706
695
  }
707
696
  set StudyDesignDescriptors(n) {
708
697
  const this$ = this;
709
- this$["studyDesignDescriptors@547-1"] = n;
698
+ this$["studyDesignDescriptors@544-1"] = n;
710
699
  }
711
700
  get DataMap() {
712
701
  const this$ = this;
713
- return unwrap(this$["datamap@548"]);
702
+ return unwrap(this$["datamap@545"]);
714
703
  }
715
704
  set DataMap(n) {
716
705
  const this$ = this;
717
- this$["datamap@548"] = n;
706
+ this$["datamap@545"] = n;
718
707
  }
719
708
  get RegisteredAssayIdentifiers() {
720
709
  const this$ = this;
721
- return this$["registeredAssayIdentifiers@549-1"];
710
+ return this$["registeredAssayIdentifiers@546-1"];
722
711
  }
723
712
  set RegisteredAssayIdentifiers(n) {
724
713
  const this$ = this;
725
- this$["registeredAssayIdentifiers@549-1"] = n;
714
+ this$["registeredAssayIdentifiers@546-1"] = n;
726
715
  }
727
716
  get Comments() {
728
717
  const this$ = this;
729
- return this$["comments@550-1"];
718
+ return this$["comments@547-1"];
730
719
  }
731
720
  set Comments(n) {
732
721
  const this$ = this;
733
- this$["comments@550-1"] = n;
722
+ this$["comments@547-1"] = n;
734
723
  }
735
724
  get StaticHash() {
736
725
  const this$ = this;
@@ -1327,125 +1316,125 @@ export class ArcInvestigation {
1327
1316
  const registeredStudyIdentifiers_1 = defaultArg(registeredStudyIdentifiers, []);
1328
1317
  const comments_1 = defaultArg(comments, []);
1329
1318
  const remarks_1 = defaultArg(remarks, []);
1330
- this["identifier@1125"] = identifier;
1331
- this["title@1126"] = title;
1332
- this["description@1127"] = description;
1333
- this["submissionDate@1128"] = submissionDate;
1334
- this["publicReleaseDate@1129"] = publicReleaseDate;
1335
- this["ontologySourceReferences@1130-1"] = ontologySourceReferences_1;
1336
- this["publications@1131-1"] = publications_1;
1337
- this["contacts@1132-1"] = contacts_1;
1338
- this["assays@1133-1"] = assays_1;
1339
- this["studies@1134-1"] = studies_1;
1340
- this["registeredStudyIdentifiers@1135-1"] = registeredStudyIdentifiers_1;
1341
- this["comments@1136-1"] = comments_1;
1342
- this["remarks@1137-1"] = remarks_1;
1319
+ this["identifier@1122"] = identifier;
1320
+ this["title@1123"] = title;
1321
+ this["description@1124"] = description;
1322
+ this["submissionDate@1125"] = submissionDate;
1323
+ this["publicReleaseDate@1126"] = publicReleaseDate;
1324
+ this["ontologySourceReferences@1127-1"] = ontologySourceReferences_1;
1325
+ this["publications@1128-1"] = publications_1;
1326
+ this["contacts@1129-1"] = contacts_1;
1327
+ this["assays@1130-1"] = assays_1;
1328
+ this["studies@1131-1"] = studies_1;
1329
+ this["registeredStudyIdentifiers@1132-1"] = registeredStudyIdentifiers_1;
1330
+ this["comments@1133-1"] = comments_1;
1331
+ this["remarks@1134-1"] = remarks_1;
1343
1332
  this.staticHash = 0;
1344
- this["init@1106"] = 1;
1333
+ this["init@1103"] = 1;
1345
1334
  }
1346
1335
  get Identifier() {
1347
1336
  const this$ = this;
1348
- return this$["identifier@1125"];
1337
+ return this$["identifier@1122"];
1349
1338
  }
1350
1339
  set Identifier(i) {
1351
1340
  const this$ = this;
1352
- this$["identifier@1125"] = i;
1341
+ this$["identifier@1122"] = i;
1353
1342
  }
1354
1343
  get Title() {
1355
1344
  const this$ = this;
1356
- return unwrap(this$["title@1126"]);
1345
+ return unwrap(this$["title@1123"]);
1357
1346
  }
1358
1347
  set Title(n) {
1359
1348
  const this$ = this;
1360
- this$["title@1126"] = n;
1349
+ this$["title@1123"] = n;
1361
1350
  }
1362
1351
  get Description() {
1363
1352
  const this$ = this;
1364
- return unwrap(this$["description@1127"]);
1353
+ return unwrap(this$["description@1124"]);
1365
1354
  }
1366
1355
  set Description(n) {
1367
1356
  const this$ = this;
1368
- this$["description@1127"] = n;
1357
+ this$["description@1124"] = n;
1369
1358
  }
1370
1359
  get SubmissionDate() {
1371
1360
  const this$ = this;
1372
- return unwrap(this$["submissionDate@1128"]);
1361
+ return unwrap(this$["submissionDate@1125"]);
1373
1362
  }
1374
1363
  set SubmissionDate(n) {
1375
1364
  const this$ = this;
1376
- this$["submissionDate@1128"] = n;
1365
+ this$["submissionDate@1125"] = n;
1377
1366
  }
1378
1367
  get PublicReleaseDate() {
1379
1368
  const this$ = this;
1380
- return unwrap(this$["publicReleaseDate@1129"]);
1369
+ return unwrap(this$["publicReleaseDate@1126"]);
1381
1370
  }
1382
1371
  set PublicReleaseDate(n) {
1383
1372
  const this$ = this;
1384
- this$["publicReleaseDate@1129"] = n;
1373
+ this$["publicReleaseDate@1126"] = n;
1385
1374
  }
1386
1375
  get OntologySourceReferences() {
1387
1376
  const this$ = this;
1388
- return this$["ontologySourceReferences@1130-1"];
1377
+ return this$["ontologySourceReferences@1127-1"];
1389
1378
  }
1390
1379
  set OntologySourceReferences(n) {
1391
1380
  const this$ = this;
1392
- this$["ontologySourceReferences@1130-1"] = n;
1381
+ this$["ontologySourceReferences@1127-1"] = n;
1393
1382
  }
1394
1383
  get Publications() {
1395
1384
  const this$ = this;
1396
- return this$["publications@1131-1"];
1385
+ return this$["publications@1128-1"];
1397
1386
  }
1398
1387
  set Publications(n) {
1399
1388
  const this$ = this;
1400
- this$["publications@1131-1"] = n;
1389
+ this$["publications@1128-1"] = n;
1401
1390
  }
1402
1391
  get Contacts() {
1403
1392
  const this$ = this;
1404
- return this$["contacts@1132-1"];
1393
+ return this$["contacts@1129-1"];
1405
1394
  }
1406
1395
  set Contacts(n) {
1407
1396
  const this$ = this;
1408
- this$["contacts@1132-1"] = n;
1397
+ this$["contacts@1129-1"] = n;
1409
1398
  }
1410
1399
  get Assays() {
1411
1400
  const this$ = this;
1412
- return this$["assays@1133-1"];
1401
+ return this$["assays@1130-1"];
1413
1402
  }
1414
1403
  set Assays(n) {
1415
1404
  const this$ = this;
1416
- this$["assays@1133-1"] = n;
1405
+ this$["assays@1130-1"] = n;
1417
1406
  }
1418
1407
  get Studies() {
1419
1408
  const this$ = this;
1420
- return this$["studies@1134-1"];
1409
+ return this$["studies@1131-1"];
1421
1410
  }
1422
1411
  set Studies(n) {
1423
1412
  const this$ = this;
1424
- this$["studies@1134-1"] = n;
1413
+ this$["studies@1131-1"] = n;
1425
1414
  }
1426
1415
  get RegisteredStudyIdentifiers() {
1427
1416
  const this$ = this;
1428
- return this$["registeredStudyIdentifiers@1135-1"];
1417
+ return this$["registeredStudyIdentifiers@1132-1"];
1429
1418
  }
1430
1419
  set RegisteredStudyIdentifiers(n) {
1431
1420
  const this$ = this;
1432
- this$["registeredStudyIdentifiers@1135-1"] = n;
1421
+ this$["registeredStudyIdentifiers@1132-1"] = n;
1433
1422
  }
1434
1423
  get Comments() {
1435
1424
  const this$ = this;
1436
- return this$["comments@1136-1"];
1425
+ return this$["comments@1133-1"];
1437
1426
  }
1438
1427
  set Comments(n) {
1439
1428
  const this$ = this;
1440
- this$["comments@1136-1"] = n;
1429
+ this$["comments@1133-1"] = n;
1441
1430
  }
1442
1431
  get Remarks() {
1443
1432
  const this$ = this;
1444
- return this$["remarks@1137-1"];
1433
+ return this$["remarks@1134-1"];
1445
1434
  }
1446
1435
  set Remarks(n) {
1447
1436
  const this$ = this;
1448
- this$["remarks@1137-1"] = n;
1437
+ this$["remarks@1134-1"] = n;
1449
1438
  }
1450
1439
  get StaticHash() {
1451
1440
  const this$ = this;
@@ -49,7 +49,7 @@ export function Assay_identifierFromFileName(fileName) {
49
49
  return (m.groups && m.groups.identifier) || "";
50
50
  }
51
51
  else {
52
- throw new Error(`Cannot parse identifier from FileName \`${fileName}\``);
52
+ throw new Error(`Cannot parse assay identifier from FileName \`${fileName}\``);
53
53
  }
54
54
  }
55
55
 
@@ -121,7 +121,7 @@ export function Study_identifierFromFileName(fileName) {
121
121
  return (m.groups && m.groups.identifier) || "";
122
122
  }
123
123
  else {
124
- throw new Error(`Cannot parse identifier from FileName \`${fileName}\``);
124
+ throw new Error(`Cannot parse study identifier from FileName \`${fileName}\``);
125
125
  }
126
126
  }
127
127
 
@@ -12,9 +12,9 @@ import { class_type } from "../fable_modules/fable-library-js.4.22.0/Reflection.
12
12
 
13
13
  export class OntologyAnnotation {
14
14
  constructor(name, tsr, tan, comments) {
15
- this._name = name;
16
- this._termSourceREF = tsr;
17
- this._termAccessionNumber = tan;
15
+ this._name = ((name == null) ? undefined : ((name === "") ? undefined : name));
16
+ this._termSourceREF = ((tsr == null) ? undefined : ((tsr === "") ? undefined : tsr));
17
+ this._termAccessionNumber = ((tan == null) ? undefined : ((tan === "") ? undefined : ((tan === ":") ? undefined : tan)));
18
18
  this._comments = defaultArg(comments, []);
19
19
  }
20
20
  get Name() {
@@ -57,9 +57,12 @@ export class OntologyAnnotation {
57
57
  return OntologyAnnotation.make(name, tsr, tan, comments_1);
58
58
  }
59
59
  get TANInfo() {
60
- let matchValue;
60
+ let matchValue, tan, matchValue_1, matchValue_2, tsr;
61
61
  const this$ = this;
62
- return unwrap((matchValue = this$.TermAccessionNumber, (matchValue == null) ? undefined : tryParseTermAnnotation(matchValue)));
62
+ return unwrap((matchValue = this$.TermAccessionNumber, (matchValue == null) ? undefined : ((tan = matchValue, (matchValue_1 = tryParseTermAnnotation(tan), (matchValue_1 == null) ? ((matchValue_2 = this$.TermSourceREF, (matchValue_2 == null) ? undefined : ((matchValue_2 === "") ? undefined : ((tsr = matchValue_2, {
63
+ IDSpace: tsr,
64
+ LocalID: tan,
65
+ }))))) : matchValue_1)))));
63
66
  }
64
67
  get NameText() {
65
68
  const this$ = this;
@@ -2,13 +2,14 @@ import { boxHashValues, Unchecked_alignByHeaders, Unchecked_extendToRowCount, Un
2
2
  import { Dictionary } from "../../fable_modules/fable-library-js.4.22.0/MutableMap.js";
3
3
  import { compareArrays, safeHash, comparePrimitives, equals, disposeSafe, getEnumerator, arrayHash, equalArrays } from "../../fable_modules/fable-library-js.4.22.0/Util.js";
4
4
  import { value as value_3, map as map_2, unwrap, defaultArg } from "../../fable_modules/fable-library-js.4.22.0/Option.js";
5
- import { item as item_1, fold, append as append_1, toList, indexed as indexed_1, choose, filter, length, tryFindIndex, empty, singleton, collect, removeAt, map, delay, toArray } from "../../fable_modules/fable-library-js.4.22.0/Seq.js";
5
+ import { item as item_1, fold, append as append_1, toList, indexed as indexed_1, choose, filter, length, tryFindIndex, empty, singleton, collect, removeAt, iterate, map, delay, toArray } from "../../fable_modules/fable-library-js.4.22.0/Seq.js";
6
6
  import { rangeDouble } from "../../fable_modules/fable-library-js.4.22.0/Range.js";
7
+ import { ResizeArray_map } from "../Helper/Collections.js";
8
+ import { getItemFromDict, addToDict } from "../../fable_modules/fable-library-js.4.22.0/MapUtil.js";
7
9
  import { join, printf, toFail } from "../../fable_modules/fable-library-js.4.22.0/String.js";
8
- import { getItemFromDict } from "../../fable_modules/fable-library-js.4.22.0/MapUtil.js";
9
10
  import { CompositeColumn } from "./CompositeColumn.js";
10
11
  import { sortBy, indexed, mapIndexed, item, sortDescending, iterateIndexed, initialize, map as map_1 } from "../../fable_modules/fable-library-js.4.22.0/Array.js";
11
- import { append, iterate, isEmpty } from "../../fable_modules/fable-library-js.4.22.0/List.js";
12
+ import { append, iterate as iterate_1, isEmpty } from "../../fable_modules/fable-library-js.4.22.0/List.js";
12
13
  import { StringBuilder__AppendLine_Z721C83C5, StringBuilder_$ctor } from "../../fable_modules/fable-library-js.4.22.0/System.Text.js";
13
14
  import { toString } from "../../fable_modules/fable-library-js.4.22.0/Types.js";
14
15
  import { CompositeCell } from "./CompositeCell.js";
@@ -92,10 +93,17 @@ export class ArcTable {
92
93
  }
93
94
  Copy() {
94
95
  const this$ = this;
95
- return ArcTable.create(this$.Name, Array.from(this$.Headers), new Dictionary(this$.Values, {
96
+ const nextHeaders = ResizeArray_map((h) => h.Copy(), this$.Headers);
97
+ const nextValues = new Dictionary([], {
96
98
  Equals: equalArrays,
97
99
  GetHashCode: arrayHash,
98
- }));
100
+ });
101
+ iterate((tupledArg) => {
102
+ const ci = tupledArg[0] | 0;
103
+ const ri = tupledArg[1] | 0;
104
+ addToDict(nextValues, [ci, ri], getItemFromDict(this$.Values, [ci, ri]).Copy());
105
+ }, this$.Values.keys());
106
+ return ArcTable.create(this$.Name, nextHeaders, nextValues);
99
107
  }
100
108
  TryGetCellAt(column, row) {
101
109
  const this$ = this;
@@ -345,7 +353,7 @@ export class ArcTable {
345
353
  if (!isEmpty(duplicates)) {
346
354
  const sb = StringBuilder_$ctor();
347
355
  StringBuilder__AppendLine_Z721C83C5(sb, "Found duplicate unique columns in `columns`.");
348
- iterate((x_1) => {
356
+ iterate_1((x_1) => {
349
357
  StringBuilder__AppendLine_Z721C83C5(sb, `Duplicate \`${x_1.HeaderType}\` at index ${x_1.Index1} and ${x_1.Index2}.`);
350
358
  }, duplicates);
351
359
  throw new Error(toString(sb));
@@ -696,7 +704,7 @@ export class ArcTable {
696
704
  if (!isEmpty(duplicates)) {
697
705
  const sb = StringBuilder_$ctor();
698
706
  StringBuilder__AppendLine_Z721C83C5(sb, "Found duplicate unique columns in `columns`.");
699
- iterate((x_1) => {
707
+ iterate_1((x_1) => {
700
708
  StringBuilder__AppendLine_Z721C83C5(sb, `Duplicate \`${x_1.HeaderType}\` at index ${x_1.Index1} and ${x_1.Index2}.`);
701
709
  }, duplicates);
702
710
  throw new Error(toString(sb));
@@ -486,6 +486,10 @@ export class CompositeHeader extends Union {
486
486
  return false;
487
487
  }
488
488
  }
489
+ Copy() {
490
+ const this$ = this;
491
+ return (this$.tag === 3) ? (new CompositeHeader(3, [this$.fields[0].Copy()])) : ((this$.tag === 2) ? (new CompositeHeader(2, [this$.fields[0].Copy()])) : ((this$.tag === 1) ? (new CompositeHeader(1, [this$.fields[0].Copy()])) : ((this$.tag === 0) ? (new CompositeHeader(0, [this$.fields[0].Copy()])) : this$)));
492
+ }
489
493
  static component(oa) {
490
494
  return new CompositeHeader(0, [oa]);
491
495
  }
package/Core/Template.js CHANGED
@@ -5,6 +5,7 @@ import { defaultArg, unwrap } from "../fable_modules/fable-library-js.4.22.0/Opt
5
5
  import { newGuid } from "../fable_modules/fable-library-js.4.22.0/Guid.js";
6
6
  import { ArcTable } from "./Table/ArcTable.js";
7
7
  import { SemVer_tryOfString_Z721C83C5 } from "./Helper/SemVer.js";
8
+ import { ResizeArray_map } from "./Helper/Collections.js";
8
9
  import { hashDateTime, boxHashSeq, boxHashArray } from "./Helper/HashCodes.js";
9
10
  import { now } from "../fable_modules/fable-library-js.4.22.0/Date.js";
10
11
 
@@ -156,6 +157,13 @@ export class Template {
156
157
  const this$ = this;
157
158
  return safeHash(this$) === safeHash(other);
158
159
  }
160
+ Copy() {
161
+ const this$ = this;
162
+ const nextAuthors = ResizeArray_map((c) => c.Copy(), this$.Authors);
163
+ const nextRepos = ResizeArray_map((c_1) => c_1.Copy(), this$.EndpointRepositories);
164
+ const nextTags = ResizeArray_map((c_2) => c_2.Copy(), this$.Tags);
165
+ return Template.create(this$.Id, this$.Table.Copy(), this$.Name, this$.Description, this$.Organisation, this$.Version, nextAuthors, nextRepos, nextTags, this$.LastUpdated);
166
+ }
159
167
  Equals(other) {
160
168
  let template;
161
169
  const this$ = this;
@@ -1,9 +1,10 @@
1
1
  import { dateTime } from "./Encode.js";
2
- import { ROCrateObject_$ctor_Z2FC25A28, ROCrateObject } from "../ROCrate/ROCrateObject.js";
2
+ import { LDObject } from "../ROCrate/LDObject.js";
3
3
  import { int32ToString, disposeSafe, getEnumerator, isIterable, defaultOf, equals } from "../fable_modules/fable-library-js.4.22.0/Util.js";
4
4
  import { list } from "../fable_modules/Thoth.Json.Core.0.4.0/Encode.fs.js";
5
- import { enumerateFromFunctions, map, delay, toList } from "../fable_modules/fable-library-js.4.22.0/Seq.js";
6
- import { decimal, int, map as map_1, oneOf, Getters$2__get_Errors, string, Getters$2_$ctor_Z4BE6C149 } from "../fable_modules/Thoth.Json.Core.0.4.0/Decode.fs.js";
5
+ import { empty, singleton, append, choose, enumerateFromFunctions, map, delay, toList } from "../fable_modules/fable-library-js.4.22.0/Seq.js";
6
+ import { value as value_10 } from "../fable_modules/fable-library-js.4.22.0/Option.js";
7
+ import { decimal, int, oneOf, map as map_1, Getters$2__get_Errors, string, Getters$2_$ctor_Z4BE6C149 } from "../fable_modules/Thoth.Json.Core.0.4.0/Decode.fs.js";
7
8
  import { ofArray, head, length, isEmpty } from "../fable_modules/fable-library-js.4.22.0/List.js";
8
9
  import { ErrorReason$1 } from "../fable_modules/Thoth.Json.Core.0.4.0/Types.fs.js";
9
10
  import { FSharpResult$2 } from "../fable_modules/fable-library-js.4.22.0/Result.js";
@@ -42,7 +43,7 @@ export function genericEncoder(obj) {
42
43
  else if (obj instanceof Date) {
43
44
  return dateTime(obj);
44
45
  }
45
- else if (obj instanceof ROCrateObject) {
46
+ else if (obj instanceof LDObject) {
46
47
  return encoder(obj);
47
48
  }
48
49
  else if (equals(obj, defaultOf())) {
@@ -62,32 +63,71 @@ export function genericEncoder(obj) {
62
63
  }
63
64
 
64
65
  export function encoder(obj) {
65
- const values = map((kv) => [kv[0], genericEncoder(obj)], obj.GetProperties(true));
66
+ let values;
67
+ const source_2 = choose((kv) => {
68
+ const l = kv[0].toLocaleLowerCase();
69
+ if (((l !== "id") && (l !== "schematype")) && (l !== "additionaltype")) {
70
+ return [kv[0], genericEncoder(kv[1])];
71
+ }
72
+ else {
73
+ return undefined;
74
+ }
75
+ }, obj.GetProperties(true));
76
+ values = append(toList(delay(() => {
77
+ let value;
78
+ return append(singleton(["@id", (value = obj.Id, {
79
+ Encode(helpers) {
80
+ return helpers.encodeString(value);
81
+ },
82
+ })]), delay(() => {
83
+ let value_1;
84
+ return append(singleton(["@type", (value_1 = obj.SchemaType, {
85
+ Encode(helpers_1) {
86
+ return helpers_1.encodeString(value_1);
87
+ },
88
+ })]), delay(() => {
89
+ let value_2;
90
+ return (obj.AdditionalType != null) ? singleton(["additionalType", (value_2 = value_10(obj.AdditionalType), {
91
+ Encode(helpers_2) {
92
+ return helpers_2.encodeString(value_2);
93
+ },
94
+ })]) : empty();
95
+ }));
96
+ }));
97
+ })), source_2);
66
98
  return {
67
- Encode(helpers) {
68
- const arg = map((tupledArg) => [tupledArg[0], tupledArg[1].Encode(helpers)], values);
69
- return helpers.encodeObject(arg);
99
+ Encode(helpers_3) {
100
+ const arg = map((tupledArg) => [tupledArg[0], tupledArg[1].Encode(helpers_3)], values);
101
+ return helpers_3.encodeObject(arg);
70
102
  },
71
103
  };
72
104
  }
73
105
 
74
- export const decoder = (() => {
75
- const decode = () => {
106
+ /**
107
+ * Returns a decoder
108
+ *
109
+ * If expectObject is set to true, decoder fails if top-level value is not an ROCrate object
110
+ */
111
+ export function getDecoder(expectObject) {
112
+ const decode = (expectObject_1) => {
76
113
  const decodeObject = {
77
114
  Decode(helpers, value) {
78
- let objectArg, objectArg_1, arg_5, objectArg_2;
115
+ let objectArg_1, arg_5, objectArg_2;
79
116
  if (helpers.isObject(value)) {
80
117
  const getters = Getters$2_$ctor_Z4BE6C149(helpers, value);
81
118
  const properties = helpers.getProperties(value);
82
119
  let result;
83
120
  const get$ = getters;
84
- const o = ROCrateObject_$ctor_Z2FC25A28((objectArg = get$.Required, objectArg.Field("@id", string)), (objectArg_1 = get$.Required, objectArg_1.Field("@type", string)));
121
+ let t;
122
+ const objectArg = get$.Required;
123
+ t = objectArg.Field("@type", string);
124
+ const o = new LDObject((objectArg_1 = get$.Required, objectArg_1.Field("@id", string)), t);
85
125
  const enumerator = getEnumerator(properties);
86
126
  try {
87
127
  while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
88
128
  const property = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
89
129
  if ((property !== "@id") && (property !== "@type")) {
90
- o.SetProperty(property, (arg_5 = decode(), (objectArg_2 = get$.Required, objectArg_2.Field(property, arg_5))));
130
+ o.SetProperty(property, (arg_5 = decode(false), (objectArg_2 = get$.Required, objectArg_2.Field(property, arg_5))));
91
131
  }
92
132
  }
93
133
  }
@@ -119,7 +159,7 @@ export const decoder = (() => {
119
159
  if (acc.tag === 0) {
120
160
  const acc_1 = acc.fields[0];
121
161
  let matchValue_1;
122
- let copyOfStruct = decode();
162
+ let copyOfStruct = decode(false);
123
163
  matchValue_1 = copyOfStruct.Decode(helpers_1, value_2);
124
164
  if (matchValue_1.tag === 0) {
125
165
  void (acc_1.push(matchValue_1.fields[0]));
@@ -139,8 +179,17 @@ export const decoder = (() => {
139
179
  }
140
180
  },
141
181
  };
142
- return oneOf(ofArray([map_1((value_4) => value_4, decodeObject), map_1((value_5) => value_5, resizeArray), map_1((value_6) => value_6, string), map_1((value_7) => value_7, int), map_1((value_8) => value_8, decimal)]));
182
+ if (expectObject_1) {
183
+ return map_1((value_4) => value_4, decodeObject);
184
+ }
185
+ else {
186
+ return oneOf(ofArray([map_1((value_5) => value_5, decodeObject), map_1((value_6) => value_6, resizeArray), map_1((value_7) => value_7, string), map_1((value_8) => value_8, int), map_1((value_9) => value_9, decimal)]));
187
+ }
143
188
  };
144
- return decode();
145
- })();
189
+ return decode(expectObject);
190
+ }
191
+
192
+ export const decoder = map_1((value) => value, getDecoder(true));
193
+
194
+ export const genericDecoder = getDecoder(false);
146
195
 
@@ -0,0 +1,31 @@
1
+ import { fromString } from "../fable_modules/Thoth.Json.JavaScript.0.3.0/Decode.fs.js";
2
+ import { encoder, decoder as decoder_1 } from "../Json/LDObject.js";
3
+ import { printf, toText } from "../fable_modules/fable-library-js.4.22.0/String.js";
4
+ import { toString } from "../fable_modules/Thoth.Json.JavaScript.0.3.0/Encode.fs.js";
5
+ import { defaultSpaces } from "../Json/Encode.js";
6
+ import { unwrap } from "../fable_modules/fable-library-js.4.22.0/Option.js";
7
+
8
+ export function ARCtrl_ROCrate_LDObject__LDObject_fromROCrateJsonString_Static_Z721C83C5(s) {
9
+ const matchValue = fromString(decoder_1, s);
10
+ if (matchValue.tag === 1) {
11
+ throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
12
+ }
13
+ else {
14
+ return matchValue.fields[0];
15
+ }
16
+ }
17
+
18
+ /**
19
+ * exports in json-ld format
20
+ */
21
+ export function ARCtrl_ROCrate_LDObject__LDObject_toROCrateJsonString_Static_71136F3F(spaces) {
22
+ return (obj) => {
23
+ const value = encoder(obj);
24
+ return toString(defaultSpaces(spaces), value);
25
+ };
26
+ }
27
+
28
+ export function ARCtrl_ROCrate_LDObject__LDObject_ToROCrateJsonString_71136F3F(this$, spaces) {
29
+ return ARCtrl_ROCrate_LDObject__LDObject_toROCrateJsonString_Static_71136F3F(unwrap(spaces))(this$);
30
+ }
31
+