@nfdi4plants/arctrl 3.0.0-alpha.3 → 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.
- package/README.md +9 -9
- package/dist/ts/cjs/ts/Conversion.js +11 -10
- package/dist/ts/cjs/ts/Core/Helper/Collections.js +15 -0
- package/dist/ts/cjs/ts/Core/Table/ArcTableAux.js +39 -8
- package/dist/ts/cjs/ts/Json/StringTable.js +9 -2
- package/dist/ts/cjs/ts/Json/Table/CellTable.js +2 -2
- package/dist/ts/cjs/ts/Json/Table/OATable.js +2 -2
- package/dist/ts/cjs/ts/JsonIO/Table/Compression.js +4 -11
- package/dist/ts/cjs/ts/ROCrate/Generic/LabProcess.js +1 -1
- package/dist/ts/cjs/ts/ROCrate/LDContext.js +92 -54
- package/dist/ts/esm/ts/Conversion.js +9 -8
- package/dist/ts/esm/ts/Core/Helper/Collections.js +12 -0
- package/dist/ts/esm/ts/Core/Table/ArcTableAux.js +36 -8
- package/dist/ts/esm/ts/Json/StringTable.js +10 -3
- package/dist/ts/esm/ts/Json/Table/CellTable.js +2 -2
- package/dist/ts/esm/ts/Json/Table/OATable.js +2 -2
- package/dist/ts/esm/ts/JsonIO/Table/Compression.js +4 -11
- package/dist/ts/esm/ts/ROCrate/Generic/LabProcess.js +1 -1
- package/dist/ts/esm/ts/ROCrate/LDContext.js +106 -66
- package/dist/ts/types/ts/Conversion.d.ts +3 -3
- package/dist/ts/types/ts/Conversion.d.ts.map +1 -1
- package/dist/ts/types/ts/Core/Helper/Collections.d.ts +3 -0
- package/dist/ts/types/ts/Core/Helper/Collections.d.ts.map +1 -1
- package/dist/ts/types/ts/Core/Table/ArcTableAux.d.ts +5 -2
- package/dist/ts/types/ts/Core/Table/ArcTableAux.d.ts.map +1 -1
- package/dist/ts/types/ts/Json/StringTable.d.ts.map +1 -1
- package/dist/ts/types/ts/Json/Table/CellTable.d.ts.map +1 -1
- package/dist/ts/types/ts/Json/Table/OATable.d.ts.map +1 -1
- package/dist/ts/types/ts/JsonIO/Table/Compression.d.ts.map +1 -1
- package/dist/ts/types/ts/ROCrate/LDContext.d.ts +3 -5
- package/dist/ts/types/ts/ROCrate/LDContext.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
2
|

