@nfdi4plants/arctrl 2.0.0-beta.1 → 2.0.0-beta.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/ARC.js +12 -8
- package/Contract/ArcAssay.js +4 -4
- package/Contract/ArcStudy.js +3 -3
- package/Contract/Datamap.js +1 -1
- package/Contract/ValidationPackagesConfig.js +95 -0
- package/Core/ArcTypes.js +4 -4
- 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/CompositeCell.js +12 -23
- 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 +2 -2
- 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 +5 -5
- package/Spreadsheet/AnnotationTable/CompositeColumn.js +10 -8
- package/Spreadsheet/ArcAssay.js +32 -16
- package/Spreadsheet/ArcInvestigation.js +2 -2
- package/Spreadsheet/ArcStudy.js +26 -10
- package/Spreadsheet/DataMap.js +2 -2
- package/Spreadsheet/DataMapTable/DataMapColumn.js +1 -1
- package/Spreadsheet/DataMapTable/DataMapHeader.js +1 -1
- package/Spreadsheet/DataMapTable/DataMapTable.js +8 -8
- package/Spreadsheet/Metadata/SparseTable.js +7 -7
- package/Spreadsheet/Template.js +2 -2
- package/ValidationPackages/ValidationPackage.js +54 -0
- package/ValidationPackages/ValidationPackagesConfig.js +55 -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/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/FsSpreadsheet.fableproj +1 -0
- package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/FsWorksheet.fs +4 -0
- package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/FsWorksheet.fs.js +9 -1
- package/fable_modules/FsSpreadsheet.6.2.0/Json/Cell.fs +45 -0
- package/fable_modules/FsSpreadsheet.6.2.0/Json/Cell.fs.js +38 -0
- package/fable_modules/FsSpreadsheet.6.2.0/Json/Column.fs +28 -0
- package/fable_modules/FsSpreadsheet.6.2.0/Json/Column.fs.js +24 -0
- package/fable_modules/FsSpreadsheet.6.2.0/Json/Row.fs +28 -0
- package/fable_modules/FsSpreadsheet.6.2.0/Json/Row.fs.js +24 -0
- package/fable_modules/FsSpreadsheet.6.2.0/Json/Workbook.fs +33 -0
- package/fable_modules/FsSpreadsheet.6.2.0/Json/Workbook.fs.js +35 -0
- package/fable_modules/FsSpreadsheet.6.2.0/Json/Worksheet.fs +148 -0
- package/fable_modules/FsSpreadsheet.6.2.0/Json/Worksheet.fs.js +109 -0
- package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/obj/Release/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +3 -3
- package/fable_modules/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
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Cell.fs +0 -23
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Cell.fs.js +0 -21
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Row.fs +0 -23
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Row.fs.js +0 -19
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Workbook.fs +0 -20
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Workbook.fs.js +0 -21
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Worksheet.fs +0 -49
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Worksheet.fs.js +0 -44
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Cells/FsCell.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Cells/FsCell.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Cells/FsCellsCollection.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Cells/FsCellsCollection.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/CellBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/CellBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/ColumnBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/ColumnBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/DSL.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/DSL.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/Expression.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/Expression.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/Operators.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/Operators.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/RowBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/RowBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/SheetBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/SheetBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/TableBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/TableBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/Transform.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/Transform.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/Types.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/Types.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/WorkbookBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/WorkbookBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/FsAddress.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/FsAddress.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/FsColumn.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/FsColumn.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/FsRow.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/FsRow.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/FsWorkbook.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/FsWorkbook.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Json/Table.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Json/Table.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Json/Value.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Json/Value.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Ranges/FsRange.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Ranges/FsRange.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Ranges/FsRangeAddress.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Ranges/FsRangeAddress.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Ranges/FsRangeBase.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Ranges/FsRangeBase.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Ranges/FsRangeColumn.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Ranges/FsRangeColumn.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Ranges/FsRangeRow.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Ranges/FsRangeRow.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/SheetBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/SheetBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Tables/FsTable.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Tables/FsTable.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Tables/FsTableField.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Tables/FsTableField.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Tables/FsTableRow.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Tables/FsTableRow.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/obj/Debug/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
|
@@ -2,7 +2,7 @@ import { Record, toString } from "../../fable_modules/fable-library-js.4.16.0/Ty
|
|
|
2
2
|
import { unwrap, defaultArg, bind, map } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
3
3
|
import { record_type, option_type, string_type } from "../../fable_modules/fable-library-js.4.16.0/Reflection.js";
|
|
4
4
|
import { Factor, Factor_$reflection } from "./Factor.js";
|
|
5
|
-
import { Value_$reflection } from "
|
|
5
|
+
import { Value_$reflection } from "../Value.js";
|
|
6
6
|
import { OntologyAnnotation_$reflection } from "../OntologyAnnotation.js";
|
|
7
7
|
import { int32ToString } from "../../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
8
8
|
import { printf, toText } from "../../fable_modules/fable-library-js.4.16.0/String.js";
|
|
@@ -35,6 +35,15 @@ export class FactorValue extends Record {
|
|
|
35
35
|
}, this$.Value);
|
|
36
36
|
return (category == null) ? ((value == null) ? "" : ((value_2 = value, value_2))) : ((value == null) ? ((category_2 = category, (category_2 + ":") + "No Value")) : ((category_1 = category, (value_1 = value, (category_1 + ":") + value_1))));
|
|
37
37
|
}
|
|
38
|
+
AlternateName() {
|
|
39
|
+
return void 0;
|
|
40
|
+
}
|
|
41
|
+
MeasurementMethod() {
|
|
42
|
+
return void 0;
|
|
43
|
+
}
|
|
44
|
+
Description() {
|
|
45
|
+
return void 0;
|
|
46
|
+
}
|
|
38
47
|
GetCategory() {
|
|
39
48
|
const this$ = this;
|
|
40
49
|
return bind((f) => f.FactorType, this$.Category);
|
|
@@ -60,12 +69,12 @@ export function FactorValue_make(id, category, value, unit) {
|
|
|
60
69
|
return new FactorValue(id, category, value, unit);
|
|
61
70
|
}
|
|
62
71
|
|
|
63
|
-
export function
|
|
72
|
+
export function FactorValue_create_30BDC49(Id, Category, Value, Unit) {
|
|
64
73
|
return FactorValue_make(Id, Category, Value, Unit);
|
|
65
74
|
}
|
|
66
75
|
|
|
67
76
|
export function FactorValue_get_empty() {
|
|
68
|
-
return
|
|
77
|
+
return FactorValue_create_30BDC49();
|
|
69
78
|
}
|
|
70
79
|
|
|
71
80
|
export function FactorValue__get_ValueText(this$) {
|
|
@@ -122,7 +131,7 @@ export function FactorValue_nameEqualsString(name, fv) {
|
|
|
122
131
|
return FactorValue__get_NameText(fv) === name;
|
|
123
132
|
}
|
|
124
133
|
|
|
125
|
-
export function FactorValue_createAsPV(category, value, unit) {
|
|
126
|
-
return
|
|
134
|
+
export function FactorValue_createAsPV(alternateName, measurementMethod, description, category, value, unit) {
|
|
135
|
+
return FactorValue_create_30BDC49(void 0, unwrap(map((c) => Factor.create(void 0, c), category)), unwrap(value), unwrap(unit));
|
|
127
136
|
}
|
|
128
137
|
|
|
@@ -2,7 +2,7 @@ import { Record, toString } from "../../fable_modules/fable-library-js.4.16.0/Ty
|
|
|
2
2
|
import { unwrap, defaultArg, bind, map } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
3
3
|
import { MaterialAttribute__SetCategory_ZDED3A0F, MaterialAttribute_create_A220A8A, MaterialAttribute__MapCategory_658CFBF6, MaterialAttribute__get_TryNameText, MaterialAttribute_$reflection, MaterialAttribute__get_NameText } from "./MaterialAttribute.js";
|
|
4
4
|
import { record_type, option_type, string_type } from "../../fable_modules/fable-library-js.4.16.0/Reflection.js";
|
|
5
|
-
import { Value_$reflection } from "
|
|
5
|
+
import { Value_$reflection } from "../Value.js";
|
|
6
6
|
import { OntologyAnnotation_$reflection } from "../OntologyAnnotation.js";
|
|
7
7
|
import { int32ToString } from "../../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
8
8
|
import { printf, toText } from "../../fable_modules/fable-library-js.4.16.0/String.js";
|
|
@@ -35,6 +35,15 @@ export class MaterialAttributeValue extends Record {
|
|
|
35
35
|
}, this$.Value);
|
|
36
36
|
return (category == null) ? ((value == null) ? "" : ((value_2 = value, value_2))) : ((value == null) ? ((category_2 = category, (category_2 + ":") + "No Value")) : ((category_1 = category, (value_1 = value, (category_1 + ":") + value_1))));
|
|
37
37
|
}
|
|
38
|
+
AlternateName() {
|
|
39
|
+
return void 0;
|
|
40
|
+
}
|
|
41
|
+
MeasurementMethod() {
|
|
42
|
+
return void 0;
|
|
43
|
+
}
|
|
44
|
+
Description() {
|
|
45
|
+
return void 0;
|
|
46
|
+
}
|
|
38
47
|
GetCategory() {
|
|
39
48
|
const this$ = this;
|
|
40
49
|
return bind((x) => x.CharacteristicType, this$.Category);
|
|
@@ -60,12 +69,12 @@ export function MaterialAttributeValue_make(id, category, value, unit) {
|
|
|
60
69
|
return new MaterialAttributeValue(id, category, value, unit);
|
|
61
70
|
}
|
|
62
71
|
|
|
63
|
-
export function
|
|
72
|
+
export function MaterialAttributeValue_create_ZE1D108D(Id, Category, Value, Unit) {
|
|
64
73
|
return MaterialAttributeValue_make(Id, Category, Value, Unit);
|
|
65
74
|
}
|
|
66
75
|
|
|
67
76
|
export function MaterialAttributeValue_get_empty() {
|
|
68
|
-
return
|
|
77
|
+
return MaterialAttributeValue_create_ZE1D108D();
|
|
69
78
|
}
|
|
70
79
|
|
|
71
80
|
/**
|
|
@@ -139,7 +148,7 @@ export function MaterialAttributeValue_nameEqualsString(name, mv) {
|
|
|
139
148
|
return MaterialAttributeValue__get_NameText(mv) === name;
|
|
140
149
|
}
|
|
141
150
|
|
|
142
|
-
export function MaterialAttributeValue_createAsPV(category, value, unit) {
|
|
143
|
-
return
|
|
151
|
+
export function MaterialAttributeValue_createAsPV(alternateName, measurementMethod, description, category, value, unit) {
|
|
152
|
+
return MaterialAttributeValue_create_ZE1D108D(void 0, unwrap(map((c) => MaterialAttribute_create_A220A8A(void 0, c), category)), unwrap(value), unwrap(unit));
|
|
144
153
|
}
|
|
145
154
|
|
|
@@ -4,7 +4,7 @@ import { printf, toText } from "../../fable_modules/fable-library-js.4.16.0/Stri
|
|
|
4
4
|
import { ProtocolParameter_$reflection, ProtocolParameter } from "./ProtocolParameter.js";
|
|
5
5
|
import { Record, toString } from "../../fable_modules/fable-library-js.4.16.0/Types.js";
|
|
6
6
|
import { record_type, option_type } from "../../fable_modules/fable-library-js.4.16.0/Reflection.js";
|
|
7
|
-
import { Value_$reflection } from "
|
|
7
|
+
import { Value_$reflection } from "../Value.js";
|
|
8
8
|
import { OntologyAnnotation_$reflection } from "../OntologyAnnotation.js";
|
|
9
9
|
|
|
10
10
|
export class ProcessParameterValue extends Record {
|
|
@@ -79,7 +79,7 @@ export class ProcessParameterValue extends Record {
|
|
|
79
79
|
static getCategory(pv) {
|
|
80
80
|
return pv.Category;
|
|
81
81
|
}
|
|
82
|
-
static createAsPV(category, value, unit) {
|
|
82
|
+
static createAsPV(alternateName, measurementMethod, description, category, value, unit) {
|
|
83
83
|
const category_1 = map((c) => ProtocolParameter.create(void 0, c), category);
|
|
84
84
|
return ProcessParameterValue.create(unwrap(category_1), unwrap(value), unwrap(unit));
|
|
85
85
|
}
|
|
@@ -103,6 +103,15 @@ export class ProcessParameterValue extends Record {
|
|
|
103
103
|
}, this$.Value);
|
|
104
104
|
return (category == null) ? ((value == null) ? "" : ((value_2 = value, value_2))) : ((value == null) ? ((category_2 = category, (category_2 + ":") + "No Value")) : ((category_1 = category, (value_1 = value, (category_1 + ":") + value_1))));
|
|
105
105
|
}
|
|
106
|
+
AlternateName() {
|
|
107
|
+
return void 0;
|
|
108
|
+
}
|
|
109
|
+
MeasurementMethod() {
|
|
110
|
+
return void 0;
|
|
111
|
+
}
|
|
112
|
+
Description() {
|
|
113
|
+
return void 0;
|
|
114
|
+
}
|
|
106
115
|
GetCategory() {
|
|
107
116
|
const this$ = this;
|
|
108
117
|
return bind((p) => p.ParameterName, this$.Category);
|
|
@@ -54,33 +54,19 @@ export class CompositeCell extends Union {
|
|
|
54
54
|
}
|
|
55
55
|
ToUnitizedCell() {
|
|
56
56
|
const this$ = this;
|
|
57
|
-
|
|
58
|
-
case 1:
|
|
59
|
-
return new CompositeCell(2, ["", OntologyAnnotation.create(this$.fields[0])]);
|
|
60
|
-
case 0:
|
|
61
|
-
return new CompositeCell(2, ["", this$.fields[0]]);
|
|
62
|
-
case 3:
|
|
63
|
-
throw new Error("Data cell cannot be converted to Unitized cell.");
|
|
64
|
-
default:
|
|
65
|
-
return this$;
|
|
66
|
-
}
|
|
57
|
+
return (this$.tag === 1) ? (new CompositeCell(2, ["", OntologyAnnotation.create(this$.fields[0])])) : ((this$.tag === 0) ? (new CompositeCell(2, ["", this$.fields[0]])) : ((this$.tag === 3) ? (new CompositeCell(2, ["", OntologyAnnotation.create(this$.fields[0].NameText)])) : this$));
|
|
67
58
|
}
|
|
68
59
|
ToTermCell() {
|
|
69
60
|
const this$ = this;
|
|
70
|
-
|
|
71
|
-
case 2:
|
|
72
|
-
return new CompositeCell(0, [this$.fields[1]]);
|
|
73
|
-
case 1:
|
|
74
|
-
return new CompositeCell(0, [OntologyAnnotation.create(this$.fields[0])]);
|
|
75
|
-
case 3:
|
|
76
|
-
throw new Error("Data cell cannot be converted to Term cell.");
|
|
77
|
-
default:
|
|
78
|
-
return this$;
|
|
79
|
-
}
|
|
61
|
+
return (this$.tag === 2) ? (new CompositeCell(0, [this$.fields[1]])) : ((this$.tag === 1) ? (new CompositeCell(0, [OntologyAnnotation.create(this$.fields[0])])) : ((this$.tag === 3) ? (new CompositeCell(0, [new OntologyAnnotation(this$.fields[0].NameText)])) : this$));
|
|
80
62
|
}
|
|
81
63
|
ToFreeTextCell() {
|
|
82
64
|
const this$ = this;
|
|
83
|
-
return (this$.tag === 0) ? (new CompositeCell(1, [this$.fields[0].NameText])) : ((this$.tag === 2) ? (new CompositeCell(1, [this$.fields[1].NameText])) : ((this$.tag === 3) ? (new CompositeCell(1, [
|
|
65
|
+
return (this$.tag === 0) ? (new CompositeCell(1, [this$.fields[0].NameText])) : ((this$.tag === 2) ? (new CompositeCell(1, [this$.fields[1].NameText])) : ((this$.tag === 3) ? (new CompositeCell(1, [this$.fields[0].NameText])) : this$));
|
|
66
|
+
}
|
|
67
|
+
ToDataCell() {
|
|
68
|
+
const this$ = this;
|
|
69
|
+
return (this$.tag === 1) ? CompositeCell.createDataFromString(this$.fields[0]) : ((this$.tag === 0) ? CompositeCell.createDataFromString(this$.fields[0].NameText) : ((this$.tag === 3) ? this$ : CompositeCell.createDataFromString(this$.fields[1].NameText)));
|
|
84
70
|
}
|
|
85
71
|
get AsUnitized() {
|
|
86
72
|
const this$ = this;
|
|
@@ -159,8 +145,11 @@ export class CompositeCell extends Union {
|
|
|
159
145
|
return CompositeCell.createUnitized(this$.fields[0], oa);
|
|
160
146
|
case 1:
|
|
161
147
|
return CompositeCell.createFreeText(oa.NameText);
|
|
162
|
-
case 3:
|
|
163
|
-
|
|
148
|
+
case 3: {
|
|
149
|
+
const d = this$.fields[0];
|
|
150
|
+
d.Name = oa.NameText;
|
|
151
|
+
return new CompositeCell(3, [d]);
|
|
152
|
+
}
|
|
164
153
|
default:
|
|
165
154
|
return CompositeCell.createTerm(oa);
|
|
166
155
|
}
|
|
@@ -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);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Json } from "
|
|
2
|
-
import { unwrap, map } from "
|
|
3
|
-
import { ofArray, choose } from "
|
|
4
|
-
import { equals } from "
|
|
5
|
-
import { tryInclude } from "
|
|
6
|
-
import { context_jsonvalue } from "
|
|
7
|
-
import { string, object } from "
|
|
8
|
-
import { OntologyAnnotation } from "
|
|
9
|
-
import { AnnotationValue_decoder } from "
|
|
10
|
-
import { Value } from "
|
|
1
|
+
import { Json } from "../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
|
|
2
|
+
import { unwrap, map } from "../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
3
|
+
import { ofArray, choose } from "../fable_modules/fable-library-js.4.16.0/List.js";
|
|
4
|
+
import { equals } from "../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
5
|
+
import { tryInclude } from "./Encode.js";
|
|
6
|
+
import { context_jsonvalue } from "./context/rocrate/property_value_context.js";
|
|
7
|
+
import { string, object } from "../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
8
|
+
import { OntologyAnnotation } from "../Core/OntologyAnnotation.js";
|
|
9
|
+
import { AnnotationValue_decoder } from "./OntologyAnnotation.js";
|
|
10
|
+
import { Value } from "../Core/Value.js";
|
|
11
11
|
|
|
12
12
|
export function genID(p) {
|
|
13
13
|
const matchValue = p.GetCategory();
|
|
@@ -97,19 +97,28 @@ export function encoder(pv) {
|
|
|
97
97
|
else {
|
|
98
98
|
return [tupledArg[0], v_1];
|
|
99
99
|
}
|
|
100
|
-
}, ofArray([["@id", new Json(0, [genID(pv)])], ["@type", new Json(0, ["PropertyValue"])], ["additionalType", new Json(0, [pv.GetAdditionalType()])], tryInclude("
|
|
100
|
+
}, ofArray([["@id", new Json(0, [genID(pv)])], ["@type", new Json(0, ["PropertyValue"])], ["additionalType", new Json(0, [pv.GetAdditionalType()])], tryInclude("alternateName", (value_11) => (new Json(0, [value_11])), pv.AlternateName()), tryInclude("measurementMethod", (value_13) => (new Json(0, [value_13])), pv.MeasurementMethod()), tryInclude("description", (value_15) => (new Json(0, [value_15])), pv.Description()), tryInclude("category", (value_17) => (new Json(0, [value_17])), patternInput[0]), tryInclude("categoryCode", (value_19) => (new Json(0, [value_19])), patternInput[1]), tryInclude("value", (x) => x, patternInput_1[0]), tryInclude("valueCode", (x_1) => x_1, patternInput_1[1]), tryInclude("unit", (value_21) => (new Json(0, [value_21])), patternInput_2[0]), tryInclude("unitCode", (value_23) => (new Json(0, [value_23])), patternInput_2[1]), ["@context", context_jsonvalue]]))]);
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
export function decoder(create) {
|
|
104
104
|
return object((get$) => {
|
|
105
|
-
let value,
|
|
105
|
+
let value, objectArg_7, code_4, objectArg_8;
|
|
106
|
+
let alternateName;
|
|
107
|
+
const objectArg = get$.Optional;
|
|
108
|
+
alternateName = objectArg.Field("alternateName", string);
|
|
109
|
+
let measurementMethod;
|
|
110
|
+
const objectArg_1 = get$.Optional;
|
|
111
|
+
measurementMethod = objectArg_1.Field("measurementMethod", string);
|
|
112
|
+
let description;
|
|
113
|
+
const objectArg_2 = get$.Optional;
|
|
114
|
+
description = objectArg_2.Field("description", string);
|
|
106
115
|
let category;
|
|
107
116
|
let name;
|
|
108
|
-
const
|
|
109
|
-
name =
|
|
117
|
+
const objectArg_3 = get$.Optional;
|
|
118
|
+
name = objectArg_3.Field("category", string);
|
|
110
119
|
let code;
|
|
111
|
-
const
|
|
112
|
-
code =
|
|
120
|
+
const objectArg_4 = get$.Optional;
|
|
121
|
+
code = objectArg_4.Field("categoryCode", string);
|
|
113
122
|
let matchResult, code_1;
|
|
114
123
|
if (name == null) {
|
|
115
124
|
if (code != null) {
|
|
@@ -161,11 +170,11 @@ export function decoder(create) {
|
|
|
161
170
|
}
|
|
162
171
|
let unit;
|
|
163
172
|
let name_1;
|
|
164
|
-
const
|
|
165
|
-
name_1 =
|
|
173
|
+
const objectArg_5 = get$.Optional;
|
|
174
|
+
name_1 = objectArg_5.Field("unit", string);
|
|
166
175
|
let code_2;
|
|
167
|
-
const
|
|
168
|
-
code_2 =
|
|
176
|
+
const objectArg_6 = get$.Optional;
|
|
177
|
+
code_2 = objectArg_6.Field("unitCode", string);
|
|
169
178
|
let matchResult_1, code_3;
|
|
170
179
|
if (name_1 == null) {
|
|
171
180
|
if (code_2 != null) {
|
|
@@ -215,7 +224,7 @@ export function decoder(create) {
|
|
|
215
224
|
throw new Error(`Error while decoding unit (name:${name_1}, code:${code_3}): ${err_3}`);
|
|
216
225
|
}
|
|
217
226
|
}
|
|
218
|
-
return create(category, (value = ((
|
|
227
|
+
return create(alternateName, measurementMethod, description, category, (value = ((objectArg_7 = get$.Optional, objectArg_7.Field("value", AnnotationValue_decoder))), (code_4 = ((objectArg_8 = get$.Optional, objectArg_8.Field("valueCode", string))), ((value == null) && (code_4 == null)) ? void 0 : (() => {
|
|
219
228
|
try {
|
|
220
229
|
return Value.fromOptions(value, void 0, code_4);
|
|
221
230
|
}
|