@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,291 @@
|
|
|
1
|
+
import { replace } from "../../fable_modules/fable-library.4.1.4/String.js";
|
|
2
|
+
import { ProtocolParameter_getNameText_Z3A4310A5 } from "../ISA/JsonTypes/ProtocolParameter.js";
|
|
3
|
+
import { Value_getText_72E9EF0F } from "../ISA/JsonTypes/Value.js";
|
|
4
|
+
import { list as list_2, toString, nil, object as object_22 } from "../../fable_modules/Thoth.Json.10.1.0/Encode.fs.js";
|
|
5
|
+
import { map, choose } from "../../fable_modules/fable-library.4.1.4/List.js";
|
|
6
|
+
import { uncurry2, equals } from "../../fable_modules/fable-library.4.1.4/Util.js";
|
|
7
|
+
import { empty, singleton, append, delay, toList } from "../../fable_modules/fable-library.4.1.4/Seq.js";
|
|
8
|
+
import { ConverterOptions__set_IncludeType_Z1FBCCD16, ConverterOptions__set_SetID_Z1FBCCD16, ConverterOptions_$ctor, ConverterOptions__get_IncludeType, ConverterOptions__get_SetID } from "./ConverterOptions.js";
|
|
9
|
+
import { tryInclude } from "./GEncode.js";
|
|
10
|
+
import { Protocol_decoder, Protocol_encoder, ProtocolParameter_decoder, ProtocolParameter_encoder } from "./Protocol.js";
|
|
11
|
+
import { Value_decoder, Value_encoder } from "./Factor.js";
|
|
12
|
+
import { OntologyAnnotation_decoder, OntologyAnnotation_encoder } from "./Ontology.js";
|
|
13
|
+
import { list as list_1, string, object as object_23 } from "../../fable_modules/Thoth.Json.10.1.0/Decode.fs.js";
|
|
14
|
+
import { ProcessParameterValue } from "../ISA/JsonTypes/ProcessParameterValue.js";
|
|
15
|
+
import { uri, fromString } from "./Decode.js";
|
|
16
|
+
import { ProcessInput } from "../ISA/JsonTypes/ProcessInput.js";
|
|
17
|
+
import { Data_decoder, Sample_decoder, Source_decoder, Source_encoder, Data_encoder, Sample_encoder } from "./Data.js";
|
|
18
|
+
import { Material_decoder, Material_encoder } from "./Material.js";
|
|
19
|
+
import { FSharpResult$2 } from "../../fable_modules/fable-library.4.1.4/Choice.js";
|
|
20
|
+
import { ProcessOutput } from "../ISA/JsonTypes/ProcessOutput.js";
|
|
21
|
+
import { URIModule_toString } from "../ISA/JsonTypes/URI.js";
|
|
22
|
+
import { decoder as decoder_4, encoder } from "./Comment.js";
|
|
23
|
+
import { Process } from "../ISA/JsonTypes/Process.js";
|
|
24
|
+
|
|
25
|
+
export function ProcessParameterValue_genID(p) {
|
|
26
|
+
const matchValue = p.Value;
|
|
27
|
+
const matchValue_1 = p.Category;
|
|
28
|
+
let matchResult, c, v;
|
|
29
|
+
if (matchValue != null) {
|
|
30
|
+
if (matchValue_1 != null) {
|
|
31
|
+
matchResult = 0;
|
|
32
|
+
c = matchValue_1;
|
|
33
|
+
v = matchValue;
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
matchResult = 1;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
matchResult = 1;
|
|
41
|
+
}
|
|
42
|
+
switch (matchResult) {
|
|
43
|
+
case 0:
|
|
44
|
+
return (("#Param_" + replace(ProtocolParameter_getNameText_Z3A4310A5(c), " ", "_")) + "_") + replace(Value_getText_72E9EF0F(v), " ", "_");
|
|
45
|
+
default:
|
|
46
|
+
return "#EmptyParameterValue";
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function ProcessParameterValue_encoder(options, oa) {
|
|
51
|
+
return object_22(choose((tupledArg) => {
|
|
52
|
+
const v = tupledArg[1];
|
|
53
|
+
if (equals(v, nil)) {
|
|
54
|
+
return void 0;
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
return [tupledArg[0], v];
|
|
58
|
+
}
|
|
59
|
+
}, toList(delay(() => {
|
|
60
|
+
let value, s;
|
|
61
|
+
return append(ConverterOptions__get_SetID(options) ? singleton(["@id", (value = ProcessParameterValue_genID(oa), (typeof value === "string") ? ((s = value, s)) : nil)]) : empty(), delay(() => {
|
|
62
|
+
let value_2, s_1;
|
|
63
|
+
return append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", (value_2 = "ProcessParameterValue", (typeof value_2 === "string") ? ((s_1 = value_2, s_1)) : nil)]) : empty(), delay(() => append(singleton(tryInclude("category", (oa_1) => ProtocolParameter_encoder(options, oa_1), oa["Category"])), delay(() => append(singleton(tryInclude("value", (value_4) => Value_encoder(options, value_4), oa["Value"])), delay(() => singleton(tryInclude("unit", (oa_2) => OntologyAnnotation_encoder(options, oa_2), oa["Unit"]))))))));
|
|
64
|
+
}));
|
|
65
|
+
}))));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function ProcessParameterValue_decoder(options) {
|
|
69
|
+
return (path) => ((v) => object_23((get$) => {
|
|
70
|
+
let arg_1, objectArg, objectArg_1, arg_5, objectArg_2;
|
|
71
|
+
return new ProcessParameterValue((arg_1 = ProtocolParameter_decoder(options), (objectArg = get$.Optional, objectArg.Field("category", uncurry2(arg_1)))), (objectArg_1 = get$.Optional, objectArg_1.Field("value", (s, json) => Value_decoder(options, s, json))), (arg_5 = OntologyAnnotation_decoder(options), (objectArg_2 = get$.Optional, objectArg_2.Field("unit", uncurry2(arg_5)))));
|
|
72
|
+
}, path, v));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function ProcessParameterValue_fromString(s) {
|
|
76
|
+
return fromString(uncurry2(ProcessParameterValue_decoder(ConverterOptions_$ctor())), s);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function ProcessParameterValue_toString(p) {
|
|
80
|
+
return toString(2, ProcessParameterValue_encoder(ConverterOptions_$ctor(), p));
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* exports in json-ld format
|
|
85
|
+
*/
|
|
86
|
+
export function ProcessParameterValue_toStringLD(p) {
|
|
87
|
+
let returnVal;
|
|
88
|
+
return toString(2, ProcessParameterValue_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), p));
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function ProcessInput_encoder(options, value) {
|
|
92
|
+
if (value instanceof ProcessInput) {
|
|
93
|
+
if (value.tag === 1) {
|
|
94
|
+
return Sample_encoder(options, value.fields[0]);
|
|
95
|
+
}
|
|
96
|
+
else if (value.tag === 2) {
|
|
97
|
+
return Data_encoder(options, value.fields[0]);
|
|
98
|
+
}
|
|
99
|
+
else if (value.tag === 3) {
|
|
100
|
+
return Material_encoder(options, value.fields[0]);
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
return Source_encoder(options, value.fields[0]);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
return nil;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function ProcessInput_decoder(options, s, json) {
|
|
112
|
+
const matchValue = Source_decoder(options, s, json);
|
|
113
|
+
if (matchValue.tag === 1) {
|
|
114
|
+
const matchValue_1 = Sample_decoder(options, s, json);
|
|
115
|
+
if (matchValue_1.tag === 1) {
|
|
116
|
+
const matchValue_2 = Data_decoder(options, s, json);
|
|
117
|
+
if (matchValue_2.tag === 1) {
|
|
118
|
+
const matchValue_3 = Material_decoder(options, s, json);
|
|
119
|
+
if (matchValue_3.tag === 1) {
|
|
120
|
+
return new FSharpResult$2(1, [matchValue_3.fields[0]]);
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
return new FSharpResult$2(0, [new ProcessInput(3, [matchValue_3.fields[0]])]);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
return new FSharpResult$2(0, [new ProcessInput(2, [matchValue_2.fields[0]])]);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
return new FSharpResult$2(0, [new ProcessInput(1, [matchValue_1.fields[0]])]);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
return new FSharpResult$2(0, [new ProcessInput(0, [matchValue.fields[0]])]);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export function ProcessInput_fromString(s) {
|
|
140
|
+
let options;
|
|
141
|
+
return fromString(uncurry2((options = ConverterOptions_$ctor(), (s_1) => ((json) => ProcessInput_decoder(options, s_1, json)))), s);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export function ProcessInput_toString(m) {
|
|
145
|
+
return toString(2, ProcessInput_encoder(ConverterOptions_$ctor(), m));
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export function ProcessInput_toStringLD(m) {
|
|
149
|
+
let returnVal;
|
|
150
|
+
return toString(2, ProcessInput_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), m));
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export function ProcessOutput_encoder(options, value) {
|
|
154
|
+
if (value instanceof ProcessOutput) {
|
|
155
|
+
if (value.tag === 1) {
|
|
156
|
+
return Data_encoder(options, value.fields[0]);
|
|
157
|
+
}
|
|
158
|
+
else if (value.tag === 2) {
|
|
159
|
+
return Material_encoder(options, value.fields[0]);
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
return Sample_encoder(options, value.fields[0]);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
return nil;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export function ProcessOutput_decoder(options, s, json) {
|
|
171
|
+
const matchValue = Sample_decoder(options, s, json);
|
|
172
|
+
if (matchValue.tag === 1) {
|
|
173
|
+
const matchValue_1 = Data_decoder(options, s, json);
|
|
174
|
+
if (matchValue_1.tag === 1) {
|
|
175
|
+
const matchValue_2 = Material_decoder(options, s, json);
|
|
176
|
+
if (matchValue_2.tag === 1) {
|
|
177
|
+
return new FSharpResult$2(1, [matchValue_2.fields[0]]);
|
|
178
|
+
}
|
|
179
|
+
else {
|
|
180
|
+
return new FSharpResult$2(0, [new ProcessOutput(2, [matchValue_2.fields[0]])]);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
else {
|
|
184
|
+
return new FSharpResult$2(0, [new ProcessOutput(1, [matchValue_1.fields[0]])]);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
return new FSharpResult$2(0, [new ProcessOutput(0, [matchValue.fields[0]])]);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export function ProcessOutput_fromString(s) {
|
|
193
|
+
let options;
|
|
194
|
+
return fromString(uncurry2((options = ConverterOptions_$ctor(), (s_1) => ((json) => ProcessOutput_decoder(options, s_1, json)))), s);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export function ProcessOutput_toString(m) {
|
|
198
|
+
return toString(2, ProcessOutput_encoder(ConverterOptions_$ctor(), m));
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export function Process_genID(p) {
|
|
202
|
+
const matchValue = p.ID;
|
|
203
|
+
if (matchValue == null) {
|
|
204
|
+
const matchValue_1 = p.Name;
|
|
205
|
+
if (matchValue_1 == null) {
|
|
206
|
+
return "#EmptyProcess";
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
return "#Process_" + replace(matchValue_1, " ", "_");
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
else {
|
|
213
|
+
return URIModule_toString(matchValue);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export function Process_encoder(options, oa) {
|
|
218
|
+
return object_22(choose((tupledArg) => {
|
|
219
|
+
const v = tupledArg[1];
|
|
220
|
+
if (equals(v, nil)) {
|
|
221
|
+
return void 0;
|
|
222
|
+
}
|
|
223
|
+
else {
|
|
224
|
+
return [tupledArg[0], v];
|
|
225
|
+
}
|
|
226
|
+
}, toList(delay(() => {
|
|
227
|
+
let value, s;
|
|
228
|
+
return append(ConverterOptions__get_SetID(options) ? singleton(["@id", (value = Process_genID(oa), (typeof value === "string") ? ((s = value, s)) : nil)]) : singleton(tryInclude("@id", (value_2) => {
|
|
229
|
+
let s_1;
|
|
230
|
+
const value_3 = value_2;
|
|
231
|
+
return (typeof value_3 === "string") ? ((s_1 = value_3, s_1)) : nil;
|
|
232
|
+
}, oa["ID"])), delay(() => {
|
|
233
|
+
let value_5, s_2;
|
|
234
|
+
return append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", (value_5 = "Process", (typeof value_5 === "string") ? ((s_2 = value_5, s_2)) : nil)]) : empty(), delay(() => append(singleton(tryInclude("name", (value_7) => {
|
|
235
|
+
let s_3;
|
|
236
|
+
const value_8 = value_7;
|
|
237
|
+
return (typeof value_8 === "string") ? ((s_3 = value_8, s_3)) : nil;
|
|
238
|
+
}, oa["Name"])), delay(() => append(singleton(tryInclude("executesProtocol", (oa_1) => Protocol_encoder(options, oa_1), oa["ExecutesProtocol"])), delay(() => append(singleton(tryInclude("parameterValues", (oa_2) => ProcessParameterValue_encoder(options, oa_2), oa["ParameterValues"])), delay(() => append(singleton(tryInclude("performer", (value_10) => {
|
|
239
|
+
let s_4;
|
|
240
|
+
const value_11 = value_10;
|
|
241
|
+
return (typeof value_11 === "string") ? ((s_4 = value_11, s_4)) : nil;
|
|
242
|
+
}, oa["Performer"])), delay(() => append(singleton(tryInclude("date", (value_13) => {
|
|
243
|
+
let s_5;
|
|
244
|
+
const value_14 = value_13;
|
|
245
|
+
return (typeof value_14 === "string") ? ((s_5 = value_14, s_5)) : nil;
|
|
246
|
+
}, oa["Date"])), delay(() => append(singleton(tryInclude("previousProcess", (oa_3) => Process_encoder(options, oa_3), oa["PreviousProcess"])), delay(() => append(singleton(tryInclude("nextProcess", (oa_4) => Process_encoder(options, oa_4), oa["NextProcess"])), delay(() => append(singleton(tryInclude("inputs", (value_16) => ProcessInput_encoder(options, value_16), oa["Inputs"])), delay(() => append(singleton(tryInclude("outputs", (value_17) => ProcessOutput_encoder(options, value_17), oa["Outputs"])), delay(() => singleton(tryInclude("comments", (comment) => encoder(options, comment), oa["Comments"]))))))))))))))))))))));
|
|
247
|
+
}));
|
|
248
|
+
}))));
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
export function Process_decoder(options) {
|
|
252
|
+
return (path_7) => ((v) => object_23((get$) => {
|
|
253
|
+
let objectArg, objectArg_1, arg_5, objectArg_2, arg_7, decoder, objectArg_3, objectArg_4, objectArg_5, arg_13, objectArg_6, arg_15, objectArg_7, objectArg_8, objectArg_9, arg_21, decoder_3, objectArg_10;
|
|
254
|
+
return new Process((objectArg = get$.Optional, objectArg.Field("@id", uri)), (objectArg_1 = get$.Optional, objectArg_1.Field("name", string)), (arg_5 = Protocol_decoder(options), (objectArg_2 = get$.Optional, objectArg_2.Field("executesProtocol", uncurry2(arg_5)))), (arg_7 = ((decoder = ProcessParameterValue_decoder(options), (path_1) => ((value_1) => list_1(uncurry2(decoder), path_1, value_1)))), (objectArg_3 = get$.Optional, objectArg_3.Field("parameterValues", uncurry2(arg_7)))), (objectArg_4 = get$.Optional, objectArg_4.Field("performer", string)), (objectArg_5 = get$.Optional, objectArg_5.Field("date", string)), (arg_13 = Process_decoder(options), (objectArg_6 = get$.Optional, objectArg_6.Field("previousProcess", uncurry2(arg_13)))), (arg_15 = Process_decoder(options), (objectArg_7 = get$.Optional, objectArg_7.Field("nextProcess", uncurry2(arg_15)))), (objectArg_8 = get$.Optional, objectArg_8.Field("inputs", (path_4, value_4) => list_1((s_1, json_1) => ProcessInput_decoder(options, s_1, json_1), path_4, value_4))), (objectArg_9 = get$.Optional, objectArg_9.Field("outputs", (path_5, value_5) => list_1((s_2, json_2) => ProcessOutput_decoder(options, s_2, json_2), path_5, value_5))), (arg_21 = ((decoder_3 = decoder_4(options), (path_6) => ((value_6) => list_1(uncurry2(decoder_3), path_6, value_6)))), (objectArg_10 = get$.Optional, objectArg_10.Field("comments", uncurry2(arg_21)))));
|
|
255
|
+
}, path_7, v));
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export function Process_fromString(s) {
|
|
259
|
+
return fromString(uncurry2(Process_decoder(ConverterOptions_$ctor())), s);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
export function Process_toString(p) {
|
|
263
|
+
return toString(2, Process_encoder(ConverterOptions_$ctor(), p));
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* exports in json-ld format
|
|
268
|
+
*/
|
|
269
|
+
export function Process_toStringLD(p) {
|
|
270
|
+
let returnVal;
|
|
271
|
+
return toString(2, Process_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), p));
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
export function ProcessSequence_fromString(s) {
|
|
275
|
+
let decoder;
|
|
276
|
+
return fromString(uncurry2((decoder = Process_decoder(ConverterOptions_$ctor()), (path) => ((value) => list_1(uncurry2(decoder), path, value)))), s);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
export function ProcessSequence_toString(p) {
|
|
280
|
+
let options;
|
|
281
|
+
return toString(2, list_2(map((options = ConverterOptions_$ctor(), (oa) => Process_encoder(options, oa)), p)));
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* exports in json-ld format
|
|
286
|
+
*/
|
|
287
|
+
export function ProcessSequence_toStringLD(p) {
|
|
288
|
+
let options, returnVal;
|
|
289
|
+
return toString(2, list_2(map((options = ((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal))), (oa) => Process_encoder(options, oa)), p)));
|
|
290
|
+
}
|
|
291
|
+
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { value as value_19 } from "../../fable_modules/fable-library.4.1.4/Option.js";
|
|
2
|
+
import { URIModule_toString } from "../ISA/JsonTypes/URI.js";
|
|
3
|
+
import { toString, nil, object as object_18 } from "../../fable_modules/Thoth.Json.10.1.0/Encode.fs.js";
|
|
4
|
+
import { 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 { OntologyAnnotation_decoder, OntologyAnnotation_encoder } from "./Ontology.js";
|
|
10
|
+
import { list as list_1, string, object as object_19 } from "../../fable_modules/Thoth.Json.10.1.0/Decode.fs.js";
|
|
11
|
+
import { fromString, uri } from "./Decode.js";
|
|
12
|
+
import { ProtocolParameter } from "../ISA/JsonTypes/ProtocolParameter.js";
|
|
13
|
+
import { replace } from "../../fable_modules/fable-library.4.1.4/String.js";
|
|
14
|
+
import { Result_Map } from "../../fable_modules/fable-library.4.1.4/Choice.js";
|
|
15
|
+
import { Component, Component_decomposeName_Z721C83C5 } from "../ISA/JsonTypes/Component.js";
|
|
16
|
+
import { decoder as decoder_3, encoder } from "./Comment.js";
|
|
17
|
+
import { Protocol } from "../ISA/JsonTypes/Protocol.js";
|
|
18
|
+
|
|
19
|
+
export function ProtocolParameter_genID(pp) {
|
|
20
|
+
const matchValue = pp.ID;
|
|
21
|
+
if (matchValue == null) {
|
|
22
|
+
const matchValue_1 = pp.ParameterName;
|
|
23
|
+
let matchResult, n_1;
|
|
24
|
+
if (matchValue_1 != null) {
|
|
25
|
+
if (!(matchValue_1.ID == null)) {
|
|
26
|
+
matchResult = 0;
|
|
27
|
+
n_1 = matchValue_1;
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
matchResult = 1;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
matchResult = 1;
|
|
35
|
+
}
|
|
36
|
+
switch (matchResult) {
|
|
37
|
+
case 0:
|
|
38
|
+
return "#Param_" + value_19(n_1.ID);
|
|
39
|
+
default:
|
|
40
|
+
return "#EmptyProtocolParameter";
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
return URIModule_toString(matchValue);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function ProtocolParameter_encoder(options, oa) {
|
|
49
|
+
return object_18(choose((tupledArg) => {
|
|
50
|
+
const v = tupledArg[1];
|
|
51
|
+
if (equals(v, nil)) {
|
|
52
|
+
return void 0;
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
return [tupledArg[0], v];
|
|
56
|
+
}
|
|
57
|
+
}, toList(delay(() => {
|
|
58
|
+
let value, s;
|
|
59
|
+
return append(ConverterOptions__get_SetID(options) ? singleton(["@id", (value = ProtocolParameter_genID(oa), (typeof value === "string") ? ((s = value, s)) : nil)]) : singleton(tryInclude("@id", (value_2) => {
|
|
60
|
+
let s_1;
|
|
61
|
+
const value_3 = value_2;
|
|
62
|
+
return (typeof value_3 === "string") ? ((s_1 = value_3, s_1)) : nil;
|
|
63
|
+
}, oa["ID"])), delay(() => {
|
|
64
|
+
let value_5, s_2;
|
|
65
|
+
return append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", (value_5 = "ProtocolParameter", (typeof value_5 === "string") ? ((s_2 = value_5, s_2)) : nil)]) : empty(), delay(() => singleton(tryInclude("parameterName", (oa_1) => OntologyAnnotation_encoder(options, oa_1), oa["ParameterName"]))));
|
|
66
|
+
}));
|
|
67
|
+
}))));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function ProtocolParameter_decoder(options) {
|
|
71
|
+
return (path) => ((v) => object_19((get$) => {
|
|
72
|
+
let objectArg, arg_3, objectArg_1;
|
|
73
|
+
return new ProtocolParameter((objectArg = get$.Optional, objectArg.Field("@id", uri)), (arg_3 = OntologyAnnotation_decoder(options), (objectArg_1 = get$.Optional, objectArg_1.Field("parameterName", uncurry2(arg_3)))));
|
|
74
|
+
}, path, v));
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function ProtocolParameter_fromString(s) {
|
|
78
|
+
return fromString(uncurry2(ProtocolParameter_decoder(ConverterOptions_$ctor())), s);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function ProtocolParameter_toString(p) {
|
|
82
|
+
return toString(2, ProtocolParameter_encoder(ConverterOptions_$ctor(), p));
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* exports in json-ld format
|
|
87
|
+
*/
|
|
88
|
+
export function ProtocolParameter_toStringLD(p) {
|
|
89
|
+
let returnVal;
|
|
90
|
+
return toString(2, ProtocolParameter_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), p));
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export function Component_genID(c) {
|
|
94
|
+
const matchValue = c.ComponentName;
|
|
95
|
+
if (matchValue == null) {
|
|
96
|
+
return "#EmptyComponent";
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
return "#Component_" + replace(matchValue, " ", "_");
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export function Component_encoder(options, oa) {
|
|
104
|
+
return object_18(choose((tupledArg) => {
|
|
105
|
+
const v = tupledArg[1];
|
|
106
|
+
if (equals(v, nil)) {
|
|
107
|
+
return void 0;
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
return [tupledArg[0], v];
|
|
111
|
+
}
|
|
112
|
+
}, toList(delay(() => {
|
|
113
|
+
let value, s;
|
|
114
|
+
return append(ConverterOptions__get_SetID(options) ? singleton(["@id", (value = Component_genID(oa), (typeof value === "string") ? ((s = value, s)) : nil)]) : empty(), delay(() => {
|
|
115
|
+
let value_2, s_1;
|
|
116
|
+
return append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", (value_2 = "Component", (typeof value_2 === "string") ? ((s_1 = value_2, s_1)) : nil)]) : empty(), delay(() => append(singleton(tryInclude("componentName", (value_4) => {
|
|
117
|
+
let s_2;
|
|
118
|
+
const value_5 = value_4;
|
|
119
|
+
return (typeof value_5 === "string") ? ((s_2 = value_5, s_2)) : nil;
|
|
120
|
+
}, oa["ComponentName"])), delay(() => singleton(tryInclude("componentType", (oa_1) => OntologyAnnotation_encoder(options, oa_1), oa["ComponentType"]))))));
|
|
121
|
+
}));
|
|
122
|
+
}))));
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export function Component_decoder(options, s, json) {
|
|
126
|
+
return Result_Map((c) => {
|
|
127
|
+
let patternInput;
|
|
128
|
+
const matchValue = c.ComponentName;
|
|
129
|
+
if (matchValue == null) {
|
|
130
|
+
patternInput = [void 0, void 0];
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
const tupledArg = Component_decomposeName_Z721C83C5(matchValue);
|
|
134
|
+
patternInput = [tupledArg[0], tupledArg[1]];
|
|
135
|
+
}
|
|
136
|
+
return new Component(c.ComponentName, patternInput[0], patternInput[1], c.ComponentType);
|
|
137
|
+
}, object_19((get$) => {
|
|
138
|
+
let objectArg, arg_3, objectArg_1;
|
|
139
|
+
return new Component((objectArg = get$.Optional, objectArg.Field("componentName", uri)), void 0, void 0, (arg_3 = OntologyAnnotation_decoder(options), (objectArg_1 = get$.Optional, objectArg_1.Field("componentType", uncurry2(arg_3)))));
|
|
140
|
+
}, s, json));
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export function Component_fromString(s) {
|
|
144
|
+
let options;
|
|
145
|
+
return fromString(uncurry2((options = ConverterOptions_$ctor(), (s_1) => ((json) => Component_decoder(options, s_1, json)))), s);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export function Component_toString(p) {
|
|
149
|
+
return toString(2, Component_encoder(ConverterOptions_$ctor(), p));
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* exports in json-ld format
|
|
154
|
+
*/
|
|
155
|
+
export function Component_toStringLD(p) {
|
|
156
|
+
let returnVal;
|
|
157
|
+
return toString(2, Component_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), p));
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export function Protocol_genID(p) {
|
|
161
|
+
const matchValue = p.ID;
|
|
162
|
+
if (matchValue == null) {
|
|
163
|
+
const matchValue_1 = p.Uri;
|
|
164
|
+
if (matchValue_1 == null) {
|
|
165
|
+
const matchValue_2 = p.Name;
|
|
166
|
+
if (matchValue_2 == null) {
|
|
167
|
+
return "#EmptyProtocol";
|
|
168
|
+
}
|
|
169
|
+
else {
|
|
170
|
+
return "#Protocol_" + replace(matchValue_2, " ", "_");
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
return matchValue_1;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
return URIModule_toString(matchValue);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export function Protocol_encoder(options, oa) {
|
|
183
|
+
return object_18(choose((tupledArg) => {
|
|
184
|
+
const v = tupledArg[1];
|
|
185
|
+
if (equals(v, nil)) {
|
|
186
|
+
return void 0;
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
return [tupledArg[0], v];
|
|
190
|
+
}
|
|
191
|
+
}, toList(delay(() => {
|
|
192
|
+
let value, s;
|
|
193
|
+
return append(ConverterOptions__get_SetID(options) ? singleton(["@id", (value = Protocol_genID(oa), (typeof value === "string") ? ((s = value, s)) : nil)]) : singleton(tryInclude("@id", (value_2) => {
|
|
194
|
+
let s_1;
|
|
195
|
+
const value_3 = value_2;
|
|
196
|
+
return (typeof value_3 === "string") ? ((s_1 = value_3, s_1)) : nil;
|
|
197
|
+
}, oa["ID"])), delay(() => {
|
|
198
|
+
let value_5, s_2;
|
|
199
|
+
return append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", (value_5 = "Protocol", (typeof value_5 === "string") ? ((s_2 = value_5, s_2)) : nil)]) : empty(), delay(() => append(singleton(tryInclude("name", (value_7) => {
|
|
200
|
+
let s_3;
|
|
201
|
+
const value_8 = value_7;
|
|
202
|
+
return (typeof value_8 === "string") ? ((s_3 = value_8, s_3)) : nil;
|
|
203
|
+
}, oa["Name"])), delay(() => append(singleton(tryInclude("protocolType", (oa_1) => OntologyAnnotation_encoder(options, oa_1), oa["ProtocolType"])), delay(() => append(singleton(tryInclude("description", (value_10) => {
|
|
204
|
+
let s_4;
|
|
205
|
+
const value_11 = value_10;
|
|
206
|
+
return (typeof value_11 === "string") ? ((s_4 = value_11, s_4)) : nil;
|
|
207
|
+
}, oa["Description"])), delay(() => append(singleton(tryInclude("uri", (value_13) => {
|
|
208
|
+
let s_5;
|
|
209
|
+
const value_14 = value_13;
|
|
210
|
+
return (typeof value_14 === "string") ? ((s_5 = value_14, s_5)) : nil;
|
|
211
|
+
}, oa["Uri"])), delay(() => append(singleton(tryInclude("version", (value_16) => {
|
|
212
|
+
let s_6;
|
|
213
|
+
const value_17 = value_16;
|
|
214
|
+
return (typeof value_17 === "string") ? ((s_6 = value_17, s_6)) : nil;
|
|
215
|
+
}, oa["Version"])), delay(() => append(singleton(tryInclude("parameters", (oa_2) => ProtocolParameter_encoder(options, oa_2), oa["Parameters"])), delay(() => append(singleton(tryInclude("components", (oa_3) => Component_encoder(options, oa_3), oa["Components"])), delay(() => singleton(tryInclude("comments", (comment) => encoder(options, comment), oa["Comments"]))))))))))))))))));
|
|
216
|
+
}));
|
|
217
|
+
}))));
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export function Protocol_decoder(options) {
|
|
221
|
+
return (path_6) => ((v) => object_19((get$) => {
|
|
222
|
+
let objectArg, objectArg_1, arg_5, objectArg_2, objectArg_3, objectArg_4, objectArg_5, arg_13, decoder, objectArg_6, objectArg_7, arg_17, decoder_2, objectArg_8;
|
|
223
|
+
return new Protocol((objectArg = get$.Optional, objectArg.Field("@id", uri)), (objectArg_1 = get$.Optional, objectArg_1.Field("name", string)), (arg_5 = OntologyAnnotation_decoder(options), (objectArg_2 = get$.Optional, objectArg_2.Field("protocolType", uncurry2(arg_5)))), (objectArg_3 = get$.Optional, objectArg_3.Field("description", string)), (objectArg_4 = get$.Optional, objectArg_4.Field("uri", uri)), (objectArg_5 = get$.Optional, objectArg_5.Field("version", string)), (arg_13 = ((decoder = ProtocolParameter_decoder(options), (path_3) => ((value_3) => list_1(uncurry2(decoder), path_3, value_3)))), (objectArg_6 = get$.Optional, objectArg_6.Field("parameters", uncurry2(arg_13)))), (objectArg_7 = get$.Optional, objectArg_7.Field("components", (path_4, value_4) => list_1((s_2, json_2) => Component_decoder(options, s_2, json_2), path_4, value_4))), (arg_17 = ((decoder_2 = decoder_3(options), (path_5) => ((value_5) => list_1(uncurry2(decoder_2), path_5, value_5)))), (objectArg_8 = get$.Optional, objectArg_8.Field("comments", uncurry2(arg_17)))));
|
|
224
|
+
}, path_6, v));
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
export function Protocol_fromString(s) {
|
|
228
|
+
return fromString(uncurry2(Protocol_decoder(ConverterOptions_$ctor())), s);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export function Protocol_toString(p) {
|
|
232
|
+
return toString(2, Protocol_encoder(ConverterOptions_$ctor(), p));
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* exports in json-ld format
|
|
237
|
+
*/
|
|
238
|
+
export function Protocol_toStringLD(p) {
|
|
239
|
+
let returnVal;
|
|
240
|
+
return toString(2, Protocol_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), p));
|
|
241
|
+
}
|
|
242
|
+
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { replace } from "../../fable_modules/fable-library.4.1.4/String.js";
|
|
2
|
+
import { toString as toString_1, nil, object as object_12 } from "../../fable_modules/Thoth.Json.10.1.0/Encode.fs.js";
|
|
3
|
+
import { choose } from "../../fable_modules/fable-library.4.1.4/List.js";
|
|
4
|
+
import { uncurry2, equals } from "../../fable_modules/fable-library.4.1.4/Util.js";
|
|
5
|
+
import { empty, singleton, append, delay, toList } from "../../fable_modules/fable-library.4.1.4/Seq.js";
|
|
6
|
+
import { ConverterOptions__set_IncludeType_Z1FBCCD16, ConverterOptions__set_SetID_Z1FBCCD16, ConverterOptions_$ctor, ConverterOptions__get_IncludeType, ConverterOptions__get_SetID } from "./ConverterOptions.js";
|
|
7
|
+
import { tryInclude } from "./GEncode.js";
|
|
8
|
+
import { OntologyAnnotation_decoder, OntologyAnnotation_encoder } from "./Ontology.js";
|
|
9
|
+
import { decoder as decoder_2, encoder as encoder_1 } from "./Comment.js";
|
|
10
|
+
import { array, string, object as object_13 } from "../../fable_modules/Thoth.Json.10.1.0/Decode.fs.js";
|
|
11
|
+
import { fromString as fromString_1, uri } from "./Decode.js";
|
|
12
|
+
import { Publication } from "../ISA/JsonTypes/Publication.js";
|
|
13
|
+
|
|
14
|
+
export function genID(p) {
|
|
15
|
+
const matchValue = p.DOI;
|
|
16
|
+
if (matchValue == null) {
|
|
17
|
+
const matchValue_1 = p.PubMedID;
|
|
18
|
+
if (matchValue_1 == null) {
|
|
19
|
+
const matchValue_2 = p.Title;
|
|
20
|
+
if (matchValue_2 == null) {
|
|
21
|
+
return "#EmptyPublication";
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
return "#Pub_" + replace(matchValue_2, " ", "_");
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
return matchValue_1;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
return matchValue;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function encoder(options, oa) {
|
|
37
|
+
return object_12(choose((tupledArg) => {
|
|
38
|
+
const v = tupledArg[1];
|
|
39
|
+
if (equals(v, nil)) {
|
|
40
|
+
return void 0;
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
return [tupledArg[0], v];
|
|
44
|
+
}
|
|
45
|
+
}, toList(delay(() => {
|
|
46
|
+
let value, s;
|
|
47
|
+
return append(ConverterOptions__get_SetID(options) ? singleton(["@id", (value = genID(oa), (typeof value === "string") ? ((s = value, s)) : nil)]) : empty(), delay(() => {
|
|
48
|
+
let value_2, s_1;
|
|
49
|
+
return append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", (value_2 = "Publication", (typeof value_2 === "string") ? ((s_1 = value_2, s_1)) : nil)]) : empty(), delay(() => append(singleton(tryInclude("pubMedID", (value_4) => {
|
|
50
|
+
let s_2;
|
|
51
|
+
const value_5 = value_4;
|
|
52
|
+
return (typeof value_5 === "string") ? ((s_2 = value_5, s_2)) : nil;
|
|
53
|
+
}, oa["PubMedID"])), delay(() => append(singleton(tryInclude("doi", (value_7) => {
|
|
54
|
+
let s_3;
|
|
55
|
+
const value_8 = value_7;
|
|
56
|
+
return (typeof value_8 === "string") ? ((s_3 = value_8, s_3)) : nil;
|
|
57
|
+
}, oa["DOI"])), delay(() => append(singleton(tryInclude("authorList", (value_10) => {
|
|
58
|
+
let s_4;
|
|
59
|
+
const value_11 = value_10;
|
|
60
|
+
return (typeof value_11 === "string") ? ((s_4 = value_11, s_4)) : nil;
|
|
61
|
+
}, oa["Authors"])), delay(() => append(singleton(tryInclude("title", (value_13) => {
|
|
62
|
+
let s_5;
|
|
63
|
+
const value_14 = value_13;
|
|
64
|
+
return (typeof value_14 === "string") ? ((s_5 = value_14, s_5)) : nil;
|
|
65
|
+
}, oa["Title"])), delay(() => append(singleton(tryInclude("status", (oa_1) => OntologyAnnotation_encoder(options, oa_1), oa["Status"])), delay(() => singleton(tryInclude("comments", (comment) => encoder_1(options, comment), oa["Comments"]))))))))))))));
|
|
66
|
+
}));
|
|
67
|
+
}))));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function decoder(options) {
|
|
71
|
+
return (path_4) => ((v) => object_13((get$) => {
|
|
72
|
+
let objectArg, objectArg_1, objectArg_2, objectArg_3, arg_9, objectArg_4, arg_11, decoder_1, objectArg_5;
|
|
73
|
+
return new Publication((objectArg = get$.Optional, objectArg.Field("pubMedID", uri)), (objectArg_1 = get$.Optional, objectArg_1.Field("doi", string)), (objectArg_2 = get$.Optional, objectArg_2.Field("authorList", string)), (objectArg_3 = get$.Optional, objectArg_3.Field("title", string)), (arg_9 = OntologyAnnotation_decoder(options), (objectArg_4 = get$.Optional, objectArg_4.Field("status", uncurry2(arg_9)))), (arg_11 = ((decoder_1 = decoder_2(options), (path_3) => ((value_3) => array(uncurry2(decoder_1), path_3, value_3)))), (objectArg_5 = get$.Optional, objectArg_5.Field("comments", uncurry2(arg_11)))));
|
|
74
|
+
}, path_4, v));
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function fromString(s) {
|
|
78
|
+
return fromString_1(uncurry2(decoder(ConverterOptions_$ctor())), s);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function toString(p) {
|
|
82
|
+
return toString_1(2, encoder(ConverterOptions_$ctor(), p));
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* exports in json-ld format
|
|
87
|
+
*/
|
|
88
|
+
export function toStringLD(p) {
|
|
89
|
+
let returnVal;
|
|
90
|
+
return toString_1(2, encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), p));
|
|
91
|
+
}
|
|
92
|
+
|