@nfdi4plants/arctrl 3.0.0-alpha.2 → 3.0.0-alpha.4

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 (40) hide show
  1. package/README.md +12 -12
  2. package/dist/ts/cjs/index.js +47 -1
  3. package/dist/ts/cjs/ts/Conversion.js +39 -11
  4. package/dist/ts/cjs/ts/Core/Helper/Collections.js +15 -0
  5. package/dist/ts/cjs/ts/Core/Table/ArcTableAux.js +39 -8
  6. package/dist/ts/cjs/ts/Json/StringTable.js +9 -2
  7. package/dist/ts/cjs/ts/Json/Table/CellTable.js +2 -2
  8. package/dist/ts/cjs/ts/Json/Table/OATable.js +2 -2
  9. package/dist/ts/cjs/ts/JsonIO/LDObject.js +107 -0
  10. package/dist/ts/cjs/ts/JsonIO/Table/Compression.js +4 -11
  11. package/dist/ts/cjs/ts/ROCrate/Generic/LabProcess.js +1 -1
  12. package/dist/ts/cjs/ts/ROCrate/LDContext.js +92 -54
  13. package/dist/ts/esm/index.js +45 -1
  14. package/dist/ts/esm/ts/Conversion.js +34 -8
  15. package/dist/ts/esm/ts/Core/Helper/Collections.js +12 -0
  16. package/dist/ts/esm/ts/Core/Table/ArcTableAux.js +36 -8
  17. package/dist/ts/esm/ts/Json/StringTable.js +10 -3
  18. package/dist/ts/esm/ts/Json/Table/CellTable.js +2 -2
  19. package/dist/ts/esm/ts/Json/Table/OATable.js +2 -2
  20. package/dist/ts/esm/ts/JsonIO/LDObject.js +94 -0
  21. package/dist/ts/esm/ts/JsonIO/Table/Compression.js +4 -11
  22. package/dist/ts/esm/ts/ROCrate/Generic/LabProcess.js +1 -1
  23. package/dist/ts/esm/ts/ROCrate/LDContext.js +106 -66
  24. package/dist/ts/types/index.d.ts +44 -1
  25. package/dist/ts/types/index.d.ts.map +1 -1
  26. package/dist/ts/types/ts/Conversion.d.ts +13 -3
  27. package/dist/ts/types/ts/Conversion.d.ts.map +1 -1
  28. package/dist/ts/types/ts/Core/Helper/Collections.d.ts +3 -0
  29. package/dist/ts/types/ts/Core/Helper/Collections.d.ts.map +1 -1
  30. package/dist/ts/types/ts/Core/Table/ArcTableAux.d.ts +5 -2
  31. package/dist/ts/types/ts/Core/Table/ArcTableAux.d.ts.map +1 -1
  32. package/dist/ts/types/ts/Json/StringTable.d.ts.map +1 -1
  33. package/dist/ts/types/ts/Json/Table/CellTable.d.ts.map +1 -1
  34. package/dist/ts/types/ts/Json/Table/OATable.d.ts.map +1 -1
  35. package/dist/ts/types/ts/JsonIO/LDObject.d.ts +29 -0
  36. package/dist/ts/types/ts/JsonIO/LDObject.d.ts.map +1 -0
  37. package/dist/ts/types/ts/JsonIO/Table/Compression.d.ts.map +1 -1
  38. package/dist/ts/types/ts/ROCrate/LDContext.d.ts +3 -5
  39. package/dist/ts/types/ts/ROCrate/LDContext.d.ts.map +1 -1
  40. package/package.json +1 -1
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- 
1
+
2
2
  ![logo](logos/ARCtrl_horizontal.png)
3
3
 
4
4
  # ARCtrl
@@ -68,11 +68,11 @@ On windows you can use the `setup.cmd` to run the following steps automatically!
68
68
 
69
69
  `py -m venv .venv`
70
70
 
