@nfdi4plants/arctrl 2.0.0-alpha.7 → 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/Json/Assay.js +37 -24
- package/Json/Comment.js +19 -2
- package/Json/IDTable.js +19 -0
- package/Json/Investigation.js +7 -6
- package/Json/OntologyAnnotation.js +45 -2
- package/Json/OntologySourceReference.js +13 -3
- package/Json/Person.js +25 -15
- package/Json/Process/AssayMaterials.js +2 -2
- package/Json/Process/Component.js +12 -7
- package/Json/Process/Data.js +17 -9
- package/Json/Process/Factor.js +28 -5
- package/Json/Process/FactorValue.js +21 -9
- package/Json/Process/Material.js +16 -8
- package/Json/Process/MaterialAttribute.js +28 -10
- package/Json/Process/MaterialAttributeValue.js +21 -9
- package/Json/Process/Process.js +16 -8
- package/Json/Process/ProcessInput.js +11 -10
- package/Json/Process/ProcessOutput.js +10 -9
- package/Json/Process/ProcessParameterValue.js +12 -7
- package/Json/Process/ProcessSequence.js +4 -2
- package/Json/Process/PropertyValue.js +29 -4
- package/Json/Process/Protocol.js +79 -51
- package/Json/Process/ProtocolParameter.js +23 -6
- package/Json/Process/Sample.js +16 -8
- package/Json/Process/Source.js +17 -9
- package/Json/Process/StudyMaterials.js +2 -2
- package/Json/Process/Value.js +3 -3
- package/Json/Publication.js +8 -7
- package/Json/Study.js +64 -50
- package/Json.js +9 -9
- package/fable_modules/project_cracked.json +1 -1
- package/package.json +1 -1
|
@@ -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,19 +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
|
-
import { unwrap } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
16
17
|
|
|
17
18
|
export const FactorValue_ROCrate_encoder = encoder;
|
|
18
19
|
|
|
19
20
|
export const FactorValue_ROCrate_decoder = decoder_1(FactorValue_createAsPV);
|
|
20
21
|
|
|
21
|
-
export function
|
|
22
|
-
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) => {
|
|
23
28
|
const v = tupledArg[1];
|
|
24
29
|
if (equals(v, new Json(3, []))) {
|
|
25
30
|
return void 0;
|
|
@@ -27,7 +32,13 @@ export function FactorValue_ISAJson_encoder(fv) {
|
|
|
27
32
|
else {
|
|
28
33
|
return [tupledArg[0], v];
|
|
29
34
|
}
|
|
30
|
-
}, 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
|
+
}
|
|
31
42
|
}
|
|
32
43
|
|
|
33
44
|
export const FactorValue_ISAJson_decoder = object((get$) => {
|
|
@@ -45,14 +56,15 @@ export function ARCtrl_Process_FactorValue__FactorValue_fromISAJsonString_Static
|
|
|
45
56
|
}
|
|
46
57
|
}
|
|
47
58
|
|
|
48
|
-
export function
|
|
59
|
+
export function ARCtrl_Process_FactorValue__FactorValue_toISAJsonString_Static_Z3B036AA(spaces, useIDReferencing) {
|
|
60
|
+
const idMap = defaultArg(useIDReferencing, false) ? (new Map([])) : void 0;
|
|
49
61
|
return (f) => {
|
|
50
|
-
const value = FactorValue_ISAJson_encoder(f);
|
|
62
|
+
const value = FactorValue_ISAJson_encoder(idMap, f);
|
|
51
63
|
return toString(defaultSpaces(spaces), value);
|
|
52
64
|
};
|
|
53
65
|
}
|
|
54
66
|
|
|
55
|
-
export function
|
|
56
|
-
return
|
|
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$);
|
|
57
69
|
}
|
|
58
70
|
|
package/Json/Process/Material.js
CHANGED
|
@@ -10,9 +10,10 @@ 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
|
-
import { unwrap } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
16
17
|
|
|
17
18
|
export function Material_ROCrate_genID(m) {
|
|
18
19
|
const matchValue = m.ID;
|
|
@@ -50,8 +51,8 @@ export const Material_ROCrate_decoder = (() => {
|
|
|
50
51
|
return decode();
|
|
51
52
|
})();
|
|
52
53
|
|
|
53
|
-
export function Material_ISAJson_encoder(
|
|
54
|
-
|
|
54
|
+
export function Material_ISAJson_encoder(idMap, c) {
|
|
55
|
+
const f = (oa) => (new Json(5, [choose((tupledArg) => {
|
|
55
56
|
const v = tupledArg[1];
|
|
56
57
|
if (equals(v, new Json(3, []))) {
|
|
57
58
|
return void 0;
|
|
@@ -59,7 +60,13 @@ export function Material_ISAJson_encoder(oa) {
|
|
|
59
60
|
else {
|
|
60
61
|
return [tupledArg[0], v];
|
|
61
62
|
}
|
|
62
|
-
}, 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
|
+
}
|
|
63
70
|
}
|
|
64
71
|
|
|
65
72
|
export const Material_ISAJson_allowedFields = ofArray(["@id", "@type", "name", "type", "characteristics", "derivesFrom", "@context"]);
|
|
@@ -82,15 +89,16 @@ export function ARCtrl_Process_Material__Material_fromISAJsonString_Static_Z721C
|
|
|
82
89
|
}
|
|
83
90
|
}
|
|
84
91
|
|
|
85
|
-
export function
|
|
92
|
+
export function ARCtrl_Process_Material__Material_toISAJsonString_Static_Z3B036AA(spaces, useIDReferencing) {
|
|
93
|
+
const idMap = defaultArg(useIDReferencing, false) ? (new Map([])) : void 0;
|
|
86
94
|
return (f) => {
|
|
87
|
-
const value = Material_ISAJson_encoder(f);
|
|
95
|
+
const value = Material_ISAJson_encoder(idMap, f);
|
|
88
96
|
return toString(defaultSpaces(spaces), value);
|
|
89
97
|
};
|
|
90
98
|
}
|
|
91
99
|
|
|
92
|
-
export function
|
|
93
|
-
return
|
|
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$);
|
|
94
102
|
}
|
|
95
103
|
|
|
96
104
|
export function ARCtrl_Process_Material__Material_fromROCrateJsonString_Static_Z721C83C5(s) {
|
|
@@ -1,17 +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
|
-
import { unwrap } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
12
13
|
|
|
13
|
-
export function
|
|
14
|
-
|
|
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) => {
|
|
15
26
|
const v = tupledArg[1];
|
|
16
27
|
if (equals(v, new Json(3, []))) {
|
|
17
28
|
return void 0;
|
|
@@ -19,7 +30,13 @@ export function MaterialAttribute_ISAJson_encoder(value) {
|
|
|
19
30
|
else {
|
|
20
31
|
return [tupledArg[0], v];
|
|
21
32
|
}
|
|
22
|
-
},
|
|
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
|
+
}
|
|
23
40
|
}
|
|
24
41
|
|
|
25
42
|
export const MaterialAttribute_ISAJson_decoder = object((get$) => {
|
|
@@ -37,14 +54,15 @@ export function ARCtrl_Process_MaterialAttribute__MaterialAttribute_fromISAJsonS
|
|
|
37
54
|
}
|
|
38
55
|
}
|
|
39
56
|
|
|
40
|
-
export function
|
|
57
|
+
export function ARCtrl_Process_MaterialAttribute__MaterialAttribute_toISAJsonString_Static_Z3B036AA(spaces, useIDReferencing) {
|
|
58
|
+
const idMap = defaultArg(useIDReferencing, false) ? (new Map([])) : void 0;
|
|
41
59
|
return (v) => {
|
|
42
|
-
const value = MaterialAttribute_ISAJson_encoder(v);
|
|
60
|
+
const value = MaterialAttribute_ISAJson_encoder(idMap, v);
|
|
43
61
|
return toString(defaultSpaces(spaces), value);
|
|
44
62
|
};
|
|
45
63
|
}
|
|
46
64
|
|
|
47
|
-
export function
|
|
48
|
-
return
|
|
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$);
|
|
49
67
|
}
|
|
50
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,19 +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
|
-
import { unwrap } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
16
17
|
|
|
17
18
|
export const MaterialAttributeValue_ROCrate_encoder = encoder;
|
|
18
19
|
|
|
19
20
|
export const MaterialAttributeValue_ROCrate_decoder = decoder_1(MaterialAttributeValue_createAsPV);
|
|
20
21
|
|
|
21
|
-
export function
|
|
22
|
-
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) => {
|
|
23
28
|
const v = tupledArg[1];
|
|
24
29
|
if (equals(v, new Json(3, []))) {
|
|
25
30
|
return void 0;
|
|
@@ -27,7 +32,13 @@ export function MaterialAttributeValue_ISAJson_encoder(oa) {
|
|
|
27
32
|
else {
|
|
28
33
|
return [tupledArg[0], v];
|
|
29
34
|
}
|
|
30
|
-
}, 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
|
+
}
|
|
31
42
|
}
|
|
32
43
|
|
|
33
44
|
export const MaterialAttributeValue_ISAJson_decoder = object((get$) => {
|
|
@@ -45,15 +56,16 @@ export function ARCtrl_Process_MaterialAttributeValue__MaterialAttributeValue_fr
|
|
|
45
56
|
}
|
|
46
57
|
}
|
|
47
58
|
|
|
48
|
-
export function
|
|
59
|
+
export function ARCtrl_Process_MaterialAttributeValue__MaterialAttributeValue_toISAJsonString_Static_Z3B036AA(spaces, useIDReferencing) {
|
|
60
|
+
const idMap = defaultArg(useIDReferencing, false) ? (new Map([])) : void 0;
|
|
49
61
|
return (f) => {
|
|
50
|
-
const value = MaterialAttributeValue_ISAJson_encoder(f);
|
|
62
|
+
const value = MaterialAttributeValue_ISAJson_encoder(idMap, f);
|
|
51
63
|
return toString(defaultSpaces(spaces), value);
|
|
52
64
|
};
|
|
53
65
|
}
|
|
54
66
|
|
|
55
|
-
export function
|
|
56
|
-
return
|
|
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$);
|
|
57
69
|
}
|
|
58
70
|
|
|
59
71
|
export function ARCtrl_Process_MaterialAttributeValue__MaterialAttributeValue_fromROCrateJsonString_Static_Z721C83C5(s) {
|
package/Json/Process/Process.js
CHANGED
|
@@ -15,9 +15,10 @@ 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
|
-
import { unwrap } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
21
22
|
|
|
22
23
|
export function Process_ROCrate_genID(p) {
|
|
23
24
|
const matchValue = p.ID;
|
|
@@ -52,8 +53,8 @@ export const Process_ROCrate_decoder = object((get$) => {
|
|
|
52
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))));
|
|
53
54
|
});
|
|
54
55
|
|
|
55
|
-
export function Process_ISAJson_encoder(oa) {
|
|
56
|
-
|
|
56
|
+
export function Process_ISAJson_encoder(studyName, assayName, idMap, oa) {
|
|
57
|
+
const f = (oa_1) => (new Json(5, [choose((tupledArg) => {
|
|
57
58
|
const v = tupledArg[1];
|
|
58
59
|
if (equals(v, new Json(3, []))) {
|
|
59
60
|
return void 0;
|
|
@@ -61,7 +62,13 @@ export function Process_ISAJson_encoder(oa) {
|
|
|
61
62
|
else {
|
|
62
63
|
return [tupledArg[0], v];
|
|
63
64
|
}
|
|
64
|
-
}, 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
|
+
}
|
|
65
72
|
}
|
|
66
73
|
|
|
67
74
|
export const Process_ISAJson_decoder = (() => {
|
|
@@ -82,15 +89,16 @@ export function ARCtrl_Process_Process__Process_fromISAJsonString_Static_Z721C83
|
|
|
82
89
|
}
|
|
83
90
|
}
|
|
84
91
|
|
|
85
|
-
export function
|
|
92
|
+
export function ARCtrl_Process_Process__Process_toISAJsonString_Static_Z3B036AA(spaces, useIDReferencing) {
|
|
93
|
+
const idMap = defaultArg(useIDReferencing, false) ? (new Map([])) : void 0;
|
|
86
94
|
return (f) => {
|
|
87
|
-
const value = Process_ISAJson_encoder(f);
|
|
95
|
+
const value = Process_ISAJson_encoder(void 0, void 0, idMap, f);
|
|
88
96
|
return toString(defaultSpaces(spaces), value);
|
|
89
97
|
};
|
|
90
98
|
}
|
|
91
99
|
|
|
92
|
-
export function
|
|
93
|
-
return
|
|
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$);
|
|
94
102
|
}
|
|
95
103
|
|
|
96
104
|
export function ARCtrl_Process_Process__Process_fromROCrateString_Static_Z721C83C5(s) {
|
|
@@ -7,9 +7,9 @@ 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
|
-
import { unwrap } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
13
13
|
|
|
14
14
|
export function ProcessInput_ROCrate_encoder(value) {
|
|
15
15
|
switch (value.tag) {
|
|
@@ -26,16 +26,16 @@ export function ProcessInput_ROCrate_encoder(value) {
|
|
|
26
26
|
|
|
27
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)]));
|
|
28
28
|
|
|
29
|
-
export function ProcessInput_ISAJson_encoder(value) {
|
|
29
|
+
export function ProcessInput_ISAJson_encoder(idMap, value) {
|
|
30
30
|
switch (value.tag) {
|
|
31
31
|
case 1:
|
|
32
|
-
return Sample_ISAJson_encoder(value.fields[0]);
|
|
32
|
+
return Sample_ISAJson_encoder(idMap, value.fields[0]);
|
|
33
33
|
case 2:
|
|
34
|
-
return Data_ISAJson_encoder(value.fields[0]);
|
|
34
|
+
return Data_ISAJson_encoder(idMap, value.fields[0]);
|
|
35
35
|
case 3:
|
|
36
|
-
return Material_ISAJson_encoder(value.fields[0]);
|
|
36
|
+
return Material_ISAJson_encoder(idMap, value.fields[0]);
|
|
37
37
|
default:
|
|
38
|
-
return Source_ISAJson_encoder(value.fields[0]);
|
|
38
|
+
return Source_ISAJson_encoder(idMap, value.fields[0]);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
|
|
@@ -51,14 +51,15 @@ export function ARCtrl_Process_ProcessInput__ProcessInput_fromISAJsonString_Stat
|
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
export function
|
|
54
|
+
export function ARCtrl_Process_ProcessInput__ProcessInput_toISAJsonString_Static_Z3B036AA(spaces, useIDReferencing) {
|
|
55
|
+
const idMap = defaultArg(useIDReferencing, false) ? (new Map([])) : void 0;
|
|
55
56
|
return (f) => {
|
|
56
|
-
const value = ProcessInput_ISAJson_encoder(f);
|
|
57
|
+
const value = ProcessInput_ISAJson_encoder(idMap, f);
|
|
57
58
|
return toString(defaultSpaces(spaces), value);
|
|
58
59
|
};
|
|
59
60
|
}
|
|
60
61
|
|
|
61
|
-
export function
|
|
62
|
-
return
|
|
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$);
|
|
63
64
|
}
|
|
64
65
|
|
|
@@ -6,9 +6,9 @@ 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
|
-
import { unwrap } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
12
12
|
|
|
13
13
|
export function ProcessOutput_ROCrate_encoder(value) {
|
|
14
14
|
switch (value.tag) {
|
|
@@ -23,14 +23,14 @@ export function ProcessOutput_ROCrate_encoder(value) {
|
|
|
23
23
|
|
|
24
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)]));
|
|
25
25
|
|
|
26
|
-
export function ProcessOutput_ISAJson_encoder(value) {
|
|
26
|
+
export function ProcessOutput_ISAJson_encoder(idMap, value) {
|
|
27
27
|
switch (value.tag) {
|
|
28
28
|
case 1:
|
|
29
|
-
return Data_ISAJson_encoder(value.fields[0]);
|
|
29
|
+
return Data_ISAJson_encoder(idMap, value.fields[0]);
|
|
30
30
|
case 2:
|
|
31
|
-
return Material_ISAJson_encoder(value.fields[0]);
|
|
31
|
+
return Material_ISAJson_encoder(idMap, value.fields[0]);
|
|
32
32
|
default:
|
|
33
|
-
return Sample_ISAJson_encoder(value.fields[0]);
|
|
33
|
+
return Sample_ISAJson_encoder(idMap, value.fields[0]);
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
|
|
@@ -46,15 +46,16 @@ export function ARCtrl_Process_ProcessOutput__ProcessOutput_fromISAJsonString_St
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
export function
|
|
49
|
+
export function ARCtrl_Process_ProcessOutput__ProcessOutput_toISAJsonString_Static_Z3B036AA(spaces, useIDReferencing) {
|
|
50
|
+
const idMap = defaultArg(useIDReferencing, false) ? (new Map([])) : void 0;
|
|
50
51
|
return (f) => {
|
|
51
|
-
const value = ProcessOutput_ISAJson_encoder(f);
|
|
52
|
+
const value = ProcessOutput_ISAJson_encoder(idMap, f);
|
|
52
53
|
return toString(defaultSpaces(spaces), value);
|
|
53
54
|
};
|
|
54
55
|
}
|
|
55
56
|
|
|
56
|
-
export function
|
|
57
|
-
return
|
|
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$);
|
|
58
59
|
}
|
|
59
60
|
|
|
60
61
|
export function ARCtrl_Process_ProcessOutput__ProcessOutput_fromROCrateJsonString_Static_Z721C83C5(s) {
|
|
@@ -10,14 +10,18 @@ import { OntologyAnnotation_ISAJson_decoder, OntologyAnnotation_ISAJson_encoder
|
|
|
10
10
|
import { object } from "../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
11
11
|
import { fromString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
|
|
12
12
|
import { printf, toText } from "../../fable_modules/fable-library-js.4.16.0/String.js";
|
|
13
|
+
import { unwrap, defaultArg } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
13
14
|
import { toString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
|
|
14
|
-
import { unwrap } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
15
15
|
|
|
16
16
|
export const ProcessParameterValue_ROCrate_encoder = encoder;
|
|
17
17
|
|
|
18
18
|
export const ProcessParameterValue_ROCrate_decoder = decoder_1((category, value, unit) => ProcessParameterValue.createAsPV(category, value, unit));
|
|
19
19
|
|
|
20
|
-
export function
|
|
20
|
+
export function ProcessParameterValue_ISAJson_genID(oa) {
|
|
21
|
+
throw new Error("Not implemented");
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function ProcessParameterValue_ISAJson_encoder(idMap, oa) {
|
|
21
25
|
return new Json(5, [choose((tupledArg) => {
|
|
22
26
|
const v = tupledArg[1];
|
|
23
27
|
if (equals(v, new Json(3, []))) {
|
|
@@ -26,7 +30,7 @@ export function ProcessParameterValue_ISAJson_encoder(oa) {
|
|
|
26
30
|
else {
|
|
27
31
|
return [tupledArg[0], v];
|
|
28
32
|
}
|
|
29
|
-
}, ofArray([tryInclude("category", ProtocolParameter_ISAJson_encoder, oa.Category), tryInclude("value", Value_ISAJson_encoder, oa.Value), tryInclude("unit", OntologyAnnotation_ISAJson_encoder, oa.Unit)]))]);
|
|
33
|
+
}, ofArray([tryInclude("category", (value) => ProtocolParameter_ISAJson_encoder(idMap, value), oa.Category), tryInclude("value", (value_1) => Value_ISAJson_encoder(idMap, value_1), oa.Value), tryInclude("unit", (oa_1) => OntologyAnnotation_ISAJson_encoder(idMap, oa_1), oa.Unit)]))]);
|
|
30
34
|
}
|
|
31
35
|
|
|
32
36
|
export const ProcessParameterValue_ISAJson_decoder = object((get$) => {
|
|
@@ -44,15 +48,16 @@ export function ARCtrl_Process_ProcessParameterValue__ProcessParameterValue_from
|
|
|
44
48
|
}
|
|
45
49
|
}
|
|
46
50
|
|
|
47
|
-
export function
|
|
51
|
+
export function ARCtrl_Process_ProcessParameterValue__ProcessParameterValue_toISAJsonString_Static_Z3B036AA(spaces, useIDReferencing) {
|
|
52
|
+
const idMap = defaultArg(useIDReferencing, false) ? (new Map([])) : void 0;
|
|
48
53
|
return (f) => {
|
|
49
|
-
const value = ProcessParameterValue_ISAJson_encoder(f);
|
|
54
|
+
const value = ProcessParameterValue_ISAJson_encoder(idMap, f);
|
|
50
55
|
return toString(defaultSpaces(spaces), value);
|
|
51
56
|
};
|
|
52
57
|
}
|
|
53
58
|
|
|
54
|
-
export function
|
|
55
|
-
return
|
|
59
|
+
export function ARCtrl_Process_ProcessParameterValue__ProcessParameterValue_ToISAJsonString_Z3B036AA(this$, spaces, useIDReferencing) {
|
|
60
|
+
return ARCtrl_Process_ProcessParameterValue__ProcessParameterValue_toISAJsonString_Static_Z3B036AA(unwrap(spaces), unwrap(useIDReferencing))(this$);
|
|
56
61
|
}
|
|
57
62
|
|
|
58
63
|
export function ARCtrl_Process_ProcessParameterValue__ProcessParameterValue_fromROCrateJsonString_Static_Z721C83C5(s) {
|
|
@@ -3,6 +3,7 @@ import { fromString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Deco
|
|
|
3
3
|
import { list as list_1 } from "../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
4
4
|
import { Process_ROCrate_encoder, Process_ROCrate_decoder, Process_ISAJson_encoder, Process_ISAJson_decoder } from "./Process.js";
|
|
5
5
|
import { printf, toText } from "../../fable_modules/fable-library-js.4.16.0/String.js";
|
|
6
|
+
import { defaultArg } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
6
7
|
import { list as list_2 } from "../../fable_modules/Thoth.Json.Core.0.2.1/Encode.fs.js";
|
|
7
8
|
import { map } from "../../fable_modules/fable-library-js.4.16.0/List.js";
|
|
8
9
|
import { toString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
|
|
@@ -27,9 +28,10 @@ export function ProcessSequence_fromISAJsonString_Z721C83C5(s) {
|
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
30
|
|
|
30
|
-
export function
|
|
31
|
+
export function ProcessSequence_toISAJsonString_Z3B036AA(spaces, useIDReferencing) {
|
|
32
|
+
const idMap = defaultArg(useIDReferencing, false) ? (new Map([])) : void 0;
|
|
31
33
|
return (f) => {
|
|
32
|
-
const value = list_2(map(Process_ISAJson_encoder, f));
|
|
34
|
+
const value = list_2(map((oa) => Process_ISAJson_encoder(void 0, void 0, idMap, oa), f));
|
|
33
35
|
return toString(defaultSpaces(spaces), value);
|
|
34
36
|
};
|
|
35
37
|
}
|
|
@@ -11,12 +11,37 @@ import { Value } from "../../Core/Process/Value.js";
|
|
|
11
11
|
|
|
12
12
|
export function genID(p) {
|
|
13
13
|
const matchValue = p.GetCategory();
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
const matchValue_1 = p.GetValue();
|
|
15
|
+
const matchValue_2 = p.GetUnit();
|
|
16
|
+
let matchResult, t, u, v, t_1, v_1;
|
|
17
|
+
if (matchValue != null) {
|
|
18
|
+
if (matchValue_1 != null) {
|
|
19
|
+
if (matchValue_2 == null) {
|
|
20
|
+
matchResult = 1;
|
|
21
|
+
t_1 = matchValue;
|
|
22
|
+
v_1 = matchValue_1;
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
matchResult = 0;
|
|
26
|
+
t = matchValue;
|
|
27
|
+
u = matchValue_2;
|
|
28
|
+
v = matchValue_1;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
matchResult = 2;
|
|
33
|
+
}
|
|
16
34
|
}
|
|
17
35
|
else {
|
|
18
|
-
|
|
19
|
-
|
|
36
|
+
matchResult = 2;
|
|
37
|
+
}
|
|
38
|
+
switch (matchResult) {
|
|
39
|
+
case 0:
|
|
40
|
+
return `#${p.GetAdditionalType()}/${t.NameText}=${v.Text}${u.NameText}`;
|
|
41
|
+
case 1:
|
|
42
|
+
return `#${p.GetAdditionalType()}/${t_1.NameText}=${v_1.Text}`;
|
|
43
|
+
default:
|
|
44
|
+
return `#Empty${p.GetAdditionalType()}`;
|
|
20
45
|
}
|
|
21
46
|
}
|
|
22
47
|
|