|
|
3
3
|
|
|
4
4
|
# ARCtrl
|
|
@@ -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 |
|
|
94
|
-
| Table_AddRows | Add 10000 rows to a table with 4 columns. |
|
|
95
|
-
| Table_fillMissingCells | For a table 6 columns and 20000 rows, where each row has one missing value, fill those values with default values. |
|
|
96
|
-
| Table_ToJson | Serialize a table with 5 columns and 10000 rows to json. |
|
|
97
|
-
| Table_ToCompressedJson | Serialize a table with 5 columns and 10000 rows to compressed json. |
|
|
98
|
-
| Assay_toJson | Parse an assay with one table with 10000 rows and 6 columns to json |
|
|
99
|
-
| Study_FromWorkbook | Parse a workbook with one study with 10000 rows and 6 columns to an ArcStudy |
|
|
100
|
-
| Investigation_ToWorkbook_ManyStudies | Parse an investigation with 1500 studies to a workbook |
|
|
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 |
|
|
@@ -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.
|
|
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.
|
|
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;
|
|
@@ -880,7 +880,7 @@ function ProcessConversion_tryGetPerformerGetter(generalI, header) {
|
|
|
880
880
|
/**
|
|
881
881
|
* Given the header sequence of an ArcTable, returns a function for parsing each row of the table to a process
|
|
882
882
|
*/
|
|
883
|
-
function ProcessConversion_getProcessGetter(processNameRoot, headers) {
|
|
883
|
+
function ProcessConversion_getProcessGetter(assayName, studyName, processNameRoot, headers) {
|
|
884
884
|
const headers_1 = (0, Seq_js_1.indexed)(headers);
|
|
885
885
|
const valueHeaders = (0, Seq_js_1.toList)((0, Seq_js_1.indexed)((0, Seq_js_1.filter)((arg) => arg[1].IsCvParamColumn, headers_1)));
|
|
886
886
|
const charGetters = (0, List_js_1.choose)((tupledArg) => {
|
|
@@ -959,6 +959,7 @@ function ProcessConversion_getProcessGetter(processNameRoot, headers) {
|
|
|
959
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)));
|
|
960
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)));
|
|
961
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}`);
|
|
962
963
|
let protocol;
|
|
963
964
|
const name = (0, Option_js_1.map)((f_7) => f_7(matrix_6)(i_6), protocolREFGetter);
|
|
964
965
|
const protocolId = LabProtocol_js_1.LDLabProtocol.genId((0, Option_js_1.unwrap)(name), processNameRoot);
|
|
@@ -966,7 +967,7 @@ function ProcessConversion_getProcessGetter(processNameRoot, headers) {
|
|
|
966
967
|
const matchValue_2 = inputGetter_1(matrix_6)(i_6);
|
|
967
968
|
const matchValue_3 = outputGetter_1(matrix_6)(i_6);
|
|
968
969
|
const agent = (0, Option_js_1.map)((f_12) => f_12(matrix_6)(i_6), performerGetter);
|
|
969
|
-
return LabProcess_js_1.LDLabProcess.create(pn, matchValue_2, matchValue_3,
|
|
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));
|
|
970
971
|
});
|
|
971
972
|
}
|
|
972
973
|
/**
|
|
@@ -1292,12 +1293,12 @@ function ARCtrl_ArcTable__ArcTable_GetProtocols(this$) {
|
|
|
1292
1293
|
/**
|
|
1293
1294
|
* Returns the list of processes specidified in this ArcTable
|
|
1294
1295
|
*/
|
|
1295
|
-
function
|
|
1296
|
+
function ARCtrl_ArcTable__ArcTable_GetProcesses_40457300(this$, assayName, studyName) {
|
|
1296
1297
|
if (this$.RowCount === 0) {
|
|
1297
1298
|
return (0, List_js_1.singleton)(LabProcess_js_1.LDLabProcess.create(this$.Name));
|
|
1298
1299
|
}
|
|
1299
1300
|
else {
|
|
1300
|
-
const getter = ProcessConversion_getProcessGetter(this$.Name, this$.Headers);
|
|
1301
|
+
const getter = ProcessConversion_getProcessGetter(assayName, studyName, this$.Name, this$.Headers);
|
|
1301
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))));
|
|
1302
1303
|
}
|
|
1303
1304
|
}
|
|
@@ -1315,8 +1316,8 @@ function ARCtrl_ArcTable__ArcTable_fromProcesses_Static_Z3575FB5F(name, ps, grap
|
|
|
1315
1316
|
/**
|
|
1316
1317
|
* Return a list of all the processes in all the tables.
|
|
1317
1318
|
*/
|
|
1318
|
-
function
|
|
1319
|
-
return (0, List_js_1.collect)(
|
|
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));
|
|
1320
1321
|
}
|
|
1321
1322
|
/**
|
|
1322
1323
|
* Create a collection of tables from a list of processes.
|
|
@@ -1570,7 +1571,7 @@ function AssayConversion_composeAssay_1501C0F8(assay) {
|
|
|
1570
1571
|
const measurementTechnique = (0, Option_js_1.map)(BaseTypes_composeDefinedTerm_ZDED3A0F, assay.TechnologyPlatform);
|
|
1571
1572
|
const variableMeasured = (0, Option_js_1.map)(BaseTypes_composePropertyValueFromOA_ZDED3A0F, assay.MeasurementType);
|
|
1572
1573
|
const creators = (0, Collections_js_1.Option_fromSeq)((0, Collections_js_1.ResizeArray_map)(PersonConversion_composePerson_Z64D846DC, assay.Performers));
|
|
1573
|
-
const processSequence = (0, Collections_js_1.Option_fromSeq)((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)));
|
|
1574
1575
|
const fragmentDescriptors = (0, Option_js_1.map)(DatamapConversion_composeFragmentDescriptors_Z8923FA3, assay.DataMap);
|
|
1575
1576
|
const dataFiles = (0, Option_js_1.map)((ps) => AssayConversion_getDataFilesFromProcesses_6BABD1B0(ps, (0, Option_js_1.unwrap)(fragmentDescriptors)), processSequence);
|
|
1576
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)))));
|
|
@@ -1604,7 +1605,7 @@ function StudyConversion_composeStudy_1680536E(study) {
|
|
|
1604
1605
|
const dateModified = (0, Date_js_1.now)();
|
|
1605
1606
|
const publications = (0, Collections_js_1.Option_fromSeq)((0, Collections_js_1.ResizeArray_map)(ScholarlyArticleConversion_composeScholarlyArticle_D324A6D, study.Publications));
|
|
1606
1607
|
const creators = (0, Collections_js_1.Option_fromSeq)((0, Collections_js_1.ResizeArray_map)(PersonConversion_composePerson_Z64D846DC, study.Contacts));
|
|
1607
|
-
const processSequence = (0, Collections_js_1.Option_fromSeq)((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)));
|
|
1608
1609
|
const fragmentDescriptors = (0, Option_js_1.map)(DatamapConversion_composeFragmentDescriptors_Z8923FA3, study.DataMap);
|
|
1609
1610
|
const dataFiles = (0, Option_js_1.map)((ps) => AssayConversion_getDataFilesFromProcesses_6BABD1B0(ps, (0, Option_js_1.unwrap)(fragmentDescriptors)), processSequence);
|
|
1610
1611
|
const comments = (0, Collections_js_1.Option_fromSeq)((0, Collections_js_1.ResizeArray_map)(BaseTypes_composeComment_Z13201A7E, study.Comments));
|
|
@@ -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
|
|
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 (
|
|
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 = (
|
|
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
|
-
|
|
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
|
}
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.encode = encode;
|
|
4
4
|
exports.decode = decode;
|
|
5
|
-
const
|
|
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 =
|
|
15
|
-
const oaTable =
|
|
16
|
-
|
|
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), `#
|
|
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);
|
|
@@ -1,47 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.LDContext = exports.IRIHelper_compactIRIRegex = void 0;
|
|
4
|
-
exports.Dictionary_ofSeq = Dictionary_ofSeq;
|
|
5
|
-
exports.Dictionary_tryFind = Dictionary_tryFind;
|
|
6
4
|
exports.IRIHelper_$007CCompactIri$007C_$007C = IRIHelper_$007CCompactIri$007C_$007C;
|
|
7
5
|
exports.IRIHelper_combine = IRIHelper_combine;
|
|
8
6
|
exports.IRIHelper_combineOptional = IRIHelper_combineOptional;
|
|
9
7
|
exports.LDContext_$reflection = LDContext_$reflection;
|
|
10
8
|
exports.LDContext_$ctor_7878CD77 = LDContext_$ctor_7878CD77;
|
|
11
|
-
const MutableMap_js_1 = require("@fable-org/fable-library-js/MutableMap.js");
|
|
12
|
-
const Util_js_1 = require("@fable-org/fable-library-js/Util.js");
|
|
13
|
-
const Seq_js_1 = require("@fable-org/fable-library-js/Seq.js");
|
|
14
|
-
const MapUtil_js_1 = require("@fable-org/fable-library-js/MapUtil.js");
|
|
15
|
-
const Types_js_1 = require("@fable-org/fable-library-js/Types.js");
|
|
16
|
-
const Option_js_1 = require("@fable-org/fable-library-js/Option.js");
|
|
17
9
|
const Regex_js_1 = require("../Core/Helper/Regex.js");
|
|
10
|
+
const Option_js_1 = require("@fable-org/fable-library-js/Option.js");
|
|
11
|
+
const Types_js_1 = require("@fable-org/fable-library-js/Types.js");
|
|
18
12
|
const Uri_js_1 = require("@fable-org/fable-library-js/Uri.js");
|
|
13
|
+
const Util_js_1 = require("@fable-org/fable-library-js/Util.js");
|
|
14
|
+
const MapUtil_js_1 = require("@fable-org/fable-library-js/MapUtil.js");
|
|
15
|
+
const Seq_js_1 = require("@fable-org/fable-library-js/Seq.js");
|
|
19
16
|
const Collections_js_1 = require("../Core/Helper/Collections.js");
|
|
20
17
|
const HashCodes_js_1 = require("../Core/Helper/HashCodes.js");
|
|
21
18
|
const Reflection_js_1 = require("@fable-org/fable-library-js/Reflection.js");
|
|
22
|
-
function Dictionary_ofSeq(s) {
|
|
23
|
-
const dict = new MutableMap_js_1.Dictionary([], {
|
|
24
|
-
Equals: Util_js_1.equals,
|
|
25
|
-
GetHashCode: Util_js_1.structuralHash,
|
|
26
|
-
});
|
|
27
|
-
(0, Seq_js_1.iterate)((tupledArg) => {
|
|
28
|
-
(0, MapUtil_js_1.addToDict)(dict, tupledArg[0], tupledArg[1]);
|
|
29
|
-
}, s);
|
|
30
|
-
return dict;
|
|
31
|
-
}
|
|
32
|
-
function Dictionary_tryFind(key, dict) {
|
|
33
|
-
let patternInput;
|
|
34
|
-
let outArg = (0, Util_js_1.defaultOf)();
|
|
35
|
-
patternInput = [(0, MapUtil_js_1.tryGetValue)(dict, key, new Types_js_1.FSharpRef(() => outArg, (v) => {
|
|
36
|
-
outArg = v;
|
|
37
|
-
})), outArg];
|
|
38
|
-
if (patternInput[0]) {
|
|
39
|
-
return (0, Option_js_1.some)(patternInput[1]);
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
return undefined;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
19
|
exports.IRIHelper_compactIRIRegex = "(?<prefix>.*):(?<suffix>[^\\/][^\\/].*)";
|
|
46
20
|
function IRIHelper_$007CCompactIri$007C_$007C(termDefition) {
|
|
47
21
|
const activePatternResult = (0, Regex_js_1.ActivePatterns_$007CRegex$007C_$007C)(exports.IRIHelper_compactIRIRegex, termDefition);
|
|
@@ -83,12 +57,12 @@ function IRIHelper_combineOptional(baseIRI, relative) {
|
|
|
83
57
|
}
|
|
84
58
|
class LDContext {
|
|
85
59
|
constructor(mappings, baseContexts) {
|
|
86
|
-
this["baseContexts@
|
|
60
|
+
this["baseContexts@41"] = (0, Option_js_1.defaultArg)(baseContexts, []);
|
|
87
61
|
this.name = undefined;
|
|
88
|
-
this["mappings@
|
|
62
|
+
this["mappings@45"] = ((mappings == null) ? (new Map([])) : (0, Option_js_1.value)(mappings));
|
|
89
63
|
this.reverseMappings = (new Map([]));
|
|
90
64
|
this.compactReverseMappings = (new Map([]));
|
|
91
|
-
let enumerator = (0, Util_js_1.getEnumerator)(this["mappings@
|
|
65
|
+
let enumerator = (0, Util_js_1.getEnumerator)(this["mappings@45"]);
|
|
92
66
|
try {
|
|
93
67
|
while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
94
68
|
const kvp = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
@@ -101,15 +75,15 @@ class LDContext {
|
|
|
101
75
|
}
|
|
102
76
|
get Mappings() {
|
|
103
77
|
const this$ = this;
|
|
104
|
-
return this$["mappings@
|
|
78
|
+
return this$["mappings@45"];
|
|
105
79
|
}
|
|
106
80
|
get BaseContexts() {
|
|
107
81
|
const this$ = this;
|
|
108
|
-
return this$["baseContexts@
|
|
82
|
+
return this$["baseContexts@41"];
|
|
109
83
|
}
|
|
110
84
|
set BaseContexts(value) {
|
|
111
85
|
const this$ = this;
|
|
112
|
-
this$["baseContexts@
|
|
86
|
+
this$["baseContexts@41"] = value;
|
|
113
87
|
}
|
|
114
88
|
get Name() {
|
|
115
89
|
const this$ = this;
|
|
@@ -121,7 +95,15 @@ class LDContext {
|
|
|
121
95
|
}
|
|
122
96
|
AddMapping(term, definition) {
|
|
123
97
|
const this$ = this;
|
|
124
|
-
|
|
98
|
+
const key = term;
|
|
99
|
+
const value = definition;
|
|
100
|
+
const dict = this$["mappings@45"];
|
|
101
|
+
if (dict.has(key)) {
|
|
102
|
+
dict.set(key, value);
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
(0, MapUtil_js_1.addToDict)(dict, key, value);
|
|
106
|
+
}
|
|
125
107
|
this$.addReverseMapping(term, definition);
|
|
126
108
|
}
|
|
127
109
|
TryResolveTerm(term) {
|
|
@@ -145,7 +127,7 @@ class LDContext {
|
|
|
145
127
|
}
|
|
146
128
|
}
|
|
147
129
|
static fromMappingSeq(mappings) {
|
|
148
|
-
return new LDContext(
|
|
130
|
+
return new LDContext((0, Collections_js_1.StringDictionary_ofSeq)(mappings));
|
|
149
131
|
}
|
|
150
132
|
static combine_InPlace(baseContext, specificContext) {
|
|
151
133
|
void (specificContext.BaseContexts.push(baseContext));
|
|
@@ -161,7 +143,7 @@ class LDContext {
|
|
|
161
143
|
ShallowCopy() {
|
|
162
144
|
const this$ = this;
|
|
163
145
|
const newMappings = new Map([]);
|
|
164
|
-
let enumerator = (0, Util_js_1.getEnumerator)(this$["mappings@
|
|
146
|
+
let enumerator = (0, Util_js_1.getEnumerator)(this$["mappings@45"]);
|
|
165
147
|
try {
|
|
166
148
|
while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
167
149
|
const kvp = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
@@ -171,12 +153,12 @@ class LDContext {
|
|
|
171
153
|
finally {
|
|
172
154
|
(0, Util_js_1.disposeSafe)(enumerator);
|
|
173
155
|
}
|
|
174
|
-
return new LDContext(newMappings, this$["baseContexts@
|
|
156
|
+
return new LDContext(newMappings, this$["baseContexts@41"]);
|
|
175
157
|
}
|
|
176
158
|
DeepCopy() {
|
|
177
159
|
const this$ = this;
|
|
178
160
|
const newMappings = new Map([]);
|
|
179
|
-
let enumerator = (0, Util_js_1.getEnumerator)(this$["mappings@
|
|
161
|
+
let enumerator = (0, Util_js_1.getEnumerator)(this$["mappings@45"]);
|
|
180
162
|
try {
|
|
181
163
|
while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
182
164
|
const kvp = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
@@ -187,7 +169,7 @@ class LDContext {
|
|
|
187
169
|
(0, Util_js_1.disposeSafe)(enumerator);
|
|
188
170
|
}
|
|
189
171
|
const newBaseContexts = [];
|
|
190
|
-
let enumerator_1 = (0, Util_js_1.getEnumerator)(this$["baseContexts@
|
|
172
|
+
let enumerator_1 = (0, Util_js_1.getEnumerator)(this$["baseContexts@41"]);
|
|
191
173
|
try {
|
|
192
174
|
while (enumerator_1["System.Collections.IEnumerator.MoveNext"]()) {
|
|
193
175
|
const ctx = enumerator_1["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
@@ -220,7 +202,7 @@ class LDContext {
|
|
|
220
202
|
let nameHash;
|
|
221
203
|
const matchValue = this$.Name;
|
|
222
204
|
nameHash = ((matchValue == null) ? 0 : (0, Util_js_1.stringHash)((0, Option_js_1.value)(matchValue)));
|
|
223
|
-
const baseContextsHash = ((this$["baseContexts@
|
|
205
|
+
const baseContextsHash = ((this$["baseContexts@41"].length === 0) ? 0 : (0, Seq_js_1.reduce)(HashCodes_js_1.mergeHashes, (0, Seq_js_1.map)(Util_js_1.safeHash, this$["baseContexts@41"]))) | 0;
|
|
224
206
|
return (0, HashCodes_js_1.mergeHashes)((0, HashCodes_js_1.mergeHashes)(mappingsHash, nameHash), baseContextsHash) | 0;
|
|
225
207
|
}
|
|
226
208
|
"System.ICloneable.Clone"() {
|
|
@@ -229,26 +211,70 @@ class LDContext {
|
|
|
229
211
|
}
|
|
230
212
|
addReverseMapping(key, value) {
|
|
231
213
|
const this$ = this;
|
|
232
|
-
|
|
214
|
+
const key_1 = value;
|
|
215
|
+
const value_1 = key;
|
|
216
|
+
const dict = this$.reverseMappings;
|
|
217
|
+
if (dict.has(key_1)) {
|
|
218
|
+
dict.set(key_1, value_1);
|
|
219
|
+
}
|
|
220
|
+
else {
|
|
221
|
+
(0, MapUtil_js_1.addToDict)(dict, key_1, value_1);
|
|
222
|
+
}
|
|
233
223
|
const activePatternResult = IRIHelper_$007CCompactIri$007C_$007C(value);
|
|
234
224
|
if (activePatternResult != null) {
|
|
235
225
|
const prefix = (0, Option_js_1.value)(activePatternResult)[0];
|
|
236
226
|
const suffix = (0, Option_js_1.value)(activePatternResult)[1];
|
|
237
|
-
|
|
238
|
-
const
|
|
227
|
+
const key_2 = prefix;
|
|
228
|
+
const value_2 = [suffix, key];
|
|
229
|
+
const dict_1 = this$.compactReverseMappings;
|
|
230
|
+
if (dict_1.has(key_2)) {
|
|
231
|
+
dict_1.set(key_2, value_2);
|
|
232
|
+
}
|
|
233
|
+
else {
|
|
234
|
+
(0, MapUtil_js_1.addToDict)(dict_1, key_2, value_2);
|
|
235
|
+
}
|
|
236
|
+
let matchValue;
|
|
237
|
+
let patternInput;
|
|
238
|
+
let outArg = (0, Util_js_1.defaultOf)();
|
|
239
|
+
patternInput = [(0, MapUtil_js_1.tryGetValue)(this$["mappings@45"], prefix, new Types_js_1.FSharpRef(() => outArg, (v) => {
|
|
240
|
+
outArg = v;
|
|
241
|
+
})), outArg];
|
|
242
|
+
matchValue = (patternInput[0] ? patternInput[1] : undefined);
|
|
239
243
|
if (matchValue == null) {
|
|
240
244
|
}
|
|
241
245
|
else {
|
|
242
|
-
|
|
246
|
+
const key_4 = IRIHelper_combine((0, Option_js_1.value)(matchValue), suffix);
|
|
247
|
+
const value_3 = key;
|
|
248
|
+
const dict_3 = this$.reverseMappings;
|
|
249
|
+
if (dict_3.has(key_4)) {
|
|
250
|
+
dict_3.set(key_4, value_3);
|
|
251
|
+
}
|
|
252
|
+
else {
|
|
253
|
+
(0, MapUtil_js_1.addToDict)(dict_3, key_4, value_3);
|
|
254
|
+
}
|
|
243
255
|
}
|
|
244
256
|
}
|
|
245
257
|
else {
|
|
246
|
-
|
|
258
|
+
let matchValue_1;
|
|
259
|
+
let patternInput_1;
|
|
260
|
+
let outArg_1 = (0, Util_js_1.defaultOf)();
|
|
261
|
+
patternInput_1 = [(0, MapUtil_js_1.tryGetValue)(this$.compactReverseMappings, key, new Types_js_1.FSharpRef(() => outArg_1, (v_2) => {
|
|
262
|
+
outArg_1 = v_2;
|
|
263
|
+
})), outArg_1];
|
|
264
|
+
matchValue_1 = (patternInput_1[0] ? patternInput_1[1] : undefined);
|
|
247
265
|
if (matchValue_1 == null) {
|
|
248
266
|
}
|
|
249
267
|
else {
|
|
250
268
|
const term = (0, Option_js_1.value)(matchValue_1)[1];
|
|
251
|
-
|
|
269
|
+
const key_6 = IRIHelper_combine(value, (0, Option_js_1.value)(matchValue_1)[0]);
|
|
270
|
+
const value_4 = term;
|
|
271
|
+
const dict_5 = this$.reverseMappings;
|
|
272
|
+
if (dict_5.has(key_6)) {
|
|
273
|
+
dict_5.set(key_6, value_4);
|
|
274
|
+
}
|
|
275
|
+
else {
|
|
276
|
+
(0, MapUtil_js_1.addToDict)(dict_5, key_6, value_4);
|
|
277
|
+
}
|
|
252
278
|
}
|
|
253
279
|
}
|
|
254
280
|
}
|
|
@@ -256,8 +282,14 @@ class LDContext {
|
|
|
256
282
|
let prefix, suffix, d;
|
|
257
283
|
const this$ = this;
|
|
258
284
|
let definition;
|
|
259
|
-
|
|
260
|
-
|
|
285
|
+
let matchValue;
|
|
286
|
+
let patternInput;
|
|
287
|
+
let outArg = (0, Util_js_1.defaultOf)();
|
|
288
|
+
patternInput = [(0, MapUtil_js_1.tryGetValue)(this$["mappings@45"], term, new Types_js_1.FSharpRef(() => outArg, (v) => {
|
|
289
|
+
outArg = v;
|
|
290
|
+
})), outArg];
|
|
291
|
+
matchValue = (patternInput[0] ? patternInput[1] : undefined);
|
|
292
|
+
definition = ((matchValue == null) ? (0, Seq_js_1.tryPick)((ctx) => ctx.TryResolveTerm(term), this$["baseContexts@41"]) : (0, Option_js_1.value)(matchValue));
|
|
261
293
|
if (definition == null) {
|
|
262
294
|
return undefined;
|
|
263
295
|
}
|
|
@@ -268,8 +300,14 @@ class LDContext {
|
|
|
268
300
|
}
|
|
269
301
|
tryFindIri(iri) {
|
|
270
302
|
const this$ = this;
|
|
271
|
-
|
|
272
|
-
|
|
303
|
+
let matchValue;
|
|
304
|
+
let patternInput;
|
|
305
|
+
let outArg = (0, Util_js_1.defaultOf)();
|
|
306
|
+
patternInput = [(0, MapUtil_js_1.tryGetValue)(this$.reverseMappings, iri, new Types_js_1.FSharpRef(() => outArg, (v) => {
|
|
307
|
+
outArg = v;
|
|
308
|
+
})), outArg];
|
|
309
|
+
matchValue = (patternInput[0] ? patternInput[1] : undefined);
|
|
310
|
+
return (matchValue == null) ? (0, Seq_js_1.tryPick)((ctx) => ctx.TryGetTerm(iri), this$["baseContexts@41"]) : (0, Option_js_1.value)(matchValue);
|
|
273
311
|
}
|
|
274
312
|
tryCompactIRI(iri) {
|
|
275
313
|
throw new Error("TryCompactIRI is Not implemented yet");
|