71
- 4. Install [Poetry](https://python-poetry.org/) and dependencies
71
+ 4. Install [uv](https://docs.astral.sh/uv/) and dependencies
72
72
 
73
73
  1. `.\.venv\Scripts\python.exe -m pip install -U pip setuptools`
74
- 2. `.\.venv\Scripts\python.exe -m pip install poetry`
75
- 3. `.\.venv\Scripts\python.exe -m poetry install --no-root`
74
+ 2. `.\.venv\Scripts\python.exe -m pip install uv`
75
+ 3. `.\.venv\Scripts\python.exe -m uv pip install -r pyproject.toml --group dev`
76
76
 
77
77
  Verify correct setup with `./build.cmd runtests` ✨
78
78
 
@@ -90,11 +90,11 @@ Measured on 13th Gen Intel(R) Core(TM) i7-13800H
90
90
 
91
91
  | Name | Description | FSharp Time (ms) | JavaScript Time (ms) | Python Time (ms) |
92
92
  | --- | --- | --- | --- | --- |
93
- | Table_GetHashCode | From a table with 1 column and 10000 rows, retrieve the Hash Code | 5 | 21 | 226 |
94
- | Table_AddRows | Add 10000 rows to a table with 4 columns. | 15 | 22 | 289 |
95
- | Table_fillMissingCells | For a table 6 columns and 20000 rows, where each row has one missing value, fill those values with default values. | 49 | 108 | 4813 |
96
- | Table_ToJson | Serialize a table with 5 columns and 10000 rows to json. | 1099 | 481 | 6833 |
97
- | Table_ToCompressedJson | Serialize a table with 5 columns and 10000 rows to compressed json. | 261 | 2266 | 717334 |
98
- | Assay_toJson | Parse an assay with one table with 10000 rows and 6 columns to json | 915 | 2459 | 28799 |
99
- | Study_FromWorkbook | Parse a workbook with one study with 10000 rows and 6 columns to an ArcStudy | 97 | 87 | 1249 |
100
- | Investigation_ToWorkbook_ManyStudies | Parse an investigation with 1500 studies to a workbook | 621 | 379 | 9974 |
93
+ | Table_GetHashCode | From a table with 1 column and 10000 rows, retrieve the Hash Code | 2 ± 0 | 9 ± 7 | 133 ± 7 |
94
+ | Table_AddRows | Add 10000 rows to a table with 4 columns. | 40 ± 9 | 20 ± 8 | 309 ± 26 |
95
+ | Table_fillMissingCells | For a table 6 columns and 20000 rows, where each row has one missing value, fill those values with default values. | 55 ± 31 | 101 ± 11 | 3375 ± 221 |
96
+ | Table_ToJson | Serialize a table with 5 columns and 10000 rows to json. | 1027 ± 200 | 293 ± 56 | 17990 ± 1482 |
97
+ | Table_ToCompressedJson | Serialize a table with 5 columns and 10000 rows to compressed json. | 216 ± 19 | 4552 ± 326 | 6188 ± 839 |
98
+ | Assay_toJson | Parse an assay with one table with 10000 rows and 6 columns to json | 856 ± 42 | 271 ± 55 | 19278 ± 1289 |
99
+ | Study_FromWorkbook | Parse a workbook with one study with 10000 rows and 6 columns to an ArcStudy | 84 ± 29 | 96 ± 12 | 1787 ± 1410 |
100
+ | Investigation_ToWorkbook_ManyStudies | Parse an investigation with 1500 studies to a workbook | 387 ± 71 | 442 ± 61 | 6305 ± 660 |
@@ -1,11 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WebController = exports.Contract = exports.Comment = exports.OntologyAnnotation = exports.Publication = exports.Person = exports.XlsxController = exports.JsonController = exports.Templates = exports.Organisation = exports.Template = exports.ArcTable = exports.CompositeColumn = exports.IOType = exports.CompositeHeader = exports.CompositeCell = exports.ArcInvestigation = exports.ArcStudy = exports.ArcAssay = exports.ARC = void 0;
3
+ exports.ROCrate = exports.WebController = exports.Contract = exports.Comment = exports.OntologyAnnotation = exports.Publication = exports.Person = exports.XlsxController = exports.JsonController = exports.Templates = exports.Organisation = exports.Template = exports.ArcTable = exports.CompositeColumn = exports.IOType = exports.CompositeHeader = exports.CompositeCell = exports.ArcInvestigation = exports.ArcWorkflow = exports.ArcRun = exports.ArcStudy = exports.ArcAssay = exports.ARC = void 0;
4
4
  var ARC_js_1 = require("./ts/ARC.js");
5
5
  Object.defineProperty(exports, "ARC", { enumerable: true, get: function () { return ARC_js_1.ARC; } });
6
6
  var ArcTypes_js_1 = require("./ts/Core/ArcTypes.js");
7
7
  Object.defineProperty(exports, "ArcAssay", { enumerable: true, get: function () { return ArcTypes_js_1.ArcAssay; } });
8
8
  Object.defineProperty(exports, "ArcStudy", { enumerable: true, get: function () { return ArcTypes_js_1.ArcStudy; } });
9
+ Object.defineProperty(exports, "ArcRun", { enumerable: true, get: function () { return ArcTypes_js_1.ArcRun; } });
10
+ Object.defineProperty(exports, "ArcWorkflow", { enumerable: true, get: function () { return ArcTypes_js_1.ArcWorkflow; } });
9
11
  Object.defineProperty(exports, "ArcInvestigation", { enumerable: true, get: function () { return ArcTypes_js_1.ArcInvestigation; } });
10
12
  var CompositeCell_js_1 = require("./ts/Core/Table/CompositeCell.js");
11
13
  Object.defineProperty(exports, "CompositeCell", { enumerable: true, get: function () { return CompositeCell_js_1.CompositeCell; } });
@@ -37,3 +39,47 @@ var Contract_js_1 = require("./ts/Contract/Contract.js");
37
39
  Object.defineProperty(exports, "Contract", { enumerable: true, get: function () { return Contract_js_1.Contract; } });
38
40
  var Template_Web_js_1 = require("./ts/Template.Web.js");
39
41
  Object.defineProperty(exports, "WebController", { enumerable: true, get: function () { return Template_Web_js_1.WebController; } });
42
+ /// RO-Crate
43
+ const LDObject_js_1 = require("./ts/ROCrate/LDObject.js");
44
+ const LDContext_js_1 = require("./ts/ROCrate/LDContext.js");
45
+ const ROCrateContext_js_1 = require("./ts/ROCrate/ROCrateContext.js");
46
+ const Comment_js_2 = require("./ts/ROCrate/Generic/Comment.js");
47
+ const DefinedTerm_js_1 = require("./ts/ROCrate/Generic/DefinedTerm.js");
48
+ const File_js_1 = require("./ts/ROCrate/Generic/File.js");
49
+ const LabProcess_js_1 = require("./ts/ROCrate/Generic/LabProcess.js");
50
+ const LabProtocol_js_1 = require("./ts/ROCrate/Generic/LabProtocol.js");
51
+ const Organization_js_1 = require("./ts/ROCrate/Generic/Organization.js");
52
+ const Person_js_2 = require("./ts/ROCrate/Generic/Person.js");
53
+ const PostalAddress_js_1 = require("./ts/ROCrate/Generic/PostalAddress.js");
54
+ const PropertyValue_js_1 = require("./ts/ROCrate/Generic/PropertyValue.js");
55
+ const Sample_js_1 = require("./ts/ROCrate/Generic/Sample.js");
56
+ const ScholarlyArticle_js_1 = require("./ts/ROCrate/Generic/ScholarlyArticle.js");
57
+ const Dataset_js_1 = require("./ts/ROCrate/Generic/Dataset.js");
58
+ const LDObject_js_2 = require("./ts/JsonIO/LDObject.js");
59
+ const LDObject_js_3 = require("./ts/JsonIO/LDObject.js");
60
+ const Conversion_js_1 = require("./ts/Conversion.js");
61
+ exports.ROCrate = {
62
+ LDNode: LDObject_js_1.LDNode,
63
+ LDGraph: LDObject_js_1.LDGraph,
64
+ LDValue: LDObject_js_1.LDValue,
65
+ LDRef: LDObject_js_1.LDRef,
66
+ LDContext: LDContext_js_1.LDContext,
67
+ initV1_1: ROCrateContext_js_1.initV1_1,
68
+ initV1_2DRAFT: ROCrateContext_js_1.initV1_2DRAFT,
69
+ initBioschemasContext: ROCrateContext_js_1.initBioschemasContext,
70
+ LDComment: Comment_js_2.LDComment,
71
+ LDDefinedTerm: DefinedTerm_js_1.LDDefinedTerm,
72
+ LDFile: File_js_1.LDFile,
73
+ LDLabProcess: LabProcess_js_1.LDLabProcess,
74
+ LDLabProtocol: LabProtocol_js_1.LDLabProtocol,
75
+ LDOrganization: Organization_js_1.LDOrganization,
76
+ LDPerson: Person_js_2.LDPerson,
77
+ LDPostalAddress: PostalAddress_js_1.LDPostalAddress,
78
+ LDPropertyValue: PropertyValue_js_1.LDPropertyValue,
79
+ LDSample: Sample_js_1.LDSample,
80
+ LDScholarlyArticle: ScholarlyArticle_js_1.LDScholarlyArticle,
81
+ LDDataset: Dataset_js_1.LDDataset,
82
+ LDGraphIO: LDObject_js_2.LDGraphExtensions_PyJsInterop,
83
+ LDNodeIO: LDObject_js_3.LDNodeExtensions_PyJsInterop,
84
+ Conversion: Conversion_js_1.TypeExtensions_Conversion
85
+ };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InvestigationConversion = exports.StudyConversion = exports.AssayConversion = exports.ScholarlyArticleConversion = exports.PersonConversion = exports.DatamapConversion = exports.ProcessConversion = exports.BaseTypes = exports.ColumnIndex_orderName = void 0;
3
+ exports.TypeExtensions_Conversion = exports.InvestigationConversion = exports.StudyConversion = exports.AssayConversion = exports.ScholarlyArticleConversion = exports.PersonConversion = exports.DatamapConversion = exports.ProcessConversion = exports.BaseTypes = exports.ColumnIndex_orderName = void 0;
4
4
  exports.DateTime_tryFromString = DateTime_tryFromString;
5
5
  exports.DateTime_toString = DateTime_toString;
6
6
  exports.ColumnIndex_tryGetIndex = ColumnIndex_tryGetIndex;
@@ -63,9 +63,9 @@ exports.ProcessConversion_processToRows_Z6839B9E8 = ProcessConversion_processToR
63
63
  exports.CompositeRow_toProtocol = CompositeRow_toProtocol;
64
64
  exports.ARCtrl_ArcTable__ArcTable_fromProtocol_Static_Z6839B9E8 = ARCtrl_ArcTable__ArcTable_fromProtocol_Static_Z6839B9E8;
65
65
  exports.ARCtrl_ArcTable__ArcTable_GetProtocols = ARCtrl_ArcTable__ArcTable_GetProtocols;
66
- exports.ARCtrl_ArcTable__ArcTable_GetProcesses = ARCtrl_ArcTable__ArcTable_GetProcesses;
66
+ exports.ARCtrl_ArcTable__ArcTable_GetProcesses_40457300 = ARCtrl_ArcTable__ArcTable_GetProcesses_40457300;
67
67
  exports.ARCtrl_ArcTable__ArcTable_fromProcesses_Static_Z3575FB5F = ARCtrl_ArcTable__ArcTable_fromProcesses_Static_Z3575FB5F;
68
- exports.ARCtrl_ArcTables__ArcTables_GetProcesses = ARCtrl_ArcTables__ArcTables_GetProcesses;
68
+ exports.ARCtrl_ArcTables__ArcTables_GetProcesses_40457300 = ARCtrl_ArcTables__ArcTables_GetProcesses_40457300;
69
69
  exports.ARCtrl_ArcTables__ArcTables_fromProcesses_Static_Z27F0B586 = ARCtrl_ArcTables__ArcTables_fromProcesses_Static_Z27F0B586;
70
70
  exports.DatamapConversion_$reflection = DatamapConversion_$reflection;
71
71
  exports.DatamapConversion_composeFragmentDescriptors_Z8923FA3 = DatamapConversion_composeFragmentDescriptors_Z8923FA3;
@@ -102,6 +102,7 @@ exports.ARCtrl_ArcStudy__ArcStudy_ToROCrateStudy = ARCtrl_ArcStudy__ArcStudy_ToR
102
102
  exports.ARCtrl_ArcStudy__ArcStudy_fromROCrateStudy_Static_Z6839B9E8 = ARCtrl_ArcStudy__ArcStudy_fromROCrateStudy_Static_Z6839B9E8;
103
103
  exports.ARCtrl_ArcInvestigation__ArcInvestigation_ToROCrateInvestigation = ARCtrl_ArcInvestigation__ArcInvestigation_ToROCrateInvestigation;
104
104
  exports.ARCtrl_ArcInvestigation__ArcInvestigation_fromROCrateInvestigation_Static_Z6839B9E8 = ARCtrl_ArcInvestigation__ArcInvestigation_fromROCrateInvestigation_Static_Z6839B9E8;
105
+ exports.TypeExtensions_Conversion_$reflection = TypeExtensions_Conversion_$reflection;
105
106
  exports.ARCtrl_ROCrate_Dataset__Dataset_toArcAssay_Static_Z6839B9E8 = ARCtrl_ROCrate_Dataset__Dataset_toArcAssay_Static_Z6839B9E8;
106
107
  exports.ARCtrl_ROCrate_Dataset__Dataset_fromArcAssay_Static_1501C0F8 = ARCtrl_ROCrate_Dataset__Dataset_fromArcAssay_Static_1501C0F8;
107
108
  exports.ARCtrl_ROCrate_Dataset__Dataset_toArcStudy_Static_Z6839B9E8 = ARCtrl_ROCrate_Dataset__Dataset_toArcStudy_Static_Z6839B9E8;
@@ -879,7 +880,7 @@ function ProcessConversion_tryGetPerformerGetter(generalI, header) {
879
880
  /**
880
881
  * Given the header sequence of an ArcTable, returns a function for parsing each row of the table to a process
881
882
  */
882
- function ProcessConversion_getProcessGetter(processNameRoot, headers) {
883
+ function ProcessConversion_getProcessGetter(assayName, studyName, processNameRoot, headers) {
883
884
  const headers_1 = (0, Seq_js_1.indexed)(headers);
884
885
  const valueHeaders = (0, Seq_js_1.toList)((0, Seq_js_1.indexed)((0, Seq_js_1.filter)((arg) => arg[1].IsCvParamColumn, headers_1)));
885
886
  const charGetters = (0, List_js_1.choose)((tupledArg) => {
@@ -958,6 +959,7 @@ function ProcessConversion_getProcessGetter(processNameRoot, headers) {
958
959
  const paramvalues = (0, Option_js_1.map)((collection_4) => Array.from(collection_4), (0, Collections_js_1.Option_fromValueWithDefault)((0, List_js_1.empty)(), (0, List_js_1.map)((f_4) => f_4(matrix_6)(i_6), parameterValueGetters)));
959
960
  const comments = (0, Option_js_1.map)((collection_5) => Array.from(collection_5), (0, Collections_js_1.Option_fromValueWithDefault)((0, List_js_1.empty)(), (0, List_js_1.map)((f_5) => f_5(matrix_6)(i_6), commentGetters)));
960
961
  const components = (0, Option_js_1.map)((collection_6) => Array.from(collection_6), (0, Collections_js_1.Option_fromValueWithDefault)((0, List_js_1.empty)(), (0, List_js_1.map)((f_6) => f_6(matrix_6)(i_6), componentGetters)));
962
+ const id = LabProcess_js_1.LDLabProcess.genId(processNameRoot, (0, Option_js_1.unwrap)(assayName), (0, Option_js_1.unwrap)(studyName)) + (`_${i_6}`);
961
963
  let protocol;
962
964
  const name = (0, Option_js_1.map)((f_7) => f_7(matrix_6)(i_6), protocolREFGetter);
963
965
  const protocolId = LabProtocol_js_1.LDLabProtocol.genId((0, Option_js_1.unwrap)(name), processNameRoot);
@@ -965,7 +967,7 @@ function ProcessConversion_getProcessGetter(processNameRoot, headers) {
965
967
  const matchValue_2 = inputGetter_1(matrix_6)(i_6);
966
968
  const matchValue_3 = outputGetter_1(matrix_6)(i_6);
967
969
  const agent = (0, Option_js_1.map)((f_12) => f_12(matrix_6)(i_6), performerGetter);
968
- return LabProcess_js_1.LDLabProcess.create(pn, matchValue_2, matchValue_3, undefined, (0, Option_js_1.unwrap)(agent), (0, Option_js_1.unwrap)(protocol), (0, Option_js_1.unwrap)(paramvalues), undefined, (0, Option_js_1.unwrap)(comments));
970
+ return LabProcess_js_1.LDLabProcess.create(pn, matchValue_2, matchValue_3, id, (0, Option_js_1.unwrap)(agent), (0, Option_js_1.unwrap)(protocol), (0, Option_js_1.unwrap)(paramvalues), undefined, (0, Option_js_1.unwrap)(comments));
969
971
  });
970
972
  }
971
973
  /**
@@ -1291,12 +1293,12 @@ function ARCtrl_ArcTable__ArcTable_GetProtocols(this$) {
1291
1293
  /**
1292
1294
  * Returns the list of processes specidified in this ArcTable
1293
1295
  */
1294
- function ARCtrl_ArcTable__ArcTable_GetProcesses(this$) {
1296
+ function ARCtrl_ArcTable__ArcTable_GetProcesses_40457300(this$, assayName, studyName) {
1295
1297
  if (this$.RowCount === 0) {
1296
1298
  return (0, List_js_1.singleton)(LabProcess_js_1.LDLabProcess.create(this$.Name));
1297
1299
  }
1298
1300
  else {
1299
- const getter = ProcessConversion_getProcessGetter(this$.Name, this$.Headers);
1301
+ const getter = ProcessConversion_getProcessGetter(assayName, studyName, this$.Name, this$.Headers);
1300
1302
  return (0, Seq_js_1.toList)((0, Seq_js_1.delay)(() => (0, Seq_js_1.map)((i) => getter(this$.Values)(i), (0, Range_js_1.rangeDouble)(0, 1, this$.RowCount - 1))));
1301
1303
  }
1302
1304
  }
@@ -1314,8 +1316,8 @@ function ARCtrl_ArcTable__ArcTable_fromProcesses_Static_Z3575FB5F(name, ps, grap
1314
1316
  /**
1315
1317
  * Return a list of all the processes in all the tables.
1316
1318
  */
1317
- function ARCtrl_ArcTables__ArcTables_GetProcesses(this$) {
1318
- return (0, List_js_1.collect)(ARCtrl_ArcTable__ArcTable_GetProcesses, (0, Seq_js_1.toList)(this$.Tables));
1319
+ function ARCtrl_ArcTables__ArcTables_GetProcesses_40457300(this$, assayName, studyName) {
1320
+ return (0, List_js_1.collect)((t) => ARCtrl_ArcTable__ArcTable_GetProcesses_40457300(t, (0, Option_js_1.unwrap)(assayName), (0, Option_js_1.unwrap)(studyName)), (0, Seq_js_1.toList)(this$.Tables));
1319
1321
  }
1320
1322
  /**
1321
1323
  * Create a collection of tables from a list of processes.
@@ -1569,7 +1571,7 @@ function AssayConversion_composeAssay_1501C0F8(assay) {
1569
1571
  const measurementTechnique = (0, Option_js_1.map)(BaseTypes_composeDefinedTerm_ZDED3A0F, assay.TechnologyPlatform);
1570
1572
  const variableMeasured = (0, Option_js_1.map)(BaseTypes_composePropertyValueFromOA_ZDED3A0F, assay.MeasurementType);
1571
1573
  const creators = (0, Collections_js_1.Option_fromSeq)((0, Collections_js_1.ResizeArray_map)(PersonConversion_composePerson_Z64D846DC, assay.Performers));
1572
- const processSequence = (0, Collections_js_1.Option_fromSeq)((collection = ARCtrl_ArcTables__ArcTables_GetProcesses(new ArcTables_js_1.ArcTables(assay.Tables)), Array.from(collection)));
1574
+ const processSequence = (0, Collections_js_1.Option_fromSeq)((collection = ARCtrl_ArcTables__ArcTables_GetProcesses_40457300(new ArcTables_js_1.ArcTables(assay.Tables), assay.Identifier), Array.from(collection)));
1573
1575
  const fragmentDescriptors = (0, Option_js_1.map)(DatamapConversion_composeFragmentDescriptors_Z8923FA3, assay.DataMap);
1574
1576
  const dataFiles = (0, Option_js_1.map)((ps) => AssayConversion_getDataFilesFromProcesses_6BABD1B0(ps, (0, Option_js_1.unwrap)(fragmentDescriptors)), processSequence);
1575
1577
  const variableMeasureds = (variableMeasured == null) ? ((fragmentDescriptors == null) ? undefined : ((fds_1 = (0, Option_js_1.value)(fragmentDescriptors), fds_1))) : ((fragmentDescriptors == null) ? ((vm_1 = (0, Option_js_1.value)(variableMeasured), (0, Collections_js_1.ResizeArray_singleton)(vm_1))) : ((fds = (0, Option_js_1.value)(fragmentDescriptors), (vm = (0, Option_js_1.value)(variableMeasured), (0, Collections_js_1.ResizeArray_appendSingleton)(vm, fds)))));
@@ -1603,7 +1605,7 @@ function StudyConversion_composeStudy_1680536E(study) {
1603
1605
  const dateModified = (0, Date_js_1.now)();
1604
1606
  const publications = (0, Collections_js_1.Option_fromSeq)((0, Collections_js_1.ResizeArray_map)(ScholarlyArticleConversion_composeScholarlyArticle_D324A6D, study.Publications));
1605
1607
  const creators = (0, Collections_js_1.Option_fromSeq)((0, Collections_js_1.ResizeArray_map)(PersonConversion_composePerson_Z64D846DC, study.Contacts));
1606
- const processSequence = (0, Collections_js_1.Option_fromSeq)((collection = ARCtrl_ArcTables__ArcTables_GetProcesses(new ArcTables_js_1.ArcTables(study.Tables)), Array.from(collection)));
1608
+ const processSequence = (0, Collections_js_1.Option_fromSeq)((collection = ARCtrl_ArcTables__ArcTables_GetProcesses_40457300(new ArcTables_js_1.ArcTables(study.Tables), undefined, study.Identifier), Array.from(collection)));
1607
1609
  const fragmentDescriptors = (0, Option_js_1.map)(DatamapConversion_composeFragmentDescriptors_Z8923FA3, study.DataMap);
1608
1610
  const dataFiles = (0, Option_js_1.map)((ps) => AssayConversion_getDataFilesFromProcesses_6BABD1B0(ps, (0, Option_js_1.unwrap)(fragmentDescriptors)), processSequence);
1609
1611
  const comments = (0, Collections_js_1.Option_fromSeq)((0, Collections_js_1.ResizeArray_map)(BaseTypes_composeComment_Z13201A7E, study.Comments));
@@ -1680,6 +1682,32 @@ function ARCtrl_ArcInvestigation__ArcInvestigation_ToROCrateInvestigation(this$)
1680
1682
  function ARCtrl_ArcInvestigation__ArcInvestigation_fromROCrateInvestigation_Static_Z6839B9E8(a, graph, context) {
1681
1683
  return InvestigationConversion_decomposeInvestigation_Z6839B9E8(a, (0, Option_js_1.unwrap)(graph), (0, Option_js_1.unwrap)(context));
1682
1684
  }
1685
+ class TypeExtensions_Conversion {
1686
+ constructor() {
1687
+ }
1688
+ static arcAssayToDataset(a) {
1689
+ return ARCtrl_ArcAssay__ArcAssay_ToROCrateAssay(a);
1690
+ }
1691
+ static datasetToArcAssay(a, graph, context) {
1692
+ return ARCtrl_ArcAssay__ArcAssay_fromROCrateAssay_Static_Z6839B9E8(a, (0, Option_js_1.unwrap)(graph), (0, Option_js_1.unwrap)(context));
1693
+ }
1694
+ static arcStudyToDataset(a) {
1695
+ return ARCtrl_ArcStudy__ArcStudy_ToROCrateStudy(a);
1696
+ }
1697
+ static datasetToArcStudy(a, graph, context) {
1698
+ return ARCtrl_ArcStudy__ArcStudy_fromROCrateStudy_Static_Z6839B9E8(a, (0, Option_js_1.unwrap)(graph), (0, Option_js_1.unwrap)(context));
1699
+ }
1700
+ static arcInvestigationToDataset(a) {
1701
+ return ARCtrl_ArcInvestigation__ArcInvestigation_ToROCrateInvestigation(a);
1702
+ }
1703
+ static datasetToArcInvestigation(a, graph, context) {
1704
+ return ARCtrl_ArcInvestigation__ArcInvestigation_fromROCrateInvestigation_Static_Z6839B9E8(a, (0, Option_js_1.unwrap)(graph), (0, Option_js_1.unwrap)(context));
1705
+ }
1706
+ }
1707
+ exports.TypeExtensions_Conversion = TypeExtensions_Conversion;
1708
+ function TypeExtensions_Conversion_$reflection() {
1709
+ return (0, Reflection_js_1.class_type)("ARCtrl.Conversion.TypeExtensions.Conversion", undefined, TypeExtensions_Conversion);
1710
+ }
1683
1711
  function ARCtrl_ROCrate_Dataset__Dataset_toArcAssay_Static_Z6839B9E8(a, graph, context) {
1684
1712
  return AssayConversion_decomposeAssay_Z6839B9E8(a, (0, Option_js_1.unwrap)(graph), (0, Option_js_1.unwrap)(context));
1685
1713
  }
@@ -9,6 +9,9 @@ exports.Dictionary_addOrUpdate = Dictionary_addOrUpdate;
9
9
  exports.Dictionary_ofSeq = Dictionary_ofSeq;
10
10
  exports.Dictionary_tryFind = Dictionary_tryFind;
11
11
  exports.Dictionary_ofSeqWithMerge = Dictionary_ofSeqWithMerge;
12
+ exports.Dictionary_init = Dictionary_init;
13
+ exports.Dictionary_items = Dictionary_items;
14
+ exports.StringDictionary_ofSeq = StringDictionary_ofSeq;
12
15
  exports.ResizeArray_create = ResizeArray_create;
13
16
  exports.ResizeArray_singleton = ResizeArray_singleton;
14
17
  exports.ResizeArray_map = ResizeArray_map;
@@ -152,6 +155,18 @@ function Dictionary_ofSeqWithMerge(merge, s) {
152
155
  }, s);
153
156
  return dict;
154
157
  }
158
+ function Dictionary_init() {
159
+ return new MutableMap_js_1.Dictionary([], {
160
+ Equals: Util_js_1.equals,
161
+ GetHashCode: Util_js_1.structuralHash,
162
+ });
163
+ }
164
+ function Dictionary_items(dict) {
165
+ return dict;
166
+ }
167
+ function StringDictionary_ofSeq(s) {
168
+ return new Map(s);
169
+ }
155
170
  function ResizeArray_create(i, v) {
156
171
  const a = [];
157
172
  if (i > 0) {
@@ -1,5 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CellDictionary_addOrUpdate = CellDictionary_addOrUpdate;
4
+ exports.CellDictionary_ofSeq = CellDictionary_ofSeq;
5
+ exports.CellDictionary_tryFind = CellDictionary_tryFind;
3
6
  exports.getColumnCount = getColumnCount;
4
7
  exports.getRowCount = getRowCount;
5
8
  exports.boxHashValues = boxHashValues;
@@ -29,22 +32,50 @@ exports.Unchecked_compositeHeaderMainColumnEqual = Unchecked_compositeHeaderMain
29
32
  exports.Unchecked_moveColumnTo = Unchecked_moveColumnTo;
30
33
  exports.Unchecked_alignByHeaders = Unchecked_alignByHeaders;
31
34
  const Int32_js_1 = require("@fable-org/fable-library-js/Int32.js");
32
- const Seq_js_1 = require("@fable-org/fable-library-js/Seq.js");
33
- const Util_js_1 = require("@fable-org/fable-library-js/Util.js");
34
- const CompositeCell_js_1 = require("./CompositeCell.js");
35
35
  const MapUtil_js_1 = require("@fable-org/fable-library-js/MapUtil.js");
36
+ const CompositeCell_js_1 = require("./CompositeCell.js");
37
+ const Util_js_1 = require("@fable-org/fable-library-js/Util.js");
38
+ const MutableMap_js_1 = require("@fable-org/fable-library-js/MutableMap.js");
39
+ const Types_js_1 = require("@fable-org/fable-library-js/Types.js");
36
40
  const Option_js_1 = require("@fable-org/fable-library-js/Option.js");
41
+ const Seq_js_1 = require("@fable-org/fable-library-js/Seq.js");
37
42
  const List_js_1 = require("@fable-org/fable-library-js/List.js");
38
43
  const String_js_1 = require("@fable-org/fable-library-js/String.js");
39
- const Collections_js_1 = require("../Helper/Collections.js");
40
44
  const Double_js_1 = require("@fable-org/fable-library-js/Double.js");
41
45
  const Array_js_1 = require("@fable-org/fable-library-js/Array.js");
42
46
  const Map_js_1 = require("@fable-org/fable-library-js/Map.js");
43
47
  const Seq2_js_1 = require("@fable-org/fable-library-js/Seq2.js");
44
48
  const Set_js_1 = require("@fable-org/fable-library-js/Set.js");
45
- const Types_js_1 = require("@fable-org/fable-library-js/Types.js");
46
49
  const Range_js_1 = require("@fable-org/fable-library-js/Range.js");
47
- const MutableMap_js_1 = require("@fable-org/fable-library-js/MutableMap.js");
50
+ const Collections_js_1 = require("../Helper/Collections.js");
51
+ function CellDictionary_addOrUpdate(key_, key__1, value, dict) {
52
+ const key = [key_, key__1];
53
+ if (dict.has(key)) {
54
+ dict.set(key, value);
55
+ }
56
+ else {
57
+ (0, MapUtil_js_1.addToDict)(dict, key, value);
58
+ }
59
+ }
60
+ function CellDictionary_ofSeq(s) {
61
+ return new MutableMap_js_1.Dictionary(s, {
62
+ Equals: Util_js_1.equalArrays,
63
+ GetHashCode: Util_js_1.arrayHash,
64
+ });
65
+ }
66
+ function CellDictionary_tryFind(key_, key__1, dict) {
67
+ let patternInput;
68
+ let outArg = (0, Util_js_1.defaultOf)();
69
+ patternInput = [(0, MapUtil_js_1.tryGetValue)(dict, [key_, key__1], new Types_js_1.FSharpRef(() => outArg, (v) => {
70
+ outArg = v;
71
+ })), outArg];
72
+ if (patternInput[0]) {
73
+ return patternInput[1];
74
+ }
75
+ else {
76
+ return undefined;
77
+ }
78
+ }
48
79
  function getColumnCount(headers) {
49
80
  return headers.length;
50
81
  }
@@ -206,7 +237,7 @@ function SanityChecks_validate(headers, values, raiseException) {
206
237
  return isValid;
207
238
  }
208
239
  function Unchecked_tryGetCellAt(column, row, cells) {
209
- return (0, Collections_js_1.Dictionary_tryFind)([column, row], cells);
240
+ return CellDictionary_tryFind(column, row, cells);
210
241
  }
211
242
  /**
212
243
  * Add or update a cell in the dictionary.
@@ -221,7 +252,7 @@ function Unchecked_addCellAt(columnIndex, rowIndex, c, cells) {
221
252
  (0, MapUtil_js_1.addToDict)(cells, [columnIndex, rowIndex], c);
222
253
  }
223
254
  function Unchecked_moveCellTo(fromCol, fromRow, toCol, toRow, cells) {
224
- const matchValue = (0, Collections_js_1.Dictionary_tryFind)([fromCol, fromRow], cells);
255
+ const matchValue = CellDictionary_tryFind(fromCol, fromRow, cells);
225
256
  if (matchValue == null) {
226
257
  }
227
258
  else {
@@ -7,10 +7,11 @@ exports.encodeString = encodeString;
7
7
  exports.decodeString = decodeString;
8
8
  const Array_js_1 = require("@fable-org/fable-library-js/Array.js");
9
9
  const Seq_js_1 = require("@fable-org/fable-library-js/Seq.js");
10
+ const Util_js_1 = require("@fable-org/fable-library-js/Util.js");
10
11
  const Decode_fs_js_1 = require("../fable_modules/Thoth.Json.Core.0.4.0/Decode.fs.js");
11
- const Collections_js_1 = require("../Core/Helper/Collections.js");
12
12
  const Option_js_1 = require("@fable-org/fable-library-js/Option.js");
13
13
  const MapUtil_js_1 = require("@fable-org/fable-library-js/MapUtil.js");
14
+ const Types_js_1 = require("@fable-org/fable-library-js/Types.js");
14
15
  const Result_js_1 = require("@fable-org/fable-library-js/Result.js");
15
16
  function arrayFromMap(otm) {
16
17
  const a = (0, Array_js_1.fill)(new Array(otm.size), 0, otm.size, "");
@@ -34,7 +35,13 @@ function encoder(ot) {
34
35
  }
35
36
  exports.decoder = (0, Decode_fs_js_1.array)(Decode_fs_js_1.string);
36
37
  function encodeString(otm, s) {
37
- const matchValue = (0, Collections_js_1.Dictionary_tryFind)(s, otm);
38
+ let matchValue;
39
+ let patternInput;
40
+ let outArg = (0, Util_js_1.defaultOf)();
41
+ patternInput = [(0, MapUtil_js_1.tryGetValue)(otm, s, new Types_js_1.FSharpRef(() => outArg, (v) => {
42
+ outArg = (v | 0);
43
+ })), outArg];
44
+ matchValue = (patternInput[0] ? patternInput[1] : undefined);
38
45
  if (matchValue == null) {
39
46
  const i_1 = otm.size | 0;
40
47
  (0, MapUtil_js_1.addToDict)(otm, s, i_1);
@@ -6,15 +6,15 @@ exports.decoder = decoder;
6
6
  exports.encodeCell = encodeCell;
7
7
  exports.decodeCell = decodeCell;
8
8
  const Seq_js_1 = require("@fable-org/fable-library-js/Seq.js");
9
+ const Collections_js_1 = require("../../Core/Helper/Collections.js");
9
10
  const Util_js_1 = require("@fable-org/fable-library-js/Util.js");
10
11
  const Array_js_1 = require("@fable-org/fable-library-js/Array.js");
11
12
  const CompositeCell_js_1 = require("./CompositeCell.js");
12
13
  const Decode_fs_js_1 = require("../../fable_modules/Thoth.Json.Core.0.4.0/Decode.fs.js");
13
- const Collections_js_1 = require("../../Core/Helper/Collections.js");
14
14
  const Option_js_1 = require("@fable-org/fable-library-js/Option.js");
15
15
  const MapUtil_js_1 = require("@fable-org/fable-library-js/MapUtil.js");
16
16
  function arrayFromMap(otm) {
17
- return (0, Seq_js_1.toArray)((0, Seq_js_1.map)((kv_1) => kv_1[0], (0, Seq_js_1.sortBy)((kv) => kv[1], otm, {
17
+ return (0, Seq_js_1.toArray)((0, Seq_js_1.map)((kv_1) => kv_1[0], (0, Seq_js_1.sortBy)((kv) => kv[1], (0, Collections_js_1.Dictionary_items)(otm), {
18
18
  Compare: Util_js_1.comparePrimitives,
19
19
  })));
20
20
  }
@@ -6,15 +6,15 @@ exports.decoder = decoder;
6
6
  exports.encodeOA = encodeOA;
7
7
  exports.decodeOA = decodeOA;
8
8
  const Seq_js_1 = require("@fable-org/fable-library-js/Seq.js");
9
+ const Collections_js_1 = require("../../Core/Helper/Collections.js");
9
10
  const Util_js_1 = require("@fable-org/fable-library-js/Util.js");
10
11
  const Array_js_1 = require("@fable-org/fable-library-js/Array.js");
11
12
  const OntologyAnnotation_js_1 = require("../OntologyAnnotation.js");
12
13
  const Decode_fs_js_1 = require("../../fable_modules/Thoth.Json.Core.0.4.0/Decode.fs.js");
13
- const Collections_js_1 = require("../../Core/Helper/Collections.js");
14
14
  const Option_js_1 = require("@fable-org/fable-library-js/Option.js");
15
15
  const MapUtil_js_1 = require("@fable-org/fable-library-js/MapUtil.js");
16
16
  function arrayFromMap(otm) {
17
- return (0, Seq_js_1.toArray)((0, Seq_js_1.map)((kv_1) => kv_1[0], (0, Seq_js_1.sortBy)((kv) => kv[1], otm, {
17
+ return (0, Seq_js_1.toArray)((0, Seq_js_1.map)((kv_1) => kv_1[0], (0, Seq_js_1.sortBy)((kv) => kv[1], (0, Collections_js_1.Dictionary_items)(otm), {
18
18
  Compare: Util_js_1.comparePrimitives,
19
19
  })));
20
20
  }
@@ -0,0 +1,107 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LDGraphExtensions_PyJsInterop = exports.LDNodeExtensions_PyJsInterop = void 0;
4
+ exports.ARCtrl_ROCrate_LDNode__LDNode_fromROCrateJsonString_Static_Z721C83C5 = ARCtrl_ROCrate_LDNode__LDNode_fromROCrateJsonString_Static_Z721C83C5;
5
+ exports.ARCtrl_ROCrate_LDNode__LDNode_toROCrateJsonString_Static_71136F3F = ARCtrl_ROCrate_LDNode__LDNode_toROCrateJsonString_Static_71136F3F;
6
+ exports.ARCtrl_ROCrate_LDNode__LDNode_ToROCrateJsonString_71136F3F = ARCtrl_ROCrate_LDNode__LDNode_ToROCrateJsonString_71136F3F;
7
+ exports.LDNodeExtensions_PyJsInterop_$reflection = LDNodeExtensions_PyJsInterop_$reflection;
8
+ exports.ARCtrl_ROCrate_LDGraph__LDGraph_fromROCrateJsonString_Static_Z721C83C5 = ARCtrl_ROCrate_LDGraph__LDGraph_fromROCrateJsonString_Static_Z721C83C5;
9
+ exports.ARCtrl_ROCrate_LDGraph__LDGraph_toROCrateJsonString_Static_71136F3F = ARCtrl_ROCrate_LDGraph__LDGraph_toROCrateJsonString_Static_71136F3F;
10
+ exports.ARCtrl_ROCrate_LDGraph__LDGraph_ToROCrateJsonString_71136F3F = ARCtrl_ROCrate_LDGraph__LDGraph_ToROCrateJsonString_71136F3F;
11
+ exports.LDGraphExtensions_PyJsInterop_$reflection = LDGraphExtensions_PyJsInterop_$reflection;
12
+ const Decode_fs_js_1 = require("../fable_modules/Thoth.Json.JavaScript.0.3.0/Decode.fs.js");
13
+ const LDNode_js_1 = require("../Json/ROCrate/LDNode.js");
14
+ const String_js_1 = require("@fable-org/fable-library-js/String.js");
15
+ const Encode_fs_js_1 = require("../fable_modules/Thoth.Json.JavaScript.0.3.0/Encode.fs.js");
16
+ const Encode_js_1 = require("../Json/Encode.js");
17
+ const Option_js_1 = require("@fable-org/fable-library-js/Option.js");
18
+ const Reflection_js_1 = require("@fable-org/fable-library-js/Reflection.js");
19
+ const LDGraph_js_1 = require("../Json/ROCrate/LDGraph.js");
20
+ function ARCtrl_ROCrate_LDNode__LDNode_fromROCrateJsonString_Static_Z721C83C5(s) {
21
+ let arg;
22
+ const matchValue = (0, Decode_fs_js_1.fromString)(LDNode_js_1.decoder, s);
23
+ if (matchValue.tag === /* Error */ 1) {
24
+ throw new Error((arg = matchValue.fields[0], (0, String_js_1.toText)((0, String_js_1.printf)("Error decoding string: %O"))(arg)));
25
+ }
26
+ else {
27
+ return matchValue.fields[0];
28
+ }
29
+ }
30
+ /**
31
+ * exports in json-ld format
32
+ */
33
+ function ARCtrl_ROCrate_LDNode__LDNode_toROCrateJsonString_Static_71136F3F(spaces) {
34
+ return (obj) => {
35
+ const value = (0, LDNode_js_1.encoder)(obj);
36
+ return (0, Encode_fs_js_1.toString)((0, Encode_js_1.defaultSpaces)(spaces), value);
37
+ };
38
+ }
39
+ function ARCtrl_ROCrate_LDNode__LDNode_ToROCrateJsonString_71136F3F(this$, spaces) {
40
+ return ARCtrl_ROCrate_LDNode__LDNode_toROCrateJsonString_Static_71136F3F((0, Option_js_1.unwrap)(spaces))(this$);
41
+ }
42
+ class LDNodeExtensions_PyJsInterop {
43
+ constructor() {
44
+ }
45
+ static fromROCrateJsonString(s) {
46
+ let arg;
47
+ const matchValue = (0, Decode_fs_js_1.fromString)(LDNode_js_1.decoder, s);
48
+ if (matchValue.tag === /* Error */ 1) {
49
+ throw new Error((arg = matchValue.fields[0], (0, String_js_1.toText)((0, String_js_1.printf)("Error decoding string: %O"))(arg)));
50
+ }
51
+ else {
52
+ return matchValue.fields[0];
53
+ }
54
+ }
55
+ static toROCrateJsonString(node, spaces) {
56
+ const value = (0, LDNode_js_1.encoder)(node);
57
+ return (0, Encode_fs_js_1.toString)((0, Encode_js_1.defaultSpaces)(spaces), value);
58
+ }
59
+ }
60
+ exports.LDNodeExtensions_PyJsInterop = LDNodeExtensions_PyJsInterop;
61
+ function LDNodeExtensions_PyJsInterop_$reflection() {
62
+ return (0, Reflection_js_1.class_type)("ARCtrl.Json.LDNodeExtensions.PyJsInterop", undefined, LDNodeExtensions_PyJsInterop);
63
+ }
64
+ function ARCtrl_ROCrate_LDGraph__LDGraph_fromROCrateJsonString_Static_Z721C83C5(s) {
65
+ let arg;
66
+ const matchValue = (0, Decode_fs_js_1.fromString)(LDGraph_js_1.decoder, s);
67
+ if (matchValue.tag === /* Error */ 1) {
68
+ throw new Error((arg = matchValue.fields[0], (0, String_js_1.toText)((0, String_js_1.printf)("Error decoding string: %O"))(arg)));
69
+ }
70
+ else {
71
+ return matchValue.fields[0];
72
+ }
73
+ }
74
+ /**
75
+ * exports in json-ld format
76
+ */
77
+ function ARCtrl_ROCrate_LDGraph__LDGraph_toROCrateJsonString_Static_71136F3F(spaces) {
78
+ return (obj) => {
79
+ const value = (0, LDGraph_js_1.encoder)(obj);
80
+ return (0, Encode_fs_js_1.toString)((0, Encode_js_1.defaultSpaces)(spaces), value);
81
+ };
82
+ }
83
+ function ARCtrl_ROCrate_LDGraph__LDGraph_ToROCrateJsonString_71136F3F(this$, spaces) {
84
+ return ARCtrl_ROCrate_LDGraph__LDGraph_toROCrateJsonString_Static_71136F3F((0, Option_js_1.unwrap)(spaces))(this$);
85
+ }
86
+ class LDGraphExtensions_PyJsInterop {
87
+ constructor() {
88
+ }
89
+ static fromROCrateJsonString(s) {
90
+ let arg;
91
+ const matchValue = (0, Decode_fs_js_1.fromString)(LDGraph_js_1.decoder, s);
92
+ if (matchValue.tag === /* Error */ 1) {
93
+ throw new Error((arg = matchValue.fields[0], (0, String_js_1.toText)((0, String_js_1.printf)("Error decoding string: %O"))(arg)));
94
+ }
95
+ else {
96
+ return matchValue.fields[0];
97
+ }
98
+ }
99
+ static toROCrateJsonString(graph, spaces) {
100
+ const value = (0, LDGraph_js_1.encoder)(graph);
101
+ return (0, Encode_fs_js_1.toString)((0, Encode_js_1.defaultSpaces)(spaces), value);
102
+ }
103
+ }
104
+ exports.LDGraphExtensions_PyJsInterop = LDGraphExtensions_PyJsInterop;
105
+ function LDGraphExtensions_PyJsInterop_$reflection() {
106
+ return (0, Reflection_js_1.class_type)("ARCtrl.Json.LDGraphExtensions.PyJsInterop", undefined, LDGraphExtensions_PyJsInterop);
107
+ }
@@ -2,8 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.encode = encode;
4
4
  exports.decode = decode;
5
- const Util_js_1 = require("@fable-org/fable-library-js/Util.js");
6
- const MutableMap_js_1 = require("@fable-org/fable-library-js/MutableMap.js");
5
+ const Collections_js_1 = require("../../Core/Helper/Collections.js");
7
6
  const Encode_fs_js_1 = require("../../fable_modules/Thoth.Json.JavaScript.0.3.0/Encode.fs.js");
8
7
  const CellTable_js_1 = require("../../Json/Table/CellTable.js");
9
8
  const OATable_js_1 = require("../../Json/Table/OATable.js");
@@ -11,15 +10,9 @@ const StringTable_js_1 = require("../../Json/StringTable.js");
11
10
  const Seq_js_1 = require("@fable-org/fable-library-js/Seq.js");
12
11
  const Decode_fs_js_1 = require("../../fable_modules/Thoth.Json.Core.0.4.0/Decode.fs.js");
13
12
  function encode(encoder, obj) {
14
- const stringTable = new Map([]);
15
- const oaTable = new MutableMap_js_1.Dictionary([], {
16
- Equals: Util_js_1.equals,
17
- GetHashCode: Util_js_1.safeHash,
18
- });
19
- const cellTable = new MutableMap_js_1.Dictionary([], {
20
- Equals: Util_js_1.equals,
21
- GetHashCode: Util_js_1.safeHash,
22
- });
13
+ const stringTable = (0, Collections_js_1.Dictionary_init)();
14
+ const oaTable = (0, Collections_js_1.Dictionary_init)();
15
+ const cellTable = (0, Collections_js_1.Dictionary_init)();
23
16
  const object = encoder(stringTable, oaTable, cellTable, obj);
24
17
  (0, Encode_fs_js_1.toString)(0, object);
25
18
  const values = [["cellTable", (0, CellTable_js_1.encoder)(stringTable, oaTable, (0, CellTable_js_1.arrayFromMap)(cellTable))], ["oaTable", (0, OATable_js_1.encoder)(stringTable, (0, OATable_js_1.arrayFromMap)(oaTable))], ["stringTable", (0, StringTable_js_1.encoder)((0, StringTable_js_1.arrayFromMap)(stringTable))], ["object", object]];
@@ -216,7 +216,7 @@ class LDLabProcess {
216
216
  }
217
217
  static genId(name, assayName, studyName) {
218
218
  let study_1, assay_1, assay, study;
219
- return (0, Helper_js_1.clean)((assayName == null) ? ((studyName != null) ? ((study_1 = (0, Option_js_1.value)(studyName), `#Process_${study_1}_${name}`)) : (`#Process_${name}`)) : ((studyName == null) ? ((assay_1 = (0, Option_js_1.value)(assayName), `#Process_${assay_1}_${name}`)) : ((assay = (0, Option_js_1.value)(assayName), (study = (0, Option_js_1.value)(studyName), `#Process_${study}_${assay}_${name}`)))));
219
+ return (0, Helper_js_1.clean)((assayName == null) ? ((studyName != null) ? ((study_1 = (0, Option_js_1.value)(studyName), `#Process_S_${study_1}_${name}`)) : (`#Process_${name}`)) : ((studyName == null) ? ((assay_1 = (0, Option_js_1.value)(assayName), `#Process_A_${assay_1}_${name}`)) : ((assay = (0, Option_js_1.value)(assayName), (study = (0, Option_js_1.value)(studyName), `#Process_S_${study}_A_${assay}_${name}`)))));
220
220
  }
221
221
  static create(name, objects, results, id, agent, executesLabProtocol, parameterValues, endTime, disambiguatingDescriptions, context) {
222
222
  const id_1 = (id == null) ? LDLabProcess.genId(name) : (0, Option_js_1.value)(id);