@nfdi4plants/arctrl 2.0.0-alpha.3 → 2.0.0-alpha.5
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.
- package/ARC.js +178 -21
- package/Contract/ARC.js +9 -1
- package/Contract/Contract.js +3 -0
- package/Contract/Datamap.js +180 -0
- package/Contract/Git.js +3 -0
- package/Core/ArcTypes.js +189 -120
- package/Core/Conversion.js +177 -106
- package/Core/Data.js +119 -0
- package/Core/{Process/DataFile.js → DataFile.js} +3 -3
- package/Core/Helper/Identifier.js +40 -0
- package/Core/Helper/Regex.js +13 -0
- package/Core/OntologyAnnotation.js +28 -6
- package/Core/Process/ColumnIndex.js +13 -3
- package/Core/Process/ProcessInput.js +5 -5
- package/Core/Process/ProcessOutput.js +5 -5
- package/Core/Process/Value.js +1 -1
- package/Core/Table/ArcTable.js +24 -2
- package/Core/Table/ArcTableAux.js +56 -5
- package/Core/Table/ArcTables.js +1 -1
- package/Core/Table/CompositeCell.js +67 -10
- package/Core/Table/CompositeColumn.js +9 -0
- package/Core/Table/CompositeHeader.js +108 -94
- package/Core/Table/DataMap.js +166 -0
- package/FileSystem/DefaultGitattributes.js +3 -0
- package/FileSystem/FileSystemTree.js +18 -4
- package/Json/Assay.js +4 -4
- package/Json/Process/Data.js +56 -18
- package/Json/Process/DataFile.js +5 -5
- package/Json/Process/PropertyValue.js +124 -4
- package/Json/Study.js +4 -4
- package/Json/Table/CompositeCell.js +7 -6
- package/Json/Table/CompositeHeader.js +4 -3
- package/Spreadsheet/AnnotationTable/ArcTable.js +10 -13
- package/Spreadsheet/AnnotationTable/CompositeCell.js +32 -50
- package/Spreadsheet/AnnotationTable/CompositeColumn.js +16 -10
- package/Spreadsheet/AnnotationTable/CompositeHeader.js +290 -135
- package/Spreadsheet/ArcAssay.js +2 -2
- package/Spreadsheet/ArcInvestigation.js +2 -2
- package/Spreadsheet/ArcStudy.js +2 -2
- package/Spreadsheet/DataMap.js +31 -0
- package/Spreadsheet/DataMapTable/DataMapColumn.js +36 -0
- package/Spreadsheet/DataMapTable/DataMapHeader.js +417 -0
- package/Spreadsheet/DataMapTable/DataMapTable.js +98 -0
- package/Spreadsheet/Metadata/Assays.js +2 -2
- package/Spreadsheet/Metadata/SparseTable.js +7 -7
- package/Spreadsheet/Metadata/Study.js +1 -1
- package/Spreadsheet/Template.js +2 -2
- package/Xlsx.js +29 -6
- package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsSpreadsheet.fableproj +9 -3
- package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsWorksheet.fs +1 -0
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Cell.fs +23 -0
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Cell.fs.js +21 -0
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Row.fs +23 -0
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Row.fs.js +19 -0
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Table.fs +24 -0
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Table.fs.js +15 -0
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Value.fs +70 -0
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Value.fs.js +48 -0
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Workbook.fs +20 -0
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Workbook.fs.js +21 -0
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Worksheet.fs +49 -0
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Worksheet.fs.js +44 -0
- package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/obj/Release/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +3 -3
- package/fable_modules/project_cracked.json +1 -1
- package/package.json +1 -1
- package/Core/Process/Data.js +0 -55
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Cells/FsCell.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Cells/FsCell.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Cells/FsCellsCollection.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Cells/FsCellsCollection.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/CellBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/CellBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/ColumnBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/ColumnBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/DSL.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/DSL.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/Expression.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/Expression.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/Operators.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/Operators.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/RowBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/RowBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/SheetBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/SheetBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/TableBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/TableBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/Transform.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/Transform.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/Types.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/Types.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/WorkbookBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/WorkbookBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsAddress.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsAddress.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsColumn.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsColumn.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsRow.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsRow.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsWorkbook.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsWorkbook.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsWorksheet.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRange.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRange.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRangeAddress.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRangeAddress.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRangeBase.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRangeBase.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRangeColumn.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRangeColumn.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRangeRow.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRangeRow.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/SheetBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/SheetBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Tables/FsTable.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Tables/FsTable.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Tables/FsTableField.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Tables/FsTableField.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Tables/FsTableRow.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Tables/FsTableRow.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/obj/Debug/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
package/Core/Conversion.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { remove, toFail, endsWith, printf, toText } from "../fable_modules/fable-library-js.4.16.0/String.js";
|
|
2
2
|
import { Comment$ } from "./Comment.js";
|
|
3
3
|
import { zip as zip_1, fold, empty as empty_1, singleton as singleton_1, append, delay, map as map_1, filter, toList, indexed, tryPick, choose } from "../fable_modules/fable-library-js.4.16.0/Seq.js";
|
|
4
|
-
import { unwrap, value as
|
|
4
|
+
import { unwrap, value as value_10, map, defaultArg } from "../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
5
5
|
import { Option_fromValueWithDefault, ResizeArray_filter } from "./Helper/Collections.js";
|
|
6
|
-
import { Value as
|
|
6
|
+
import { Value as Value_2 } from "./Process/Value.js";
|
|
7
7
|
import { Component_create_4208F9FC } from "./Process/Component.js";
|
|
8
8
|
import { ProtocolParameter } from "./Process/ProtocolParameter.js";
|
|
9
9
|
import { ProcessParameterValue } from "./Process/ProcessParameterValue.js";
|
|
@@ -12,13 +12,13 @@ import { Factor } from "./Process/Factor.js";
|
|
|
12
12
|
import { toString } from "../fable_modules/fable-library-js.4.16.0/Types.js";
|
|
13
13
|
import { MaterialAttributeValue_create_BE8DE56 } from "./Process/MaterialAttributeValue.js";
|
|
14
14
|
import { MaterialAttribute_create_A220A8A } from "./Process/MaterialAttribute.js";
|
|
15
|
-
import { ProcessInput_getCharacteristicValues_5B3D5BA9, ProcessInput__isMaterial, ProcessInput__isData, ProcessInput_setCharacteristicValues, ProcessInput__get_Name, ProcessInput__isSource, ProcessInput__isSample, ProcessInput,
|
|
16
|
-
import { ProcessOutput_getFactorValues_Z42C11600, ProcessOutput__isMaterial, ProcessOutput__isData, ProcessOutput_setFactorValues, ProcessOutput__get_Name, ProcessOutput__isSample, ProcessOutput,
|
|
15
|
+
import { ProcessInput_getCharacteristicValues_5B3D5BA9, ProcessInput__isMaterial, ProcessInput__isData, ProcessInput_setCharacteristicValues, ProcessInput__get_Name, ProcessInput__isSource, ProcessInput__isSample, ProcessInput, ProcessInput_createRawData_Z721C83C5, ProcessInput_createMaterial_4452CB4C, ProcessInput_createSample_Z598187B7, ProcessInput_createSource_Z5E00540E } from "./Process/ProcessInput.js";
|
|
16
|
+
import { ProcessOutput_getFactorValues_Z42C11600, ProcessOutput__isMaterial, ProcessOutput__isData, ProcessOutput_setFactorValues, ProcessOutput__get_Name, ProcessOutput__isSample, ProcessOutput, ProcessOutput_createRawData_Z721C83C5, ProcessOutput_createMaterial_4452CB4C, ProcessOutput_createSample_Z598187B7 } from "./Process/ProcessOutput.js";
|
|
17
17
|
import { CompositeCell } from "./Table/CompositeCell.js";
|
|
18
|
+
import { OntologyAnnotation } from "./OntologyAnnotation.js";
|
|
18
19
|
import { safeHash, equals, disposeSafe, getEnumerator, comparePrimitives, arrayHash, equalArrays, stringHash, int32ToString } from "../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
19
20
|
import { IOType, CompositeHeader } from "./Table/CompositeHeader.js";
|
|
20
21
|
import { ActivePatterns_$007CRegex$007C_$007C } from "./Helper/Regex.js";
|
|
21
|
-
import { OntologyAnnotation } from "./OntologyAnnotation.js";
|
|
22
22
|
import { ARCtrl_Process_Component__Component_TryGetColumnIndex, ARCtrl_Process_ProtocolParameter__ProtocolParameter_TryGetColumnIndex, tryGetFactorColumnIndex, tryGetCharacteristicColumnIndex, tryGetComponentIndex, tryGetParameterColumnIndex, ARCtrl_OntologyAnnotation__OntologyAnnotation_setColumnIndex_Static, ARCtrl_OntologyAnnotation__OntologyAnnotation_SetColumnIndex_Z524259A4 } from "./Process/ColumnIndex.js";
|
|
23
23
|
import { getItemFromDict } from "../fable_modules/fable-library-js.4.16.0/MapUtil.js";
|
|
24
24
|
import { initialize, zip, append as append_1, sortBy, head, tryPick as tryPick_1, collect, mapIndexed, item, length, map as map_2, empty, ofArray, isEmpty, singleton, choose as choose_1 } from "../fable_modules/fable-library-js.4.16.0/List.js";
|
|
@@ -68,7 +68,7 @@ export function Person_getSourceAssayIdentifiersFromComments(person) {
|
|
|
68
68
|
export function Person_removeSourceAssayComments(person) {
|
|
69
69
|
return ResizeArray_filter((c) => {
|
|
70
70
|
if (c.Name != null) {
|
|
71
|
-
return !(
|
|
71
|
+
return !(value_10(c.Name).indexOf(Person_AssayIdentifierPrefix) === 0);
|
|
72
72
|
}
|
|
73
73
|
else {
|
|
74
74
|
return false;
|
|
@@ -80,7 +80,7 @@ export function Person_setOrcidFromComments(person) {
|
|
|
80
80
|
const person_1 = person.Copy();
|
|
81
81
|
const isOrcidComment = (c) => {
|
|
82
82
|
if (c.Name != null) {
|
|
83
|
-
return endsWith(
|
|
83
|
+
return endsWith(value_10(c.Name).toLocaleUpperCase(), Person_orcidKey);
|
|
84
84
|
}
|
|
85
85
|
else {
|
|
86
86
|
return false;
|
|
@@ -118,11 +118,23 @@ export function Person_setCommentFromORCID(person) {
|
|
|
118
118
|
export function JsonTypes_valueOfCell(value) {
|
|
119
119
|
switch (value.tag) {
|
|
120
120
|
case 0:
|
|
121
|
-
|
|
121
|
+
if (value.fields[0].isEmpty()) {
|
|
122
|
+
return [void 0, void 0];
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
return [new Value_2(0, [value.fields[0]]), void 0];
|
|
126
|
+
}
|
|
122
127
|
case 2:
|
|
123
|
-
return [
|
|
128
|
+
return [(value.fields[0] === "") ? void 0 : Value_2.fromString(value.fields[0]), value.fields[1].isEmpty() ? void 0 : value.fields[1]];
|
|
129
|
+
case 3:
|
|
130
|
+
throw new Error("Data cell should not be parsed to isa value");
|
|
124
131
|
default:
|
|
125
|
-
|
|
132
|
+
if (value.fields[0] === "") {
|
|
133
|
+
return [void 0, void 0];
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
return [Value_2.fromString(value.fields[0]), void 0];
|
|
137
|
+
}
|
|
126
138
|
}
|
|
127
139
|
}
|
|
128
140
|
|
|
@@ -131,7 +143,7 @@ export function JsonTypes_valueOfCell(value) {
|
|
|
131
143
|
*/
|
|
132
144
|
export function JsonTypes_composeComponent(header, value) {
|
|
133
145
|
const patternInput = JsonTypes_valueOfCell(value);
|
|
134
|
-
return Component_create_4208F9FC(patternInput[0], unwrap(patternInput[1]), header.ToTerm());
|
|
146
|
+
return Component_create_4208F9FC(unwrap(patternInput[0]), unwrap(patternInput[1]), header.ToTerm());
|
|
135
147
|
}
|
|
136
148
|
|
|
137
149
|
/**
|
|
@@ -140,7 +152,7 @@ export function JsonTypes_composeComponent(header, value) {
|
|
|
140
152
|
export function JsonTypes_composeParameterValue(header, value) {
|
|
141
153
|
const patternInput = JsonTypes_valueOfCell(value);
|
|
142
154
|
const p = ProtocolParameter.create(void 0, header.ToTerm());
|
|
143
|
-
return ProcessParameterValue.create(p, patternInput[0], unwrap(patternInput[1]));
|
|
155
|
+
return ProcessParameterValue.create(p, unwrap(patternInput[0]), unwrap(patternInput[1]));
|
|
144
156
|
}
|
|
145
157
|
|
|
146
158
|
/**
|
|
@@ -148,7 +160,7 @@ export function JsonTypes_composeParameterValue(header, value) {
|
|
|
148
160
|
*/
|
|
149
161
|
export function JsonTypes_composeFactorValue(header, value) {
|
|
150
162
|
const patternInput = JsonTypes_valueOfCell(value);
|
|
151
|
-
return FactorValue_create_29259B2C(void 0, Factor.create(toString(header), header.ToTerm()), patternInput[0], unwrap(patternInput[1]));
|
|
163
|
+
return FactorValue_create_29259B2C(void 0, Factor.create(toString(header), header.ToTerm()), unwrap(patternInput[0]), unwrap(patternInput[1]));
|
|
152
164
|
}
|
|
153
165
|
|
|
154
166
|
/**
|
|
@@ -156,7 +168,7 @@ export function JsonTypes_composeFactorValue(header, value) {
|
|
|
156
168
|
*/
|
|
157
169
|
export function JsonTypes_composeCharacteristicValue(header, value) {
|
|
158
170
|
const patternInput = JsonTypes_valueOfCell(value);
|
|
159
|
-
return MaterialAttributeValue_create_BE8DE56(void 0, MaterialAttribute_create_A220A8A(void 0, header.ToTerm()), patternInput[0], unwrap(patternInput[1]));
|
|
171
|
+
return MaterialAttributeValue_create_BE8DE56(void 0, MaterialAttribute_create_A220A8A(void 0, header.ToTerm()), unwrap(patternInput[0]), unwrap(patternInput[1]));
|
|
160
172
|
}
|
|
161
173
|
|
|
162
174
|
/**
|
|
@@ -174,28 +186,20 @@ export function JsonTypes_composeProcessInput(header, value) {
|
|
|
174
186
|
matchResult = 1;
|
|
175
187
|
break;
|
|
176
188
|
}
|
|
177
|
-
case
|
|
189
|
+
case 3: {
|
|
178
190
|
matchResult = 2;
|
|
179
191
|
break;
|
|
180
192
|
}
|
|
181
|
-
case 4: {
|
|
182
|
-
matchResult = 3;
|
|
183
|
-
break;
|
|
184
|
-
}
|
|
185
193
|
case 2: {
|
|
186
|
-
matchResult =
|
|
187
|
-
break;
|
|
188
|
-
}
|
|
189
|
-
case 3: {
|
|
190
|
-
matchResult = 5;
|
|
194
|
+
matchResult = 3;
|
|
191
195
|
break;
|
|
192
196
|
}
|
|
193
197
|
default:
|
|
194
|
-
matchResult =
|
|
198
|
+
matchResult = 4;
|
|
195
199
|
}
|
|
196
200
|
}
|
|
197
201
|
else {
|
|
198
|
-
matchResult =
|
|
202
|
+
matchResult = 4;
|
|
199
203
|
}
|
|
200
204
|
switch (matchResult) {
|
|
201
205
|
case 0:
|
|
@@ -205,11 +209,7 @@ export function JsonTypes_composeProcessInput(header, value) {
|
|
|
205
209
|
case 2:
|
|
206
210
|
return ProcessInput_createMaterial_4452CB4C(toString(value));
|
|
207
211
|
case 3:
|
|
208
|
-
return ProcessInput_createImageFile_Z721C83C5(toString(value));
|
|
209
|
-
case 4:
|
|
210
212
|
return ProcessInput_createRawData_Z721C83C5(toString(value));
|
|
211
|
-
case 5:
|
|
212
|
-
return ProcessInput_createDerivedData_Z721C83C5(toString(value));
|
|
213
213
|
default:
|
|
214
214
|
return toFail(printf("Could not parse input header %O"))(header);
|
|
215
215
|
}
|
|
@@ -226,28 +226,20 @@ export function JsonTypes_composeProcessOutput(header, value) {
|
|
|
226
226
|
matchResult = 0;
|
|
227
227
|
break;
|
|
228
228
|
}
|
|
229
|
-
case
|
|
229
|
+
case 3: {
|
|
230
230
|
matchResult = 1;
|
|
231
231
|
break;
|
|
232
232
|
}
|
|
233
|
-
case 4: {
|
|
234
|
-
matchResult = 2;
|
|
235
|
-
break;
|
|
236
|
-
}
|
|
237
233
|
case 2: {
|
|
238
|
-
matchResult =
|
|
239
|
-
break;
|
|
240
|
-
}
|
|
241
|
-
case 3: {
|
|
242
|
-
matchResult = 4;
|
|
234
|
+
matchResult = 2;
|
|
243
235
|
break;
|
|
244
236
|
}
|
|
245
237
|
default:
|
|
246
|
-
matchResult =
|
|
238
|
+
matchResult = 3;
|
|
247
239
|
}
|
|
248
240
|
}
|
|
249
241
|
else {
|
|
250
|
-
matchResult =
|
|
242
|
+
matchResult = 3;
|
|
251
243
|
}
|
|
252
244
|
switch (matchResult) {
|
|
253
245
|
case 0:
|
|
@@ -255,11 +247,7 @@ export function JsonTypes_composeProcessOutput(header, value) {
|
|
|
255
247
|
case 1:
|
|
256
248
|
return ProcessOutput_createMaterial_4452CB4C(toString(value));
|
|
257
249
|
case 2:
|
|
258
|
-
return ProcessOutput_createImageFile_Z721C83C5(toString(value));
|
|
259
|
-
case 3:
|
|
260
250
|
return ProcessOutput_createRawData_Z721C83C5(toString(value));
|
|
261
|
-
case 4:
|
|
262
|
-
return ProcessOutput_createDerivedData_Z721C83C5(toString(value));
|
|
263
251
|
default:
|
|
264
252
|
return toFail(printf("Could not parse output header %O"))(header);
|
|
265
253
|
}
|
|
@@ -269,68 +257,112 @@ export function JsonTypes_composeProcessOutput(header, value) {
|
|
|
269
257
|
* Convert an ISA Value and Unit tuple to a CompositeCell
|
|
270
258
|
*/
|
|
271
259
|
export function JsonTypes_cellOfValue(value, unit) {
|
|
272
|
-
const value_2 = defaultArg(value, new
|
|
260
|
+
const value_2 = defaultArg(value, new Value_2(3, [""]));
|
|
261
|
+
let matchResult, oa, text, name, u, f, u_1, f_1, i, u_2, i_1;
|
|
273
262
|
switch (value_2.tag) {
|
|
274
|
-
case 3:
|
|
275
|
-
if (
|
|
276
|
-
|
|
277
|
-
|
|
263
|
+
case 3: {
|
|
264
|
+
if (value_2.fields[0] === "") {
|
|
265
|
+
if (unit != null) {
|
|
266
|
+
matchResult = 3;
|
|
267
|
+
name = value_2.fields[0];
|
|
268
|
+
u = unit;
|
|
269
|
+
}
|
|
270
|
+
else {
|
|
271
|
+
matchResult = 1;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
else if (unit != null) {
|
|
275
|
+
matchResult = 3;
|
|
276
|
+
name = value_2.fields[0];
|
|
277
|
+
u = unit;
|
|
278
278
|
}
|
|
279
279
|
else {
|
|
280
|
-
|
|
280
|
+
matchResult = 2;
|
|
281
|
+
text = value_2.fields[0];
|
|
281
282
|
}
|
|
282
|
-
|
|
283
|
+
break;
|
|
284
|
+
}
|
|
285
|
+
case 2: {
|
|
283
286
|
if (unit == null) {
|
|
284
|
-
|
|
287
|
+
matchResult = 5;
|
|
288
|
+
f_1 = value_2.fields[0];
|
|
285
289
|
}
|
|
286
290
|
else {
|
|
287
|
-
|
|
288
|
-
|
|
291
|
+
matchResult = 4;
|
|
292
|
+
f = value_2.fields[0];
|
|
293
|
+
u_1 = unit;
|
|
289
294
|
}
|
|
290
|
-
|
|
295
|
+
break;
|
|
296
|
+
}
|
|
297
|
+
case 1: {
|
|
291
298
|
if (unit == null) {
|
|
292
|
-
|
|
299
|
+
matchResult = 7;
|
|
300
|
+
i_1 = value_2.fields[0];
|
|
293
301
|
}
|
|
294
302
|
else {
|
|
295
|
-
|
|
296
|
-
|
|
303
|
+
matchResult = 6;
|
|
304
|
+
i = value_2.fields[0];
|
|
305
|
+
u_2 = unit;
|
|
297
306
|
}
|
|
307
|
+
break;
|
|
308
|
+
}
|
|
298
309
|
default:
|
|
299
310
|
if (unit == null) {
|
|
300
|
-
|
|
311
|
+
matchResult = 0;
|
|
312
|
+
oa = value_2.fields[0];
|
|
301
313
|
}
|
|
302
314
|
else {
|
|
303
|
-
|
|
315
|
+
matchResult = 8;
|
|
304
316
|
}
|
|
305
317
|
}
|
|
318
|
+
switch (matchResult) {
|
|
319
|
+
case 0:
|
|
320
|
+
return new CompositeCell(0, [oa]);
|
|
321
|
+
case 1:
|
|
322
|
+
return new CompositeCell(0, [new OntologyAnnotation()]);
|
|
323
|
+
case 2:
|
|
324
|
+
return new CompositeCell(0, [new OntologyAnnotation(text)]);
|
|
325
|
+
case 3:
|
|
326
|
+
return new CompositeCell(2, [name, u]);
|
|
327
|
+
case 4:
|
|
328
|
+
return new CompositeCell(2, [f.toString(), u_1]);
|
|
329
|
+
case 5:
|
|
330
|
+
return new CompositeCell(2, [f_1.toString(), new OntologyAnnotation()]);
|
|
331
|
+
case 6:
|
|
332
|
+
return new CompositeCell(2, [int32ToString(i), u_2]);
|
|
333
|
+
case 7:
|
|
334
|
+
return new CompositeCell(2, [int32ToString(i_1), new OntologyAnnotation()]);
|
|
335
|
+
default:
|
|
336
|
+
return toFail(printf("Could not parse value %O with unit %O"))(value_2)(unit);
|
|
337
|
+
}
|
|
306
338
|
}
|
|
307
339
|
|
|
308
340
|
/**
|
|
309
341
|
* Convert an ISA Component to a CompositeHeader and Cell tuple
|
|
310
342
|
*/
|
|
311
343
|
export function JsonTypes_decomposeComponent(c) {
|
|
312
|
-
return [new CompositeHeader(0, [
|
|
344
|
+
return [new CompositeHeader(0, [value_10(c.ComponentType)]), JsonTypes_cellOfValue(c.ComponentValue, c.ComponentUnit)];
|
|
313
345
|
}
|
|
314
346
|
|
|
315
347
|
/**
|
|
316
348
|
* Convert an ISA ProcessParameterValue to a CompositeHeader and Cell tuple
|
|
317
349
|
*/
|
|
318
350
|
export function JsonTypes_decomposeParameterValue(ppv) {
|
|
319
|
-
return [new CompositeHeader(3, [
|
|
351
|
+
return [new CompositeHeader(3, [value_10(value_10(ppv.Category).ParameterName)]), JsonTypes_cellOfValue(ppv.Value, ppv.Unit)];
|
|
320
352
|
}
|
|
321
353
|
|
|
322
354
|
/**
|
|
323
355
|
* Convert an ISA FactorValue to a CompositeHeader and Cell tuple
|
|
324
356
|
*/
|
|
325
357
|
export function JsonTypes_decomposeFactorValue(fv) {
|
|
326
|
-
return [new CompositeHeader(2, [
|
|
358
|
+
return [new CompositeHeader(2, [value_10(value_10(fv.Category).FactorType)]), JsonTypes_cellOfValue(fv.Value, fv.Unit)];
|
|
327
359
|
}
|
|
328
360
|
|
|
329
361
|
/**
|
|
330
362
|
* Convert an ISA MaterialAttributeValue to a CompositeHeader and Cell tuple
|
|
331
363
|
*/
|
|
332
364
|
export function JsonTypes_decomposeCharacteristicValue(cv) {
|
|
333
|
-
return [new CompositeHeader(1, [
|
|
365
|
+
return [new CompositeHeader(1, [value_10(value_10(cv.Category).CharacteristicType)]), JsonTypes_cellOfValue(cv.Value, cv.Unit)];
|
|
334
366
|
}
|
|
335
367
|
|
|
336
368
|
/**
|
|
@@ -341,17 +373,17 @@ export function JsonTypes_decomposeProcessInput(pi) {
|
|
|
341
373
|
case 1:
|
|
342
374
|
return [new CompositeHeader(11, [new IOType(1, [])]), new CompositeCell(1, [defaultArg(pi.fields[0].Name, "")])];
|
|
343
375
|
case 3:
|
|
344
|
-
return [new CompositeHeader(11, [new IOType(
|
|
376
|
+
return [new CompositeHeader(11, [new IOType(3, [])]), new CompositeCell(1, [defaultArg(pi.fields[0].Name, "")])];
|
|
345
377
|
case 2: {
|
|
346
378
|
const d = pi.fields[0];
|
|
347
|
-
const dataType =
|
|
379
|
+
const dataType = value_10(d.DataType);
|
|
348
380
|
switch (dataType.tag) {
|
|
349
381
|
case 0:
|
|
350
382
|
return [new CompositeHeader(11, [new IOType(2, [])]), new CompositeCell(1, [defaultArg(d.Name, "")])];
|
|
351
383
|
case 1:
|
|
352
|
-
return [new CompositeHeader(11, [new IOType(
|
|
384
|
+
return [new CompositeHeader(11, [new IOType(2, [])]), new CompositeCell(1, [defaultArg(d.Name, "")])];
|
|
353
385
|
default:
|
|
354
|
-
return [new CompositeHeader(11, [new IOType(
|
|
386
|
+
return [new CompositeHeader(11, [new IOType(2, [])]), new CompositeCell(1, [defaultArg(d.Name, "")])];
|
|
355
387
|
}
|
|
356
388
|
}
|
|
357
389
|
default:
|
|
@@ -365,17 +397,17 @@ export function JsonTypes_decomposeProcessInput(pi) {
|
|
|
365
397
|
export function JsonTypes_decomposeProcessOutput(po) {
|
|
366
398
|
switch (po.tag) {
|
|
367
399
|
case 2:
|
|
368
|
-
return [new CompositeHeader(12, [new IOType(
|
|
400
|
+
return [new CompositeHeader(12, [new IOType(3, [])]), new CompositeCell(1, [defaultArg(po.fields[0].Name, "")])];
|
|
369
401
|
case 1: {
|
|
370
402
|
const d = po.fields[0];
|
|
371
|
-
const dataType =
|
|
403
|
+
const dataType = value_10(d.DataType);
|
|
372
404
|
switch (dataType.tag) {
|
|
373
405
|
case 0:
|
|
374
406
|
return [new CompositeHeader(12, [new IOType(2, [])]), new CompositeCell(1, [defaultArg(d.Name, "")])];
|
|
375
407
|
case 1:
|
|
376
|
-
return [new CompositeHeader(12, [new IOType(
|
|
408
|
+
return [new CompositeHeader(12, [new IOType(2, [])]), new CompositeCell(1, [defaultArg(d.Name, "")])];
|
|
377
409
|
default:
|
|
378
|
-
return [new CompositeHeader(12, [new IOType(
|
|
410
|
+
return [new CompositeHeader(12, [new IOType(2, [])]), new CompositeCell(1, [defaultArg(d.Name, "")])];
|
|
379
411
|
}
|
|
380
412
|
}
|
|
381
413
|
default:
|
|
@@ -423,7 +455,7 @@ export function JsonTypes_decomposeTechnologyPlatform(name) {
|
|
|
423
455
|
}
|
|
424
456
|
|
|
425
457
|
/**
|
|
426
|
-
* If the headers
|
|
458
|
+
* If the given headers depict a component, returns a function for parsing the values of the matrix to the values of this component
|
|
427
459
|
*/
|
|
428
460
|
export function ProcessParsing_tryComponentGetter(generalI, valueI, valueHeader) {
|
|
429
461
|
if (valueHeader.tag === 0) {
|
|
@@ -437,7 +469,7 @@ export function ProcessParsing_tryComponentGetter(generalI, valueI, valueHeader)
|
|
|
437
469
|
}
|
|
438
470
|
|
|
439
471
|
/**
|
|
440
|
-
* If the headers
|
|
472
|
+
* If the given headers depict a parameter, returns a function for parsing the values of the matrix to the values of this type
|
|
441
473
|
*/
|
|
442
474
|
export function ProcessParsing_tryParameterGetter(generalI, valueI, valueHeader) {
|
|
443
475
|
if (valueHeader.tag === 3) {
|
|
@@ -449,6 +481,9 @@ export function ProcessParsing_tryParameterGetter(generalI, valueI, valueHeader)
|
|
|
449
481
|
}
|
|
450
482
|
}
|
|
451
483
|
|
|
484
|
+
/**
|
|
485
|
+
* If the given headers depict a factor, returns a function for parsing the values of the matrix to the values of this type
|
|
486
|
+
*/
|
|
452
487
|
export function ProcessParsing_tryFactorGetter(generalI, valueI, valueHeader) {
|
|
453
488
|
if (valueHeader.tag === 2) {
|
|
454
489
|
const cat = new CompositeHeader(2, [ARCtrl_OntologyAnnotation__OntologyAnnotation_setColumnIndex_Static(valueI, valueHeader.fields[0])]);
|
|
@@ -459,6 +494,9 @@ export function ProcessParsing_tryFactorGetter(generalI, valueI, valueHeader) {
|
|
|
459
494
|
}
|
|
460
495
|
}
|
|
461
496
|
|
|
497
|
+
/**
|
|
498
|
+
* If the given headers depict a protocolType, returns a function for parsing the values of the matrix to the values of this type
|
|
499
|
+
*/
|
|
462
500
|
export function ProcessParsing_tryCharacteristicGetter(generalI, valueI, valueHeader) {
|
|
463
501
|
if (valueHeader.tag === 1) {
|
|
464
502
|
const cat = new CompositeHeader(1, [ARCtrl_OntologyAnnotation__OntologyAnnotation_setColumnIndex_Static(valueI, valueHeader.fields[0])]);
|
|
@@ -470,7 +508,7 @@ export function ProcessParsing_tryCharacteristicGetter(generalI, valueI, valueHe
|
|
|
470
508
|
}
|
|
471
509
|
|
|
472
510
|
/**
|
|
473
|
-
* If the headers
|
|
511
|
+
* If the given headers depict a protocolType, returns a function for parsing the values of the matrix to the values of this type
|
|
474
512
|
*/
|
|
475
513
|
export function ProcessParsing_tryGetProtocolTypeGetter(generalI, header) {
|
|
476
514
|
if (header.tag === 4) {
|
|
@@ -481,6 +519,9 @@ export function ProcessParsing_tryGetProtocolTypeGetter(generalI, header) {
|
|
|
481
519
|
}
|
|
482
520
|
}
|
|
483
521
|
|
|
522
|
+
/**
|
|
523
|
+
* If the given headers depict a protocolREF, returns a function for parsing the values of the matrix to the values of this type
|
|
524
|
+
*/
|
|
484
525
|
export function ProcessParsing_tryGetProtocolREFGetter(generalI, header) {
|
|
485
526
|
if (header.tag === 8) {
|
|
486
527
|
return (matrix) => ((i) => getItemFromDict(matrix, [generalI, i]).AsFreeText);
|
|
@@ -490,6 +531,9 @@ export function ProcessParsing_tryGetProtocolREFGetter(generalI, header) {
|
|
|
490
531
|
}
|
|
491
532
|
}
|
|
492
533
|
|
|
534
|
+
/**
|
|
535
|
+
* If the given headers depict a protocolDescription, returns a function for parsing the values of the matrix to the values of this type
|
|
536
|
+
*/
|
|
493
537
|
export function ProcessParsing_tryGetProtocolDescriptionGetter(generalI, header) {
|
|
494
538
|
if (header.tag === 5) {
|
|
495
539
|
return (matrix) => ((i) => getItemFromDict(matrix, [generalI, i]).AsFreeText);
|
|
@@ -499,6 +543,9 @@ export function ProcessParsing_tryGetProtocolDescriptionGetter(generalI, header)
|
|
|
499
543
|
}
|
|
500
544
|
}
|
|
501
545
|
|
|
546
|
+
/**
|
|
547
|
+
* If the given headers depict a protocolURI, returns a function for parsing the values of the matrix to the values of this type
|
|
548
|
+
*/
|
|
502
549
|
export function ProcessParsing_tryGetProtocolURIGetter(generalI, header) {
|
|
503
550
|
if (header.tag === 6) {
|
|
504
551
|
return (matrix) => ((i) => getItemFromDict(matrix, [generalI, i]).AsFreeText);
|
|
@@ -508,6 +555,9 @@ export function ProcessParsing_tryGetProtocolURIGetter(generalI, header) {
|
|
|
508
555
|
}
|
|
509
556
|
}
|
|
510
557
|
|
|
558
|
+
/**
|
|
559
|
+
* If the given headers depict a protocolVersion, returns a function for parsing the values of the matrix to the values of this type
|
|
560
|
+
*/
|
|
511
561
|
export function ProcessParsing_tryGetProtocolVersionGetter(generalI, header) {
|
|
512
562
|
if (header.tag === 7) {
|
|
513
563
|
return (matrix) => ((i) => getItemFromDict(matrix, [generalI, i]).AsFreeText);
|
|
@@ -517,6 +567,9 @@ export function ProcessParsing_tryGetProtocolVersionGetter(generalI, header) {
|
|
|
517
567
|
}
|
|
518
568
|
}
|
|
519
569
|
|
|
570
|
+
/**
|
|
571
|
+
* If the given headers depict an input, returns a function for parsing the values of the matrix to the values of this type
|
|
572
|
+
*/
|
|
520
573
|
export function ProcessParsing_tryGetInputGetter(generalI, header) {
|
|
521
574
|
if (header.tag === 11) {
|
|
522
575
|
return (matrix) => ((i) => JsonTypes_composeProcessInput(header, getItemFromDict(matrix, [generalI, i])));
|
|
@@ -526,6 +579,9 @@ export function ProcessParsing_tryGetInputGetter(generalI, header) {
|
|
|
526
579
|
}
|
|
527
580
|
}
|
|
528
581
|
|
|
582
|
+
/**
|
|
583
|
+
* If the given headers depict an output, returns a function for parsing the values of the matrix to the values of this type
|
|
584
|
+
*/
|
|
529
585
|
export function ProcessParsing_tryGetOutputGetter(generalI, header) {
|
|
530
586
|
if (header.tag === 12) {
|
|
531
587
|
return (matrix) => ((i) => JsonTypes_composeProcessOutput(header, getItemFromDict(matrix, [generalI, i])));
|
|
@@ -535,6 +591,18 @@ export function ProcessParsing_tryGetOutputGetter(generalI, header) {
|
|
|
535
591
|
}
|
|
536
592
|
}
|
|
537
593
|
|
|
594
|
+
/**
|
|
595
|
+
* If the given headers depict a comment, returns a function for parsing the values of the matrix to the values of this type
|
|
596
|
+
*/
|
|
597
|
+
export function ProcessParsing_tryGetCommentGetter(generalI, header) {
|
|
598
|
+
if (header.tag === 14) {
|
|
599
|
+
return (matrix) => ((i) => (new Comment$(header.fields[0], getItemFromDict(matrix, [generalI, i]).AsFreeText)));
|
|
600
|
+
}
|
|
601
|
+
else {
|
|
602
|
+
return void 0;
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
|
|
538
606
|
/**
|
|
539
607
|
* Given the header sequence of an ArcTable, returns a function for parsing each row of the table to a process
|
|
540
608
|
*/
|
|
@@ -562,8 +630,9 @@ export function ProcessParsing_getProcessGetter(processNameRoot, headers) {
|
|
|
562
630
|
const protocolDescriptionGetter = tryPick((tupledArg_6) => ProcessParsing_tryGetProtocolDescriptionGetter(tupledArg_6[0], tupledArg_6[1]), headers_1);
|
|
563
631
|
const protocolURIGetter = tryPick((tupledArg_7) => ProcessParsing_tryGetProtocolURIGetter(tupledArg_7[0], tupledArg_7[1]), headers_1);
|
|
564
632
|
const protocolVersionGetter = tryPick((tupledArg_8) => ProcessParsing_tryGetProtocolVersionGetter(tupledArg_8[0], tupledArg_8[1]), headers_1);
|
|
633
|
+
const commentGetters = toList(choose((tupledArg_9) => ProcessParsing_tryGetCommentGetter(tupledArg_9[0], tupledArg_9[1]), headers_1));
|
|
565
634
|
let inputGetter_1;
|
|
566
|
-
const matchValue = tryPick((
|
|
635
|
+
const matchValue = tryPick((tupledArg_10) => ProcessParsing_tryGetInputGetter(tupledArg_10[0], tupledArg_10[1]), headers_1);
|
|
567
636
|
if (matchValue == null) {
|
|
568
637
|
inputGetter_1 = ((matrix_1) => ((i_1) => singleton(new ProcessInput(0, [Source_create_Z5CA08497(void 0, `${processNameRoot}_Input_${i_1}`, toList(map_1((f_1) => f_1(matrix_1)(i_1), charGetters)))]))));
|
|
569
638
|
}
|
|
@@ -576,7 +645,7 @@ export function ProcessParsing_getProcessGetter(processNameRoot, headers) {
|
|
|
576
645
|
}));
|
|
577
646
|
}
|
|
578
647
|
let outputGetter_1;
|
|
579
|
-
const matchValue_1 = tryPick((
|
|
648
|
+
const matchValue_1 = tryPick((tupledArg_11) => ProcessParsing_tryGetOutputGetter(tupledArg_11[0], tupledArg_11[1]), headers_1);
|
|
580
649
|
if (matchValue_1 == null) {
|
|
581
650
|
outputGetter_1 = ((matrix_3) => ((i_3) => singleton(new ProcessOutput(0, [Sample_create_62424AD2(void 0, `${processNameRoot}_Output_${i_3}`, void 0, toList(map_1((f_3) => f_3(matrix_3)(i_3), factorValueGetters)))]))));
|
|
582
651
|
}
|
|
@@ -591,9 +660,10 @@ export function ProcessParsing_getProcessGetter(processNameRoot, headers) {
|
|
|
591
660
|
return (matrix_4) => ((i_4) => {
|
|
592
661
|
const pn = map((p) => Process_composeName(p, i_4), Option_fromValueWithDefault("", processNameRoot));
|
|
593
662
|
const paramvalues = Option_fromValueWithDefault(empty(), map_2((f_4) => f_4(matrix_4)(i_4), parameterValueGetters));
|
|
594
|
-
const parameters = map((list_5) => map_2((pv) =>
|
|
663
|
+
const parameters = map((list_5) => map_2((pv) => value_10(pv.Category), list_5), paramvalues);
|
|
664
|
+
const comments = Option_fromValueWithDefault(empty(), map_2((f_5) => f_5(matrix_4)(i_4), commentGetters));
|
|
595
665
|
let protocol;
|
|
596
|
-
const p_1 = Protocol_make(void 0, map((
|
|
666
|
+
const p_1 = Protocol_make(void 0, map((f_6) => f_6(matrix_4)(i_4), protocolREFGetter), map((f_7) => f_7(matrix_4)(i_4), protocolTypeGetter), map((f_8) => f_8(matrix_4)(i_4), protocolDescriptionGetter), map((f_9) => f_9(matrix_4)(i_4), protocolURIGetter), map((f_10) => f_10(matrix_4)(i_4), protocolVersionGetter), parameters, Option_fromValueWithDefault(empty(), map_2((f_11) => f_11(matrix_4)(i_4), componentGetters)), void 0);
|
|
597
667
|
let matchResult;
|
|
598
668
|
if (p_1.Name == null) {
|
|
599
669
|
if (p_1.ProtocolType == null) {
|
|
@@ -638,7 +708,7 @@ export function ProcessParsing_getProcessGetter(processNameRoot, headers) {
|
|
|
638
708
|
const inputs = inputGetter_1(matrix_4)(i_4);
|
|
639
709
|
const outputs = outputGetter_1(matrix_4)(i_4);
|
|
640
710
|
patternInput = (((length(inputs) === 1) && (length(outputs) === 2)) ? [ofArray([item(0, inputs), item(0, inputs)]), outputs] : (((length(inputs) === 2) && (length(outputs) === 1)) ? [inputs, ofArray([item(0, outputs), item(0, outputs)])] : [inputs, outputs]));
|
|
641
|
-
return Process_make(void 0, pn, protocol, paramvalues, void 0, void 0, void 0, void 0, patternInput[0], patternInput[1],
|
|
711
|
+
return Process_make(void 0, pn, protocol, paramvalues, void 0, void 0, void 0, void 0, patternInput[0], patternInput[1], comments);
|
|
642
712
|
});
|
|
643
713
|
}
|
|
644
714
|
|
|
@@ -651,21 +721,21 @@ export function ProcessParsing_getProcessGetter(processNameRoot, headers) {
|
|
|
651
721
|
*/
|
|
652
722
|
export function ProcessParsing_groupProcesses(ps) {
|
|
653
723
|
return List_groupBy((x) => {
|
|
654
|
-
if ((x.Name != null) && (Process_decomposeName_Z721C83C5(
|
|
655
|
-
return Process_decomposeName_Z721C83C5(
|
|
724
|
+
if ((x.Name != null) && (Process_decomposeName_Z721C83C5(value_10(x.Name))[1] != null)) {
|
|
725
|
+
return Process_decomposeName_Z721C83C5(value_10(x.Name))[0];
|
|
656
726
|
}
|
|
657
|
-
else if ((x.ExecutesProtocol != null) && (
|
|
658
|
-
return
|
|
727
|
+
else if ((x.ExecutesProtocol != null) && (value_10(x.ExecutesProtocol).Name != null)) {
|
|
728
|
+
return value_10(value_10(x.ExecutesProtocol).Name);
|
|
659
729
|
}
|
|
660
|
-
else if ((x.Name != null) && (
|
|
661
|
-
const lastUnderScoreIndex =
|
|
662
|
-
return remove(
|
|
730
|
+
else if ((x.Name != null) && (value_10(x.Name).indexOf("_") >= 0)) {
|
|
731
|
+
const lastUnderScoreIndex = value_10(x.Name).lastIndexOf("_") | 0;
|
|
732
|
+
return remove(value_10(x.Name), lastUnderScoreIndex);
|
|
663
733
|
}
|
|
664
734
|
else if (x.Name != null) {
|
|
665
|
-
return
|
|
735
|
+
return value_10(x.Name);
|
|
666
736
|
}
|
|
667
|
-
else if ((x.ExecutesProtocol != null) && (
|
|
668
|
-
return
|
|
737
|
+
else if ((x.ExecutesProtocol != null) && (value_10(x.ExecutesProtocol).ID != null)) {
|
|
738
|
+
return value_10(value_10(x.ExecutesProtocol).ID);
|
|
669
739
|
}
|
|
670
740
|
else {
|
|
671
741
|
return createMissingIdentifier();
|
|
@@ -681,14 +751,14 @@ export function ProcessParsing_groupProcesses(ps) {
|
|
|
681
751
|
*/
|
|
682
752
|
export function ProcessParsing_mergeIdenticalProcesses(processes) {
|
|
683
753
|
const l = List_groupBy((x) => {
|
|
684
|
-
if ((x.Name != null) && (Process_decomposeName_Z721C83C5(
|
|
685
|
-
return [Process_decomposeName_Z721C83C5(
|
|
754
|
+
if ((x.Name != null) && (Process_decomposeName_Z721C83C5(value_10(x.Name))[1] != null)) {
|
|
755
|
+
return [Process_decomposeName_Z721C83C5(value_10(x.Name))[0], boxHashOption(x.ExecutesProtocol), map(boxHashSeq, x.ParameterValues), map(boxHashSeq, x.Comments)];
|
|
686
756
|
}
|
|
687
|
-
else if ((x.ExecutesProtocol != null) && (
|
|
688
|
-
return [
|
|
757
|
+
else if ((x.ExecutesProtocol != null) && (value_10(x.ExecutesProtocol).Name != null)) {
|
|
758
|
+
return [value_10(value_10(x.ExecutesProtocol).Name), boxHashOption(x.ExecutesProtocol), map(boxHashSeq, x.ParameterValues), map(boxHashSeq, x.Comments)];
|
|
689
759
|
}
|
|
690
760
|
else {
|
|
691
|
-
return [createMissingIdentifier(), boxHashOption(x.ExecutesProtocol), map(boxHashSeq, x.ParameterValues)];
|
|
761
|
+
return [createMissingIdentifier(), boxHashOption(x.ExecutesProtocol), map(boxHashSeq, x.ParameterValues), map(boxHashSeq, x.Comments)];
|
|
692
762
|
}
|
|
693
763
|
}, processes, {
|
|
694
764
|
Equals: equalArrays,
|
|
@@ -700,12 +770,12 @@ export function ProcessParsing_mergeIdenticalProcesses(processes) {
|
|
|
700
770
|
const pVs = item(0, processes_1).ParameterValues;
|
|
701
771
|
const inputs = Option_fromValueWithDefault(empty(), collect((p) => defaultArg(p.Inputs, empty()), processes_1));
|
|
702
772
|
const outputs = Option_fromValueWithDefault(empty(), collect((p_1) => defaultArg(p_1.Outputs, empty()), processes_1));
|
|
703
|
-
return Process_create_Z7C1F7FA9(void 0, (length(l) > 1) ? Process_composeName(n, i) : n, item(0, processes_1).ExecutesProtocol, pVs, void 0, void 0, void 0, void 0, inputs, outputs);
|
|
773
|
+
return Process_create_Z7C1F7FA9(void 0, (length(l) > 1) ? Process_composeName(n, i) : n, unwrap(item(0, processes_1).ExecutesProtocol), unwrap(pVs), void 0, void 0, void 0, void 0, unwrap(inputs), unwrap(outputs), unwrap(item(0, processes_1).Comments));
|
|
704
774
|
}, l);
|
|
705
775
|
}
|
|
706
776
|
|
|
707
777
|
export function ProcessParsing_processToRows(p) {
|
|
708
|
-
let
|
|
778
|
+
let list_4;
|
|
709
779
|
const pvs = map_2((ppv) => [JsonTypes_decomposeParameterValue(ppv), tryGetParameterColumnIndex(ppv)], defaultArg(p.ParameterValues, empty()));
|
|
710
780
|
let components;
|
|
711
781
|
const matchValue = p.ExecutesProtocol;
|
|
@@ -717,8 +787,9 @@ export function ProcessParsing_processToRows(p) {
|
|
|
717
787
|
}
|
|
718
788
|
else {
|
|
719
789
|
const prot_1 = matchValue_1;
|
|
720
|
-
protVals = toList(delay(() => append((prot_1.Name != null) ? singleton_1([new CompositeHeader(8, []), new CompositeCell(1, [
|
|
790
|
+
protVals = toList(delay(() => append((prot_1.Name != null) ? singleton_1([new CompositeHeader(8, []), new CompositeCell(1, [value_10(prot_1.Name)])]) : empty_1(), delay(() => append((prot_1.ProtocolType != null) ? singleton_1([new CompositeHeader(4, []), new CompositeCell(0, [value_10(prot_1.ProtocolType)])]) : empty_1(), delay(() => append((prot_1.Description != null) ? singleton_1([new CompositeHeader(5, []), new CompositeCell(1, [value_10(prot_1.Description)])]) : empty_1(), delay(() => append((prot_1.Uri != null) ? singleton_1([new CompositeHeader(6, []), new CompositeCell(1, [value_10(prot_1.Uri)])]) : empty_1(), delay(() => ((prot_1.Version != null) ? singleton_1([new CompositeHeader(7, []), new CompositeCell(1, [value_10(prot_1.Version)])]) : empty_1())))))))))));
|
|
721
791
|
}
|
|
792
|
+
const comments = map_2((c) => [new CompositeHeader(14, [defaultArg(c.Name, "")]), new CompositeCell(1, [defaultArg(c.Value, "")])], defaultArg(p.Comments, empty()));
|
|
722
793
|
return map_2((tupledArg_1) => {
|
|
723
794
|
const ios = tupledArg_1[1];
|
|
724
795
|
const inputForCharas = defaultArg(tryPick_1((tupledArg_2) => {
|
|
@@ -761,8 +832,8 @@ export function ProcessParsing_processToRows(p) {
|
|
|
761
832
|
const vals = map_2((tuple_5) => tuple_5[0], sortBy((arg) => defaultArg(arg[1], 10000), append_1(chars, append_1(components, append_1(pvs, map_2((fv) => [JsonTypes_decomposeFactorValue(fv), tryGetFactorColumnIndex(fv)], ProcessOutput_getFactorValues_Z42C11600(outputForFactors))))), {
|
|
762
833
|
Compare: comparePrimitives,
|
|
763
834
|
}));
|
|
764
|
-
return toList(delay(() => append(singleton_1(JsonTypes_decomposeProcessInput(inputForType)), delay(() => append(protVals, delay(() => append(vals, delay(() => singleton_1(JsonTypes_decomposeProcessOutput(outputForType))))))))));
|
|
765
|
-
}, List_groupBy((tupledArg) => [ProcessInput__get_Name(tupledArg[0]), ProcessOutput__get_Name(tupledArg[1])], (
|
|
835
|
+
return toList(delay(() => append(singleton_1(JsonTypes_decomposeProcessInput(inputForType)), delay(() => append(protVals, delay(() => append(vals, delay(() => append(comments, delay(() => singleton_1(JsonTypes_decomposeProcessOutput(outputForType))))))))))));
|
|
836
|
+
}, List_groupBy((tupledArg) => [ProcessInput__get_Name(tupledArg[0]), ProcessOutput__get_Name(tupledArg[1])], (list_4 = defaultArg(p.Outputs, empty()), zip(defaultArg(p.Inputs, empty()), list_4)), {
|
|
766
837
|
Equals: equalArrays,
|
|
767
838
|
GetHashCode: arrayHash,
|
|
768
839
|
}));
|
|
@@ -907,9 +978,9 @@ export function CompositeRow_toProtocol(tableName, row) {
|
|
|
907
978
|
case 5:
|
|
908
979
|
return Protocol_addParameter(ProtocolParameter.create(void 0, oa_1), p);
|
|
909
980
|
case 6:
|
|
910
|
-
return Protocol_addComponent(Component_create_4208F9FC(
|
|
981
|
+
return Protocol_addComponent(Component_create_4208F9FC(Value_2.fromString(v_4), unit, oa_2), p);
|
|
911
982
|
case 7:
|
|
912
|
-
return Protocol_addComponent(Component_create_4208F9FC(new
|
|
983
|
+
return Protocol_addComponent(Component_create_4208F9FC(new Value_2(0, [t]), void 0, oa_3), p);
|
|
913
984
|
default:
|
|
914
985
|
return p;
|
|
915
986
|
}
|
|
@@ -927,7 +998,7 @@ export function ARCtrl_ArcTable__ArcTable_fromProtocol_Static_3BF20962(p) {
|
|
|
927
998
|
try {
|
|
928
999
|
while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
929
1000
|
const pp = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
930
|
-
t.AddColumn(new CompositeHeader(3, [
|
|
1001
|
+
t.AddColumn(new CompositeHeader(3, [value_10(pp.ParameterName)]), void 0, ARCtrl_Process_ProtocolParameter__ProtocolParameter_TryGetColumnIndex(pp));
|
|
931
1002
|
}
|
|
932
1003
|
}
|
|
933
1004
|
finally {
|
|
@@ -938,7 +1009,7 @@ export function ARCtrl_ArcTable__ArcTable_fromProtocol_Static_3BF20962(p) {
|
|
|
938
1009
|
while (enumerator_1["System.Collections.IEnumerator.MoveNext"]()) {
|
|
939
1010
|
const c = enumerator_1["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
940
1011
|
const v_1 = map((arg) => singleton_2(ARCtrl_CompositeCell__CompositeCell_fromValue_Static_6B24B5AD(arg, unwrap(c.ComponentUnit))), c.ComponentValue);
|
|
941
|
-
t.AddColumn(new CompositeHeader(3, [
|
|
1012
|
+
t.AddColumn(new CompositeHeader(3, [value_10(c.ComponentType)]), v_1, ARCtrl_Process_Component__Component_TryGetColumnIndex(c));
|
|
942
1013
|
}
|
|
943
1014
|
}
|
|
944
1015
|
finally {
|