@nfdi4plants/arctrl 2.0.0-alpha.6 → 2.0.0-alpha.8
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/Core/Data.js +53 -4
- package/Core/DataContext.js +92 -0
- package/Core/Helper/Regex.js +26 -10
- package/Core/Helper/Url.js +38 -0
- package/Core/OntologyAnnotation.js +2 -1
- package/Core/Table/ArcTableAux.js +2 -2
- package/Core/Table/CompositeCell.js +4 -0
- package/Core/Table/DataMap.js +95 -82
- package/Json/Assay.js +51 -22
- package/Json/Comment.js +35 -6
- package/Json/IDTable.js +19 -0
- package/Json/Investigation.js +22 -5
- package/Json/OntologyAnnotation.js +61 -6
- package/Json/OntologySourceReference.js +29 -7
- package/Json/Person.js +38 -16
- package/Json/Process/AssayMaterials.js +2 -2
- package/Json/Process/Component.js +19 -5
- package/Json/Process/Data.js +23 -7
- package/Json/Process/DataFile.js +9 -0
- package/Json/Process/Factor.js +33 -6
- package/Json/Process/FactorValue.js +23 -6
- package/Json/Process/Material.js +22 -5
- package/Json/Process/MaterialAttribute.js +30 -7
- package/Json/Process/MaterialAttributeValue.js +27 -6
- package/Json/Process/MaterialType.js +5 -0
- package/Json/Process/Process.js +22 -5
- package/Json/Process/ProcessInput.js +13 -7
- package/Json/Process/ProcessOutput.js +16 -6
- package/Json/Process/ProcessParameterValue.js +18 -4
- package/Json/Process/ProcessSequence.js +4 -2
- package/Json/Process/PropertyValue.js +29 -4
- package/Json/Process/Protocol.js +88 -52
- package/Json/Process/ProtocolParameter.js +28 -6
- package/Json/Process/Sample.js +23 -7
- package/Json/Process/Source.js +23 -6
- package/Json/Process/StudyMaterials.js +2 -2
- package/Json/Process/Value.js +3 -3
- package/Json/Publication.js +21 -8
- package/Json/Study.js +86 -56
- package/Json/Table/CellTable.js +4 -1
- package/Json/Table/Templates.js +10 -2
- package/Json.js +9 -9
- package/Spreadsheet/DataMapTable/DataMapColumn.js +36 -30
- package/Spreadsheet/DataMapTable/DataMapHeader.js +146 -122
- package/Spreadsheet/DataMapTable/DataMapTable.js +17 -12
- package/Template.Web.js +1 -1
- package/fable_modules/project_cracked.json +1 -1
- package/package.json +1 -1
package/Json/Process/Data.js
CHANGED
|
@@ -6,13 +6,14 @@ import { DataFile_ROCrate_decoder, DataFile_ROCrate_encoder, DataFile_ISAJson_de
|
|
|
6
6
|
import { Comment_ISAJson_decoder, Comment_ISAJson_encoder, Comment_ROCrate_decoder, Comment_ROCrate_encoder, Comment_decoder, Comment_encoder } from "../Comment.js";
|
|
7
7
|
import { string, object } from "../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
8
8
|
import { Data } from "../../Core/Data.js";
|
|
9
|
-
import { unwrap } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
9
|
+
import { defaultArg, unwrap } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
10
10
|
import { Decode_objectNoAdditionalProperties, Decode_resizeArray, Decode_uri } from "../Decode.js";
|
|
11
11
|
import { decodeString, encodeString } from "../StringTable.js";
|
|
12
12
|
import { printf, toText, replace } from "../../fable_modules/fable-library-js.4.16.0/String.js";
|
|
13
13
|
import { URIModule_toString } from "../../Core/URI.js";
|
|
14
14
|
import { list as list_1 } from "../../fable_modules/Thoth.Json.Core.0.2.1/Encode.fs.js";
|
|
15
15
|
import { context_jsonvalue } from "../context/rocrate/isa_data_context.js";
|
|
16
|
+
import { encode } from "../IDTable.js";
|
|
16
17
|
import { fromString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
|
|
17
18
|
import { toString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
|
|
18
19
|
|
|
@@ -85,8 +86,8 @@ export const Data_ROCrate_decoder = object((get$) => {
|
|
|
85
86
|
return new Data(unwrap((objectArg = get$.Optional, objectArg.Field("@id", Decode_uri))), unwrap((objectArg_1 = get$.Optional, objectArg_1.Field("name", string))), unwrap((objectArg_2 = get$.Optional, objectArg_2.Field("type", DataFile_ROCrate_decoder))), unwrap((objectArg_3 = get$.Optional, objectArg_3.Field("encodingFormat", string))), unwrap((objectArg_4 = get$.Optional, objectArg_4.Field("usageInfo", Decode_uri))), unwrap((arg_11 = Decode_resizeArray(Comment_ROCrate_decoder), (objectArg_5 = get$.Optional, objectArg_5.Field("comments", arg_11)))));
|
|
86
87
|
});
|
|
87
88
|
|
|
88
|
-
export function Data_ISAJson_encoder(oa) {
|
|
89
|
-
|
|
89
|
+
export function Data_ISAJson_encoder(idMap, oa) {
|
|
90
|
+
const f = (oa_1) => (new Json(5, [choose((tupledArg) => {
|
|
90
91
|
const v = tupledArg[1];
|
|
91
92
|
if (equals(v, new Json(3, []))) {
|
|
92
93
|
return void 0;
|
|
@@ -94,7 +95,13 @@ export function Data_ISAJson_encoder(oa) {
|
|
|
94
95
|
else {
|
|
95
96
|
return [tupledArg[0], v];
|
|
96
97
|
}
|
|
97
|
-
}, ofArray([tryInclude("@id", (value) => (new Json(0, [value])),
|
|
98
|
+
}, ofArray([tryInclude("@id", (value) => (new Json(0, [value])), Data_ROCrate_genID(oa_1)), tryInclude("name", (value_2) => (new Json(0, [value_2])), oa_1.Name), tryInclude("type", DataFile_ISAJson_encoder, oa_1.DataType), tryIncludeSeq("comments", (comment) => Comment_ISAJson_encoder(idMap, comment), oa_1.Comments)]))]));
|
|
99
|
+
if (idMap != null) {
|
|
100
|
+
return encode(Data_ROCrate_genID, f, oa, idMap);
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
return f(oa);
|
|
104
|
+
}
|
|
98
105
|
}
|
|
99
106
|
|
|
100
107
|
export const Data_ISAJson_allowedFields = ofArray(["@id", "name", "type", "comments", "@type", "@context"]);
|
|
@@ -114,13 +121,18 @@ export function ARCtrl_Data__Data_fromISAJsonString_Static_Z721C83C5(s) {
|
|
|
114
121
|
}
|
|
115
122
|
}
|
|
116
123
|
|
|
117
|
-
export function
|
|
124
|
+
export function ARCtrl_Data__Data_toISAJsonString_Static_Z3B036AA(spaces, useIDReferencing) {
|
|
125
|
+
const idMap = defaultArg(useIDReferencing, false) ? (new Map([])) : void 0;
|
|
118
126
|
return (f) => {
|
|
119
|
-
const
|
|
120
|
-
return toString(defaultSpaces(spaces),
|
|
127
|
+
const value_1 = Data_ISAJson_encoder(idMap, f);
|
|
128
|
+
return toString(defaultSpaces(spaces), value_1);
|
|
121
129
|
};
|
|
122
130
|
}
|
|
123
131
|
|
|
132
|
+
export function ARCtrl_Data__Data_toISAJsonString_Z3B036AA(this$, spaces, useIDReferencing) {
|
|
133
|
+
return ARCtrl_Data__Data_toISAJsonString_Static_Z3B036AA(unwrap(spaces), unwrap(useIDReferencing))(this$);
|
|
134
|
+
}
|
|
135
|
+
|
|
124
136
|
export function ARCtrl_Data__Data_fromROCrateJsonString_Static_Z721C83C5(s) {
|
|
125
137
|
const matchValue = fromString(Data_ROCrate_decoder, s);
|
|
126
138
|
if (matchValue.tag === 1) {
|
|
@@ -138,3 +150,7 @@ export function ARCtrl_Data__Data_toROCrateJsonString_Static_71136F3F(spaces) {
|
|
|
138
150
|
};
|
|
139
151
|
}
|
|
140
152
|
|
|
153
|
+
export function ARCtrl_Data__Data_toROCrateJsonString_71136F3F(this$, spaces) {
|
|
154
|
+
return ARCtrl_Data__Data_toROCrateJsonString_Static_71136F3F(unwrap(spaces))(this$);
|
|
155
|
+
}
|
|
156
|
+
|
package/Json/Process/DataFile.js
CHANGED
|
@@ -6,6 +6,7 @@ import { fromString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Deco
|
|
|
6
6
|
import { printf, toText } from "../../fable_modules/fable-library-js.4.16.0/String.js";
|
|
7
7
|
import { toString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
|
|
8
8
|
import { defaultSpaces } from "../Encode.js";
|
|
9
|
+
import { unwrap } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
9
10
|
|
|
10
11
|
export function DataFile_ROCrate_encoder(value) {
|
|
11
12
|
switch (value.tag) {
|
|
@@ -62,6 +63,10 @@ export function ARCtrl_DataFile__DataFile_toISAJsonString_Static_71136F3F(spaces
|
|
|
62
63
|
};
|
|
63
64
|
}
|
|
64
65
|
|
|
66
|
+
export function ARCtrl_DataFile__DataFile_ToISAJsonString_71136F3F(this$, spaces) {
|
|
67
|
+
return ARCtrl_DataFile__DataFile_toISAJsonString_Static_71136F3F(unwrap(spaces))(this$);
|
|
68
|
+
}
|
|
69
|
+
|
|
65
70
|
export function ARCtrl_DataFile__DataFile_fromROCrateJsonString_Static_Z721C83C5(s) {
|
|
66
71
|
const matchValue = fromString(DataFile_ROCrate_decoder, s);
|
|
67
72
|
if (matchValue.tag === 1) {
|
|
@@ -79,3 +84,7 @@ export function ARCtrl_DataFile__DataFile_toROCrateJsonString_Static_71136F3F(sp
|
|
|
79
84
|
};
|
|
80
85
|
}
|
|
81
86
|
|
|
87
|
+
export function ARCtrl_DataFile__DataFile_ToROCrateJsonString_71136F3F(this$, spaces) {
|
|
88
|
+
return ARCtrl_DataFile__DataFile_toROCrateJsonString_Static_71136F3F(unwrap(spaces))(this$);
|
|
89
|
+
}
|
|
90
|
+
|
package/Json/Process/Factor.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { OntologyAnnotation_ISAJson_decoder, OntologyAnnotation_ISAJson_encoder, OntologyAnnotation_ROCrate_genID } from "../OntologyAnnotation.js";
|
|
1
2
|
import { ofArray, choose } from "../../fable_modules/fable-library-js.4.16.0/List.js";
|
|
2
3
|
import { equals } from "../../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
3
4
|
import { Json } from "../../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
|
|
4
5
|
import { defaultSpaces, tryIncludeSeq, tryInclude } from "../Encode.js";
|
|
5
|
-
import { OntologyAnnotation_ISAJson_decoder, OntologyAnnotation_ISAJson_encoder } from "../OntologyAnnotation.js";
|
|
6
6
|
import { Comment_ISAJson_decoder, Comment_ISAJson_encoder } from "../Comment.js";
|
|
7
|
-
import { defaultArg } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
7
|
+
import { unwrap, defaultArg } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
8
|
+
import { encode } from "../IDTable.js";
|
|
8
9
|
import { string, object } from "../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
9
10
|
import { Decode_resizeArray } from "../Decode.js";
|
|
10
11
|
import { Factor } from "../../Core/Process/Factor.js";
|
|
@@ -12,8 +13,24 @@ import { fromString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Deco
|
|
|
12
13
|
import { printf, toText } from "../../fable_modules/fable-library-js.4.16.0/String.js";
|
|
13
14
|
import { toString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
|
|
14
15
|
|
|
15
|
-
export function
|
|
16
|
-
|
|
16
|
+
export function Factor_ISAJson_genID(f) {
|
|
17
|
+
const matchValue = f.Name;
|
|
18
|
+
if (matchValue == null) {
|
|
19
|
+
const matchValue_1 = f.FactorType;
|
|
20
|
+
if (matchValue_1 == null) {
|
|
21
|
+
return "#EmptyFactor";
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
return `#Factor/${OntologyAnnotation_ROCrate_genID(matchValue_1)}`;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
return `#Factor/${matchValue}`;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function Factor_ISAJson_encoder(idMap, value) {
|
|
33
|
+
const f_1 = (value_1) => (new Json(5, [choose((tupledArg) => {
|
|
17
34
|
const v = tupledArg[1];
|
|
18
35
|
if (equals(v, new Json(3, []))) {
|
|
19
36
|
return void 0;
|
|
@@ -21,7 +38,13 @@ export function Factor_ISAJson_encoder(value) {
|
|
|
21
38
|
else {
|
|
22
39
|
return [tupledArg[0], v];
|
|
23
40
|
}
|
|
24
|
-
}, ofArray([tryInclude("
|
|
41
|
+
}, ofArray([tryInclude("@id", (value_2) => (new Json(0, [value_2])), Factor_ISAJson_genID(value_1)), tryInclude("factorName", (value_4) => (new Json(0, [value_4])), value_1.Name), tryInclude("factorType", (oa) => OntologyAnnotation_ISAJson_encoder(idMap, oa), value_1.FactorType), tryIncludeSeq("comments", (comment) => Comment_ISAJson_encoder(idMap, comment), defaultArg(value_1.Comments, []))]))]));
|
|
42
|
+
if (idMap != null) {
|
|
43
|
+
return encode(Factor_ISAJson_genID, f_1, value, idMap);
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
return f_1(value);
|
|
47
|
+
}
|
|
25
48
|
}
|
|
26
49
|
|
|
27
50
|
export const Factor_ISAJson_decoder = object((get$) => {
|
|
@@ -41,8 +64,12 @@ export function ARCtrl_Process_Factor__Factor_fromISAJsonString_Static_Z721C83C5
|
|
|
41
64
|
|
|
42
65
|
export function ARCtrl_Process_Factor__Factor_toISAJsonString_Static_71136F3F(spaces) {
|
|
43
66
|
return (f) => {
|
|
44
|
-
const value = Factor_ISAJson_encoder(f);
|
|
67
|
+
const value = Factor_ISAJson_encoder(void 0, f);
|
|
45
68
|
return toString(defaultSpaces(spaces), value);
|
|
46
69
|
};
|
|
47
70
|
}
|
|
48
71
|
|
|
72
|
+
export function ARCtrl_Process_Factor__Factor_ToISAJsonString_71136F3F(this$, spaces) {
|
|
73
|
+
return ARCtrl_Process_Factor__Factor_toISAJsonString_Static_71136F3F(unwrap(spaces))(this$);
|
|
74
|
+
}
|
|
75
|
+
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { decoder as decoder_1, encoder } from "./PropertyValue.js";
|
|
1
|
+
import { genID, decoder as decoder_1, encoder } from "./PropertyValue.js";
|
|
2
2
|
import { FactorValue, FactorValue_createAsPV } from "../../Core/Process/FactorValue.js";
|
|
3
3
|
import { ofArray, choose } from "../../fable_modules/fable-library-js.4.16.0/List.js";
|
|
4
4
|
import { equals } from "../../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
@@ -7,18 +7,24 @@ import { defaultSpaces, tryInclude } from "../Encode.js";
|
|
|
7
7
|
import { Factor_ISAJson_decoder, Factor_ISAJson_encoder } from "./Factor.js";
|
|
8
8
|
import { Value_ISAJson_decoder, Value_ISAJson_encoder } from "./Value.js";
|
|
9
9
|
import { OntologyAnnotation_ISAJson_decoder, OntologyAnnotation_ISAJson_encoder } from "../OntologyAnnotation.js";
|
|
10
|
+
import { encode } from "../IDTable.js";
|
|
10
11
|
import { object } from "../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
11
12
|
import { Decode_uri } from "../Decode.js";
|
|
12
13
|
import { fromString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
|
|
13
14
|
import { printf, toText } from "../../fable_modules/fable-library-js.4.16.0/String.js";
|
|
15
|
+
import { unwrap, defaultArg } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
14
16
|
import { toString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
|
|
15
17
|
|
|
16
18
|
export const FactorValue_ROCrate_encoder = encoder;
|
|
17
19
|
|
|
18
20
|
export const FactorValue_ROCrate_decoder = decoder_1(FactorValue_createAsPV);
|
|
19
21
|
|
|
20
|
-
export function
|
|
21
|
-
return
|
|
22
|
+
export function FactorValue_ISAJson_genID(fv) {
|
|
23
|
+
return genID(fv);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function FactorValue_ISAJson_encoder(idMap, fv) {
|
|
27
|
+
const f = (fv_1) => (new Json(5, [choose((tupledArg) => {
|
|
22
28
|
const v = tupledArg[1];
|
|
23
29
|
if (equals(v, new Json(3, []))) {
|
|
24
30
|
return void 0;
|
|
@@ -26,7 +32,13 @@ export function FactorValue_ISAJson_encoder(fv) {
|
|
|
26
32
|
else {
|
|
27
33
|
return [tupledArg[0], v];
|
|
28
34
|
}
|
|
29
|
-
}, ofArray([tryInclude("@id", (value) => (new Json(0, [value])),
|
|
35
|
+
}, ofArray([tryInclude("@id", (value) => (new Json(0, [value])), FactorValue_ISAJson_genID(fv_1)), tryInclude("category", (value_2) => Factor_ISAJson_encoder(idMap, value_2), fv_1.Category), tryInclude("value", (value_3) => Value_ISAJson_encoder(idMap, value_3), fv_1.Value), tryInclude("unit", (oa) => OntologyAnnotation_ISAJson_encoder(idMap, oa), fv_1.Unit)]))]));
|
|
36
|
+
if (idMap != null) {
|
|
37
|
+
return encode(FactorValue_ISAJson_genID, f, fv, idMap);
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
return f(fv);
|
|
41
|
+
}
|
|
30
42
|
}
|
|
31
43
|
|
|
32
44
|
export const FactorValue_ISAJson_decoder = object((get$) => {
|
|
@@ -44,10 +56,15 @@ export function ARCtrl_Process_FactorValue__FactorValue_fromISAJsonString_Static
|
|
|
44
56
|
}
|
|
45
57
|
}
|
|
46
58
|
|
|
47
|
-
export function
|
|
59
|
+
export function ARCtrl_Process_FactorValue__FactorValue_toISAJsonString_Static_Z3B036AA(spaces, useIDReferencing) {
|
|
60
|
+
const idMap = defaultArg(useIDReferencing, false) ? (new Map([])) : void 0;
|
|
48
61
|
return (f) => {
|
|
49
|
-
const value = FactorValue_ISAJson_encoder(f);
|
|
62
|
+
const value = FactorValue_ISAJson_encoder(idMap, f);
|
|
50
63
|
return toString(defaultSpaces(spaces), value);
|
|
51
64
|
};
|
|
52
65
|
}
|
|
53
66
|
|
|
67
|
+
export function ARCtrl_Process_FactorValue__FactorValue_ToISAJsonString_Z3B036AA(this$, spaces, useIDReferencing) {
|
|
68
|
+
return ARCtrl_Process_FactorValue__FactorValue_toISAJsonString_Static_Z3B036AA(unwrap(spaces), unwrap(useIDReferencing))(this$);
|
|
69
|
+
}
|
|
70
|
+
|
package/Json/Process/Material.js
CHANGED
|
@@ -10,7 +10,9 @@ import { context_jsonvalue } from "../context/rocrate/isa_material_context.js";
|
|
|
10
10
|
import { list as list_2, string, object } from "../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
11
11
|
import { Decode_objectNoAdditionalProperties, Decode_uri } from "../Decode.js";
|
|
12
12
|
import { Material } from "../../Core/Process/Material.js";
|
|
13
|
+
import { encode } from "../IDTable.js";
|
|
13
14
|
import { fromString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
|
|
15
|
+
import { unwrap, defaultArg } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
14
16
|
import { toString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
|
|
15
17
|
|
|
16
18
|
export function Material_ROCrate_genID(m) {
|
|
@@ -49,8 +51,8 @@ export const Material_ROCrate_decoder = (() => {
|
|
|
49
51
|
return decode();
|
|
50
52
|
})();
|
|
51
53
|
|
|
52
|
-
export function Material_ISAJson_encoder(
|
|
53
|
-
|
|
54
|
+
export function Material_ISAJson_encoder(idMap, c) {
|
|
55
|
+
const f = (oa) => (new Json(5, [choose((tupledArg) => {
|
|
54
56
|
const v = tupledArg[1];
|
|
55
57
|
if (equals(v, new Json(3, []))) {
|
|
56
58
|
return void 0;
|
|
@@ -58,7 +60,13 @@ export function Material_ISAJson_encoder(oa) {
|
|
|
58
60
|
else {
|
|
59
61
|
return [tupledArg[0], v];
|
|
60
62
|
}
|
|
61
|
-
}, ofArray([tryInclude("@id", (value) => (new Json(0, [value])), oa
|
|
63
|
+
}, ofArray([tryInclude("@id", (value) => (new Json(0, [value])), Material_ROCrate_genID(oa)), tryInclude("name", (value_2) => (new Json(0, [value_2])), oa.Name), tryInclude("type", MaterialType_ISAJson_encoder, oa.MaterialType), tryIncludeListOpt("characteristics", (oa_1) => MaterialAttributeValue_ISAJson_encoder(idMap, oa_1), oa.Characteristics), tryIncludeListOpt("derivesFrom", (c_1) => Material_ISAJson_encoder(idMap, c_1), oa.DerivesFrom)]))]));
|
|
64
|
+
if (idMap != null) {
|
|
65
|
+
return encode(Material_ROCrate_genID, f, c, idMap);
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
return f(c);
|
|
69
|
+
}
|
|
62
70
|
}
|
|
63
71
|
|
|
64
72
|
export const Material_ISAJson_allowedFields = ofArray(["@id", "@type", "name", "type", "characteristics", "derivesFrom", "@context"]);
|
|
@@ -81,13 +89,18 @@ export function ARCtrl_Process_Material__Material_fromISAJsonString_Static_Z721C
|
|
|
81
89
|
}
|
|
82
90
|
}
|
|
83
91
|
|
|
84
|
-
export function
|
|
92
|
+
export function ARCtrl_Process_Material__Material_toISAJsonString_Static_Z3B036AA(spaces, useIDReferencing) {
|
|
93
|
+
const idMap = defaultArg(useIDReferencing, false) ? (new Map([])) : void 0;
|
|
85
94
|
return (f) => {
|
|
86
|
-
const value = Material_ISAJson_encoder(f);
|
|
95
|
+
const value = Material_ISAJson_encoder(idMap, f);
|
|
87
96
|
return toString(defaultSpaces(spaces), value);
|
|
88
97
|
};
|
|
89
98
|
}
|
|
90
99
|
|
|
100
|
+
export function ARCtrl_Process_Material__Material_ToISAJsonString_Z3B036AA(this$, spaces, useIDReferencing) {
|
|
101
|
+
return ARCtrl_Process_Material__Material_toISAJsonString_Static_Z3B036AA(unwrap(spaces), unwrap(useIDReferencing))(this$);
|
|
102
|
+
}
|
|
103
|
+
|
|
91
104
|
export function ARCtrl_Process_Material__Material_fromROCrateJsonString_Static_Z721C83C5(s) {
|
|
92
105
|
const matchValue = fromString(Material_ROCrate_decoder, s);
|
|
93
106
|
if (matchValue.tag === 1) {
|
|
@@ -105,3 +118,7 @@ export function ARCtrl_Process_Material__Material_toROCrateJsonString_Static_711
|
|
|
105
118
|
};
|
|
106
119
|
}
|
|
107
120
|
|
|
121
|
+
export function ARCtrl_Process_Material__Material_ToROCrateJsonString_71136F3F(this$, spaces) {
|
|
122
|
+
return ARCtrl_Process_Material__Material_toROCrateJsonString_Static_71136F3F(unwrap(spaces))(this$);
|
|
123
|
+
}
|
|
124
|
+
|
|
@@ -1,16 +1,28 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OntologyAnnotation_ISAJson_decoder, OntologyAnnotation_ISAJson_encoder, OntologyAnnotation_ROCrate_genID } from "../OntologyAnnotation.js";
|
|
2
|
+
import { ofArray, choose } from "../../fable_modules/fable-library-js.4.16.0/List.js";
|
|
2
3
|
import { equals } from "../../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
3
4
|
import { Json } from "../../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
|
|
4
5
|
import { defaultSpaces, tryInclude } from "../Encode.js";
|
|
5
|
-
import {
|
|
6
|
+
import { encode } from "../IDTable.js";
|
|
6
7
|
import { object } from "../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
7
8
|
import { MaterialAttribute } from "../../Core/Process/MaterialAttribute.js";
|
|
8
9
|
import { fromString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
|
|
9
10
|
import { printf, toText } from "../../fable_modules/fable-library-js.4.16.0/String.js";
|
|
11
|
+
import { unwrap, defaultArg } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
10
12
|
import { toString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
|
|
11
13
|
|
|
12
|
-
export function
|
|
13
|
-
|
|
14
|
+
export function MaterialAttribute_ISAJson_genID(m) {
|
|
15
|
+
const matchValue = m.CharacteristicType;
|
|
16
|
+
if (matchValue == null) {
|
|
17
|
+
return "#EmptyFactor";
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
return `#MaterialAttribute/${OntologyAnnotation_ROCrate_genID(matchValue)}`;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function MaterialAttribute_ISAJson_encoder(idMap, value) {
|
|
25
|
+
const f = (value_1) => (new Json(5, [choose((tupledArg) => {
|
|
14
26
|
const v = tupledArg[1];
|
|
15
27
|
if (equals(v, new Json(3, []))) {
|
|
16
28
|
return void 0;
|
|
@@ -18,7 +30,13 @@ export function MaterialAttribute_ISAJson_encoder(value) {
|
|
|
18
30
|
else {
|
|
19
31
|
return [tupledArg[0], v];
|
|
20
32
|
}
|
|
21
|
-
},
|
|
33
|
+
}, ofArray([tryInclude("@id", (value_2) => (new Json(0, [value_2])), MaterialAttribute_ISAJson_genID(value_1)), tryInclude("characteristicType", (oa) => OntologyAnnotation_ISAJson_encoder(idMap, oa), value_1.CharacteristicType)]))]));
|
|
34
|
+
if (idMap != null) {
|
|
35
|
+
return encode(MaterialAttribute_ISAJson_genID, f, value, idMap);
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
return f(value);
|
|
39
|
+
}
|
|
22
40
|
}
|
|
23
41
|
|
|
24
42
|
export const MaterialAttribute_ISAJson_decoder = object((get$) => {
|
|
@@ -36,10 +54,15 @@ export function ARCtrl_Process_MaterialAttribute__MaterialAttribute_fromISAJsonS
|
|
|
36
54
|
}
|
|
37
55
|
}
|
|
38
56
|
|
|
39
|
-
export function
|
|
57
|
+
export function ARCtrl_Process_MaterialAttribute__MaterialAttribute_toISAJsonString_Static_Z3B036AA(spaces, useIDReferencing) {
|
|
58
|
+
const idMap = defaultArg(useIDReferencing, false) ? (new Map([])) : void 0;
|
|
40
59
|
return (v) => {
|
|
41
|
-
const value = MaterialAttribute_ISAJson_encoder(v);
|
|
60
|
+
const value = MaterialAttribute_ISAJson_encoder(idMap, v);
|
|
42
61
|
return toString(defaultSpaces(spaces), value);
|
|
43
62
|
};
|
|
44
63
|
}
|
|
45
64
|
|
|
65
|
+
export function ARCtrl_Process_MaterialAttribute__MaterialAttribute_ToJsonString_Z3B036AA(this$, spaces, useIDReferencing) {
|
|
66
|
+
return ARCtrl_Process_MaterialAttribute__MaterialAttribute_toISAJsonString_Static_Z3B036AA(unwrap(spaces), unwrap(useIDReferencing))(this$);
|
|
67
|
+
}
|
|
68
|
+
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { decoder as decoder_1, encoder } from "./PropertyValue.js";
|
|
1
|
+
import { genID, decoder as decoder_1, encoder } from "./PropertyValue.js";
|
|
2
2
|
import { MaterialAttributeValue, MaterialAttributeValue_createAsPV } from "../../Core/Process/MaterialAttributeValue.js";
|
|
3
3
|
import { ofArray, choose } from "../../fable_modules/fable-library-js.4.16.0/List.js";
|
|
4
4
|
import { equals } from "../../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
@@ -7,18 +7,24 @@ import { defaultSpaces, tryInclude } from "../Encode.js";
|
|
|
7
7
|
import { MaterialAttribute_ISAJson_decoder, MaterialAttribute_ISAJson_encoder } from "./MaterialAttribute.js";
|
|
8
8
|
import { Value_ISAJson_decoder, Value_ISAJson_encoder } from "./Value.js";
|
|
9
9
|
import { OntologyAnnotation_ISAJson_decoder, OntologyAnnotation_ISAJson_encoder } from "../OntologyAnnotation.js";
|
|
10
|
+
import { encode } from "../IDTable.js";
|
|
10
11
|
import { object } from "../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
11
12
|
import { Decode_uri } from "../Decode.js";
|
|
12
13
|
import { fromString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
|
|
13
14
|
import { printf, toText } from "../../fable_modules/fable-library-js.4.16.0/String.js";
|
|
15
|
+
import { unwrap, defaultArg } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
14
16
|
import { toString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
|
|
15
17
|
|
|
16
18
|
export const MaterialAttributeValue_ROCrate_encoder = encoder;
|
|
17
19
|
|
|
18
20
|
export const MaterialAttributeValue_ROCrate_decoder = decoder_1(MaterialAttributeValue_createAsPV);
|
|
19
21
|
|
|
20
|
-
export function
|
|
21
|
-
return
|
|
22
|
+
export function MaterialAttributeValue_ISAJson_genID(oa) {
|
|
23
|
+
return genID(oa);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function MaterialAttributeValue_ISAJson_encoder(idMap, oa) {
|
|
27
|
+
const f = (oa_1) => (new Json(5, [choose((tupledArg) => {
|
|
22
28
|
const v = tupledArg[1];
|
|
23
29
|
if (equals(v, new Json(3, []))) {
|
|
24
30
|
return void 0;
|
|
@@ -26,7 +32,13 @@ export function MaterialAttributeValue_ISAJson_encoder(oa) {
|
|
|
26
32
|
else {
|
|
27
33
|
return [tupledArg[0], v];
|
|
28
34
|
}
|
|
29
|
-
}, ofArray([tryInclude("@id", (value) => (new Json(0, [value])),
|
|
35
|
+
}, ofArray([tryInclude("@id", (value) => (new Json(0, [value])), MaterialAttributeValue_ISAJson_genID(oa_1)), tryInclude("category", (value_2) => MaterialAttribute_ISAJson_encoder(idMap, value_2), oa_1.Category), tryInclude("value", (value_3) => Value_ISAJson_encoder(idMap, value_3), oa_1.Value), tryInclude("unit", (oa_3) => OntologyAnnotation_ISAJson_encoder(idMap, oa_3), oa_1.Unit)]))]));
|
|
36
|
+
if (idMap != null) {
|
|
37
|
+
return encode(MaterialAttributeValue_ISAJson_genID, f, oa, idMap);
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
return f(oa);
|
|
41
|
+
}
|
|
30
42
|
}
|
|
31
43
|
|
|
32
44
|
export const MaterialAttributeValue_ISAJson_decoder = object((get$) => {
|
|
@@ -44,13 +56,18 @@ export function ARCtrl_Process_MaterialAttributeValue__MaterialAttributeValue_fr
|
|
|
44
56
|
}
|
|
45
57
|
}
|
|
46
58
|
|
|
47
|
-
export function
|
|
59
|
+
export function ARCtrl_Process_MaterialAttributeValue__MaterialAttributeValue_toISAJsonString_Static_Z3B036AA(spaces, useIDReferencing) {
|
|
60
|
+
const idMap = defaultArg(useIDReferencing, false) ? (new Map([])) : void 0;
|
|
48
61
|
return (f) => {
|
|
49
|
-
const value = MaterialAttributeValue_ISAJson_encoder(f);
|
|
62
|
+
const value = MaterialAttributeValue_ISAJson_encoder(idMap, f);
|
|
50
63
|
return toString(defaultSpaces(spaces), value);
|
|
51
64
|
};
|
|
52
65
|
}
|
|
53
66
|
|
|
67
|
+
export function ARCtrl_Process_MaterialAttributeValue__MaterialAttributeValue_ToISAJsonString_Z3B036AA(this$, spaces, useIDReferencing) {
|
|
68
|
+
return ARCtrl_Process_MaterialAttributeValue__MaterialAttributeValue_toISAJsonString_Static_Z3B036AA(unwrap(spaces), unwrap(useIDReferencing))(this$);
|
|
69
|
+
}
|
|
70
|
+
|
|
54
71
|
export function ARCtrl_Process_MaterialAttributeValue__MaterialAttributeValue_fromROCrateJsonString_Static_Z721C83C5(s) {
|
|
55
72
|
const matchValue = fromString(MaterialAttributeValue_ROCrate_decoder, s);
|
|
56
73
|
if (matchValue.tag === 1) {
|
|
@@ -68,3 +85,7 @@ export function ARCtrl_Process_MaterialAttributeValue__MaterialAttributeValue_to
|
|
|
68
85
|
};
|
|
69
86
|
}
|
|
70
87
|
|
|
88
|
+
export function ARCtrl_Process_MaterialAttributeValue__MaterialAttributeValue_ToROCrateJsonString_71136F3F(this$, spaces) {
|
|
89
|
+
return ARCtrl_Process_MaterialAttributeValue__MaterialAttributeValue_toROCrateJsonString_Static_71136F3F(unwrap(spaces))(this$);
|
|
90
|
+
}
|
|
91
|
+
|
|
@@ -6,6 +6,7 @@ import { fromString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Deco
|
|
|
6
6
|
import { printf, toText } from "../../fable_modules/fable-library-js.4.16.0/String.js";
|
|
7
7
|
import { toString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
|
|
8
8
|
import { defaultSpaces } from "../Encode.js";
|
|
9
|
+
import { unwrap } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
9
10
|
|
|
10
11
|
export function MaterialType_ROCrate_encoder(value) {
|
|
11
12
|
if (value.tag === 1) {
|
|
@@ -58,3 +59,7 @@ export function ARCtrl_Process_MaterialType__MaterialType_toISAJsonString_Static
|
|
|
58
59
|
};
|
|
59
60
|
}
|
|
60
61
|
|
|
62
|
+
export function ARCtrl_Process_MaterialType__MaterialType_ToISAJsonString_71136F3F(this$, spaces) {
|
|
63
|
+
return ARCtrl_Process_MaterialType__MaterialType_toISAJsonString_Static_71136F3F(unwrap(spaces))(this$);
|
|
64
|
+
}
|
|
65
|
+
|
package/Json/Process/Process.js
CHANGED
|
@@ -15,7 +15,9 @@ import { context_jsonvalue } from "../context/rocrate/isa_process_context.js";
|
|
|
15
15
|
import { list as list_2, string, object } from "../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
16
16
|
import { Decode_uri } from "../Decode.js";
|
|
17
17
|
import { Process } from "../../Core/Process/Process.js";
|
|
18
|
+
import { encode } from "../IDTable.js";
|
|
18
19
|
import { fromString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
|
|
20
|
+
import { unwrap, defaultArg } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
19
21
|
import { toString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
|
|
20
22
|
|
|
21
23
|
export function Process_ROCrate_genID(p) {
|
|
@@ -51,8 +53,8 @@ export const Process_ROCrate_decoder = object((get$) => {
|
|
|
51
53
|
return new Process((objectArg = get$.Optional, objectArg.Field("@id", Decode_uri)), (objectArg_1 = get$.Optional, objectArg_1.Field("name", string)), (objectArg_2 = get$.Optional, objectArg_2.Field("executesProtocol", Protocol_ROCrate_decoder)), (arg_7 = list_2(ProcessParameterValue_ROCrate_decoder), (objectArg_3 = get$.Optional, objectArg_3.Field("parameterValues", arg_7))), (objectArg_4 = get$.Optional, objectArg_4.Field("performer", Person_ROCrate_decodeAuthorListString)), (objectArg_5 = get$.Optional, objectArg_5.Field("date", string)), void 0, void 0, (arg_13 = list_2(ProcessInput_ROCrate_decoder), (objectArg_6 = get$.Optional, objectArg_6.Field("inputs", arg_13))), (arg_15 = list_2(ProcessOutput_ROCrate_decoder), (objectArg_7 = get$.Optional, objectArg_7.Field("outputs", arg_15))), (arg_17 = list_2(Comment_ROCrate_decoder), (objectArg_8 = get$.Optional, objectArg_8.Field("comments", arg_17))));
|
|
52
54
|
});
|
|
53
55
|
|
|
54
|
-
export function Process_ISAJson_encoder(oa) {
|
|
55
|
-
|
|
56
|
+
export function Process_ISAJson_encoder(studyName, assayName, idMap, oa) {
|
|
57
|
+
const f = (oa_1) => (new Json(5, [choose((tupledArg) => {
|
|
56
58
|
const v = tupledArg[1];
|
|
57
59
|
if (equals(v, new Json(3, []))) {
|
|
58
60
|
return void 0;
|
|
@@ -60,7 +62,13 @@ export function Process_ISAJson_encoder(oa) {
|
|
|
60
62
|
else {
|
|
61
63
|
return [tupledArg[0], v];
|
|
62
64
|
}
|
|
63
|
-
}, ofArray([tryInclude("@id", (value) => (new Json(0, [value])),
|
|
65
|
+
}, ofArray([tryInclude("@id", (value) => (new Json(0, [value])), Process_ROCrate_genID(oa_1)), tryInclude("name", (value_2) => (new Json(0, [value_2])), oa_1.Name), tryInclude("executesProtocol", (oa_2) => Protocol_ISAJson_encoder(studyName, assayName, oa_1.Name, idMap, oa_2), oa_1.ExecutesProtocol), tryIncludeListOpt("parameterValues", (oa_3) => ProcessParameterValue_ISAJson_encoder(idMap, oa_3), oa_1.ParameterValues), tryInclude("performer", (value_4) => (new Json(0, [value_4])), oa_1.Performer), tryInclude("date", (value_6) => (new Json(0, [value_6])), oa_1.Date), tryInclude("previousProcess", (oa_4) => Process_ISAJson_encoder(studyName, assayName, idMap, oa_4), oa_1.PreviousProcess), tryInclude("nextProcess", (oa_5) => Process_ISAJson_encoder(studyName, assayName, idMap, oa_5), oa_1.NextProcess), tryIncludeListOpt("inputs", (value_8) => ProcessInput_ISAJson_encoder(idMap, value_8), oa_1.Inputs), tryIncludeListOpt("outputs", (value_9) => ProcessOutput_ISAJson_encoder(idMap, value_9), oa_1.Outputs), tryIncludeListOpt("comments", (comment) => Comment_ISAJson_encoder(idMap, comment), oa_1.Comments)]))]));
|
|
66
|
+
if (idMap != null) {
|
|
67
|
+
return encode(Process_ROCrate_genID, f, oa, idMap);
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
return f(oa);
|
|
71
|
+
}
|
|
64
72
|
}
|
|
65
73
|
|
|
66
74
|
export const Process_ISAJson_decoder = (() => {
|
|
@@ -81,13 +89,18 @@ export function ARCtrl_Process_Process__Process_fromISAJsonString_Static_Z721C83
|
|
|
81
89
|
}
|
|
82
90
|
}
|
|
83
91
|
|
|
84
|
-
export function
|
|
92
|
+
export function ARCtrl_Process_Process__Process_toISAJsonString_Static_Z3B036AA(spaces, useIDReferencing) {
|
|
93
|
+
const idMap = defaultArg(useIDReferencing, false) ? (new Map([])) : void 0;
|
|
85
94
|
return (f) => {
|
|
86
|
-
const value = Process_ISAJson_encoder(f);
|
|
95
|
+
const value = Process_ISAJson_encoder(void 0, void 0, idMap, f);
|
|
87
96
|
return toString(defaultSpaces(spaces), value);
|
|
88
97
|
};
|
|
89
98
|
}
|
|
90
99
|
|
|
100
|
+
export function ARCtrl_Process_Process__Process_ToISAJsonString_Z3B036AA(this$, spaces, useIDReferencing) {
|
|
101
|
+
return ARCtrl_Process_Process__Process_toISAJsonString_Static_Z3B036AA(unwrap(spaces), unwrap(useIDReferencing))(this$);
|
|
102
|
+
}
|
|
103
|
+
|
|
91
104
|
export function ARCtrl_Process_Process__Process_fromROCrateString_Static_Z721C83C5(s) {
|
|
92
105
|
const matchValue = fromString(Process_ROCrate_decoder, s);
|
|
93
106
|
if (matchValue.tag === 1) {
|
|
@@ -105,3 +118,7 @@ export function ARCtrl_Process_Process__Process_toROCrateString_Static_39E0BC3F(
|
|
|
105
118
|
};
|
|
106
119
|
}
|
|
107
120
|
|
|
121
|
+
export function ARCtrl_Process_Process__Process_ToROCrateString_39E0BC3F(this$, studyName, assayName, spaces) {
|
|
122
|
+
return ARCtrl_Process_Process__Process_toROCrateString_Static_39E0BC3F(unwrap(studyName), unwrap(assayName), unwrap(spaces))(this$);
|
|
123
|
+
}
|
|
124
|
+
|
|
@@ -7,6 +7,7 @@ import { ProcessInput } from "../../Core/Process/ProcessInput.js";
|
|
|
7
7
|
import { ofArray } from "../../fable_modules/fable-library-js.4.16.0/List.js";
|
|
8
8
|
import { fromString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
|
|
9
9
|
import { printf, toText } from "../../fable_modules/fable-library-js.4.16.0/String.js";
|
|
10
|
+
import { unwrap, defaultArg } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
10
11
|
import { toString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
|
|
11
12
|
import { defaultSpaces } from "../Encode.js";
|
|
12
13
|
|
|
@@ -25,16 +26,16 @@ export function ProcessInput_ROCrate_encoder(value) {
|
|
|
25
26
|
|
|
26
27
|
export const ProcessInput_ROCrate_decoder = oneOf(ofArray([map((Item) => (new ProcessInput(0, [Item])), Source_ROCrate_decoder), map((Item_1) => (new ProcessInput(1, [Item_1])), Sample_ROCrate_decoder), map((Item_2) => (new ProcessInput(2, [Item_2])), Data_ROCrate_decoder), map((Item_3) => (new ProcessInput(3, [Item_3])), Material_ROCrate_decoder)]));
|
|
27
28
|
|
|
28
|
-
export function ProcessInput_ISAJson_encoder(value) {
|
|
29
|
+
export function ProcessInput_ISAJson_encoder(idMap, value) {
|
|
29
30
|
switch (value.tag) {
|
|
30
31
|
case 1:
|
|
31
|
-
return Sample_ISAJson_encoder(value.fields[0]);
|
|
32
|
+
return Sample_ISAJson_encoder(idMap, value.fields[0]);
|
|
32
33
|
case 2:
|
|
33
|
-
return Data_ISAJson_encoder(value.fields[0]);
|
|
34
|
+
return Data_ISAJson_encoder(idMap, value.fields[0]);
|
|
34
35
|
case 3:
|
|
35
|
-
return Material_ISAJson_encoder(value.fields[0]);
|
|
36
|
+
return Material_ISAJson_encoder(idMap, value.fields[0]);
|
|
36
37
|
default:
|
|
37
|
-
return Source_ISAJson_encoder(value.fields[0]);
|
|
38
|
+
return Source_ISAJson_encoder(idMap, value.fields[0]);
|
|
38
39
|
}
|
|
39
40
|
}
|
|
40
41
|
|
|
@@ -50,10 +51,15 @@ export function ARCtrl_Process_ProcessInput__ProcessInput_fromISAJsonString_Stat
|
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
53
|
|
|
53
|
-
export function
|
|
54
|
+
export function ARCtrl_Process_ProcessInput__ProcessInput_toISAJsonString_Static_Z3B036AA(spaces, useIDReferencing) {
|
|
55
|
+
const idMap = defaultArg(useIDReferencing, false) ? (new Map([])) : void 0;
|
|
54
56
|
return (f) => {
|
|
55
|
-
const value = ProcessInput_ISAJson_encoder(f);
|
|
57
|
+
const value = ProcessInput_ISAJson_encoder(idMap, f);
|
|
56
58
|
return toString(defaultSpaces(spaces), value);
|
|
57
59
|
};
|
|
58
60
|
}
|
|
59
61
|
|
|
62
|
+
export function ARCtrl_Process_ProcessInput__ProcessInput_ToISAJsonString_Z3B036AA(this$, spaces, useIDReferencing) {
|
|
63
|
+
return ARCtrl_Process_ProcessInput__ProcessInput_toISAJsonString_Static_Z3B036AA(unwrap(spaces), unwrap(useIDReferencing))(this$);
|
|
64
|
+
}
|
|
65
|
+
|
|
@@ -6,6 +6,7 @@ import { ProcessOutput } from "../../Core/Process/ProcessOutput.js";
|
|
|
6
6
|
import { ofArray } from "../../fable_modules/fable-library-js.4.16.0/List.js";
|
|
7
7
|
import { fromString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
|
|
8
8
|
import { printf, toText } from "../../fable_modules/fable-library-js.4.16.0/String.js";
|
|
9
|
+
import { unwrap, defaultArg } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
9
10
|
import { toString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
|
|
10
11
|
import { defaultSpaces } from "../Encode.js";
|
|
11
12
|
|
|
@@ -22,14 +23,14 @@ export function ProcessOutput_ROCrate_encoder(value) {
|
|
|
22
23
|
|
|
23
24
|
export const ProcessOutput_ROCrate_decoder = oneOf(ofArray([map((Item) => (new ProcessOutput(0, [Item])), Sample_ROCrate_decoder), map((Item_1) => (new ProcessOutput(1, [Item_1])), Data_ROCrate_decoder), map((Item_2) => (new ProcessOutput(2, [Item_2])), Material_ROCrate_decoder)]));
|
|
24
25
|
|
|
25
|
-
export function ProcessOutput_ISAJson_encoder(value) {
|
|
26
|
+
export function ProcessOutput_ISAJson_encoder(idMap, value) {
|
|
26
27
|
switch (value.tag) {
|
|
27
28
|
case 1:
|
|
28
|
-
return Data_ISAJson_encoder(value.fields[0]);
|
|
29
|
+
return Data_ISAJson_encoder(idMap, value.fields[0]);
|
|
29
30
|
case 2:
|
|
30
|
-
return Material_ISAJson_encoder(value.fields[0]);
|
|
31
|
+
return Material_ISAJson_encoder(idMap, value.fields[0]);
|
|
31
32
|
default:
|
|
32
|
-
return Sample_ISAJson_encoder(value.fields[0]);
|
|
33
|
+
return Sample_ISAJson_encoder(idMap, value.fields[0]);
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
36
|
|
|
@@ -45,13 +46,18 @@ export function ARCtrl_Process_ProcessOutput__ProcessOutput_fromISAJsonString_St
|
|
|
45
46
|
}
|
|
46
47
|
}
|
|
47
48
|
|
|
48
|
-
export function
|
|
49
|
+
export function ARCtrl_Process_ProcessOutput__ProcessOutput_toISAJsonString_Static_Z3B036AA(spaces, useIDReferencing) {
|
|
50
|
+
const idMap = defaultArg(useIDReferencing, false) ? (new Map([])) : void 0;
|
|
49
51
|
return (f) => {
|
|
50
|
-
const value = ProcessOutput_ISAJson_encoder(f);
|
|
52
|
+
const value = ProcessOutput_ISAJson_encoder(idMap, f);
|
|
51
53
|
return toString(defaultSpaces(spaces), value);
|
|
52
54
|
};
|
|
53
55
|
}
|
|
54
56
|
|
|
57
|
+
export function ARCtrl_Process_ProcessOutput__ProcessOutput_toISAJsonString_Z3B036AA(this$, spaces, useIDReferencing) {
|
|
58
|
+
return ARCtrl_Process_ProcessOutput__ProcessOutput_toISAJsonString_Static_Z3B036AA(unwrap(spaces), unwrap(useIDReferencing))(this$);
|
|
59
|
+
}
|
|
60
|
+
|
|
55
61
|
export function ARCtrl_Process_ProcessOutput__ProcessOutput_fromROCrateJsonString_Static_Z721C83C5(s) {
|
|
56
62
|
const matchValue = fromString(ProcessOutput_ROCrate_decoder, s);
|
|
57
63
|
if (matchValue.tag === 1) {
|
|
@@ -69,3 +75,7 @@ export function ARCtrl_Process_ProcessOutput__ProcessOutput_toROCrateJsonString_
|
|
|
69
75
|
};
|
|
70
76
|
}
|
|
71
77
|
|
|
78
|
+
export function ARCtrl_Process_ProcessOutput__ProcessOutput_toROCrateJsonString_71136F3F(this$, spaces) {
|
|
79
|
+
return ARCtrl_Process_ProcessOutput__ProcessOutput_toROCrateJsonString_Static_71136F3F(unwrap(spaces))(this$);
|
|
80
|
+
}
|
|
81
|
+
|