@nfdi4plants/arctrl 1.0.0-alpha6
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/ARCtrl.js +257 -0
- package/Contract/Contract.js +95 -0
- package/Contracts/Contracts.ARCtrl.js +35 -0
- package/Contracts/Contracts.ArcAssay.js +65 -0
- package/Contracts/Contracts.ArcInvestigation.js +58 -0
- package/Contracts/Contracts.ArcStudy.js +65 -0
- package/Contracts/Contracts.Git.js +91 -0
- package/FileSystem/Commit.js +18 -0
- package/FileSystem/DefaultGitignore.js +3 -0
- package/FileSystem/FileSystem.js +53 -0
- package/FileSystem/FileSystemTree.js +223 -0
- package/FileSystem/Path.js +38 -0
- package/FileSystemTree.js +51 -0
- package/ISA/ISA/ArcTypes/ArcTable.js +744 -0
- package/ISA/ISA/ArcTypes/ArcTableAux.js +1142 -0
- package/ISA/ISA/ArcTypes/ArcTables.js +380 -0
- package/ISA/ISA/ArcTypes/ArcTypes.js +2018 -0
- package/ISA/ISA/ArcTypes/CompositeCell.js +180 -0
- package/ISA/ISA/ArcTypes/CompositeColumn.js +42 -0
- package/ISA/ISA/ArcTypes/CompositeHeader.js +358 -0
- package/ISA/ISA/ArcTypes/CompositeRow.js +111 -0
- package/ISA/ISA/ArcTypes/IdentifierSetters.js +26 -0
- package/ISA/ISA/Builder/Types.js +243 -0
- package/ISA/ISA/Fable.js +50 -0
- package/ISA/ISA/Helper.js +326 -0
- package/ISA/ISA/Identifier.js +76 -0
- package/ISA/ISA/JsonTypes/AnnotationValue.js +56 -0
- package/ISA/ISA/JsonTypes/Assay.js +620 -0
- package/ISA/ISA/JsonTypes/AssayMaterials.js +39 -0
- package/ISA/ISA/JsonTypes/ColumnIndex.js +246 -0
- package/ISA/ISA/JsonTypes/Comment.js +58 -0
- package/ISA/ISA/JsonTypes/CommentList.js +139 -0
- package/ISA/ISA/JsonTypes/Component.js +158 -0
- package/ISA/ISA/JsonTypes/Data.js +55 -0
- package/ISA/ISA/JsonTypes/DataFile.js +68 -0
- package/ISA/ISA/JsonTypes/Factor.js +128 -0
- package/ISA/ISA/JsonTypes/FactorValue.js +109 -0
- package/ISA/ISA/JsonTypes/Investigation.js +204 -0
- package/ISA/ISA/JsonTypes/Material.js +66 -0
- package/ISA/ISA/JsonTypes/MaterialAttribute.js +101 -0
- package/ISA/ISA/JsonTypes/MaterialAttributeValue.js +126 -0
- package/ISA/ISA/JsonTypes/MaterialType.js +41 -0
- package/ISA/ISA/JsonTypes/OntologyAnnotation.js +219 -0
- package/ISA/ISA/JsonTypes/OntologySourceReference.js +85 -0
- package/ISA/ISA/JsonTypes/Person.js +137 -0
- package/ISA/ISA/JsonTypes/Process.js +401 -0
- package/ISA/ISA/JsonTypes/ProcessInput.js +297 -0
- package/ISA/ISA/JsonTypes/ProcessOutput.js +263 -0
- package/ISA/ISA/JsonTypes/ProcessParameterValue.js +129 -0
- package/ISA/ISA/JsonTypes/ProcessSequence.js +255 -0
- package/ISA/ISA/JsonTypes/Protocol.js +277 -0
- package/ISA/ISA/JsonTypes/ProtocolParameter.js +101 -0
- package/ISA/ISA/JsonTypes/Publication.js +105 -0
- package/ISA/ISA/JsonTypes/Sample.js +71 -0
- package/ISA/ISA/JsonTypes/Source.js +54 -0
- package/ISA/ISA/JsonTypes/Study.js +942 -0
- package/ISA/ISA/JsonTypes/StudyMaterials.js +45 -0
- package/ISA/ISA/JsonTypes/URI.js +19 -0
- package/ISA/ISA/JsonTypes/Value.js +210 -0
- package/ISA/ISA/Regex.js +588 -0
- package/ISA/ISA.Json/Assay.js +123 -0
- package/ISA/ISA.Json/Comment.js +84 -0
- package/ISA/ISA.Json/ConverterOptions.js +33 -0
- package/ISA/ISA.Json/Data.js +271 -0
- package/ISA/ISA.Json/Decode.js +46 -0
- package/ISA/ISA.Json/Factor.js +194 -0
- package/ISA/ISA.Json/GEncode.js +15 -0
- package/ISA/ISA.Json/Investigation.js +132 -0
- package/ISA/ISA.Json/Material.js +233 -0
- package/ISA/ISA.Json/Ontology.js +204 -0
- package/ISA/ISA.Json/Person.js +204 -0
- package/ISA/ISA.Json/Process.js +291 -0
- package/ISA/ISA.Json/Protocol.js +242 -0
- package/ISA/ISA.Json/Publication.js +92 -0
- package/ISA/ISA.Json/Study.js +230 -0
- package/ISA/ISA.Json/Validation/Fable.js +69 -0
- package/ISA/ISA.Json/Validation/JsonSchemaValidation.js +88 -0
- package/ISA/ISA.Json/Validation/ValidationResult.js +45 -0
- package/ISA/ISA.Spreadsheet/AnnotationTable/ArcTable.js +137 -0
- package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeCell.js +78 -0
- package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeColumn.js +59 -0
- package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeHeader.js +478 -0
- package/ISA/ISA.Spreadsheet/ArcAssay.js +150 -0
- package/ISA/ISA.Spreadsheet/ArcInvestigation.js +314 -0
- package/ISA/ISA.Spreadsheet/ArcStudy.js +67 -0
- package/ISA/ISA.Spreadsheet/CollectionAux.js +128 -0
- package/ISA/ISA.Spreadsheet/Metadata/Assays.js +81 -0
- package/ISA/ISA.Spreadsheet/Metadata/Comment.js +60 -0
- package/ISA/ISA.Spreadsheet/Metadata/Contacts.js +104 -0
- package/ISA/ISA.Spreadsheet/Metadata/Conversions.js +180 -0
- package/ISA/ISA.Spreadsheet/Metadata/DesignDescriptors.js +27 -0
- package/ISA/ISA.Spreadsheet/Metadata/Factors.js +85 -0
- package/ISA/ISA.Spreadsheet/Metadata/OntologyAnnotation.js +65 -0
- package/ISA/ISA.Spreadsheet/Metadata/OntologySourceReference.js +73 -0
- package/ISA/ISA.Spreadsheet/Metadata/Protocols.js +116 -0
- package/ISA/ISA.Spreadsheet/Metadata/Publication.js +96 -0
- package/ISA/ISA.Spreadsheet/Metadata/SparseTable.js +451 -0
- package/ISA/ISA.Spreadsheet/Metadata/Study.js +260 -0
- package/README.md +277 -0
- package/SemVer.js +60 -0
- package/Templates/Templates.Json.js +40 -0
- package/Templates/Templates.Spreadsheet.js +315 -0
- package/Templates/Templates.js +179 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCell.fs +387 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCell.fs.js +240 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCellsCollection.fs +725 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCellsCollection.fs.js +522 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/CellBuilder.fs +195 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/CellBuilder.fs.js +208 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/ColumnBuilder.fs +209 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/ColumnBuilder.fs.js +137 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/DSL.fs +61 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/DSL.fs.js +62 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Expression.fs +24 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Expression.fs.js +56 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Operators.fs +102 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Operators.fs.js +6 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/RowBuilder.fs +200 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/RowBuilder.fs.js +137 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/SheetBuilder.fs +139 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/SheetBuilder.fs.js +116 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/TableBuilder.fs +120 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/TableBuilder.fs.js +120 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Transform.fs +229 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Transform.fs.js +421 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Types.fs +151 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Types.fs.js +277 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/WorkbookBuilder.fs +114 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/WorkbookBuilder.fs.js +104 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsAddress.fs +177 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsAddress.fs.js +249 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsColumn.fs +200 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsColumn.fs.js +125 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsRow.fs +202 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsRow.fs.js +135 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsSpreadsheet.fableproj +58 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsWorkbook.fs +183 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsWorkbook.fs.js +138 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsWorksheet.fs +628 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsWorksheet.fs.js +398 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRange.fs +19 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRange.fs.js +41 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeAddress.fs +222 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeAddress.fs.js +235 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeBase.fs +93 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeBase.fs.js +91 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeColumn.fs +65 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeColumn.fs.js +74 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeRow.fs +22 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeRow.fs.js +40 -0
- package/fable_modules/FsSpreadsheet.4.1.0/SheetBuilder.fs +249 -0
- package/fable_modules/FsSpreadsheet.4.1.0/SheetBuilder.fs.js +325 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTable.fs +455 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTable.fs.js +310 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableField.fs +140 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableField.fs.js +173 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableRow.fs +6 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableRow.fs.js +17 -0
- package/fable_modules/FsSpreadsheet.4.1.0/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
- package/fable_modules/FsSpreadsheet.4.1.0/obj/Debug/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +19 -0
- package/fable_modules/FsSpreadsheet.4.1.0/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
- package/fable_modules/FsSpreadsheet.4.1.0/obj/Release/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +19 -0
- package/fable_modules/Thoth.Json.10.1.0/Decode.fs +1366 -0
- package/fable_modules/Thoth.Json.10.1.0/Decode.fs.js +1798 -0
- package/fable_modules/Thoth.Json.10.1.0/Encode.fs +621 -0
- package/fable_modules/Thoth.Json.10.1.0/Encode.fs.js +472 -0
- package/fable_modules/Thoth.Json.10.1.0/Extra.fs +31 -0
- package/fable_modules/Thoth.Json.10.1.0/Extra.fs.js +8 -0
- package/fable_modules/Thoth.Json.10.1.0/Thoth.Json.fableproj +30 -0
- package/fable_modules/Thoth.Json.10.1.0/Types.fs +59 -0
- package/fable_modules/Thoth.Json.10.1.0/Types.fs.js +98 -0
- package/fable_modules/Thoth.Json.10.1.0/obj/Release/netstandard2.0/Thoth.Json.AssemblyInfo.fs +19 -0
- package/fable_modules/Thoth.Json.10.1.0/package.json +5 -0
- package/fable_modules/fable-library.4.1.4/Array.d.ts +120 -0
- package/fable_modules/fable-library.4.1.4/Array.js +1204 -0
- package/fable_modules/fable-library.4.1.4/Async.d.ts +32 -0
- package/fable_modules/fable-library.4.1.4/Async.js +158 -0
- package/fable_modules/fable-library.4.1.4/AsyncBuilder.d.ts +59 -0
- package/fable_modules/fable-library.4.1.4/AsyncBuilder.js +183 -0
- package/fable_modules/fable-library.4.1.4/BigInt.d.ts +115 -0
- package/fable_modules/fable-library.4.1.4/BigInt.js +282 -0
- package/fable_modules/fable-library.4.1.4/BitConverter.d.ts +27 -0
- package/fable_modules/fable-library.4.1.4/BitConverter.js +138 -0
- package/fable_modules/fable-library.4.1.4/Boolean.d.ts +3 -0
- package/fable_modules/fable-library.4.1.4/Boolean.js +21 -0
- package/fable_modules/fable-library.4.1.4/Char.d.ts +65 -0
- package/fable_modules/fable-library.4.1.4/Char.js +169 -0
- package/fable_modules/fable-library.4.1.4/Choice.d.ts +138 -0
- package/fable_modules/fable-library.4.1.4/Choice.js +227 -0
- package/fable_modules/fable-library.4.1.4/Date.d.ts +70 -0
- package/fable_modules/fable-library.4.1.4/Date.js +451 -0
- package/fable_modules/fable-library.4.1.4/DateOffset.d.ts +63 -0
- package/fable_modules/fable-library.4.1.4/DateOffset.js +268 -0
- package/fable_modules/fable-library.4.1.4/DateOnly.d.ts +18 -0
- package/fable_modules/fable-library.4.1.4/DateOnly.js +124 -0
- package/fable_modules/fable-library.4.1.4/Decimal.d.ts +45 -0
- package/fable_modules/fable-library.4.1.4/Decimal.js +212 -0
- package/fable_modules/fable-library.4.1.4/Double.d.ts +11 -0
- package/fable_modules/fable-library.4.1.4/Double.js +46 -0
- package/fable_modules/fable-library.4.1.4/Encoding.d.ts +12 -0
- package/fable_modules/fable-library.4.1.4/Encoding.js +173 -0
- package/fable_modules/fable-library.4.1.4/Event.d.ts +31 -0
- package/fable_modules/fable-library.4.1.4/Event.js +93 -0
- package/fable_modules/fable-library.4.1.4/FSharp.Collections.d.ts +7 -0
- package/fable_modules/fable-library.4.1.4/FSharp.Collections.js +27 -0
- package/fable_modules/fable-library.4.1.4/FSharp.Core.d.ts +17 -0
- package/fable_modules/fable-library.4.1.4/FSharp.Core.js +69 -0
- package/fable_modules/fable-library.4.1.4/Global.d.ts +24 -0
- package/fable_modules/fable-library.4.1.4/Global.js +8 -0
- package/fable_modules/fable-library.4.1.4/Guid.d.ts +10 -0
- package/fable_modules/fable-library.4.1.4/Guid.js +142 -0
- package/fable_modules/fable-library.4.1.4/Int32.d.ts +28 -0
- package/fable_modules/fable-library.4.1.4/Int32.js +135 -0
- package/fable_modules/fable-library.4.1.4/List.d.ts +143 -0
- package/fable_modules/fable-library.4.1.4/List.js +1273 -0
- package/fable_modules/fable-library.4.1.4/Long.d.ts +3 -0
- package/fable_modules/fable-library.4.1.4/Long.js +46 -0
- package/fable_modules/fable-library.4.1.4/MailboxProcessor.d.ts +25 -0
- package/fable_modules/fable-library.4.1.4/MailboxProcessor.js +93 -0
- package/fable_modules/fable-library.4.1.4/Map.d.ts +178 -0
- package/fable_modules/fable-library.4.1.4/Map.js +1396 -0
- package/fable_modules/fable-library.4.1.4/MapUtil.d.ts +10 -0
- package/fable_modules/fable-library.4.1.4/MapUtil.js +112 -0
- package/fable_modules/fable-library.4.1.4/MutableMap.d.ts +52 -0
- package/fable_modules/fable-library.4.1.4/MutableMap.js +326 -0
- package/fable_modules/fable-library.4.1.4/MutableSet.d.ts +39 -0
- package/fable_modules/fable-library.4.1.4/MutableSet.js +232 -0
- package/fable_modules/fable-library.4.1.4/Native.d.ts +2 -0
- package/fable_modules/fable-library.4.1.4/Native.js +8 -0
- package/fable_modules/fable-library.4.1.4/Numeric.d.ts +19 -0
- package/fable_modules/fable-library.4.1.4/Numeric.js +71 -0
- package/fable_modules/fable-library.4.1.4/Observable.d.ts +32 -0
- package/fable_modules/fable-library.4.1.4/Observable.js +113 -0
- package/fable_modules/fable-library.4.1.4/Option.d.ts +28 -0
- package/fable_modules/fable-library.4.1.4/Option.js +96 -0
- package/fable_modules/fable-library.4.1.4/README.md +3 -0
- package/fable_modules/fable-library.4.1.4/Random.d.ts +37 -0
- package/fable_modules/fable-library.4.1.4/Random.js +170 -0
- package/fable_modules/fable-library.4.1.4/Range.d.ts +12 -0
- package/fable_modules/fable-library.4.1.4/Range.js +45 -0
- package/fable_modules/fable-library.4.1.4/Reflection.d.ts +119 -0
- package/fable_modules/fable-library.4.1.4/Reflection.js +461 -0
- package/fable_modules/fable-library.4.1.4/RegExp.d.ts +10 -0
- package/fable_modules/fable-library.4.1.4/RegExp.js +132 -0
- package/fable_modules/fable-library.4.1.4/Seq.d.ts +165 -0
- package/fable_modules/fable-library.4.1.4/Seq.js +1379 -0
- package/fable_modules/fable-library.4.1.4/Seq2.d.ts +18 -0
- package/fable_modules/fable-library.4.1.4/Seq2.js +111 -0
- package/fable_modules/fable-library.4.1.4/Set.d.ts +190 -0
- package/fable_modules/fable-library.4.1.4/Set.js +1789 -0
- package/fable_modules/fable-library.4.1.4/String.d.ts +49 -0
- package/fable_modules/fable-library.4.1.4/String.js +540 -0
- package/fable_modules/fable-library.4.1.4/System.Collections.Generic.d.ts +71 -0
- package/fable_modules/fable-library.4.1.4/System.Collections.Generic.js +307 -0
- package/fable_modules/fable-library.4.1.4/System.Text.d.ts +30 -0
- package/fable_modules/fable-library.4.1.4/System.Text.js +110 -0
- package/fable_modules/fable-library.4.1.4/SystemException.d.ts +5 -0
- package/fable_modules/fable-library.4.1.4/SystemException.js +5 -0
- package/fable_modules/fable-library.4.1.4/TimeOnly.d.ts +15 -0
- package/fable_modules/fable-library.4.1.4/TimeOnly.js +122 -0
- package/fable_modules/fable-library.4.1.4/TimeSpan.d.ts +34 -0
- package/fable_modules/fable-library.4.1.4/TimeSpan.js +177 -0
- package/fable_modules/fable-library.4.1.4/Timer.d.ts +19 -0
- package/fable_modules/fable-library.4.1.4/Timer.js +67 -0
- package/fable_modules/fable-library.4.1.4/Types.d.ts +58 -0
- package/fable_modules/fable-library.4.1.4/Types.js +208 -0
- package/fable_modules/fable-library.4.1.4/Unicode.13.0.0.d.ts +2 -0
- package/fable_modules/fable-library.4.1.4/Unicode.13.0.0.js +4 -0
- package/fable_modules/fable-library.4.1.4/Uri.d.ts +29 -0
- package/fable_modules/fable-library.4.1.4/Uri.js +142 -0
- package/fable_modules/fable-library.4.1.4/Util.d.ts +187 -0
- package/fable_modules/fable-library.4.1.4/Util.js +662 -0
- package/fable_modules/fable-library.4.1.4/lib/big.d.ts +338 -0
- package/fable_modules/fable-library.4.1.4/lib/big.js +826 -0
- package/fable_modules/fable-library.4.1.4/package.json +23 -0
- package/fable_modules/project_cracked.json +1 -0
- package/package.json +22 -0
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { Value } from "../ISA/JsonTypes/Value.js";
|
|
2
|
+
import { OntologyAnnotation_decoder, OntologyAnnotation_encoder } from "./Ontology.js";
|
|
3
|
+
import { object as object_8, toString, nil } from "../../fable_modules/Thoth.Json.10.1.0/Encode.fs.js";
|
|
4
|
+
import { array, object as object_9, string, float, int } from "../../fable_modules/Thoth.Json.10.1.0/Decode.fs.js";
|
|
5
|
+
import { FSharpResult$2 } from "../../fable_modules/fable-library.4.1.4/Choice.js";
|
|
6
|
+
import { uri, fromString } from "./Decode.js";
|
|
7
|
+
import { equals, uncurry2 } from "../../fable_modules/fable-library.4.1.4/Util.js";
|
|
8
|
+
import { ConverterOptions__set_IncludeType_Z1FBCCD16, ConverterOptions__set_SetID_Z1FBCCD16, ConverterOptions__get_IncludeType, ConverterOptions__get_SetID, ConverterOptions_$ctor } from "./ConverterOptions.js";
|
|
9
|
+
import { replace } from "../../fable_modules/fable-library.4.1.4/String.js";
|
|
10
|
+
import { URIModule_toString } from "../ISA/JsonTypes/URI.js";
|
|
11
|
+
import { choose } from "../../fable_modules/fable-library.4.1.4/List.js";
|
|
12
|
+
import { empty, singleton, append, delay, toList } from "../../fable_modules/fable-library.4.1.4/Seq.js";
|
|
13
|
+
import { tryInclude } from "./GEncode.js";
|
|
14
|
+
import { decoder as decoder_1, encoder } from "./Comment.js";
|
|
15
|
+
import { Factor } from "../ISA/JsonTypes/Factor.js";
|
|
16
|
+
import { FactorValue } from "../ISA/JsonTypes/FactorValue.js";
|
|
17
|
+
|
|
18
|
+
export function Value_encoder(options, value) {
|
|
19
|
+
if (value instanceof Value) {
|
|
20
|
+
if (value.tag === 1) {
|
|
21
|
+
return value.fields[0];
|
|
22
|
+
}
|
|
23
|
+
else if (value.tag === 3) {
|
|
24
|
+
return value.fields[0];
|
|
25
|
+
}
|
|
26
|
+
else if (value.tag === 0) {
|
|
27
|
+
return OntologyAnnotation_encoder(options, value.fields[0]);
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
return value.fields[0];
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
return nil;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function Value_decoder(options, s, json) {
|
|
39
|
+
const matchValue = int(s)(json);
|
|
40
|
+
if (matchValue.tag === 1) {
|
|
41
|
+
const matchValue_1 = float(s, json);
|
|
42
|
+
if (matchValue_1.tag === 1) {
|
|
43
|
+
const matchValue_2 = OntologyAnnotation_decoder(options)(s)(json);
|
|
44
|
+
if (matchValue_2.tag === 1) {
|
|
45
|
+
const matchValue_3 = string(s, json);
|
|
46
|
+
if (matchValue_3.tag === 1) {
|
|
47
|
+
return new FSharpResult$2(1, [matchValue_3.fields[0]]);
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
return new FSharpResult$2(0, [new Value(3, [matchValue_3.fields[0]])]);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
return new FSharpResult$2(0, [new Value(0, [matchValue_2.fields[0]])]);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
return new FSharpResult$2(0, [new Value(2, [matchValue_1.fields[0]])]);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
return new FSharpResult$2(0, [new Value(1, [matchValue.fields[0]])]);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function Value_fromString(s) {
|
|
67
|
+
let options;
|
|
68
|
+
return fromString(uncurry2((options = ConverterOptions_$ctor(), (s_1) => ((json) => Value_decoder(options, s_1, json)))), s);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function Value_toString(v) {
|
|
72
|
+
return toString(2, Value_encoder(ConverterOptions_$ctor(), v));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function Factor_genID(f) {
|
|
76
|
+
const matchValue = f.ID;
|
|
77
|
+
if (matchValue == null) {
|
|
78
|
+
const matchValue_1 = f.Name;
|
|
79
|
+
if (matchValue_1 == null) {
|
|
80
|
+
return "#EmptyFactor";
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
return "#Factor_" + replace(matchValue_1, " ", "_");
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
return URIModule_toString(matchValue);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function Factor_encoder(options, oa) {
|
|
92
|
+
return object_8(choose((tupledArg) => {
|
|
93
|
+
const v = tupledArg[1];
|
|
94
|
+
if (equals(v, nil)) {
|
|
95
|
+
return void 0;
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
return [tupledArg[0], v];
|
|
99
|
+
}
|
|
100
|
+
}, toList(delay(() => {
|
|
101
|
+
let value, s;
|
|
102
|
+
return append(ConverterOptions__get_SetID(options) ? singleton(["@id", (value = Factor_genID(oa), (typeof value === "string") ? ((s = value, s)) : nil)]) : singleton(tryInclude("@id", (value_2) => {
|
|
103
|
+
let s_1;
|
|
104
|
+
const value_3 = value_2;
|
|
105
|
+
return (typeof value_3 === "string") ? ((s_1 = value_3, s_1)) : nil;
|
|
106
|
+
}, oa["ID"])), delay(() => {
|
|
107
|
+
let value_5, s_2;
|
|
108
|
+
return append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", (value_5 = "Factor", (typeof value_5 === "string") ? ((s_2 = value_5, s_2)) : nil)]) : empty(), delay(() => append(singleton(tryInclude("factorName", (value_7) => {
|
|
109
|
+
let s_3;
|
|
110
|
+
const value_8 = value_7;
|
|
111
|
+
return (typeof value_8 === "string") ? ((s_3 = value_8, s_3)) : nil;
|
|
112
|
+
}, oa["Name"])), delay(() => append(singleton(tryInclude("factorType", (oa_1) => OntologyAnnotation_encoder(options, oa_1), oa["FactorType"])), delay(() => singleton(tryInclude("comments", (comment) => encoder(options, comment), oa["Comments"]))))))));
|
|
113
|
+
}));
|
|
114
|
+
}))));
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export function Factor_decoder(options) {
|
|
118
|
+
return (path_2) => ((v) => object_9((get$) => {
|
|
119
|
+
let objectArg, objectArg_1, arg_5, objectArg_2, arg_7, decoder, objectArg_3;
|
|
120
|
+
return new Factor((objectArg = get$.Optional, objectArg.Field("@id", uri)), (objectArg_1 = get$.Optional, objectArg_1.Field("factorName", string)), (arg_5 = OntologyAnnotation_decoder(options), (objectArg_2 = get$.Optional, objectArg_2.Field("factorType", uncurry2(arg_5)))), (arg_7 = ((decoder = decoder_1(options), (path_1) => ((value_1) => array(uncurry2(decoder), path_1, value_1)))), (objectArg_3 = get$.Optional, objectArg_3.Field("comments", uncurry2(arg_7)))));
|
|
121
|
+
}, path_2, v));
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export function Factor_fromString(s) {
|
|
125
|
+
return fromString(uncurry2(Factor_decoder(ConverterOptions_$ctor())), s);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export function Factor_toString(f) {
|
|
129
|
+
return toString(2, Factor_encoder(ConverterOptions_$ctor(), f));
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* exports in json-ld format
|
|
134
|
+
*/
|
|
135
|
+
export function Factor_toStringLD(f) {
|
|
136
|
+
let returnVal;
|
|
137
|
+
return toString(2, Factor_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), f));
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export function FactorValue_genID(fv) {
|
|
141
|
+
const matchValue = fv.ID;
|
|
142
|
+
if (matchValue == null) {
|
|
143
|
+
return "#EmptyFactorValue";
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
return URIModule_toString(matchValue);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export function FactorValue_encoder(options, oa) {
|
|
151
|
+
return object_8(choose((tupledArg) => {
|
|
152
|
+
const v = tupledArg[1];
|
|
153
|
+
if (equals(v, nil)) {
|
|
154
|
+
return void 0;
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
return [tupledArg[0], v];
|
|
158
|
+
}
|
|
159
|
+
}, toList(delay(() => {
|
|
160
|
+
let value, s;
|
|
161
|
+
return append(ConverterOptions__get_SetID(options) ? singleton(["@id", (value = FactorValue_genID(oa), (typeof value === "string") ? ((s = value, s)) : nil)]) : singleton(tryInclude("@id", (value_2) => {
|
|
162
|
+
let s_1;
|
|
163
|
+
const value_3 = value_2;
|
|
164
|
+
return (typeof value_3 === "string") ? ((s_1 = value_3, s_1)) : nil;
|
|
165
|
+
}, oa["ID"])), delay(() => {
|
|
166
|
+
let value_5, s_2;
|
|
167
|
+
return append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", (value_5 = "FactorValue", (typeof value_5 === "string") ? ((s_2 = value_5, s_2)) : nil)]) : empty(), delay(() => append(singleton(tryInclude("category", (oa_1) => Factor_encoder(options, oa_1), oa["Category"])), delay(() => append(singleton(tryInclude("value", (value_7) => Value_encoder(options, value_7), oa["Value"])), delay(() => singleton(tryInclude("unit", (oa_2) => OntologyAnnotation_encoder(options, oa_2), oa["Unit"]))))))));
|
|
168
|
+
}));
|
|
169
|
+
}))));
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export function FactorValue_decoder(options) {
|
|
173
|
+
return (path) => ((v) => object_9((get$) => {
|
|
174
|
+
let objectArg, arg_3, objectArg_1, objectArg_2, arg_7, objectArg_3;
|
|
175
|
+
return new FactorValue((objectArg = get$.Optional, objectArg.Field("@id", uri)), (arg_3 = Factor_decoder(options), (objectArg_1 = get$.Optional, objectArg_1.Field("category", uncurry2(arg_3)))), (objectArg_2 = get$.Optional, objectArg_2.Field("value", (s_1, json_1) => Value_decoder(options, s_1, json_1))), (arg_7 = OntologyAnnotation_decoder(options), (objectArg_3 = get$.Optional, objectArg_3.Field("unit", uncurry2(arg_7)))));
|
|
176
|
+
}, path, v));
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export function FactorValue_fromString(s) {
|
|
180
|
+
return fromString(uncurry2(FactorValue_decoder(ConverterOptions_$ctor())), s);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export function FactorValue_toString(f) {
|
|
184
|
+
return toString(2, FactorValue_encoder(ConverterOptions_$ctor(), f));
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* exports in json-ld format
|
|
189
|
+
*/
|
|
190
|
+
export function FactorValue_toStringLD(f) {
|
|
191
|
+
let returnVal;
|
|
192
|
+
return toString(2, FactorValue_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), f));
|
|
193
|
+
}
|
|
194
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { value as value_1 } from "../../fable_modules/fable-library.4.1.4/Option.js";
|
|
2
|
+
import { isIterable } from "../../fable_modules/fable-library.4.1.4/Util.js";
|
|
3
|
+
import { nil, seq } from "../../fable_modules/Thoth.Json.10.1.0/Encode.fs.js";
|
|
4
|
+
import { map } from "../../fable_modules/fable-library.4.1.4/Seq.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Try to encode the given object using the given encoder, or return Encode.nil if the object is null
|
|
8
|
+
*
|
|
9
|
+
* If the object is a sequence, encode each element using the given encoder and return the resulting sequence
|
|
10
|
+
*/
|
|
11
|
+
export function tryInclude(name, encoder, value) {
|
|
12
|
+
let v, o;
|
|
13
|
+
return [name, (value != null) ? (isIterable(value_1(value)) ? ((v = value_1(value), seq(map(encoder, v)))) : ((o = value_1(value), encoder(o)))) : nil];
|
|
14
|
+
}
|
|
15
|
+
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { replace } from "../../fable_modules/fable-library.4.1.4/String.js";
|
|
2
|
+
import { URIModule_toString } from "../ISA/JsonTypes/URI.js";
|
|
3
|
+
import { toString, nil, object as object_24 } from "../../fable_modules/Thoth.Json.10.1.0/Encode.fs.js";
|
|
4
|
+
import { empty as empty_1, choose } from "../../fable_modules/fable-library.4.1.4/List.js";
|
|
5
|
+
import { uncurry2, equals } from "../../fable_modules/fable-library.4.1.4/Util.js";
|
|
6
|
+
import { empty, singleton, append, delay, toList } from "../../fable_modules/fable-library.4.1.4/Seq.js";
|
|
7
|
+
import { ConverterOptions__set_IncludeType_Z1FBCCD16, ConverterOptions__set_SetID_Z1FBCCD16, ConverterOptions_$ctor, ConverterOptions__get_IncludeType, ConverterOptions__get_SetID } from "./ConverterOptions.js";
|
|
8
|
+
import { tryInclude } from "./GEncode.js";
|
|
9
|
+
import { OntologySourceReference_decoder, OntologySourceReference_encoder } from "./Ontology.js";
|
|
10
|
+
import { decoder as decoder_5, encoder } from "./Publication.js";
|
|
11
|
+
import { decoder as decoder_6, encoder as encoder_1 } from "./Person.js";
|
|
12
|
+
import { Study_decoder, Study_encoder } from "./Study.js";
|
|
13
|
+
import { decoder as decoder_7, encoder as encoder_2 } from "./Comment.js";
|
|
14
|
+
import { list as list_1, string, object as object_25 } from "../../fable_modules/Thoth.Json.10.1.0/Decode.fs.js";
|
|
15
|
+
import { Investigation } from "../ISA/JsonTypes/Investigation.js";
|
|
16
|
+
import { fromString } from "./Decode.js";
|
|
17
|
+
import { ArcInvestigation } from "../ISA/ArcTypes/ArcTypes.js";
|
|
18
|
+
|
|
19
|
+
export function Investigation_genID(i) {
|
|
20
|
+
const matchValue = i.ID;
|
|
21
|
+
if (matchValue == null) {
|
|
22
|
+
const matchValue_1 = i.FileName;
|
|
23
|
+
if (matchValue_1 == null) {
|
|
24
|
+
const matchValue_2 = i.Identifier;
|
|
25
|
+
if (matchValue_2 == null) {
|
|
26
|
+
const matchValue_3 = i.Title;
|
|
27
|
+
if (matchValue_3 == null) {
|
|
28
|
+
return "#EmptyStudy";
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
return "#Study_" + replace(matchValue_3, " ", "_");
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
return "#Study_" + replace(matchValue_2, " ", "_");
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
return "#Study_" + replace(matchValue_1, " ", "_");
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
return URIModule_toString(matchValue);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function Investigation_encoder(options, oa) {
|
|
48
|
+
return object_24(choose((tupledArg) => {
|
|
49
|
+
const v = tupledArg[1];
|
|
50
|
+
if (equals(v, nil)) {
|
|
51
|
+
return void 0;
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
return [tupledArg[0], v];
|
|
55
|
+
}
|
|
56
|
+
}, toList(delay(() => {
|
|
57
|
+
let value, s;
|
|
58
|
+
return append(ConverterOptions__get_SetID(options) ? singleton(["@id", (value = Investigation_genID(oa), (typeof value === "string") ? ((s = value, s)) : nil)]) : singleton(tryInclude("@id", (value_2) => {
|
|
59
|
+
let s_1;
|
|
60
|
+
const value_3 = value_2;
|
|
61
|
+
return (typeof value_3 === "string") ? ((s_1 = value_3, s_1)) : nil;
|
|
62
|
+
}, oa["ID"])), delay(() => {
|
|
63
|
+
let value_5, s_2;
|
|
64
|
+
return append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", (value_5 = "Investigation", (typeof value_5 === "string") ? ((s_2 = value_5, s_2)) : nil)]) : empty(), delay(() => append(singleton(tryInclude("filename", (value_7) => {
|
|
65
|
+
let s_3;
|
|
66
|
+
const value_8 = value_7;
|
|
67
|
+
return (typeof value_8 === "string") ? ((s_3 = value_8, s_3)) : nil;
|
|
68
|
+
}, oa["FileName"])), delay(() => append(singleton(tryInclude("identifier", (value_10) => {
|
|
69
|
+
let s_4;
|
|
70
|
+
const value_11 = value_10;
|
|
71
|
+
return (typeof value_11 === "string") ? ((s_4 = value_11, s_4)) : nil;
|
|
72
|
+
}, oa["Identifier"])), delay(() => append(singleton(tryInclude("title", (value_13) => {
|
|
73
|
+
let s_5;
|
|
74
|
+
const value_14 = value_13;
|
|
75
|
+
return (typeof value_14 === "string") ? ((s_5 = value_14, s_5)) : nil;
|
|
76
|
+
}, oa["Title"])), delay(() => append(singleton(tryInclude("description", (value_16) => {
|
|
77
|
+
let s_6;
|
|
78
|
+
const value_17 = value_16;
|
|
79
|
+
return (typeof value_17 === "string") ? ((s_6 = value_17, s_6)) : nil;
|
|
80
|
+
}, oa["Description"])), delay(() => append(singleton(tryInclude("submissionDate", (value_19) => {
|
|
81
|
+
let s_7;
|
|
82
|
+
const value_20 = value_19;
|
|
83
|
+
return (typeof value_20 === "string") ? ((s_7 = value_20, s_7)) : nil;
|
|
84
|
+
}, oa["SubmissionDate"])), delay(() => append(singleton(tryInclude("publicReleaseDate", (value_22) => {
|
|
85
|
+
let s_8;
|
|
86
|
+
const value_23 = value_22;
|
|
87
|
+
return (typeof value_23 === "string") ? ((s_8 = value_23, s_8)) : nil;
|
|
88
|
+
}, oa["PublicReleaseDate"])), delay(() => append(singleton(tryInclude("ontologySourceReferences", (osr) => OntologySourceReference_encoder(options, osr), oa["OntologySourceReferences"])), delay(() => append(singleton(tryInclude("publications", (oa_1) => encoder(options, oa_1), oa["Publications"])), delay(() => append(singleton(tryInclude("people", (oa_2) => encoder_1(options, oa_2), oa["Contacts"])), delay(() => append(singleton(tryInclude("studies", (oa_3) => Study_encoder(options, oa_3), oa["Studies"])), delay(() => singleton(tryInclude("comments", (comment) => encoder_2(options, comment), oa["Comments"]))))))))))))))))))))))));
|
|
89
|
+
}));
|
|
90
|
+
}))));
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export function Investigation_decoder(options) {
|
|
94
|
+
return (path_12) => ((v) => object_25((get$) => {
|
|
95
|
+
let objectArg, objectArg_1, objectArg_2, objectArg_3, objectArg_4, objectArg_5, objectArg_6, arg_15, decoder, objectArg_7, arg_17, decoder_1, objectArg_8, arg_19, decoder_2, objectArg_9, arg_21, decoder_3, objectArg_10, arg_23, decoder_4, objectArg_11;
|
|
96
|
+
return new Investigation((objectArg = get$.Optional, objectArg.Field("@id", string)), (objectArg_1 = get$.Optional, objectArg_1.Field("filename", string)), (objectArg_2 = get$.Optional, objectArg_2.Field("identifier", string)), (objectArg_3 = get$.Optional, objectArg_3.Field("title", string)), (objectArg_4 = get$.Optional, objectArg_4.Field("description", string)), (objectArg_5 = get$.Optional, objectArg_5.Field("submissionDate", string)), (objectArg_6 = get$.Optional, objectArg_6.Field("publicReleaseDate", string)), (arg_15 = ((decoder = OntologySourceReference_decoder(options), (path_7) => ((value_7) => list_1(uncurry2(decoder), path_7, value_7)))), (objectArg_7 = get$.Optional, objectArg_7.Field("ontologySourceReferences", uncurry2(arg_15)))), (arg_17 = ((decoder_1 = decoder_5(options), (path_8) => ((value_8) => list_1(uncurry2(decoder_1), path_8, value_8)))), (objectArg_8 = get$.Optional, objectArg_8.Field("publications", uncurry2(arg_17)))), (arg_19 = ((decoder_2 = decoder_6(options), (path_9) => ((value_9) => list_1(uncurry2(decoder_2), path_9, value_9)))), (objectArg_9 = get$.Optional, objectArg_9.Field("people", uncurry2(arg_19)))), (arg_21 = ((decoder_3 = Study_decoder(options), (path_10) => ((value_10) => list_1(uncurry2(decoder_3), path_10, value_10)))), (objectArg_10 = get$.Optional, objectArg_10.Field("studies", uncurry2(arg_21)))), (arg_23 = ((decoder_4 = decoder_7(options), (path_11) => ((value_11) => list_1(uncurry2(decoder_4), path_11, value_11)))), (objectArg_11 = get$.Optional, objectArg_11.Field("comments", uncurry2(arg_23)))), empty_1());
|
|
97
|
+
}, path_12, v));
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function Investigation_fromString(s) {
|
|
101
|
+
return fromString(uncurry2(Investigation_decoder(ConverterOptions_$ctor())), s);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function Investigation_toString(p) {
|
|
105
|
+
return toString(2, Investigation_encoder(ConverterOptions_$ctor(), p));
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* exports in json-ld format
|
|
110
|
+
*/
|
|
111
|
+
export function Investigation_toStringLD(i) {
|
|
112
|
+
let returnVal;
|
|
113
|
+
return toString(2, Investigation_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), i));
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export function ArcInvestigation_fromString(s) {
|
|
117
|
+
const arg = fromString(uncurry2(Investigation_decoder(ConverterOptions_$ctor())), s);
|
|
118
|
+
return ArcInvestigation.fromInvestigation(arg);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export function ArcInvestigation_toString(a) {
|
|
122
|
+
return toString(2, Investigation_encoder(ConverterOptions_$ctor(), a.ToInvestigation()));
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* exports in json-ld format
|
|
127
|
+
*/
|
|
128
|
+
export function ArcInvestigation_toStringLD(a) {
|
|
129
|
+
let returnVal;
|
|
130
|
+
return toString(2, Investigation_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), a.ToInvestigation()));
|
|
131
|
+
}
|
|
132
|
+
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { MaterialType } from "../ISA/JsonTypes/MaterialType.js";
|
|
2
|
+
import { toString, object as object_10, nil } from "../../fable_modules/Thoth.Json.10.1.0/Encode.fs.js";
|
|
3
|
+
import { list as list_1, object as object_11, string } from "../../fable_modules/Thoth.Json.10.1.0/Decode.fs.js";
|
|
4
|
+
import { FSharpResult$2 } from "../../fable_modules/fable-library.4.1.4/Choice.js";
|
|
5
|
+
import { ErrorReason } from "../../fable_modules/Thoth.Json.10.1.0/Types.fs.js";
|
|
6
|
+
import { URIModule_toString } from "../ISA/JsonTypes/URI.js";
|
|
7
|
+
import { ofArray, choose } from "../../fable_modules/fable-library.4.1.4/List.js";
|
|
8
|
+
import { uncurry2, equals } from "../../fable_modules/fable-library.4.1.4/Util.js";
|
|
9
|
+
import { empty, singleton, append, delay, toList } from "../../fable_modules/fable-library.4.1.4/Seq.js";
|
|
10
|
+
import { ConverterOptions__set_IncludeType_Z1FBCCD16, ConverterOptions__set_SetID_Z1FBCCD16, ConverterOptions_$ctor, ConverterOptions__get_IncludeType, ConverterOptions__get_SetID } from "./ConverterOptions.js";
|
|
11
|
+
import { tryInclude } from "./GEncode.js";
|
|
12
|
+
import { OntologyAnnotation_decoder, OntologyAnnotation_encoder } from "./Ontology.js";
|
|
13
|
+
import { hasUnknownFields, fromString, uri } from "./Decode.js";
|
|
14
|
+
import { MaterialAttribute } from "../ISA/JsonTypes/MaterialAttribute.js";
|
|
15
|
+
import { Value_decoder, Value_encoder } from "./Factor.js";
|
|
16
|
+
import { MaterialAttributeValue } from "../ISA/JsonTypes/MaterialAttributeValue.js";
|
|
17
|
+
import { replace } from "../../fable_modules/fable-library.4.1.4/String.js";
|
|
18
|
+
import { Material } from "../ISA/JsonTypes/Material.js";
|
|
19
|
+
|
|
20
|
+
export function MaterialType_encoder(options, value) {
|
|
21
|
+
if (value instanceof MaterialType) {
|
|
22
|
+
if (value.tag === 1) {
|
|
23
|
+
return "Labeled Extract Name";
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
return "Extract Name";
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
return nil;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function MaterialType_decoder(options, s, json) {
|
|
35
|
+
const matchValue = string(s, json);
|
|
36
|
+
if (matchValue.tag === 1) {
|
|
37
|
+
return new FSharpResult$2(1, [matchValue.fields[0]]);
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
switch (matchValue.fields[0]) {
|
|
41
|
+
case "Extract Name":
|
|
42
|
+
return new FSharpResult$2(0, [new MaterialType(0, [])]);
|
|
43
|
+
case "Labeled Extract Name":
|
|
44
|
+
return new FSharpResult$2(0, [new MaterialType(1, [])]);
|
|
45
|
+
default: {
|
|
46
|
+
const s_1 = matchValue.fields[0];
|
|
47
|
+
return new FSharpResult$2(1, [[`Could not parse ${s_1}No other value than "Extract Name" or "Labeled Extract Name" allowed for materialtype`, new ErrorReason(0, [s_1, nil])]]);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function MaterialAttribute_genID(m) {
|
|
54
|
+
const matchValue = m.ID;
|
|
55
|
+
if (matchValue == null) {
|
|
56
|
+
return "#EmptyMaterialAttribute";
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
return URIModule_toString(matchValue);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function MaterialAttribute_encoder(options, oa) {
|
|
64
|
+
return object_10(choose((tupledArg) => {
|
|
65
|
+
const v = tupledArg[1];
|
|
66
|
+
if (equals(v, nil)) {
|
|
67
|
+
return void 0;
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
return [tupledArg[0], v];
|
|
71
|
+
}
|
|
72
|
+
}, toList(delay(() => {
|
|
73
|
+
let value, s;
|
|
74
|
+
return append(ConverterOptions__get_SetID(options) ? singleton(["@id", (value = MaterialAttribute_genID(oa), (typeof value === "string") ? ((s = value, s)) : nil)]) : singleton(tryInclude("@id", (value_2) => {
|
|
75
|
+
let s_1;
|
|
76
|
+
const value_3 = value_2;
|
|
77
|
+
return (typeof value_3 === "string") ? ((s_1 = value_3, s_1)) : nil;
|
|
78
|
+
}, oa["ID"])), delay(() => {
|
|
79
|
+
let value_5, s_2;
|
|
80
|
+
return append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", (value_5 = "MaterialAttribute", (typeof value_5 === "string") ? ((s_2 = value_5, s_2)) : nil)]) : empty(), delay(() => singleton(tryInclude("characteristicType", (oa_1) => OntologyAnnotation_encoder(options, oa_1), oa["CharacteristicType"]))));
|
|
81
|
+
}));
|
|
82
|
+
}))));
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function MaterialAttribute_decoder(options) {
|
|
86
|
+
return (path) => ((v) => object_11((get$) => {
|
|
87
|
+
let objectArg, arg_3, objectArg_1;
|
|
88
|
+
return new MaterialAttribute((objectArg = get$.Optional, objectArg.Field("@id", uri)), (arg_3 = OntologyAnnotation_decoder(options), (objectArg_1 = get$.Optional, objectArg_1.Field("characteristicType", uncurry2(arg_3)))));
|
|
89
|
+
}, path, v));
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function MaterialAttribute_fromString(s) {
|
|
93
|
+
return fromString(uncurry2(MaterialAttribute_decoder(ConverterOptions_$ctor())), s);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export function MaterialAttribute_toString(m) {
|
|
97
|
+
return toString(2, MaterialAttribute_encoder(ConverterOptions_$ctor(), m));
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* exports in json-ld format
|
|
102
|
+
*/
|
|
103
|
+
export function MaterialAttribute_toStringLD(m) {
|
|
104
|
+
let returnVal;
|
|
105
|
+
return toString(2, MaterialAttribute_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), m));
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export function MaterialAttributeValue_genID(m) {
|
|
109
|
+
const matchValue = m.ID;
|
|
110
|
+
if (matchValue == null) {
|
|
111
|
+
return "#EmptyMaterialAttributeValue";
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
return URIModule_toString(matchValue);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export function MaterialAttributeValue_encoder(options, oa) {
|
|
119
|
+
return object_10(choose((tupledArg) => {
|
|
120
|
+
const v = tupledArg[1];
|
|
121
|
+
if (equals(v, nil)) {
|
|
122
|
+
return void 0;
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
return [tupledArg[0], v];
|
|
126
|
+
}
|
|
127
|
+
}, toList(delay(() => {
|
|
128
|
+
let value, s;
|
|
129
|
+
return append(ConverterOptions__get_SetID(options) ? singleton(["@id", (value = MaterialAttributeValue_genID(oa), (typeof value === "string") ? ((s = value, s)) : nil)]) : singleton(tryInclude("@id", (value_2) => {
|
|
130
|
+
let s_1;
|
|
131
|
+
const value_3 = value_2;
|
|
132
|
+
return (typeof value_3 === "string") ? ((s_1 = value_3, s_1)) : nil;
|
|
133
|
+
}, oa["ID"])), delay(() => {
|
|
134
|
+
let value_5, s_2;
|
|
135
|
+
return append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", (value_5 = "MaterialAttributeValue", (typeof value_5 === "string") ? ((s_2 = value_5, s_2)) : nil)]) : empty(), delay(() => append(singleton(tryInclude("category", (oa_1) => MaterialAttribute_encoder(options, oa_1), oa["Category"])), delay(() => append(singleton(tryInclude("value", (value_7) => Value_encoder(options, value_7), oa["Value"])), delay(() => singleton(tryInclude("unit", (oa_2) => OntologyAnnotation_encoder(options, oa_2), oa["Unit"]))))))));
|
|
136
|
+
}));
|
|
137
|
+
}))));
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export function MaterialAttributeValue_decoder(options) {
|
|
141
|
+
return (path) => ((v) => object_11((get$) => {
|
|
142
|
+
let objectArg, arg_3, objectArg_1, objectArg_2, arg_7, objectArg_3;
|
|
143
|
+
return new MaterialAttributeValue((objectArg = get$.Optional, objectArg.Field("@id", uri)), (arg_3 = MaterialAttribute_decoder(options), (objectArg_1 = get$.Optional, objectArg_1.Field("category", uncurry2(arg_3)))), (objectArg_2 = get$.Optional, objectArg_2.Field("value", (s_1, json_1) => Value_decoder(options, s_1, json_1))), (arg_7 = OntologyAnnotation_decoder(options), (objectArg_3 = get$.Optional, objectArg_3.Field("unit", uncurry2(arg_7)))));
|
|
144
|
+
}, path, v));
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export function MaterialAttributeValue_fromString(s) {
|
|
148
|
+
return fromString(uncurry2(MaterialAttributeValue_decoder(ConverterOptions_$ctor())), s);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export function MaterialAttributeValue_toString(m) {
|
|
152
|
+
return toString(2, MaterialAttributeValue_encoder(ConverterOptions_$ctor(), m));
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* exports in json-ld format
|
|
157
|
+
*/
|
|
158
|
+
export function MaterialAttributeValue_toStringLD(m) {
|
|
159
|
+
let returnVal;
|
|
160
|
+
return toString(2, MaterialAttributeValue_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), m));
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export function Material_genID(m) {
|
|
164
|
+
const matchValue = m.ID;
|
|
165
|
+
if (matchValue == null) {
|
|
166
|
+
const matchValue_1 = m.Name;
|
|
167
|
+
if (matchValue_1 == null) {
|
|
168
|
+
return "#EmptyMaterial";
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
return "#Material_" + replace(matchValue_1, " ", "_");
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
else {
|
|
175
|
+
return matchValue;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export function Material_encoder(options, oa) {
|
|
180
|
+
return object_10(choose((tupledArg) => {
|
|
181
|
+
const v = tupledArg[1];
|
|
182
|
+
if (equals(v, nil)) {
|
|
183
|
+
return void 0;
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
return [tupledArg[0], v];
|
|
187
|
+
}
|
|
188
|
+
}, toList(delay(() => {
|
|
189
|
+
let value, s;
|
|
190
|
+
return append(ConverterOptions__get_SetID(options) ? singleton(["@id", (value = Material_genID(oa), (typeof value === "string") ? ((s = value, s)) : nil)]) : singleton(tryInclude("@id", (value_2) => {
|
|
191
|
+
let s_1;
|
|
192
|
+
const value_3 = value_2;
|
|
193
|
+
return (typeof value_3 === "string") ? ((s_1 = value_3, s_1)) : nil;
|
|
194
|
+
}, oa["ID"])), delay(() => {
|
|
195
|
+
let value_5, s_2;
|
|
196
|
+
return append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", (value_5 = "Material", (typeof value_5 === "string") ? ((s_2 = value_5, s_2)) : nil)]) : empty(), delay(() => append(singleton(tryInclude("name", (value_7) => {
|
|
197
|
+
let s_3;
|
|
198
|
+
const value_8 = value_7;
|
|
199
|
+
return (typeof value_8 === "string") ? ((s_3 = value_8, s_3)) : nil;
|
|
200
|
+
}, oa["Name"])), delay(() => append(singleton(tryInclude("type", (value_10) => MaterialType_encoder(options, value_10), oa["MaterialType"])), delay(() => append(singleton(tryInclude("characteristics", (oa_1) => MaterialAttributeValue_encoder(options, oa_1), oa["Characteristics"])), delay(() => singleton(tryInclude("derivesFrom", (oa_2) => Material_encoder(options, oa_2), oa["DerivesFrom"]))))))))));
|
|
201
|
+
}));
|
|
202
|
+
}))));
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export function Material_decoder(options, s, json) {
|
|
206
|
+
if (hasUnknownFields(ofArray(["@id", "@type", "name", "type", "characteristics", "derivesFrom"]), json)) {
|
|
207
|
+
return new FSharpResult$2(1, [["Unknown fields in material", new ErrorReason(0, [s, nil])]]);
|
|
208
|
+
}
|
|
209
|
+
else {
|
|
210
|
+
return object_11((get$) => {
|
|
211
|
+
let objectArg, objectArg_1, objectArg_2, arg_7, decoder, objectArg_3, objectArg_4;
|
|
212
|
+
return new Material((objectArg = get$.Optional, objectArg.Field("@id", uri)), (objectArg_1 = get$.Optional, objectArg_1.Field("name", string)), (objectArg_2 = get$.Optional, objectArg_2.Field("type", (s_2, json_2) => MaterialType_decoder(options, s_2, json_2))), (arg_7 = ((decoder = MaterialAttributeValue_decoder(options), (path_1) => ((value_1) => list_1(uncurry2(decoder), path_1, value_1)))), (objectArg_3 = get$.Optional, objectArg_3.Field("characteristics", uncurry2(arg_7)))), (objectArg_4 = get$.Optional, objectArg_4.Field("derivesFrom", (path_2, value_2) => list_1((s_3, json_3) => Material_decoder(options, s_3, json_3), path_2, value_2))));
|
|
213
|
+
}, s, json);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export function Material_fromString(s) {
|
|
218
|
+
let options;
|
|
219
|
+
return fromString(uncurry2((options = ConverterOptions_$ctor(), (s_1) => ((json) => Material_decoder(options, s_1, json)))), s);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export function Material_toString(m) {
|
|
223
|
+
return toString(2, Material_encoder(ConverterOptions_$ctor(), m));
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* exports in json-ld format
|
|
228
|
+
*/
|
|
229
|
+
export function Material_toStringLD(m) {
|
|
230
|
+
let returnVal;
|
|
231
|
+
return toString(2, Material_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), m));
|
|
232
|
+
}
|
|
233
|
+
|