@nfdi4plants/arctrl 2.0.0-beta.2 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ARC.js +55 -18
- package/Contract/ArcAssay.js +4 -4
- package/Contract/ArcInvestigation.js +4 -4
- package/Contract/ArcStudy.js +3 -3
- package/Contract/Datamap.js +1 -1
- package/Contract/ValidationPackagesConfig.js +96 -0
- package/Core/ArcTypes.js +93 -90
- package/Core/Conversion.js +13 -13
- package/Core/DataContext.js +53 -6
- package/Core/{Table/DataMap.js → DataMap.js} +34 -22
- package/Core/Process/Component.js +15 -5
- package/Core/Process/FactorValue.js +14 -5
- package/Core/Process/MaterialAttributeValue.js +14 -5
- package/Core/Process/ProcessParameterValue.js +11 -2
- package/Core/Table/ArcTable.js +99 -11
- package/Core/Table/CompositeCell.js +38 -23
- package/Core/Table/CompositeColumn.js +7 -30
- package/Core/Table/CompositeHeader.js +5 -215
- package/Core/{Process/Value.js → Value.js} +9 -9
- package/Json/Assay.js +10 -9
- package/Json/{Process/Data.js → Data.js} +17 -17
- package/Json/{Process/DataFile.js → DataFile.js} +9 -9
- package/Json/DataMap/DataContext.js +30 -0
- package/Json/DataMap/DataMap.js +25 -0
- package/Json/Encode.js +10 -1
- package/Json/Process/Component.js +1 -1
- package/Json/Process/FactorValue.js +1 -1
- package/Json/Process/MaterialAttributeValue.js +1 -1
- package/Json/Process/ProcessInput.js +1 -1
- package/Json/Process/ProcessOutput.js +1 -1
- package/Json/Process/ProcessParameterValue.js +2 -2
- package/Json/Process/Value.js +3 -3
- package/Json/{Process/PropertyValue.js → PropertyValue.js} +30 -21
- package/Json/Study.js +9 -8
- package/Json/Table/CompositeCell.js +1 -1
- package/Json/context/rocrate/isa_data_context.js +1 -1
- package/Json/context/rocrate/isa_investigation_context.js +1 -1
- package/Json/context/rocrate/property_value_context.js +1 -1
- package/Spreadsheet/AnnotationTable/ArcTable.js +3 -2
- package/Spreadsheet/AnnotationTable/CompositeColumn.js +9 -7
- package/Spreadsheet/ArcAssay.js +62 -26
- package/Spreadsheet/ArcInvestigation.js +59 -38
- package/Spreadsheet/ArcStudy.js +51 -20
- package/Spreadsheet/DataMap.js +1 -1
- package/Spreadsheet/DataMapTable/DataMapTable.js +3 -3
- package/Spreadsheet/Template.js +1 -1
- package/ValidationPackages/ValidationPackage.js +61 -0
- package/ValidationPackages/ValidationPackagesConfig.js +88 -0
- package/Xlsx.js +9 -9
- package/Yaml/Encode.js +8 -0
- package/Yaml/ValidationPackage.js +47 -0
- package/Yaml/ValidationPackagesConfig.js +48 -0
- package/fable_modules/YAMLicious.0.0.1/Decode.fs +374 -0
- package/fable_modules/YAMLicious.0.0.1/Decode.fs.js +1684 -0
- package/fable_modules/YAMLicious.0.0.1/Encode.fs +148 -0
- package/fable_modules/YAMLicious.0.0.1/Encode.fs.js +74 -0
- package/fable_modules/YAMLicious.0.0.1/Interop/JsInterop.fs +14 -0
- package/fable_modules/YAMLicious.0.0.1/Interop/JsInterop.fs.js +11 -0
- package/fable_modules/YAMLicious.0.0.1/Interop/PyInterop.fs +9 -0
- package/fable_modules/YAMLicious.0.0.1/Library.fs +138 -0
- package/fable_modules/YAMLicious.0.0.1/Library.fs.js +7 -0
- package/fable_modules/YAMLicious.0.0.1/Persil.fs +86 -0
- package/fable_modules/YAMLicious.0.0.1/Persil.fs.js +49 -0
- package/fable_modules/YAMLicious.0.0.1/Preprocessing.fs +59 -0
- package/fable_modules/YAMLicious.0.0.1/Preprocessing.fs.js +102 -0
- package/fable_modules/YAMLicious.0.0.1/Reader.fs +295 -0
- package/fable_modules/YAMLicious.0.0.1/Reader.fs.js +530 -0
- package/fable_modules/YAMLicious.0.0.1/Regex.fs +108 -0
- package/fable_modules/YAMLicious.0.0.1/Regex.fs.js +19 -0
- package/fable_modules/YAMLicious.0.0.1/RegexActivePatterns.fs +166 -0
- package/fable_modules/YAMLicious.0.0.1/RegexActivePatterns.fs.js +225 -0
- package/fable_modules/YAMLicious.0.0.1/Writer.fs +84 -0
- package/fable_modules/YAMLicious.0.0.1/Writer.fs.js +161 -0
- package/fable_modules/YAMLicious.0.0.1/YAMLicious.fableproj +39 -0
- package/fable_modules/YAMLicious.0.0.1/YAMLiciousTypes.fs +82 -0
- package/fable_modules/YAMLicious.0.0.1/YAMLiciousTypes.fs.js +130 -0
- package/fable_modules/YAMLicious.0.0.1/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
- package/fable_modules/YAMLicious.0.0.1/obj/Debug/netstandard2.0/YAMLicious.AssemblyInfo.fs +19 -0
- package/fable_modules/YAMLicious.0.0.1/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
- package/fable_modules/YAMLicious.0.0.1/obj/Release/netstandard2.0/YAMLicious.AssemblyInfo.fs +19 -0
- package/fable_modules/project_cracked.json +1 -1
- package/index.js +1 -0
- package/package.json +1 -1
|
@@ -2,7 +2,6 @@ import { map } from "../../fable_modules/fable-library-js.4.16.0/Array.js";
|
|
|
2
2
|
import { union_type, string_type, getUnionCases, name } from "../../fable_modules/fable-library-js.4.16.0/Reflection.js";
|
|
3
3
|
import { Union, toString } from "../../fable_modules/fable-library-js.4.16.0/Types.js";
|
|
4
4
|
import { ActivePatterns_$007CTermColumn$007C_$007C, Pattern_CommentPattern, Pattern_OutputPattern, Pattern_InputPattern, ActivePatterns_$007CRegex$007C_$007C, tryParseIOTypeHeader } from "../Helper/Regex.js";
|
|
5
|
-
import { equals } from "../../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
6
5
|
import { printf, toFail } from "../../fable_modules/fable-library-js.4.16.0/String.js";
|
|
7
6
|
import { OntologyAnnotation_$reflection, OntologyAnnotation } from "../OntologyAnnotation.js";
|
|
8
7
|
|
|
@@ -98,79 +97,6 @@ export class IOType extends Union {
|
|
|
98
97
|
return IOType.ofString(s);
|
|
99
98
|
}
|
|
100
99
|
}
|
|
101
|
-
GetUITooltip() {
|
|
102
|
-
const this$ = this;
|
|
103
|
-
return IOType.getUITooltip(this$);
|
|
104
|
-
}
|
|
105
|
-
static getUITooltip(iotype) {
|
|
106
|
-
let matchResult;
|
|
107
|
-
if (typeof iotype === "string") {
|
|
108
|
-
if (equals(iotype, "Source")) {
|
|
109
|
-
matchResult = 0;
|
|
110
|
-
}
|
|
111
|
-
else if (equals(iotype, "Sample")) {
|
|
112
|
-
matchResult = 1;
|
|
113
|
-
}
|
|
114
|
-
else if (equals(iotype, "RawDataFile")) {
|
|
115
|
-
matchResult = 2;
|
|
116
|
-
}
|
|
117
|
-
else if (equals(iotype, "DerivedDataFile")) {
|
|
118
|
-
matchResult = 3;
|
|
119
|
-
}
|
|
120
|
-
else if (equals(iotype, "ImageFile")) {
|
|
121
|
-
matchResult = 4;
|
|
122
|
-
}
|
|
123
|
-
else if (equals(iotype, "Material")) {
|
|
124
|
-
matchResult = 5;
|
|
125
|
-
}
|
|
126
|
-
else if (equals(iotype, "FreeText")) {
|
|
127
|
-
matchResult = 6;
|
|
128
|
-
}
|
|
129
|
-
else {
|
|
130
|
-
matchResult = 7;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
else {
|
|
134
|
-
switch (iotype.tag) {
|
|
135
|
-
case 1: {
|
|
136
|
-
matchResult = 1;
|
|
137
|
-
break;
|
|
138
|
-
}
|
|
139
|
-
case 2: {
|
|
140
|
-
matchResult = 2;
|
|
141
|
-
break;
|
|
142
|
-
}
|
|
143
|
-
case 3: {
|
|
144
|
-
matchResult = 5;
|
|
145
|
-
break;
|
|
146
|
-
}
|
|
147
|
-
case 4: {
|
|
148
|
-
matchResult = 6;
|
|
149
|
-
break;
|
|
150
|
-
}
|
|
151
|
-
default:
|
|
152
|
-
matchResult = 0;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
switch (matchResult) {
|
|
156
|
-
case 0:
|
|
157
|
-
return "The source value must be a unique identifier for an organism or a sample.";
|
|
158
|
-
case 1:
|
|
159
|
-
return "The Sample Name column describes specifc laboratory samples with a unique identifier.";
|
|
160
|
-
case 2:
|
|
161
|
-
return "The Raw Data File column defines untransformed and unprocessed data files.";
|
|
162
|
-
case 3:
|
|
163
|
-
return "The Derived Data File column defines transformed and/or processed data files.";
|
|
164
|
-
case 4:
|
|
165
|
-
return "Placeholder";
|
|
166
|
-
case 5:
|
|
167
|
-
return "Placeholder";
|
|
168
|
-
case 6:
|
|
169
|
-
return "Placeholder";
|
|
170
|
-
default:
|
|
171
|
-
throw new Error(`Unable to parse combination to existing IOType: \`${iotype}\``);
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
100
|
static source() {
|
|
175
101
|
return new IOType(0, []);
|
|
176
102
|
}
|
|
@@ -543,157 +469,21 @@ export class CompositeHeader extends Union {
|
|
|
543
469
|
return void 0;
|
|
544
470
|
}
|
|
545
471
|
}
|
|
546
|
-
|
|
472
|
+
get IsUnique() {
|
|
547
473
|
const this$ = this;
|
|
548
|
-
|
|
549
|
-
}
|
|
550
|
-
static getUITooltip(header) {
|
|
551
|
-
let matchResult;
|
|
552
|
-
if (typeof header === "string") {
|
|
553
|
-
if (equals(header, "Component")) {
|
|
554
|
-
matchResult = 0;
|
|
555
|
-
}
|
|
556
|
-
else if (equals(header, "Characteristic")) {
|
|
557
|
-
matchResult = 1;
|
|
558
|
-
}
|
|
559
|
-
else if (equals(header, "Factor")) {
|
|
560
|
-
matchResult = 2;
|
|
561
|
-
}
|
|
562
|
-
else if (equals(header, "Parameter")) {
|
|
563
|
-
matchResult = 3;
|
|
564
|
-
}
|
|
565
|
-
else if (equals(header, "ProtocolType")) {
|
|
566
|
-
matchResult = 4;
|
|
567
|
-
}
|
|
568
|
-
else if (equals(header, "ProtocolDescription")) {
|
|
569
|
-
matchResult = 5;
|
|
570
|
-
}
|
|
571
|
-
else if (equals(header, "ProtocolUri")) {
|
|
572
|
-
matchResult = 6;
|
|
573
|
-
}
|
|
574
|
-
else if (equals(header, "ProtocolVersion")) {
|
|
575
|
-
matchResult = 7;
|
|
576
|
-
}
|
|
577
|
-
else if (equals(header, "ProtocolREF")) {
|
|
578
|
-
matchResult = 8;
|
|
579
|
-
}
|
|
580
|
-
else if (equals(header, "Performer")) {
|
|
581
|
-
matchResult = 9;
|
|
582
|
-
}
|
|
583
|
-
else if (equals(header, "Date")) {
|
|
584
|
-
matchResult = 10;
|
|
585
|
-
}
|
|
586
|
-
else if (equals(header, "Input")) {
|
|
587
|
-
matchResult = 11;
|
|
588
|
-
}
|
|
589
|
-
else if (equals(header, "Output")) {
|
|
590
|
-
matchResult = 12;
|
|
591
|
-
}
|
|
592
|
-
else if (equals(header, "FreeText")) {
|
|
593
|
-
matchResult = 13;
|
|
594
|
-
}
|
|
595
|
-
else if (equals(header, "Comment")) {
|
|
596
|
-
matchResult = 14;
|
|
597
|
-
}
|
|
598
|
-
else {
|
|
599
|
-
matchResult = 15;
|
|
600
|
-
}
|
|
601
|
-
}
|
|
602
|
-
else {
|
|
603
|
-
switch (header.tag) {
|
|
604
|
-
case 1: {
|
|
605
|
-
matchResult = 1;
|
|
606
|
-
break;
|
|
607
|
-
}
|
|
608
|
-
case 2: {
|
|
609
|
-
matchResult = 2;
|
|
610
|
-
break;
|
|
611
|
-
}
|
|
612
|
-
case 3: {
|
|
613
|
-
matchResult = 3;
|
|
614
|
-
break;
|
|
615
|
-
}
|
|
616
|
-
case 4: {
|
|
617
|
-
matchResult = 4;
|
|
618
|
-
break;
|
|
619
|
-
}
|
|
620
|
-
case 5: {
|
|
621
|
-
matchResult = 5;
|
|
622
|
-
break;
|
|
623
|
-
}
|
|
624
|
-
case 6: {
|
|
625
|
-
matchResult = 6;
|
|
626
|
-
break;
|
|
627
|
-
}
|
|
628
|
-
case 7: {
|
|
629
|
-
matchResult = 7;
|
|
630
|
-
break;
|
|
631
|
-
}
|
|
632
|
-
case 8: {
|
|
633
|
-
matchResult = 8;
|
|
634
|
-
break;
|
|
635
|
-
}
|
|
636
|
-
case 9: {
|
|
637
|
-
matchResult = 9;
|
|
638
|
-
break;
|
|
639
|
-
}
|
|
640
|
-
case 10: {
|
|
641
|
-
matchResult = 10;
|
|
642
|
-
break;
|
|
643
|
-
}
|
|
644
|
-
case 11: {
|
|
645
|
-
matchResult = 11;
|
|
646
|
-
break;
|
|
647
|
-
}
|
|
648
|
-
case 12: {
|
|
649
|
-
matchResult = 12;
|
|
650
|
-
break;
|
|
651
|
-
}
|
|
652
|
-
case 13: {
|
|
653
|
-
matchResult = 13;
|
|
654
|
-
break;
|
|
655
|
-
}
|
|
656
|
-
case 14: {
|
|
657
|
-
matchResult = 14;
|
|
658
|
-
break;
|
|
659
|
-
}
|
|
660
|
-
default:
|
|
661
|
-
matchResult = 0;
|
|
662
|
-
}
|
|
663
|
-
}
|
|
664
|
-
switch (matchResult) {
|
|
665
|
-
case 0:
|
|
666
|
-
return "Component columns are used to describe physical components of a experiment, e.g. instrument names, software names, and reagents names.";
|
|
667
|
-
case 1:
|
|
668
|
-
return "Characteristic columns are used for study descriptions and describe inherent properties of the source material, e.g. a certain strain or organism part.";
|
|
669
|
-
case 2:
|
|
670
|
-
return "Use Factor columns to describe independent variables that result in a specific output of your experiment, e.g. the light intensity under which an organism was grown.";
|
|
671
|
-
case 3:
|
|
672
|
-
return "Parameter columns describe steps in your experimental workflow, e.g. the centrifugation time or the temperature used for your assay.";
|
|
474
|
+
switch (this$.tag) {
|
|
673
475
|
case 4:
|
|
674
|
-
|
|
476
|
+
case 8:
|
|
675
477
|
case 5:
|
|
676
|
-
return "Describe the protocol in free text.";
|
|
677
478
|
case 6:
|
|
678
|
-
return "Web or local address where the in-depth protocol is stored.";
|
|
679
479
|
case 7:
|
|
680
|
-
return "Defines the protocol version.";
|
|
681
|
-
case 8:
|
|
682
|
-
return "Defines the protocol name.";
|
|
683
480
|
case 9:
|
|
684
|
-
return "Defines the protocol performer.";
|
|
685
481
|
case 10:
|
|
686
|
-
return "Defines the date the protocol was performed.";
|
|
687
482
|
case 11:
|
|
688
|
-
return "Only one input column per table. E.g. experimental samples or files.";
|
|
689
483
|
case 12:
|
|
690
|
-
return
|
|
691
|
-
case 13:
|
|
692
|
-
return "Placeholder";
|
|
693
|
-
case 14:
|
|
694
|
-
return "Comment";
|
|
484
|
+
return true;
|
|
695
485
|
default:
|
|
696
|
-
|
|
486
|
+
return false;
|
|
697
487
|
}
|
|
698
488
|
}
|
|
699
489
|
static component(oa) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { tryParse } from "
|
|
2
|
-
import { Union, toString, FSharpRef } from "
|
|
3
|
-
import { tryParse as tryParse_1 } from "
|
|
4
|
-
import { OntologyAnnotation_$reflection, OntologyAnnotation } from "
|
|
5
|
-
import { defaultArg } from "
|
|
6
|
-
import { int32ToString } from "
|
|
7
|
-
import { printf, toText } from "
|
|
8
|
-
import { union_type, string_type, float64_type, int32_type } from "
|
|
1
|
+
import { tryParse } from "../fable_modules/fable-library-js.4.16.0/Int32.js";
|
|
2
|
+
import { Union, toString, FSharpRef } from "../fable_modules/fable-library-js.4.16.0/Types.js";
|
|
3
|
+
import { tryParse as tryParse_1 } from "../fable_modules/fable-library-js.4.16.0/Double.js";
|
|
4
|
+
import { OntologyAnnotation_$reflection, OntologyAnnotation } from "./OntologyAnnotation.js";
|
|
5
|
+
import { defaultArg } from "../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
6
|
+
import { int32ToString } from "../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
7
|
+
import { printf, toText } from "../fable_modules/fable-library-js.4.16.0/String.js";
|
|
8
|
+
import { union_type, string_type, float64_type, int32_type } from "../fable_modules/fable-library-js.4.16.0/Reflection.js";
|
|
9
9
|
|
|
10
10
|
export class Value extends Union {
|
|
11
11
|
constructor(tag, fields) {
|
|
@@ -132,6 +132,6 @@ export class Value extends Union {
|
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
export function Value_$reflection() {
|
|
135
|
-
return union_type("ARCtrl.
|
|
135
|
+
return union_type("ARCtrl.Value", [], Value, () => [[["Item", OntologyAnnotation_$reflection()]], [["Item", int32_type]], [["Item", float64_type]], [["Item", string_type]]]);
|
|
136
136
|
}
|
|
137
137
|
|
package/Json/Assay.js
CHANGED
|
@@ -3,6 +3,7 @@ import { equals } from "../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
|
3
3
|
import { Json } from "../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
|
|
4
4
|
import { defaultSpaces, tryIncludeList, tryIncludeSeq, tryInclude } from "./Encode.js";
|
|
5
5
|
import { OntologyAnnotation_ISAJson_decoder, OntologyAnnotation_ISAJson_encoder, OntologyAnnotation_ROCrate_decoderDefinedTerm, OntologyAnnotation_ROCrate_decoderPropertyValue, OntologyAnnotation_ROCrate_encoderDefinedTerm, OntologyAnnotation_ROCrate_encoderPropertyValue, OntologyAnnotation_decoder, OntologyAnnotation_encoder } from "./OntologyAnnotation.js";
|
|
6
|
+
import { decoderCompressed, encoderCompressed, decoder as decoder_1, encoder as encoder_3 } from "./DataMap/DataMap.js";
|
|
6
7
|
import { ArcTable_decoderCompressed, ArcTable_encoderCompressed, ArcTable_decoder, ArcTable_encoder } from "./Table/ArcTable.js";
|
|
7
8
|
import { Person_ROCrate_decoder, Person_ROCrate_encoder, Person_decoder, Person_encoder } from "./Person.js";
|
|
8
9
|
import { Comment_ISAJson_decoder, Comment_ISAJson_encoder, Comment_ROCrate_decoder, Comment_ROCrate_encoder, Comment_decoder, Comment_encoder } from "./Comment.js";
|
|
@@ -15,11 +16,11 @@ import { Assay_tryIdentifierFromFileName, createMissingIdentifier, Assay_fileNam
|
|
|
15
16
|
import { JsonTypes_decomposeTechnologyPlatform, JsonTypes_composeTechnologyPlatform, ARCtrl_ArcTables__ArcTables_fromProcesses_Static_62A3309D, ARCtrl_ArcTables__ArcTables_GetProcesses } from "../Core/Conversion.js";
|
|
16
17
|
import { getCharacteristics, getUnits, getData } from "../Core/Process/ProcessSequence.js";
|
|
17
18
|
import { list as list_1 } from "../fable_modules/Thoth.Json.Core.0.2.1/Encode.fs.js";
|
|
18
|
-
import { Data_ISAJson_encoder, Data_ROCrate_encoder } from "./
|
|
19
|
+
import { Data_ISAJson_encoder, Data_ROCrate_encoder } from "./Data.js";
|
|
19
20
|
import { Process_ISAJson_decoder, Process_ISAJson_encoder, Process_ROCrate_decoder, Process_ROCrate_encoder } from "./Process/Process.js";
|
|
20
21
|
import { context_jsonvalue } from "./context/rocrate/isa_assay_context.js";
|
|
21
22
|
import { MaterialAttribute_ISAJson_encoder } from "./Process/MaterialAttribute.js";
|
|
22
|
-
import { encoder as
|
|
23
|
+
import { encoder as encoder_4 } from "./Process/AssayMaterials.js";
|
|
23
24
|
import { Option_fromValueWithDefault } from "../Core/Helper/Collections.js";
|
|
24
25
|
import { encode } from "./IDTable.js";
|
|
25
26
|
import { fromString } from "../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
|
|
@@ -35,12 +36,12 @@ export function Assay_encoder(assay) {
|
|
|
35
36
|
else {
|
|
36
37
|
return [tupledArg[0], v];
|
|
37
38
|
}
|
|
38
|
-
}, ofArray([["Identifier", new Json(0, [assay.Identifier])], tryInclude("MeasurementType", OntologyAnnotation_encoder, assay.MeasurementType), tryInclude("TechnologyType", OntologyAnnotation_encoder, assay.TechnologyType), tryInclude("TechnologyPlatform", OntologyAnnotation_encoder, assay.TechnologyPlatform), tryIncludeSeq("Tables", ArcTable_encoder, assay.Tables), tryIncludeSeq("Performers", Person_encoder, assay.Performers), tryIncludeSeq("Comments", Comment_encoder, assay.Comments)]))]);
|
|
39
|
+
}, ofArray([["Identifier", new Json(0, [assay.Identifier])], tryInclude("MeasurementType", OntologyAnnotation_encoder, assay.MeasurementType), tryInclude("TechnologyType", OntologyAnnotation_encoder, assay.TechnologyType), tryInclude("TechnologyPlatform", OntologyAnnotation_encoder, assay.TechnologyPlatform), tryInclude("DataMap", encoder_3, assay.DataMap), tryIncludeSeq("Tables", ArcTable_encoder, assay.Tables), tryIncludeSeq("Performers", Person_encoder, assay.Performers), tryIncludeSeq("Comments", Comment_encoder, assay.Comments)]))]);
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
export const Assay_decoder = object((get$) => {
|
|
42
|
-
let objectArg, objectArg_1, objectArg_2, objectArg_3, arg_9, objectArg_4,
|
|
43
|
-
return ArcAssay.create((objectArg = get$.Required, objectArg.Field("Identifier", string)), unwrap((objectArg_1 = get$.Optional, objectArg_1.Field("MeasurementType", OntologyAnnotation_decoder))), unwrap((objectArg_2 = get$.Optional, objectArg_2.Field("TechnologyType", OntologyAnnotation_decoder))), unwrap((objectArg_3 = get$.Optional, objectArg_3.Field("TechnologyPlatform", OntologyAnnotation_decoder))), unwrap((arg_9 = Decode_resizeArray(ArcTable_decoder), (objectArg_4 = get$.Optional, objectArg_4.Field("Tables", arg_9)))),
|
|
43
|
+
let objectArg, objectArg_1, objectArg_2, objectArg_3, arg_9, objectArg_4, objectArg_5, arg_13, objectArg_6, arg_15, objectArg_7;
|
|
44
|
+
return ArcAssay.create((objectArg = get$.Required, objectArg.Field("Identifier", string)), unwrap((objectArg_1 = get$.Optional, objectArg_1.Field("MeasurementType", OntologyAnnotation_decoder))), unwrap((objectArg_2 = get$.Optional, objectArg_2.Field("TechnologyType", OntologyAnnotation_decoder))), unwrap((objectArg_3 = get$.Optional, objectArg_3.Field("TechnologyPlatform", OntologyAnnotation_decoder))), unwrap((arg_9 = Decode_resizeArray(ArcTable_decoder), (objectArg_4 = get$.Optional, objectArg_4.Field("Tables", arg_9)))), unwrap((objectArg_5 = get$.Optional, objectArg_5.Field("DataMap", decoder_1))), unwrap((arg_13 = Decode_resizeArray(Person_decoder), (objectArg_6 = get$.Optional, objectArg_6.Field("Performers", arg_13)))), unwrap((arg_15 = Decode_resizeArray(Comment_decoder), (objectArg_7 = get$.Optional, objectArg_7.Field("Comments", arg_15)))));
|
|
44
45
|
});
|
|
45
46
|
|
|
46
47
|
export function Assay_encoderCompressed(stringTable, oaTable, cellTable, assay) {
|
|
@@ -52,13 +53,13 @@ export function Assay_encoderCompressed(stringTable, oaTable, cellTable, assay)
|
|
|
52
53
|
else {
|
|
53
54
|
return [tupledArg[0], v];
|
|
54
55
|
}
|
|
55
|
-
}, ofArray([["Identifier", new Json(0, [assay.Identifier])], tryInclude("MeasurementType", OntologyAnnotation_encoder, assay.MeasurementType), tryInclude("TechnologyType", OntologyAnnotation_encoder, assay.TechnologyType), tryInclude("TechnologyPlatform", OntologyAnnotation_encoder, assay.TechnologyPlatform), tryIncludeSeq("Tables", (table) => ArcTable_encoderCompressed(stringTable, oaTable, cellTable, table), assay.Tables), tryIncludeSeq("Performers", Person_encoder, assay.Performers), tryIncludeSeq("Comments", Comment_encoder, assay.Comments)]))]);
|
|
56
|
+
}, ofArray([["Identifier", new Json(0, [assay.Identifier])], tryInclude("MeasurementType", OntologyAnnotation_encoder, assay.MeasurementType), tryInclude("TechnologyType", OntologyAnnotation_encoder, assay.TechnologyType), tryInclude("TechnologyPlatform", OntologyAnnotation_encoder, assay.TechnologyPlatform), tryIncludeSeq("Tables", (table) => ArcTable_encoderCompressed(stringTable, oaTable, cellTable, table), assay.Tables), tryInclude("DataMap", (dm) => encoderCompressed(stringTable, oaTable, cellTable, dm), assay.DataMap), tryIncludeSeq("Performers", Person_encoder, assay.Performers), tryIncludeSeq("Comments", Comment_encoder, assay.Comments)]))]);
|
|
56
57
|
}
|
|
57
58
|
|
|
58
59
|
export function Assay_decoderCompressed(stringTable, oaTable, cellTable) {
|
|
59
60
|
return object((get$) => {
|
|
60
|
-
let objectArg, objectArg_1, objectArg_2, objectArg_3, arg_9, objectArg_4, arg_11, objectArg_5, arg_13, objectArg_6;
|
|
61
|
-
return ArcAssay.create((objectArg = get$.Required, objectArg.Field("Identifier", string)), unwrap((objectArg_1 = get$.Optional, objectArg_1.Field("MeasurementType", OntologyAnnotation_decoder))), unwrap((objectArg_2 = get$.Optional, objectArg_2.Field("TechnologyType", OntologyAnnotation_decoder))), unwrap((objectArg_3 = get$.Optional, objectArg_3.Field("TechnologyPlatform", OntologyAnnotation_decoder))), unwrap((arg_9 = Decode_resizeArray(ArcTable_decoderCompressed(stringTable, oaTable, cellTable)), (objectArg_4 = get$.Optional, objectArg_4.Field("Tables", arg_9)))),
|
|
61
|
+
let objectArg, objectArg_1, objectArg_2, objectArg_3, arg_9, objectArg_4, arg_11, objectArg_5, arg_13, objectArg_6, arg_15, objectArg_7;
|
|
62
|
+
return ArcAssay.create((objectArg = get$.Required, objectArg.Field("Identifier", string)), unwrap((objectArg_1 = get$.Optional, objectArg_1.Field("MeasurementType", OntologyAnnotation_decoder))), unwrap((objectArg_2 = get$.Optional, objectArg_2.Field("TechnologyType", OntologyAnnotation_decoder))), unwrap((objectArg_3 = get$.Optional, objectArg_3.Field("TechnologyPlatform", OntologyAnnotation_decoder))), unwrap((arg_9 = Decode_resizeArray(ArcTable_decoderCompressed(stringTable, oaTable, cellTable)), (objectArg_4 = get$.Optional, objectArg_4.Field("Tables", arg_9)))), unwrap((arg_11 = decoderCompressed(stringTable, oaTable, cellTable), (objectArg_5 = get$.Optional, objectArg_5.Field("DataMap", arg_11)))), unwrap((arg_13 = Decode_resizeArray(Person_decoder), (objectArg_6 = get$.Optional, objectArg_6.Field("Performers", arg_13)))), unwrap((arg_15 = Decode_resizeArray(Comment_decoder), (objectArg_7 = get$.Optional, objectArg_7.Field("Comments", arg_15)))));
|
|
62
63
|
});
|
|
63
64
|
}
|
|
64
65
|
|
|
@@ -105,7 +106,7 @@ export function Assay_ISAJson_encoder(studyName, idMap, a) {
|
|
|
105
106
|
const processes = ARCtrl_ArcTables__ArcTables_GetProcesses(a_1);
|
|
106
107
|
const encodedUnits = tryIncludeList("unitCategories", (oa) => OntologyAnnotation_ISAJson_encoder(idMap, oa), getUnits(processes));
|
|
107
108
|
const encodedCharacteristics = tryIncludeList("characteristicCategories", (value_1) => MaterialAttribute_ISAJson_encoder(idMap, value_1), getCharacteristics(processes));
|
|
108
|
-
const encodedMaterials = tryInclude("materials", (ps) =>
|
|
109
|
+
const encodedMaterials = tryInclude("materials", (ps) => encoder_4(idMap, ps), Option_fromValueWithDefault(empty(), processes));
|
|
109
110
|
const encocedDataFiles = tryIncludeList("dataFiles", (oa_1) => Data_ISAJson_encoder(idMap, oa_1), getData(processes));
|
|
110
111
|
const units = getUnits(processes);
|
|
111
112
|
return new Json(5, [choose((tupledArg) => {
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { singleton, ofArray, choose } from "
|
|
2
|
-
import { equals } from "
|
|
3
|
-
import { Json } from "
|
|
4
|
-
import { defaultSpaces, tryIncludeSeq, tryInclude } from "
|
|
1
|
+
import { singleton, ofArray, choose } from "../fable_modules/fable-library-js.4.16.0/List.js";
|
|
2
|
+
import { equals } from "../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
3
|
+
import { Json } from "../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
|
|
4
|
+
import { defaultSpaces, tryIncludeSeq, tryInclude } from "./Encode.js";
|
|
5
5
|
import { DataFile_ROCrate_decoder, DataFile_ROCrate_encoder, DataFile_ISAJson_decoder, DataFile_ISAJson_encoder } from "./DataFile.js";
|
|
6
|
-
import { Comment_ISAJson_decoder, Comment_ISAJson_encoder, Comment_ROCrate_decoder, Comment_ROCrate_encoder, Comment_decoder, Comment_encoder } from "
|
|
7
|
-
import { string, object } from "
|
|
8
|
-
import { Data } from "
|
|
9
|
-
import { defaultArg, unwrap } from "
|
|
10
|
-
import { Decode_objectNoAdditionalProperties, Decode_resizeArray, Decode_uri } from "
|
|
11
|
-
import { decodeString, encodeString } from "
|
|
12
|
-
import { printf, toText, replace } from "
|
|
13
|
-
import { URIModule_toString } from "
|
|
14
|
-
import { list as list_1 } from "
|
|
15
|
-
import { context_jsonvalue } from "
|
|
16
|
-
import { encode } from "
|
|
17
|
-
import { fromString } from "
|
|
18
|
-
import { toString } from "
|
|
6
|
+
import { Comment_ISAJson_decoder, Comment_ISAJson_encoder, Comment_ROCrate_decoder, Comment_ROCrate_encoder, Comment_decoder, Comment_encoder } from "./Comment.js";
|
|
7
|
+
import { string, object } from "../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
8
|
+
import { Data } from "../Core/Data.js";
|
|
9
|
+
import { defaultArg, unwrap } from "../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
10
|
+
import { Decode_objectNoAdditionalProperties, Decode_resizeArray, Decode_uri } from "./Decode.js";
|
|
11
|
+
import { decodeString, encodeString } from "./StringTable.js";
|
|
12
|
+
import { printf, toText, replace } from "../fable_modules/fable-library-js.4.16.0/String.js";
|
|
13
|
+
import { URIModule_toString } from "../Core/URI.js";
|
|
14
|
+
import { list as list_1 } from "../fable_modules/Thoth.Json.Core.0.2.1/Encode.fs.js";
|
|
15
|
+
import { context_jsonvalue } from "./context/rocrate/isa_data_context.js";
|
|
16
|
+
import { encode } from "./IDTable.js";
|
|
17
|
+
import { fromString } from "../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
|
|
18
|
+
import { toString } from "../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
|
|
19
19
|
|
|
20
20
|
export function Data_encoder(d) {
|
|
21
21
|
return new Json(5, [choose((tupledArg) => {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ErrorReason$1, Json } from "
|
|
2
|
-
import { string } from "
|
|
3
|
-
import { FSharpResult$2 } from "
|
|
4
|
-
import { DataFile } from "
|
|
5
|
-
import { fromString } from "
|
|
6
|
-
import { printf, toText } from "
|
|
7
|
-
import { toString } from "
|
|
8
|
-
import { defaultSpaces } from "
|
|
9
|
-
import { unwrap } from "
|
|
1
|
+
import { ErrorReason$1, Json } from "../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
|
|
2
|
+
import { string } from "../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
3
|
+
import { FSharpResult$2 } from "../fable_modules/fable-library-js.4.16.0/Result.js";
|
|
4
|
+
import { DataFile } from "../Core/DataFile.js";
|
|
5
|
+
import { fromString } from "../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
|
|
6
|
+
import { printf, toText } from "../fable_modules/fable-library-js.4.16.0/String.js";
|
|
7
|
+
import { toString } from "../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
|
|
8
|
+
import { defaultSpaces } from "./Encode.js";
|
|
9
|
+
import { unwrap } from "../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
10
10
|
|
|
11
11
|
export function DataFile_ROCrate_encoder(value) {
|
|
12
12
|
switch (value.tag) {
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ofArray, choose } from "../../fable_modules/fable-library-js.4.16.0/List.js";
|
|
2
|
+
import { equals } from "../../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
3
|
+
import { Json } from "../../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
|
|
4
|
+
import { Data_decoder, Data_encoder } from "../Data.js";
|
|
5
|
+
import { tryInclude } from "../Encode.js";
|
|
6
|
+
import { OntologyAnnotation_decoder, OntologyAnnotation_encoder } from "../OntologyAnnotation.js";
|
|
7
|
+
import { DataContext_$ctor_Z780A8A2A, DataContext__get_Label, DataContext__get_GeneratedBy, DataContext__get_Description, DataContext__get_ObjectType, DataContext__get_Unit, DataContext__get_Explication } from "../../Core/DataContext.js";
|
|
8
|
+
import { string, object } from "../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
9
|
+
import { unwrap } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
10
|
+
|
|
11
|
+
export function encoder(dc) {
|
|
12
|
+
return new Json(5, [choose((tupledArg) => {
|
|
13
|
+
const v = tupledArg[1];
|
|
14
|
+
if (equals(v, new Json(3, []))) {
|
|
15
|
+
return void 0;
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
return [tupledArg[0], v];
|
|
19
|
+
}
|
|
20
|
+
}, ofArray([["data", Data_encoder(dc)], tryInclude("explication", OntologyAnnotation_encoder, DataContext__get_Explication(dc)), tryInclude("unit", OntologyAnnotation_encoder, DataContext__get_Unit(dc)), tryInclude("objectType", OntologyAnnotation_encoder, DataContext__get_ObjectType(dc)), tryInclude("description", (value) => (new Json(0, [value])), DataContext__get_Description(dc)), tryInclude("generatedBy", (value_2) => (new Json(0, [value_2])), DataContext__get_GeneratedBy(dc)), tryInclude("label", (value_4) => (new Json(0, [value_4])), DataContext__get_Label(dc))]))]);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const decoder = object((get$) => {
|
|
24
|
+
let objectArg_1, objectArg_2, objectArg_3, objectArg_4, objectArg_5, objectArg_6;
|
|
25
|
+
let data;
|
|
26
|
+
const objectArg = get$.Required;
|
|
27
|
+
data = objectArg.Field("data", Data_decoder);
|
|
28
|
+
return DataContext_$ctor_Z780A8A2A(unwrap(data.ID), unwrap(data.Name), unwrap(data.DataType), unwrap(data.Format), unwrap(data.SelectorFormat), unwrap((objectArg_1 = get$.Optional, objectArg_1.Field("explication", OntologyAnnotation_decoder))), unwrap((objectArg_2 = get$.Optional, objectArg_2.Field("unit", OntologyAnnotation_decoder))), unwrap((objectArg_3 = get$.Optional, objectArg_3.Field("objectType", OntologyAnnotation_decoder))), unwrap((objectArg_4 = get$.Optional, objectArg_4.Field("label", string))), unwrap((objectArg_5 = get$.Optional, objectArg_5.Field("description", string))), unwrap((objectArg_6 = get$.Optional, objectArg_6.Field("generatedBy", string))), data.Comments);
|
|
29
|
+
});
|
|
30
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { seq } from "../../fable_modules/Thoth.Json.Core.0.2.1/Encode.fs.js";
|
|
2
|
+
import { map } from "../../fable_modules/fable-library-js.4.16.0/Seq.js";
|
|
3
|
+
import { decoder as decoder_1, encoder as encoder_1 } from "./DataContext.js";
|
|
4
|
+
import { DataMap_$ctor_4E3220A7, DataMap__get_DataContexts } from "../../Core/DataMap.js";
|
|
5
|
+
import { Json } from "../../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
|
|
6
|
+
import { object } from "../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
7
|
+
import { Decode_resizeArray } from "../Decode.js";
|
|
8
|
+
|
|
9
|
+
export function encoder(dm) {
|
|
10
|
+
return new Json(5, [[["dataContexts", seq(map(encoder_1, DataMap__get_DataContexts(dm)))]]]);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const decoder = object((get$) => {
|
|
14
|
+
let arg_1, objectArg;
|
|
15
|
+
return DataMap_$ctor_4E3220A7((arg_1 = Decode_resizeArray(decoder_1), (objectArg = get$.Required, objectArg.Field("dataContexts", arg_1))));
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export function encoderCompressed(stringTable, oaTable, cellTable, dm) {
|
|
19
|
+
return encoder(dm);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function decoderCompressed(stringTable, oaTable, cellTable) {
|
|
23
|
+
return decoder;
|
|
24
|
+
}
|
|
25
|
+
|
package/Json/Encode.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defaultArg, value as value_2 } from "../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
2
2
|
import { Json } from "../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
|
|
3
|
-
import { map, isEmpty } from "../fable_modules/fable-library-js.4.16.0/Seq.js";
|
|
3
|
+
import { append, map, isEmpty } from "../fable_modules/fable-library-js.4.16.0/Seq.js";
|
|
4
4
|
import { list as list_1, seq } from "../fable_modules/Thoth.Json.Core.0.2.1/Encode.fs.js";
|
|
5
5
|
import { item, map as map_1 } from "../fable_modules/fable-library-js.4.16.0/Array.js";
|
|
6
6
|
import { map as map_2, isEmpty as isEmpty_1 } from "../fable_modules/fable-library-js.4.16.0/List.js";
|
|
@@ -43,3 +43,12 @@ export function dateTime(d) {
|
|
|
43
43
|
return new Json(0, [item(0, toString(d, "O", {}).split("+"))]);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
export function addPropertyToObject(name, value, obj) {
|
|
47
|
+
if (obj.tag === 5) {
|
|
48
|
+
return new Json(5, [append(obj.fields[0], [[name, value]])]);
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
throw new Error("Expected object");
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { genID, decoder as decoder_1, encoder } from "
|
|
1
|
+
import { genID, decoder as decoder_1, encoder } from "../PropertyValue.js";
|
|
2
2
|
import { Component, Component_decomposeName_Z721C83C5, Component__get_ComponentName, Component_createAsPV } from "../../Core/Process/Component.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";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { genID, decoder as decoder_1, encoder } from "
|
|
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";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { genID, decoder as decoder_1, encoder } from "
|
|
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";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Sample_ISAJson_decoder, Sample_ISAJson_encoder, Sample_ROCrate_decoder, Sample_ROCrate_encoder } from "./Sample.js";
|
|
2
|
-
import { Data_ISAJson_decoder, Data_ISAJson_encoder, Data_ROCrate_decoder, Data_ROCrate_encoder } from "
|
|
2
|
+
import { Data_ISAJson_decoder, Data_ISAJson_encoder, Data_ROCrate_decoder, Data_ROCrate_encoder } from "../Data.js";
|
|
3
3
|
import { Material_ISAJson_decoder, Material_ISAJson_encoder, Material_ROCrate_decoder, Material_ROCrate_encoder } from "./Material.js";
|
|
4
4
|
import { Source_ISAJson_decoder, Source_ISAJson_encoder, Source_ROCrate_decoder, Source_ROCrate_encoder } from "./Source.js";
|
|
5
5
|
import { map, oneOf } from "../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Data_ISAJson_decoder, Data_ISAJson_encoder, Data_ROCrate_decoder, Data_ROCrate_encoder } from "
|
|
1
|
+
import { Data_ISAJson_decoder, Data_ISAJson_encoder, Data_ROCrate_decoder, Data_ROCrate_encoder } from "../Data.js";
|
|
2
2
|
import { Material_ISAJson_decoder, Material_ISAJson_encoder, Material_ROCrate_decoder, Material_ROCrate_encoder } from "./Material.js";
|
|
3
3
|
import { Sample_ISAJson_decoder, Sample_ISAJson_encoder, Sample_ROCrate_decoder, Sample_ROCrate_encoder } from "./Sample.js";
|
|
4
4
|
import { map, oneOf } from "../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { decoder as decoder_1, encoder } from "
|
|
1
|
+
import { decoder as decoder_1, encoder } from "../PropertyValue.js";
|
|
2
2
|
import { ProcessParameterValue } from "../../Core/Process/ProcessParameterValue.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";
|
|
@@ -15,7 +15,7 @@ import { toString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode
|
|
|
15
15
|
|
|
16
16
|
export const ProcessParameterValue_ROCrate_encoder = encoder;
|
|
17
17
|
|
|
18
|
-
export const ProcessParameterValue_ROCrate_decoder = decoder_1((category, value, unit) => ProcessParameterValue.createAsPV(category, value, unit));
|
|
18
|
+
export const ProcessParameterValue_ROCrate_decoder = decoder_1((alternateName, measurementMethod, description, category, value, unit) => ProcessParameterValue.createAsPV(alternateName, measurementMethod, description, category, value, unit));
|
|
19
19
|
|
|
20
20
|
export function ProcessParameterValue_ISAJson_genID(oa) {
|
|
21
21
|
throw new Error("Not implemented");
|
package/Json/Process/Value.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Json } from "../../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
|
|
2
2
|
import { OntologyAnnotation_ISAJson_decoder, OntologyAnnotation_ISAJson_encoder } from "../OntologyAnnotation.js";
|
|
3
3
|
import { string, float, int, map, oneOf } from "../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
4
|
-
import { Value } from "../../Core/
|
|
4
|
+
import { Value } from "../../Core/Value.js";
|
|
5
5
|
import { ofArray } from "../../fable_modules/fable-library-js.4.16.0/List.js";
|
|
6
6
|
import { fromString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
|
|
7
7
|
import { printf, toText } from "../../fable_modules/fable-library-js.4.16.0/String.js";
|
|
@@ -23,7 +23,7 @@ export function Value_ISAJson_encoder(idMap, value) {
|
|
|
23
23
|
|
|
24
24
|
export const Value_ISAJson_decoder = oneOf(ofArray([map((Item) => (new Value(1, [Item])), int), map((Item_1) => (new Value(2, [Item_1])), float), map((Item_2) => (new Value(0, [Item_2])), OntologyAnnotation_ISAJson_decoder), map((Item_3) => (new Value(3, [Item_3])), string)]));
|
|
25
25
|
|
|
26
|
-
export function
|
|
26
|
+
export function ARCtrl_Value__Value_fromISAJsonString_Static_Z721C83C5(s) {
|
|
27
27
|
const matchValue = fromString(Value_ISAJson_decoder, s);
|
|
28
28
|
if (matchValue.tag === 1) {
|
|
29
29
|
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
@@ -33,7 +33,7 @@ export function ARCtrl_Process_Value__Value_fromISAJsonString_Static_Z721C83C5(s
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
export function
|
|
36
|
+
export function ARCtrl_Value__Value_toISAJsonString_Static_71136F3F(spaces) {
|
|
37
37
|
return (v) => {
|
|
38
38
|
const value = Value_ISAJson_encoder(void 0, v);
|
|
39
39
|
return toString(defaultSpaces(spaces), value);
|