@nfdi4plants/arctrl 2.0.0-alpha.8 → 2.0.0-beta.2
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 +13 -15
- package/Contract/ArcAssay.js +1 -1
- package/Contract/ArcInvestigation.js +9 -12
- package/Contract/ArcStudy.js +1 -1
- package/Core/ArcTypes.js +53 -53
- package/Core/Conversion.js +28 -42
- package/Spreadsheet/AnnotationTable/ArcTable.js +34 -24
- package/Spreadsheet/AnnotationTable/CompositeCell.js +22 -27
- package/Spreadsheet/AnnotationTable/CompositeColumn.js +38 -25
- package/Spreadsheet/AnnotationTable/CompositeHeader.js +181 -339
- package/Spreadsheet/ArcAssay.js +2 -2
- package/Spreadsheet/ArcInvestigation.js +7 -23
- package/Spreadsheet/ArcStudy.js +2 -2
- package/Spreadsheet/DataMap.js +1 -1
- package/Spreadsheet/DataMapTable/DataMapColumn.js +1 -1
- package/Spreadsheet/DataMapTable/DataMapHeader.js +1 -1
- package/Spreadsheet/DataMapTable/DataMapTable.js +5 -5
- package/Spreadsheet/Metadata/SparseTable.js +7 -7
- package/Spreadsheet/Template.js +2 -2
- package/Xlsx.js +1 -4
- package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/FsSpreadsheet.fableproj +1 -0
- package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/FsWorksheet.fs +4 -0
- package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/FsWorksheet.fs.js +9 -1
- package/fable_modules/FsSpreadsheet.6.2.0/Json/Cell.fs +45 -0
- package/fable_modules/FsSpreadsheet.6.2.0/Json/Cell.fs.js +38 -0
- package/fable_modules/FsSpreadsheet.6.2.0/Json/Column.fs +28 -0
- package/fable_modules/FsSpreadsheet.6.2.0/Json/Column.fs.js +24 -0
- package/fable_modules/FsSpreadsheet.6.2.0/Json/Row.fs +28 -0
- package/fable_modules/FsSpreadsheet.6.2.0/Json/Row.fs.js +24 -0
- package/fable_modules/FsSpreadsheet.6.2.0/Json/Workbook.fs +33 -0
- package/fable_modules/FsSpreadsheet.6.2.0/Json/Workbook.fs.js +35 -0
- package/fable_modules/FsSpreadsheet.6.2.0/Json/Worksheet.fs +148 -0
- package/fable_modules/FsSpreadsheet.6.2.0/Json/Worksheet.fs.js +109 -0
- package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/obj/Release/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +3 -3
- package/fable_modules/project_cracked.json +1 -1
- package/package.json +1 -1
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Cell.fs +0 -23
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Cell.fs.js +0 -21
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Row.fs +0 -23
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Row.fs.js +0 -19
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Workbook.fs +0 -20
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Workbook.fs.js +0 -21
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Worksheet.fs +0 -49
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Worksheet.fs.js +0 -44
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Cells/FsCell.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Cells/FsCell.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Cells/FsCellsCollection.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Cells/FsCellsCollection.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/CellBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/CellBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/ColumnBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/ColumnBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/DSL.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/DSL.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/Expression.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/Expression.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/Operators.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/Operators.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/RowBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/RowBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/SheetBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/SheetBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/TableBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/TableBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/Transform.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/Transform.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/Types.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/Types.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/WorkbookBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/WorkbookBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/FsAddress.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/FsAddress.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/FsColumn.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/FsColumn.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/FsRow.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/FsRow.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/FsWorkbook.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/FsWorkbook.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Json/Table.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Json/Table.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Json/Value.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Json/Value.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Ranges/FsRange.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Ranges/FsRange.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Ranges/FsRangeAddress.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Ranges/FsRangeAddress.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Ranges/FsRangeBase.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Ranges/FsRangeBase.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Ranges/FsRangeColumn.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Ranges/FsRangeColumn.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Ranges/FsRangeRow.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Ranges/FsRangeRow.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/SheetBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/SheetBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Tables/FsTable.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Tables/FsTable.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Tables/FsTableField.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Tables/FsTableField.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Tables/FsTableRow.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Tables/FsTableRow.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/obj/Debug/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { printf, toFail } from "../../fable_modules/fable-library-js.4.16.0/String.js";
|
|
2
|
-
import { singleton, ofArray, tryFindIndex, tail, head, isEmpty, map } from "../../fable_modules/fable-library-js.4.16.0/List.js";
|
|
3
2
|
import { OntologyAnnotation } from "../../Core/OntologyAnnotation.js";
|
|
4
|
-
import {
|
|
3
|
+
import { freeTextFromStringCells, dataFromStringCells, unitizedFromStringCells, termFromStringCells } from "./CompositeCell.js";
|
|
4
|
+
import { tryFindIndex, skip, item, equalsWith } from "../../fable_modules/fable-library-js.4.16.0/Array.js";
|
|
5
|
+
import { defaultOf } from "../../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
5
6
|
import { ActivePatterns_$007CComment$007C_$007C, ActivePatterns_$007COutputColumnHeader$007C_$007C, ActivePatterns_$007CInputColumnHeader$007C_$007C, tryParseComponentColumnHeader, tryParseCharacteristicColumnHeader, tryParseFactorColumnHeader, tryParseParameterColumnHeader, ActivePatterns_$007CTSRColumnHeader$007C_$007C, ActivePatterns_$007CTANColumnHeader$007C_$007C, ActivePatterns_$007CUnitColumnHeader$007C_$007C } from "../../Core/Helper/Regex.js";
|
|
6
7
|
import { IOType, CompositeHeader } from "../../Core/Table/CompositeHeader.js";
|
|
7
|
-
import { map
|
|
8
|
-
import { FsCell } from "../../fable_modules/FsSpreadsheet.6.1.2/Cells/FsCell.fs.js";
|
|
8
|
+
import { map } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
9
9
|
import { toString } from "../../fable_modules/fable-library-js.4.16.0/Types.js";
|
|
10
|
-
import { empty, singleton
|
|
10
|
+
import { empty, singleton, append, delay, toArray } from "../../fable_modules/fable-library-js.4.16.0/Seq.js";
|
|
11
11
|
|
|
12
12
|
export function ActivePattern_mergeIDInfo(idSpace1, localID1, idSpace2, localID2) {
|
|
13
13
|
if (idSpace1 !== idSpace2) {
|
|
@@ -22,59 +22,66 @@ export function ActivePattern_mergeIDInfo(idSpace1, localID1, idSpace2, localID2
|
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
export function ActivePattern_$007CTerm$007C_$007C(categoryParser, f,
|
|
25
|
+
export function ActivePattern_$007CTerm$007C_$007C(categoryParser, f, cellValues) {
|
|
26
26
|
const $007CAC$007C_$007C = categoryParser;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const activePatternResult = $007CAC$007C_$007C(head(cellValues));
|
|
27
|
+
let matchResult, name, name_1, term1, term2;
|
|
28
|
+
if (!equalsWith((x, y) => (x === y), cellValues, defaultOf()) && (cellValues.length === 1)) {
|
|
29
|
+
const activePatternResult = $007CAC$007C_$007C(item(0, cellValues));
|
|
31
30
|
if (activePatternResult != null) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
matchResult = 0;
|
|
32
|
+
name = activePatternResult;
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
matchResult = 2;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
else if (!equalsWith((x_1, y_1) => (x_1 === y_1), cellValues, defaultOf()) && (cellValues.length === 3)) {
|
|
39
|
+
const activePatternResult_1 = $007CAC$007C_$007C(item(0, cellValues));
|
|
40
|
+
if (activePatternResult_1 != null) {
|
|
41
|
+
const activePatternResult_2 = ActivePatterns_$007CTSRColumnHeader$007C_$007C(item(1, cellValues));
|
|
42
|
+
if (activePatternResult_2 != null) {
|
|
43
|
+
const activePatternResult_3 = ActivePatterns_$007CTANColumnHeader$007C_$007C(item(2, cellValues));
|
|
44
|
+
if (activePatternResult_3 != null) {
|
|
45
|
+
matchResult = 1;
|
|
46
|
+
name_1 = activePatternResult_1;
|
|
47
|
+
term1 = activePatternResult_2;
|
|
48
|
+
term2 = activePatternResult_3;
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
matchResult = 2;
|
|
52
|
+
}
|
|
35
53
|
}
|
|
36
54
|
else {
|
|
37
|
-
matchResult =
|
|
55
|
+
matchResult = 2;
|
|
38
56
|
}
|
|
39
57
|
}
|
|
40
58
|
else {
|
|
41
|
-
matchResult =
|
|
59
|
+
matchResult = 2;
|
|
42
60
|
}
|
|
43
61
|
}
|
|
44
62
|
else {
|
|
45
|
-
matchResult =
|
|
63
|
+
matchResult = 2;
|
|
46
64
|
}
|
|
47
65
|
switch (matchResult) {
|
|
48
66
|
case 0:
|
|
49
|
-
return [f(OntologyAnnotation.create(name)), (
|
|
67
|
+
return [f(OntologyAnnotation.create(name)), (cellValues_1) => termFromStringCells(void 0, void 0, cellValues_1)];
|
|
68
|
+
case 1: {
|
|
69
|
+
const term = ActivePattern_mergeIDInfo(term1.IDSpace, term1.LocalID, term2.IDSpace, term2.LocalID);
|
|
70
|
+
return [f(OntologyAnnotation.create(name_1, term.TermSourceRef, term.TermAccessionNumber)), (cellValues_2) => termFromStringCells(1, 2, cellValues_2)];
|
|
71
|
+
}
|
|
50
72
|
default: {
|
|
51
|
-
let matchResult_1,
|
|
52
|
-
if (!
|
|
53
|
-
const
|
|
54
|
-
if (
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
name_1 = activePatternResult_1;
|
|
64
|
-
term1 = activePatternResult_2;
|
|
65
|
-
term2 = activePatternResult_3;
|
|
66
|
-
}
|
|
67
|
-
else {
|
|
68
|
-
matchResult_1 = 1;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
else {
|
|
72
|
-
matchResult_1 = 1;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
else {
|
|
76
|
-
matchResult_1 = 1;
|
|
77
|
-
}
|
|
73
|
+
let matchResult_1, name_2, term1_1, term2_1;
|
|
74
|
+
if (!equalsWith((x_2, y_2) => (x_2 === y_2), cellValues, defaultOf()) && (cellValues.length === 3)) {
|
|
75
|
+
const activePatternResult_4 = $007CAC$007C_$007C(item(0, cellValues));
|
|
76
|
+
if (activePatternResult_4 != null) {
|
|
77
|
+
const activePatternResult_5 = ActivePatterns_$007CTANColumnHeader$007C_$007C(item(1, cellValues));
|
|
78
|
+
if (activePatternResult_5 != null) {
|
|
79
|
+
const activePatternResult_6 = ActivePatterns_$007CTSRColumnHeader$007C_$007C(item(2, cellValues));
|
|
80
|
+
if (activePatternResult_6 != null) {
|
|
81
|
+
matchResult_1 = 0;
|
|
82
|
+
name_2 = activePatternResult_4;
|
|
83
|
+
term1_1 = activePatternResult_6;
|
|
84
|
+
term2_1 = activePatternResult_5;
|
|
78
85
|
}
|
|
79
86
|
else {
|
|
80
87
|
matchResult_1 = 1;
|
|
@@ -93,33 +100,23 @@ export function ActivePattern_$007CTerm$007C_$007C(categoryParser, f, cells) {
|
|
|
93
100
|
}
|
|
94
101
|
switch (matchResult_1) {
|
|
95
102
|
case 0: {
|
|
96
|
-
const
|
|
97
|
-
return [f(OntologyAnnotation.create(
|
|
103
|
+
const term_1 = ActivePattern_mergeIDInfo(term1_1.IDSpace, term1_1.LocalID, term2_1.IDSpace, term2_1.LocalID);
|
|
104
|
+
return [f(OntologyAnnotation.create(name_2, term_1.TermSourceRef, term_1.TermAccessionNumber)), (cellValues_3) => termFromStringCells(2, 1, cellValues_3)];
|
|
98
105
|
}
|
|
99
106
|
default: {
|
|
100
|
-
let matchResult_2,
|
|
101
|
-
if (!
|
|
102
|
-
const
|
|
103
|
-
if (
|
|
104
|
-
if (
|
|
105
|
-
const
|
|
106
|
-
if (
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
term1_1 = activePatternResult_6;
|
|
114
|
-
term2_1 = activePatternResult_5;
|
|
115
|
-
}
|
|
116
|
-
else {
|
|
117
|
-
matchResult_2 = 1;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
else {
|
|
121
|
-
matchResult_2 = 1;
|
|
122
|
-
}
|
|
107
|
+
let matchResult_2, name_3, term1_2, term2_2;
|
|
108
|
+
if (!equalsWith((x_3, y_3) => (x_3 === y_3), cellValues, defaultOf()) && (cellValues.length === 4)) {
|
|
109
|
+
const activePatternResult_7 = $007CAC$007C_$007C(item(0, cellValues));
|
|
110
|
+
if (activePatternResult_7 != null) {
|
|
111
|
+
if (ActivePatterns_$007CUnitColumnHeader$007C_$007C(item(1, cellValues)) != null) {
|
|
112
|
+
const activePatternResult_9 = ActivePatterns_$007CTSRColumnHeader$007C_$007C(item(2, cellValues));
|
|
113
|
+
if (activePatternResult_9 != null) {
|
|
114
|
+
const activePatternResult_10 = ActivePatterns_$007CTANColumnHeader$007C_$007C(item(3, cellValues));
|
|
115
|
+
if (activePatternResult_10 != null) {
|
|
116
|
+
matchResult_2 = 0;
|
|
117
|
+
name_3 = activePatternResult_7;
|
|
118
|
+
term1_2 = activePatternResult_9;
|
|
119
|
+
term2_2 = activePatternResult_10;
|
|
123
120
|
}
|
|
124
121
|
else {
|
|
125
122
|
matchResult_2 = 1;
|
|
@@ -142,43 +139,23 @@ export function ActivePattern_$007CTerm$007C_$007C(categoryParser, f, cells) {
|
|
|
142
139
|
}
|
|
143
140
|
switch (matchResult_2) {
|
|
144
141
|
case 0: {
|
|
145
|
-
const
|
|
146
|
-
return [f(OntologyAnnotation.create(
|
|
142
|
+
const term_2 = ActivePattern_mergeIDInfo(term1_2.IDSpace, term1_2.LocalID, term2_2.IDSpace, term2_2.LocalID);
|
|
143
|
+
return [f(OntologyAnnotation.create(name_3, term_2.TermSourceRef, term_2.TermAccessionNumber)), (cellValues_4) => unitizedFromStringCells(1, 2, 3, cellValues_4)];
|
|
147
144
|
}
|
|
148
145
|
default: {
|
|
149
|
-
let matchResult_3,
|
|
150
|
-
if (!
|
|
151
|
-
const
|
|
152
|
-
if (
|
|
153
|
-
if (
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
matchResult_3 = 0;
|
|
163
|
-
name_3 = activePatternResult_7;
|
|
164
|
-
term1_2 = activePatternResult_9;
|
|
165
|
-
term2_2 = activePatternResult_10;
|
|
166
|
-
}
|
|
167
|
-
else {
|
|
168
|
-
matchResult_3 = 1;
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
else {
|
|
172
|
-
matchResult_3 = 1;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
else {
|
|
176
|
-
matchResult_3 = 1;
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
else {
|
|
180
|
-
matchResult_3 = 1;
|
|
181
|
-
}
|
|
146
|
+
let matchResult_3, name_4, term1_3, term2_3;
|
|
147
|
+
if (!equalsWith((x_4, y_4) => (x_4 === y_4), cellValues, defaultOf()) && (cellValues.length === 4)) {
|
|
148
|
+
const activePatternResult_11 = $007CAC$007C_$007C(item(0, cellValues));
|
|
149
|
+
if (activePatternResult_11 != null) {
|
|
150
|
+
if (ActivePatterns_$007CUnitColumnHeader$007C_$007C(item(1, cellValues)) != null) {
|
|
151
|
+
const activePatternResult_13 = ActivePatterns_$007CTANColumnHeader$007C_$007C(item(2, cellValues));
|
|
152
|
+
if (activePatternResult_13 != null) {
|
|
153
|
+
const activePatternResult_14 = ActivePatterns_$007CTSRColumnHeader$007C_$007C(item(3, cellValues));
|
|
154
|
+
if (activePatternResult_14 != null) {
|
|
155
|
+
matchResult_3 = 0;
|
|
156
|
+
name_4 = activePatternResult_11;
|
|
157
|
+
term1_3 = activePatternResult_14;
|
|
158
|
+
term2_3 = activePatternResult_13;
|
|
182
159
|
}
|
|
183
160
|
else {
|
|
184
161
|
matchResult_3 = 1;
|
|
@@ -201,72 +178,11 @@ export function ActivePattern_$007CTerm$007C_$007C(categoryParser, f, cells) {
|
|
|
201
178
|
}
|
|
202
179
|
switch (matchResult_3) {
|
|
203
180
|
case 0: {
|
|
204
|
-
const
|
|
205
|
-
return [f(OntologyAnnotation.create(
|
|
206
|
-
}
|
|
207
|
-
default: {
|
|
208
|
-
let matchResult_4, name_4, term1_3, term2_3;
|
|
209
|
-
if (!isEmpty(cellValues)) {
|
|
210
|
-
const activePatternResult_11 = $007CAC$007C_$007C(head(cellValues));
|
|
211
|
-
if (activePatternResult_11 != null) {
|
|
212
|
-
if (!isEmpty(tail(cellValues))) {
|
|
213
|
-
if (ActivePatterns_$007CUnitColumnHeader$007C_$007C(head(tail(cellValues))) != null) {
|
|
214
|
-
if (!isEmpty(tail(tail(cellValues)))) {
|
|
215
|
-
const activePatternResult_13 = ActivePatterns_$007CTANColumnHeader$007C_$007C(head(tail(tail(cellValues))));
|
|
216
|
-
if (activePatternResult_13 != null) {
|
|
217
|
-
if (!isEmpty(tail(tail(tail(cellValues))))) {
|
|
218
|
-
const activePatternResult_14 = ActivePatterns_$007CTSRColumnHeader$007C_$007C(head(tail(tail(tail(cellValues)))));
|
|
219
|
-
if (activePatternResult_14 != null) {
|
|
220
|
-
if (isEmpty(tail(tail(tail(tail(cellValues)))))) {
|
|
221
|
-
matchResult_4 = 0;
|
|
222
|
-
name_4 = activePatternResult_11;
|
|
223
|
-
term1_3 = activePatternResult_14;
|
|
224
|
-
term2_3 = activePatternResult_13;
|
|
225
|
-
}
|
|
226
|
-
else {
|
|
227
|
-
matchResult_4 = 1;
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
else {
|
|
231
|
-
matchResult_4 = 1;
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
else {
|
|
235
|
-
matchResult_4 = 1;
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
else {
|
|
239
|
-
matchResult_4 = 1;
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
else {
|
|
243
|
-
matchResult_4 = 1;
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
else {
|
|
247
|
-
matchResult_4 = 1;
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
else {
|
|
251
|
-
matchResult_4 = 1;
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
else {
|
|
255
|
-
matchResult_4 = 1;
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
else {
|
|
259
|
-
matchResult_4 = 1;
|
|
260
|
-
}
|
|
261
|
-
switch (matchResult_4) {
|
|
262
|
-
case 0: {
|
|
263
|
-
const term_3 = ActivePattern_mergeIDInfo(term1_3.IDSpace, term1_3.LocalID, term2_3.IDSpace, term2_3.LocalID);
|
|
264
|
-
return [f(OntologyAnnotation.create(name_4, term_3.TermSourceRef, term_3.TermAccessionNumber)), (cells_5) => unitizedFromFsCells(1, 3, 2, cells_5)];
|
|
265
|
-
}
|
|
266
|
-
default:
|
|
267
|
-
return void 0;
|
|
268
|
-
}
|
|
181
|
+
const term_3 = ActivePattern_mergeIDInfo(term1_3.IDSpace, term1_3.LocalID, term2_3.IDSpace, term2_3.LocalID);
|
|
182
|
+
return [f(OntologyAnnotation.create(name_4, term_3.TermSourceRef, term_3.TermAccessionNumber)), (cellValues_5) => unitizedFromStringCells(1, 3, 2, cellValues_5)];
|
|
269
183
|
}
|
|
184
|
+
default:
|
|
185
|
+
return void 0;
|
|
270
186
|
}
|
|
271
187
|
}
|
|
272
188
|
}
|
|
@@ -276,8 +192,8 @@ export function ActivePattern_$007CTerm$007C_$007C(categoryParser, f, cells) {
|
|
|
276
192
|
}
|
|
277
193
|
}
|
|
278
194
|
|
|
279
|
-
export function ActivePattern_$007CParameter$007C_$007C(
|
|
280
|
-
const activePatternResult = ActivePattern_$007CTerm$007C_$007C(tryParseParameterColumnHeader, (Item) => (new CompositeHeader(3, [Item])),
|
|
195
|
+
export function ActivePattern_$007CParameter$007C_$007C(cellValues) {
|
|
196
|
+
const activePatternResult = ActivePattern_$007CTerm$007C_$007C(tryParseParameterColumnHeader, (Item) => (new CompositeHeader(3, [Item])), cellValues);
|
|
281
197
|
if (activePatternResult != null) {
|
|
282
198
|
const r = activePatternResult;
|
|
283
199
|
return r;
|
|
@@ -287,8 +203,8 @@ export function ActivePattern_$007CParameter$007C_$007C(cells) {
|
|
|
287
203
|
}
|
|
288
204
|
}
|
|
289
205
|
|
|
290
|
-
export function ActivePattern_$007CFactor$007C_$007C(
|
|
291
|
-
const activePatternResult = ActivePattern_$007CTerm$007C_$007C(tryParseFactorColumnHeader, (Item) => (new CompositeHeader(2, [Item])),
|
|
206
|
+
export function ActivePattern_$007CFactor$007C_$007C(cellValues) {
|
|
207
|
+
const activePatternResult = ActivePattern_$007CTerm$007C_$007C(tryParseFactorColumnHeader, (Item) => (new CompositeHeader(2, [Item])), cellValues);
|
|
292
208
|
if (activePatternResult != null) {
|
|
293
209
|
const r = activePatternResult;
|
|
294
210
|
return r;
|
|
@@ -298,8 +214,8 @@ export function ActivePattern_$007CFactor$007C_$007C(cells) {
|
|
|
298
214
|
}
|
|
299
215
|
}
|
|
300
216
|
|
|
301
|
-
export function ActivePattern_$007CCharacteristic$007C_$007C(
|
|
302
|
-
const activePatternResult = ActivePattern_$007CTerm$007C_$007C(tryParseCharacteristicColumnHeader, (Item) => (new CompositeHeader(1, [Item])),
|
|
217
|
+
export function ActivePattern_$007CCharacteristic$007C_$007C(cellValues) {
|
|
218
|
+
const activePatternResult = ActivePattern_$007CTerm$007C_$007C(tryParseCharacteristicColumnHeader, (Item) => (new CompositeHeader(1, [Item])), cellValues);
|
|
303
219
|
if (activePatternResult != null) {
|
|
304
220
|
const r = activePatternResult;
|
|
305
221
|
return r;
|
|
@@ -309,8 +225,8 @@ export function ActivePattern_$007CCharacteristic$007C_$007C(cells) {
|
|
|
309
225
|
}
|
|
310
226
|
}
|
|
311
227
|
|
|
312
|
-
export function ActivePattern_$007CComponent$007C_$007C(
|
|
313
|
-
const activePatternResult = ActivePattern_$007CTerm$007C_$007C(tryParseComponentColumnHeader, (Item) => (new CompositeHeader(0, [Item])),
|
|
228
|
+
export function ActivePattern_$007CComponent$007C_$007C(cellValues) {
|
|
229
|
+
const activePatternResult = ActivePattern_$007CTerm$007C_$007C(tryParseComponentColumnHeader, (Item) => (new CompositeHeader(0, [Item])), cellValues);
|
|
314
230
|
if (activePatternResult != null) {
|
|
315
231
|
const r = activePatternResult;
|
|
316
232
|
return r;
|
|
@@ -320,87 +236,65 @@ export function ActivePattern_$007CComponent$007C_$007C(cells) {
|
|
|
320
236
|
}
|
|
321
237
|
}
|
|
322
238
|
|
|
323
|
-
export function ActivePattern_$007CInput$007C_$007C(
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
if (!isEmpty(cellValues)) {
|
|
327
|
-
const activePatternResult = ActivePatterns_$007CInputColumnHeader$007C_$007C(head(cellValues));
|
|
328
|
-
if (activePatternResult != null) {
|
|
329
|
-
matchResult = 0;
|
|
330
|
-
cols = tail(cellValues);
|
|
331
|
-
ioType = activePatternResult;
|
|
332
|
-
}
|
|
333
|
-
else {
|
|
334
|
-
matchResult = 1;
|
|
335
|
-
}
|
|
239
|
+
export function ActivePattern_$007CInput$007C_$007C(cellValues) {
|
|
240
|
+
if (cellValues.length === 0) {
|
|
241
|
+
return void 0;
|
|
336
242
|
}
|
|
337
243
|
else {
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
const
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
const
|
|
346
|
-
|
|
244
|
+
const matchValue = item(0, cellValues);
|
|
245
|
+
const activePatternResult = ActivePatterns_$007CInputColumnHeader$007C_$007C(matchValue);
|
|
246
|
+
if (activePatternResult != null) {
|
|
247
|
+
const ioType = activePatternResult;
|
|
248
|
+
const cols = skip(1, cellValues);
|
|
249
|
+
const matchValue_1 = IOType.ofString(ioType);
|
|
250
|
+
if (matchValue_1.tag === 2) {
|
|
251
|
+
const format = map((y) => (1 + y), tryFindIndex((s) => (s.indexOf("Data Format") === 0), cols));
|
|
252
|
+
const selectorFormat = map((y_1) => (1 + y_1), tryFindIndex((s_1) => (s_1.indexOf("Data Selector Format") === 0), cols));
|
|
253
|
+
return [new CompositeHeader(11, [new IOType(2, [])]), (cellValues_1) => dataFromStringCells(format, selectorFormat, cellValues_1)];
|
|
347
254
|
}
|
|
348
255
|
else {
|
|
349
|
-
return [new CompositeHeader(11, [
|
|
256
|
+
return [new CompositeHeader(11, [matchValue_1]), freeTextFromStringCells];
|
|
350
257
|
}
|
|
351
258
|
}
|
|
352
|
-
|
|
259
|
+
else {
|
|
353
260
|
return void 0;
|
|
261
|
+
}
|
|
354
262
|
}
|
|
355
263
|
}
|
|
356
264
|
|
|
357
|
-
export function ActivePattern_$007COutput$007C_$007C(
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
if (!isEmpty(cellValues)) {
|
|
361
|
-
const activePatternResult = ActivePatterns_$007COutputColumnHeader$007C_$007C(head(cellValues));
|
|
362
|
-
if (activePatternResult != null) {
|
|
363
|
-
matchResult = 0;
|
|
364
|
-
cols = tail(cellValues);
|
|
365
|
-
ioType = activePatternResult;
|
|
366
|
-
}
|
|
367
|
-
else {
|
|
368
|
-
matchResult = 1;
|
|
369
|
-
}
|
|
265
|
+
export function ActivePattern_$007COutput$007C_$007C(cellValues) {
|
|
266
|
+
if (cellValues.length === 0) {
|
|
267
|
+
return void 0;
|
|
370
268
|
}
|
|
371
269
|
else {
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
const
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
const
|
|
380
|
-
|
|
270
|
+
const matchValue = item(0, cellValues);
|
|
271
|
+
const activePatternResult = ActivePatterns_$007COutputColumnHeader$007C_$007C(matchValue);
|
|
272
|
+
if (activePatternResult != null) {
|
|
273
|
+
const ioType = activePatternResult;
|
|
274
|
+
const cols = skip(1, cellValues);
|
|
275
|
+
const matchValue_1 = IOType.ofString(ioType);
|
|
276
|
+
if (matchValue_1.tag === 2) {
|
|
277
|
+
const format = map((y) => (1 + y), tryFindIndex((s) => (s.indexOf("Data Format") === 0), cols));
|
|
278
|
+
const selectorFormat = map((y_1) => (1 + y_1), tryFindIndex((s_1) => (s_1.indexOf("Data Selector Format") === 0), cols));
|
|
279
|
+
return [new CompositeHeader(12, [new IOType(2, [])]), (cellValues_1) => dataFromStringCells(format, selectorFormat, cellValues_1)];
|
|
381
280
|
}
|
|
382
281
|
else {
|
|
383
|
-
return [new CompositeHeader(12, [
|
|
282
|
+
return [new CompositeHeader(12, [matchValue_1]), freeTextFromStringCells];
|
|
384
283
|
}
|
|
385
284
|
}
|
|
386
|
-
|
|
285
|
+
else {
|
|
387
286
|
return void 0;
|
|
287
|
+
}
|
|
388
288
|
}
|
|
389
289
|
}
|
|
390
290
|
|
|
391
|
-
export function ActivePattern_$007CComment$007C_$007C(
|
|
392
|
-
const cellValues = map((c) => c.ValueAsString(), cells);
|
|
291
|
+
export function ActivePattern_$007CComment$007C_$007C(cellValues) {
|
|
393
292
|
let matchResult, key;
|
|
394
|
-
if (!
|
|
395
|
-
const activePatternResult = ActivePatterns_$007CComment$007C_$007C(
|
|
293
|
+
if (!equalsWith((x, y) => (x === y), cellValues, defaultOf()) && (cellValues.length === 1)) {
|
|
294
|
+
const activePatternResult = ActivePatterns_$007CComment$007C_$007C(item(0, cellValues));
|
|
396
295
|
if (activePatternResult != null) {
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
key = activePatternResult;
|
|
400
|
-
}
|
|
401
|
-
else {
|
|
402
|
-
matchResult = 1;
|
|
403
|
-
}
|
|
296
|
+
matchResult = 0;
|
|
297
|
+
key = activePatternResult;
|
|
404
298
|
}
|
|
405
299
|
else {
|
|
406
300
|
matchResult = 1;
|
|
@@ -411,13 +305,13 @@ export function ActivePattern_$007CComment$007C_$007C(cells) {
|
|
|
411
305
|
}
|
|
412
306
|
switch (matchResult) {
|
|
413
307
|
case 0:
|
|
414
|
-
return [new CompositeHeader(14, [key]),
|
|
308
|
+
return [new CompositeHeader(14, [key]), freeTextFromStringCells];
|
|
415
309
|
default:
|
|
416
310
|
return void 0;
|
|
417
311
|
}
|
|
418
312
|
}
|
|
419
313
|
|
|
420
|
-
export function ActivePattern_$007CProtocolType$007C_$007C(
|
|
314
|
+
export function ActivePattern_$007CProtocolType$007C_$007C(cellValues) {
|
|
421
315
|
const activePatternResult = ActivePattern_$007CTerm$007C_$007C((s) => {
|
|
422
316
|
if (s === "Protocol Type") {
|
|
423
317
|
return s;
|
|
@@ -425,7 +319,7 @@ export function ActivePattern_$007CProtocolType$007C_$007C(cells) {
|
|
|
425
319
|
else {
|
|
426
320
|
return void 0;
|
|
427
321
|
}
|
|
428
|
-
}, (_arg) => (new CompositeHeader(4, [])),
|
|
322
|
+
}, (_arg) => (new CompositeHeader(4, [])), cellValues);
|
|
429
323
|
if (activePatternResult != null) {
|
|
430
324
|
const r = activePatternResult;
|
|
431
325
|
return r;
|
|
@@ -435,67 +329,29 @@ export function ActivePattern_$007CProtocolType$007C_$007C(cells) {
|
|
|
435
329
|
}
|
|
436
330
|
}
|
|
437
331
|
|
|
438
|
-
export function ActivePattern_$007CProtocolHeader$007C_$007C(
|
|
439
|
-
const cellValues = map((c) => c.ValueAsString(), cells);
|
|
332
|
+
export function ActivePattern_$007CProtocolHeader$007C_$007C(cellValues) {
|
|
440
333
|
let matchResult;
|
|
441
|
-
if (!
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
if (isEmpty(tail(cellValues))) {
|
|
463
|
-
matchResult = 2;
|
|
464
|
-
}
|
|
465
|
-
else {
|
|
466
|
-
matchResult = 6;
|
|
467
|
-
}
|
|
468
|
-
break;
|
|
469
|
-
}
|
|
470
|
-
case "Protocol Version": {
|
|
471
|
-
if (isEmpty(tail(cellValues))) {
|
|
472
|
-
matchResult = 3;
|
|
473
|
-
}
|
|
474
|
-
else {
|
|
475
|
-
matchResult = 6;
|
|
476
|
-
}
|
|
477
|
-
break;
|
|
478
|
-
}
|
|
479
|
-
case "Performer": {
|
|
480
|
-
if (isEmpty(tail(cellValues))) {
|
|
481
|
-
matchResult = 4;
|
|
482
|
-
}
|
|
483
|
-
else {
|
|
484
|
-
matchResult = 6;
|
|
485
|
-
}
|
|
486
|
-
break;
|
|
487
|
-
}
|
|
488
|
-
case "Date": {
|
|
489
|
-
if (isEmpty(tail(cellValues))) {
|
|
490
|
-
matchResult = 5;
|
|
491
|
-
}
|
|
492
|
-
else {
|
|
493
|
-
matchResult = 6;
|
|
494
|
-
}
|
|
495
|
-
break;
|
|
496
|
-
}
|
|
497
|
-
default:
|
|
498
|
-
matchResult = 6;
|
|
334
|
+
if (!equalsWith((x, y) => (x === y), cellValues, defaultOf()) && (cellValues.length === 1)) {
|
|
335
|
+
if (item(0, cellValues) === "Protocol REF") {
|
|
336
|
+
matchResult = 0;
|
|
337
|
+
}
|
|
338
|
+
else if (item(0, cellValues) === "Protocol Description") {
|
|
339
|
+
matchResult = 1;
|
|
340
|
+
}
|
|
341
|
+
else if (item(0, cellValues) === "Protocol Uri") {
|
|
342
|
+
matchResult = 2;
|
|
343
|
+
}
|
|
344
|
+
else if (item(0, cellValues) === "Protocol Version") {
|
|
345
|
+
matchResult = 3;
|
|
346
|
+
}
|
|
347
|
+
else if (item(0, cellValues) === "Performer") {
|
|
348
|
+
matchResult = 4;
|
|
349
|
+
}
|
|
350
|
+
else if (item(0, cellValues) === "Date") {
|
|
351
|
+
matchResult = 5;
|
|
352
|
+
}
|
|
353
|
+
else {
|
|
354
|
+
matchResult = 6;
|
|
499
355
|
}
|
|
500
356
|
}
|
|
501
357
|
else {
|
|
@@ -503,107 +359,93 @@ export function ActivePattern_$007CProtocolHeader$007C_$007C(cells) {
|
|
|
503
359
|
}
|
|
504
360
|
switch (matchResult) {
|
|
505
361
|
case 0:
|
|
506
|
-
return [new CompositeHeader(8, []),
|
|
362
|
+
return [new CompositeHeader(8, []), freeTextFromStringCells];
|
|
507
363
|
case 1:
|
|
508
|
-
return [new CompositeHeader(5, []),
|
|
364
|
+
return [new CompositeHeader(5, []), freeTextFromStringCells];
|
|
509
365
|
case 2:
|
|
510
|
-
return [new CompositeHeader(6, []),
|
|
366
|
+
return [new CompositeHeader(6, []), freeTextFromStringCells];
|
|
511
367
|
case 3:
|
|
512
|
-
return [new CompositeHeader(7, []),
|
|
368
|
+
return [new CompositeHeader(7, []), freeTextFromStringCells];
|
|
513
369
|
case 4:
|
|
514
|
-
return [new CompositeHeader(9, []),
|
|
370
|
+
return [new CompositeHeader(9, []), freeTextFromStringCells];
|
|
515
371
|
case 5:
|
|
516
|
-
return [new CompositeHeader(10, []),
|
|
372
|
+
return [new CompositeHeader(10, []), freeTextFromStringCells];
|
|
517
373
|
default:
|
|
518
374
|
return void 0;
|
|
519
375
|
}
|
|
520
376
|
}
|
|
521
377
|
|
|
522
|
-
export function ActivePattern_$007CFreeText$007C_$007C(
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
if (!isEmpty(cellValues)) {
|
|
526
|
-
if (isEmpty(tail(cellValues))) {
|
|
527
|
-
matchResult = 0;
|
|
528
|
-
text = head(cellValues);
|
|
529
|
-
}
|
|
530
|
-
else {
|
|
531
|
-
matchResult = 1;
|
|
532
|
-
}
|
|
378
|
+
export function ActivePattern_$007CFreeText$007C_$007C(cellValues) {
|
|
379
|
+
if (!equalsWith((x, y) => (x === y), cellValues, defaultOf()) && (cellValues.length === 1)) {
|
|
380
|
+
return [new CompositeHeader(13, [item(0, cellValues)]), freeTextFromStringCells];
|
|
533
381
|
}
|
|
534
382
|
else {
|
|
535
|
-
|
|
536
|
-
}
|
|
537
|
-
switch (matchResult) {
|
|
538
|
-
case 0:
|
|
539
|
-
return [new CompositeHeader(13, [text]), freeTextFromFsCells];
|
|
540
|
-
default:
|
|
541
|
-
return void 0;
|
|
383
|
+
return void 0;
|
|
542
384
|
}
|
|
543
385
|
}
|
|
544
386
|
|
|
545
|
-
export function
|
|
546
|
-
const activePatternResult = ActivePattern_$007CParameter$007C_$007C(
|
|
387
|
+
export function fromStringCells(cellValues) {
|
|
388
|
+
const activePatternResult = ActivePattern_$007CParameter$007C_$007C(cellValues);
|
|
547
389
|
if (activePatternResult != null) {
|
|
548
390
|
const p = activePatternResult;
|
|
549
391
|
return p;
|
|
550
392
|
}
|
|
551
393
|
else {
|
|
552
|
-
const activePatternResult_1 = ActivePattern_$007CFactor$007C_$007C(
|
|
394
|
+
const activePatternResult_1 = ActivePattern_$007CFactor$007C_$007C(cellValues);
|
|
553
395
|
if (activePatternResult_1 != null) {
|
|
554
396
|
const f = activePatternResult_1;
|
|
555
397
|
return f;
|
|
556
398
|
}
|
|
557
399
|
else {
|
|
558
|
-
const activePatternResult_2 = ActivePattern_$007CCharacteristic$007C_$007C(
|
|
400
|
+
const activePatternResult_2 = ActivePattern_$007CCharacteristic$007C_$007C(cellValues);
|
|
559
401
|
if (activePatternResult_2 != null) {
|
|
560
402
|
const c = activePatternResult_2;
|
|
561
403
|
return c;
|
|
562
404
|
}
|
|
563
405
|
else {
|
|
564
|
-
const activePatternResult_3 = ActivePattern_$007CComponent$007C_$007C(
|
|
406
|
+
const activePatternResult_3 = ActivePattern_$007CComponent$007C_$007C(cellValues);
|
|
565
407
|
if (activePatternResult_3 != null) {
|
|
566
408
|
const c_1 = activePatternResult_3;
|
|
567
409
|
return c_1;
|
|
568
410
|
}
|
|
569
411
|
else {
|
|
570
|
-
const activePatternResult_4 = ActivePattern_$007CInput$007C_$007C(
|
|
412
|
+
const activePatternResult_4 = ActivePattern_$007CInput$007C_$007C(cellValues);
|
|
571
413
|
if (activePatternResult_4 != null) {
|
|
572
414
|
const i = activePatternResult_4;
|
|
573
415
|
return i;
|
|
574
416
|
}
|
|
575
417
|
else {
|
|
576
|
-
const activePatternResult_5 = ActivePattern_$007COutput$007C_$007C(
|
|
418
|
+
const activePatternResult_5 = ActivePattern_$007COutput$007C_$007C(cellValues);
|
|
577
419
|
if (activePatternResult_5 != null) {
|
|
578
420
|
const o = activePatternResult_5;
|
|
579
421
|
return o;
|
|
580
422
|
}
|
|
581
423
|
else {
|
|
582
|
-
const activePatternResult_6 = ActivePattern_$007CProtocolType$007C_$007C(
|
|
424
|
+
const activePatternResult_6 = ActivePattern_$007CProtocolType$007C_$007C(cellValues);
|
|
583
425
|
if (activePatternResult_6 != null) {
|
|
584
426
|
const pt = activePatternResult_6;
|
|
585
427
|
return pt;
|
|
586
428
|
}
|
|
587
429
|
else {
|
|
588
|
-
const activePatternResult_7 = ActivePattern_$007CProtocolHeader$007C_$007C(
|
|
430
|
+
const activePatternResult_7 = ActivePattern_$007CProtocolHeader$007C_$007C(cellValues);
|
|
589
431
|
if (activePatternResult_7 != null) {
|
|
590
432
|
const ph = activePatternResult_7;
|
|
591
433
|
return ph;
|
|
592
434
|
}
|
|
593
435
|
else {
|
|
594
|
-
const activePatternResult_8 = ActivePattern_$007CComment$007C_$007C(
|
|
436
|
+
const activePatternResult_8 = ActivePattern_$007CComment$007C_$007C(cellValues);
|
|
595
437
|
if (activePatternResult_8 != null) {
|
|
596
438
|
const c_2 = activePatternResult_8;
|
|
597
439
|
return c_2;
|
|
598
440
|
}
|
|
599
441
|
else {
|
|
600
|
-
const activePatternResult_9 = ActivePattern_$007CFreeText$007C_$007C(
|
|
442
|
+
const activePatternResult_9 = ActivePattern_$007CFreeText$007C_$007C(cellValues);
|
|
601
443
|
if (activePatternResult_9 != null) {
|
|
602
444
|
const ft = activePatternResult_9;
|
|
603
445
|
return ft;
|
|
604
446
|
}
|
|
605
447
|
else {
|
|
606
|
-
return toFail(printf("Could not parse header group %O"))(
|
|
448
|
+
return toFail(printf("Could not parse header group %O"))(cellValues);
|
|
607
449
|
}
|
|
608
450
|
}
|
|
609
451
|
}
|
|
@@ -616,15 +458,15 @@ export function fromFsCells(cells) {
|
|
|
616
458
|
}
|
|
617
459
|
}
|
|
618
460
|
|
|
619
|
-
export function
|
|
461
|
+
export function toStringCells(hasUnit, header) {
|
|
620
462
|
if (header.IsDataColumn) {
|
|
621
|
-
return
|
|
463
|
+
return [toString(header), "Data Format", "Data Selector Format"];
|
|
622
464
|
}
|
|
623
465
|
else if (header.IsSingleColumn) {
|
|
624
|
-
return
|
|
466
|
+
return [toString(header)];
|
|
625
467
|
}
|
|
626
468
|
else if (header.IsTermColumn) {
|
|
627
|
-
return
|
|
469
|
+
return toArray(delay(() => append(singleton(toString(header)), delay(() => append(hasUnit ? singleton("Unit") : empty(), delay(() => append(singleton(`Term Source REF (${header.GetColumnAccessionShort})`), delay(() => singleton(`Term Accession Number (${header.GetColumnAccessionShort})`)))))))));
|
|
628
470
|
}
|
|
629
471
|
else {
|
|
630
472
|
return toFail(printf("header %O is neither single nor term column"))(header);
|