@nfdi4plants/arctrl 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ARC.js +9 -9
- package/Contract/Contract.js +3 -3
- package/Contracts/Contracts.ArcTypes.js +11 -11
- package/Contracts/Contracts.Git.js +4 -4
- package/FileSystem/Commit.js +2 -2
- package/FileSystem/FileSystem.js +4 -4
- package/FileSystem/FileSystemTree.js +8 -8
- package/FileSystem/Path.js +2 -2
- package/FileSystemTree.js +1 -1
- package/ISA/ISA/ArcTypes/ArcTable.js +19 -19
- package/ISA/ISA/ArcTypes/ArcTableAux.js +16 -16
- package/ISA/ISA/ArcTypes/ArcTables.js +11 -11
- package/ISA/ISA/ArcTypes/ArcTypes.js +10 -10
- package/ISA/ISA/ArcTypes/CompositeCell.js +4 -4
- package/ISA/ISA/ArcTypes/CompositeColumn.js +8 -7
- package/ISA/ISA/ArcTypes/CompositeHeader.js +5 -5
- package/ISA/ISA/ArcTypes/CompositeRow.js +1 -1
- package/ISA/ISA/Builder/Types.js +5 -5
- package/ISA/ISA/Fable.js +6 -6
- package/ISA/ISA/Helper.js +15 -13
- package/ISA/ISA/Identifier.js +1 -1
- package/ISA/ISA/JsonTypes/Assay.js +8 -8
- package/ISA/ISA/JsonTypes/AssayMaterials.js +4 -4
- package/ISA/ISA/JsonTypes/ColumnIndex.js +5 -5
- package/ISA/ISA/JsonTypes/Comment.js +3 -3
- package/ISA/ISA/JsonTypes/CommentList.js +4 -4
- package/ISA/ISA/JsonTypes/Component.js +4 -4
- package/ISA/ISA/JsonTypes/Data.js +4 -4
- package/ISA/ISA/JsonTypes/DataFile.js +2 -2
- package/ISA/ISA/JsonTypes/Factor.js +6 -6
- package/ISA/ISA/JsonTypes/FactorValue.js +5 -5
- package/ISA/ISA/JsonTypes/Investigation.js +6 -6
- package/ISA/ISA/JsonTypes/Material.js +5 -5
- package/ISA/ISA/JsonTypes/MaterialAttribute.js +3 -3
- package/ISA/ISA/JsonTypes/MaterialAttributeValue.js +5 -5
- package/ISA/ISA/JsonTypes/MaterialType.js +2 -2
- package/ISA/ISA/JsonTypes/OntologyAnnotation.js +6 -6
- package/ISA/ISA/JsonTypes/OntologySourceReference.js +6 -6
- package/ISA/ISA/JsonTypes/Person.js +23 -8
- package/ISA/ISA/JsonTypes/Process.js +13 -13
- package/ISA/ISA/JsonTypes/ProcessInput.js +5 -5
- package/ISA/ISA/JsonTypes/ProcessOutput.js +5 -5
- package/ISA/ISA/JsonTypes/ProcessParameterValue.js +5 -5
- package/ISA/ISA/JsonTypes/ProcessSequence.js +6 -6
- package/ISA/ISA/JsonTypes/Protocol.js +6 -6
- package/ISA/ISA/JsonTypes/ProtocolParameter.js +3 -3
- package/ISA/ISA/JsonTypes/Publication.js +6 -6
- package/ISA/ISA/JsonTypes/Sample.js +5 -5
- package/ISA/ISA/JsonTypes/Source.js +5 -5
- package/ISA/ISA/JsonTypes/Study.js +8 -8
- package/ISA/ISA/JsonTypes/StudyMaterials.js +4 -4
- package/ISA/ISA/JsonTypes/Value.js +22 -29
- package/ISA/ISA/Regex.js +3 -3
- package/ISA/ISA.Json/ArcTypes/ArcAssay.js +105 -84
- package/ISA/ISA.Json/ArcTypes/ArcInvestigation.js +78 -49
- package/ISA/ISA.Json/ArcTypes/ArcStudy.js +74 -41
- package/ISA/ISA.Json/ArcTypes/ArcTable.js +112 -71
- package/ISA/ISA.Json/ArcTypes/CellTable.js +13 -19
- package/ISA/ISA.Json/ArcTypes/CompositeCell.js +23 -38
- package/ISA/ISA.Json/ArcTypes/CompositeHeader.js +18 -46
- package/ISA/ISA.Json/ArcTypes/IOType.js +11 -13
- package/ISA/ISA.Json/ArcTypes/OATable.js +13 -19
- package/ISA/ISA.Json/Assay.js +71 -47
- package/ISA/ISA.Json/Comment.js +31 -35
- package/ISA/ISA.Json/ConverterOptions.js +19 -1
- package/ISA/ISA.Json/Data.js +119 -137
- package/ISA/ISA.Json/Decode.js +51 -36
- package/ISA/ISA.Json/Factor.js +90 -90
- package/ISA/ISA.Json/GEncode.js +31 -6
- package/ISA/ISA.Json/Investigation.js +54 -79
- package/ISA/ISA.Json/Material.js +103 -104
- package/ISA/ISA.Json/Ontology.js +86 -109
- package/ISA/ISA.Json/Person.js +47 -65
- package/ISA/ISA.Json/Process.js +144 -130
- package/ISA/ISA.Json/Protocol.js +144 -105
- package/ISA/ISA.Json/Publication.js +34 -40
- package/ISA/ISA.Json/StringTable.js +25 -24
- package/ISA/ISA.Json/Study.js +70 -96
- package/ISA/ISA.Json/context/rocrate/isa_assay_context.js +34 -0
- package/ISA/ISA.Json/context/rocrate/isa_comment_context.js +23 -0
- package/ISA/ISA.Json/context/rocrate/isa_component_context.js +24 -0
- package/ISA/ISA.Json/context/rocrate/isa_data_context.js +25 -0
- package/ISA/ISA.Json/context/rocrate/isa_factor_context.js +25 -0
- package/ISA/ISA.Json/context/rocrate/isa_factor_value_context.js +25 -0
- package/ISA/ISA.Json/context/rocrate/isa_investigation_context.js +33 -0
- package/ISA/ISA.Json/context/rocrate/isa_material_attribute_context.js +23 -0
- package/ISA/ISA.Json/context/rocrate/isa_material_attribute_value_context.js +25 -0
- package/ISA/ISA.Json/context/rocrate/isa_material_context.js +26 -0
- package/ISA/ISA.Json/context/rocrate/isa_ontology_annotation_context.js +25 -0
- package/ISA/ISA.Json/context/rocrate/isa_ontology_source_reference_context.js +26 -0
- package/ISA/ISA.Json/context/rocrate/isa_organization_context.js +22 -0
- package/ISA/ISA.Json/context/rocrate/isa_person_context.js +31 -0
- package/ISA/ISA.Json/context/rocrate/isa_process_context.js +31 -0
- package/ISA/ISA.Json/context/rocrate/isa_process_parameter_value_context.js +25 -0
- package/ISA/ISA.Json/context/rocrate/isa_protocol_context.js +30 -0
- package/ISA/ISA.Json/context/rocrate/isa_protocol_parameter_context.js +23 -0
- package/ISA/ISA.Json/context/rocrate/isa_publication_context.js +27 -0
- package/ISA/ISA.Json/context/rocrate/isa_sample_context.js +26 -0
- package/ISA/ISA.Json/context/rocrate/isa_source_context.js +25 -0
- package/ISA/ISA.Json/context/rocrate/isa_study_context.js +42 -0
- package/ISA/ISA.Json/context/rocrate/rocrate_context.js +25 -0
- package/ISA/ISA.Spreadsheet/AnnotationTable/ArcTable.js +5 -5
- package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeCell.js +2 -2
- package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeColumn.js +8 -8
- package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeHeader.js +4 -4
- package/ISA/ISA.Spreadsheet/ArcAssay.js +5 -5
- package/ISA/ISA.Spreadsheet/ArcInvestigation.js +10 -10
- package/ISA/ISA.Spreadsheet/ArcStudy.js +5 -5
- package/ISA/ISA.Spreadsheet/CollectionAux.js +8 -8
- package/ISA/ISA.Spreadsheet/Metadata/Assays.js +5 -5
- package/ISA/ISA.Spreadsheet/Metadata/Comment.js +31 -20
- package/ISA/ISA.Spreadsheet/Metadata/Contacts.js +5 -5
- package/ISA/ISA.Spreadsheet/Metadata/Conversions.js +5 -5
- package/ISA/ISA.Spreadsheet/Metadata/DesignDescriptors.js +1 -1
- package/ISA/ISA.Spreadsheet/Metadata/Factors.js +5 -5
- package/ISA/ISA.Spreadsheet/Metadata/OntologyAnnotation.js +5 -5
- package/ISA/ISA.Spreadsheet/Metadata/OntologySourceReference.js +5 -5
- package/ISA/ISA.Spreadsheet/Metadata/Protocols.js +5 -5
- package/ISA/ISA.Spreadsheet/Metadata/Publication.js +5 -5
- package/ISA/ISA.Spreadsheet/Metadata/SparseTable.js +21 -16
- package/ISA/ISA.Spreadsheet/Metadata/Study.js +8 -8
- package/README.md +20 -3
- package/SemVer.js +6 -6
- package/Templates/Template.Json.js +43 -36
- package/Templates/Template.Spreadsheet.js +10 -10
- package/Templates/Template.Web.js +4 -4
- package/Templates/Template.js +7 -7
- package/Templates/Templates.js +7 -7
- package/WebRequest/WebRequest.Node.js +15 -0
- package/WebRequest/WebRequest.js +10 -29
- package/fable_modules/Fable.Fetch.2.6.0/Fetch.fs.js +7 -7
- package/fable_modules/Fable.Promise.2.2.2/Promise.fs.js +3 -3
- package/fable_modules/Fable.SimpleHttp.3.5.0/Http.fs.js +8 -8
- package/fable_modules/Fable.SimpleHttp.3.5.0/Types.fs.js +2 -2
- package/fable_modules/FsSpreadsheet.5.1.3/Cells/FsCell.fs.js +14 -14
- package/fable_modules/FsSpreadsheet.5.1.3/Cells/FsCellsCollection.fs.js +6 -6
- package/fable_modules/FsSpreadsheet.5.1.3/DSL/CellBuilder.fs.js +4 -4
- package/fable_modules/FsSpreadsheet.5.1.3/DSL/ColumnBuilder.fs.js +3 -3
- package/fable_modules/FsSpreadsheet.5.1.3/DSL/DSL.fs.js +2 -2
- package/fable_modules/FsSpreadsheet.5.1.3/DSL/Expression.fs.js +1 -1
- package/fable_modules/FsSpreadsheet.5.1.3/DSL/RowBuilder.fs.js +3 -3
- package/fable_modules/FsSpreadsheet.5.1.3/DSL/SheetBuilder.fs.js +3 -3
- package/fable_modules/FsSpreadsheet.5.1.3/DSL/TableBuilder.fs.js +3 -3
- package/fable_modules/FsSpreadsheet.5.1.3/DSL/Transform.fs.js +6 -6
- package/fable_modules/FsSpreadsheet.5.1.3/DSL/Types.fs.js +4 -4
- package/fable_modules/FsSpreadsheet.5.1.3/DSL/WorkbookBuilder.fs.js +3 -3
- package/fable_modules/FsSpreadsheet.5.1.3/FsAddress.fs.js +8 -8
- package/fable_modules/FsSpreadsheet.5.1.3/FsColumn.fs.js +3 -3
- package/fable_modules/FsSpreadsheet.5.1.3/FsRow.fs.js +3 -3
- package/fable_modules/FsSpreadsheet.5.1.3/FsWorkbook.fs.js +6 -6
- package/fable_modules/FsSpreadsheet.5.1.3/FsWorksheet.fs.js +9 -9
- package/fable_modules/FsSpreadsheet.5.1.3/Ranges/FsRange.fs.js +3 -3
- package/fable_modules/FsSpreadsheet.5.1.3/Ranges/FsRangeAddress.fs.js +4 -3
- package/fable_modules/FsSpreadsheet.5.1.3/Ranges/FsRangeBase.fs.js +3 -3
- package/fable_modules/FsSpreadsheet.5.1.3/Ranges/FsRangeColumn.fs.js +3 -3
- package/fable_modules/FsSpreadsheet.5.1.3/Ranges/FsRangeRow.fs.js +1 -1
- package/fable_modules/FsSpreadsheet.5.1.3/SheetBuilder.fs.js +8 -8
- package/fable_modules/FsSpreadsheet.5.1.3/Tables/FsTable.fs.js +7 -7
- package/fable_modules/FsSpreadsheet.5.1.3/Tables/FsTableField.fs.js +4 -4
- package/fable_modules/FsSpreadsheet.5.1.3/Tables/FsTableRow.fs.js +1 -1
- package/fable_modules/Thoth.Json.Core.0.2.1/Decode.fs +1390 -0
- package/fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js +1230 -0
- package/fable_modules/Thoth.Json.Core.0.2.1/Encode.fs +233 -0
- package/fable_modules/Thoth.Json.Core.0.2.1/Encode.fs.js +113 -0
- package/fable_modules/Thoth.Json.Core.0.2.1/Thoth.Json.Core.fableproj +28 -0
- package/fable_modules/Thoth.Json.Core.0.2.1/Types.fs +76 -0
- package/fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js +33 -0
- package/fable_modules/Thoth.Json.Core.0.2.1/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
- package/fable_modules/{Thoth.Json.10.1.0/obj/Release/netstandard2.0/Thoth.Json.AssemblyInfo.fs → Thoth.Json.Core.0.2.1/obj/Debug/netstandard2.0/Thoth.Json.Core.AssemblyInfo.fs} +8 -7
- package/fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs +79 -0
- package/fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js +85 -0
- package/fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs +32 -0
- package/fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js +45 -0
- package/fable_modules/Thoth.Json.JavaScript.0.1.0/Thoth.Json.JavaScript.fableproj +21 -0
- package/fable_modules/Thoth.Json.JavaScript.0.1.0/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
- package/fable_modules/Thoth.Json.JavaScript.0.1.0/obj/Debug/netstandard2.0/Thoth.Json.JavaScript.AssemblyInfo.fs +18 -0
- package/fable_modules/Thoth.Json.JavaScript.0.1.0/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
- package/fable_modules/Thoth.Json.JavaScript.0.1.0/obj/Release/netstandard2.0/Thoth.Json.JavaScript.AssemblyInfo.fs +19 -0
- package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Array.d.ts +4 -1
- package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Array.js +124 -86
- package/fable_modules/fable-library-js.4.13.0/CHANGELOG.md +29 -0
- package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Choice.d.ts +0 -17
- package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Choice.js +0 -43
- package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Date.js +3 -2
- package/fable_modules/fable-library-js.4.13.0/FSharp.Core.CompilerServices.d.ts +12 -0
- package/fable_modules/fable-library-js.4.13.0/FSharp.Core.CompilerServices.js +27 -0
- package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/List.js +3 -3
- package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Map.js +3 -3
- package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/MutableMap.js +2 -1
- package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/MutableSet.js +2 -1
- package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Random.js +7 -7
- package/fable_modules/fable-library-js.4.13.0/Result.d.ts +37 -0
- package/fable_modules/fable-library-js.4.13.0/Result.js +165 -0
- package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Set.js +2 -2
- package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/String.d.ts +1 -0
- package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/String.js +8 -5
- package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/System.Collections.Generic.d.ts +15 -7
- package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/System.Collections.Generic.js +46 -36
- package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/System.Text.d.ts +9 -1
- package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/System.Text.js +60 -8
- package/fable_modules/fable-library-js.4.13.0/big.d.ts +338 -0
- package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/package.json +4 -3
- package/fable_modules/project_cracked.json +1 -1
- package/package.json +1 -1
- package/ISA/ISA.Json/Validation/Fable.js +0 -69
- package/ISA/ISA.Json/Validation/JsonSchemaValidation.js +0 -88
- package/ISA/ISA.Json/Validation/ValidationResult.js +0 -45
- package/fable_modules/Thoth.Json.10.1.0/Decode.fs +0 -1366
- package/fable_modules/Thoth.Json.10.1.0/Decode.fs.js +0 -1798
- package/fable_modules/Thoth.Json.10.1.0/Encode.fs +0 -621
- package/fable_modules/Thoth.Json.10.1.0/Encode.fs.js +0 -472
- package/fable_modules/Thoth.Json.10.1.0/Extra.fs +0 -31
- package/fable_modules/Thoth.Json.10.1.0/Extra.fs.js +0 -8
- package/fable_modules/Thoth.Json.10.1.0/Thoth.Json.fableproj +0 -30
- package/fable_modules/Thoth.Json.10.1.0/Types.fs +0 -59
- package/fable_modules/Thoth.Json.10.1.0/Types.fs.js +0 -98
- package/fable_modules/Thoth.Json.10.1.0/package.json +0 -5
- package/fable_modules/fable-library.4.5.0/CHANGELOG.md +0 -11
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Async.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Async.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/AsyncBuilder.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/AsyncBuilder.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/BigInt.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/BigInt.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/BitConverter.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/BitConverter.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Boolean.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Boolean.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Char.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Char.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Date.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/DateOffset.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/DateOffset.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/DateOnly.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/DateOnly.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Decimal.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Decimal.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Double.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Double.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Encoding.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Encoding.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Event.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Event.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/FSharp.Collections.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/FSharp.Collections.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/FSharp.Core.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/FSharp.Core.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Global.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Global.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Guid.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Guid.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Int32.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Int32.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/List.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Long.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Long.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/MailboxProcessor.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/MailboxProcessor.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Map.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/MapUtil.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/MapUtil.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/MutableMap.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/MutableSet.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Native.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Native.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Numeric.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Numeric.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Observable.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Observable.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Option.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Option.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/README.md +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Random.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Range.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Range.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Reflection.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Reflection.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/RegExp.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/RegExp.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Seq.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Seq.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Seq2.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Seq2.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Set.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/SystemException.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/SystemException.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/TimeOnly.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/TimeOnly.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/TimeSpan.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/TimeSpan.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Timer.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Timer.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Types.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Types.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Unicode.13.0.0.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Unicode.13.0.0.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Uri.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Uri.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Util.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Util.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/lib/big.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/lib/big.js +0 -0
package/ISA/ISA.Json/Material.js
CHANGED
|
@@ -1,53 +1,57 @@
|
|
|
1
|
+
import { ErrorReason$1, Json } from "../../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
|
|
2
|
+
import { list as list_2, object, string } from "../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
3
|
+
import { FSharpResult$2 } from "../../fable_modules/fable-library-js.4.13.0/Result.js";
|
|
1
4
|
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.5.0/Choice.js";
|
|
5
|
-
import { ErrorReason } from "../../fable_modules/Thoth.Json.10.1.0/Types.fs.js";
|
|
6
5
|
import { URIModule_toString } from "../ISA/JsonTypes/URI.js";
|
|
7
|
-
import { ofArray, choose } from "../../fable_modules/fable-library.4.
|
|
8
|
-
import {
|
|
9
|
-
import { empty, singleton, append, delay, toList } from "../../fable_modules/fable-library.4.
|
|
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";
|
|
6
|
+
import { ofArray, choose } from "../../fable_modules/fable-library-js.4.13.0/List.js";
|
|
7
|
+
import { equals } from "../../fable_modules/fable-library-js.4.13.0/Util.js";
|
|
8
|
+
import { empty, singleton, append, delay, toList } from "../../fable_modules/fable-library-js.4.13.0/Seq.js";
|
|
9
|
+
import { ConverterOptions__set_IncludeContext_Z1FBCCD16, ConverterOptions__set_IncludeType_Z1FBCCD16, ConverterOptions__set_SetID_Z1FBCCD16, ConverterOptions_$ctor, ConverterOptions__get_IncludeContext, ConverterOptions__get_IncludeType, ConverterOptions__get_SetID } from "./ConverterOptions.js";
|
|
10
|
+
import { tryIncludeList, tryInclude } from "./GEncode.js";
|
|
11
|
+
import { list as list_1 } from "../../fable_modules/Thoth.Json.Core.0.2.1/Encode.fs.js";
|
|
12
12
|
import { OntologyAnnotation_decoder, OntologyAnnotation_encoder } from "./Ontology.js";
|
|
13
|
-
import {
|
|
13
|
+
import { context_jsonvalue } from "./context/rocrate/isa_material_attribute_context.js";
|
|
14
|
+
import { object as object_1, uri } from "./Decode.js";
|
|
14
15
|
import { MaterialAttribute } from "../ISA/JsonTypes/MaterialAttribute.js";
|
|
16
|
+
import { fromString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
|
|
17
|
+
import { replace, printf, toText } from "../../fable_modules/fable-library-js.4.13.0/String.js";
|
|
18
|
+
import { toString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
|
|
15
19
|
import { Value_decoder, Value_encoder } from "./Factor.js";
|
|
20
|
+
import { context_jsonvalue as context_jsonvalue_1 } from "./context/rocrate/isa_material_attribute_value_context.js";
|
|
16
21
|
import { MaterialAttributeValue } from "../ISA/JsonTypes/MaterialAttributeValue.js";
|
|
17
|
-
import {
|
|
22
|
+
import { context_jsonvalue as context_jsonvalue_2 } from "./context/rocrate/isa_material_context.js";
|
|
18
23
|
import { Material } from "../ISA/JsonTypes/Material.js";
|
|
19
24
|
|
|
20
25
|
export function MaterialType_encoder(options, value) {
|
|
21
|
-
if (value
|
|
22
|
-
|
|
23
|
-
return "Labeled Extract Name";
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
return "Extract Name";
|
|
27
|
-
}
|
|
26
|
+
if (value.tag === 1) {
|
|
27
|
+
return new Json(0, ["Labeled Extract Name"]);
|
|
28
28
|
}
|
|
29
29
|
else {
|
|
30
|
-
return
|
|
30
|
+
return new Json(0, ["Extract Name"]);
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
export function MaterialType_decoder(options
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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])]]);
|
|
34
|
+
export function MaterialType_decoder(options) {
|
|
35
|
+
return {
|
|
36
|
+
Decode(s, json) {
|
|
37
|
+
const matchValue = string.Decode(s, json);
|
|
38
|
+
if (matchValue.tag === 1) {
|
|
39
|
+
return new FSharpResult$2(1, [matchValue.fields[0]]);
|
|
48
40
|
}
|
|
49
|
-
|
|
50
|
-
|
|
41
|
+
else {
|
|
42
|
+
switch (matchValue.fields[0]) {
|
|
43
|
+
case "Extract Name":
|
|
44
|
+
return new FSharpResult$2(0, [new MaterialType(0, [])]);
|
|
45
|
+
case "Labeled Extract Name":
|
|
46
|
+
return new FSharpResult$2(0, [new MaterialType(1, [])]);
|
|
47
|
+
default: {
|
|
48
|
+
const s_1 = matchValue.fields[0];
|
|
49
|
+
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$1(0, [s_1, json])]]);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
};
|
|
51
55
|
}
|
|
52
56
|
|
|
53
57
|
export function MaterialAttribute_genID(m) {
|
|
@@ -61,36 +65,32 @@ export function MaterialAttribute_genID(m) {
|
|
|
61
65
|
}
|
|
62
66
|
|
|
63
67
|
export function MaterialAttribute_encoder(options, oa) {
|
|
64
|
-
return
|
|
68
|
+
return new Json(5, [choose((tupledArg) => {
|
|
65
69
|
const v = tupledArg[1];
|
|
66
|
-
if (equals(v,
|
|
70
|
+
if (equals(v, new Json(3, []))) {
|
|
67
71
|
return void 0;
|
|
68
72
|
}
|
|
69
73
|
else {
|
|
70
74
|
return [tupledArg[0], v];
|
|
71
75
|
}
|
|
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
|
-
}))));
|
|
76
|
+
}, toList(delay(() => append(ConverterOptions__get_SetID(options) ? singleton(["@id", new Json(0, [MaterialAttribute_genID(oa)])]) : singleton(tryInclude("@id", (value_1) => (new Json(0, [value_1])), oa.ID)), delay(() => append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", list_1(ofArray([new Json(0, ["MaterialAttribute"]), new Json(0, ["ArcMaterialAttribute"])]))]) : empty(), delay(() => append(singleton(tryInclude("characteristicType", (oa_1) => OntologyAnnotation_encoder(options, oa_1), oa.CharacteristicType)), delay(() => (ConverterOptions__get_IncludeContext(options) ? singleton(["@context", context_jsonvalue]) : empty()))))))))))]);
|
|
83
77
|
}
|
|
84
78
|
|
|
85
79
|
export function MaterialAttribute_decoder(options) {
|
|
86
|
-
return (
|
|
80
|
+
return object((get$) => {
|
|
87
81
|
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",
|
|
89
|
-
}
|
|
82
|
+
return new MaterialAttribute((objectArg = get$.Optional, objectArg.Field("@id", uri)), (arg_3 = OntologyAnnotation_decoder(options), (objectArg_1 = get$.Optional, objectArg_1.Field("characteristicType", arg_3))));
|
|
83
|
+
});
|
|
90
84
|
}
|
|
91
85
|
|
|
92
86
|
export function MaterialAttribute_fromJsonString(s) {
|
|
93
|
-
|
|
87
|
+
const matchValue = fromString(MaterialAttribute_decoder(ConverterOptions_$ctor()), s);
|
|
88
|
+
if (matchValue.tag === 1) {
|
|
89
|
+
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
return matchValue.fields[0];
|
|
93
|
+
}
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
export function MaterialAttribute_toJsonString(m) {
|
|
@@ -100,11 +100,16 @@ export function MaterialAttribute_toJsonString(m) {
|
|
|
100
100
|
/**
|
|
101
101
|
* exports in json-ld format
|
|
102
102
|
*/
|
|
103
|
-
export function
|
|
103
|
+
export function MaterialAttribute_toJsonldString(m) {
|
|
104
104
|
let returnVal;
|
|
105
105
|
return toString(2, MaterialAttribute_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), m));
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
+
export function MaterialAttribute_toJsonldStringWithContext(a) {
|
|
109
|
+
let returnVal;
|
|
110
|
+
return toString(2, MaterialAttribute_encoder((returnVal = ConverterOptions_$ctor(), (((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), ConverterOptions__set_IncludeContext_Z1FBCCD16(returnVal, true)), returnVal)), a));
|
|
111
|
+
}
|
|
112
|
+
|
|
108
113
|
export function MaterialAttributeValue_genID(m) {
|
|
109
114
|
const matchValue = m.ID;
|
|
110
115
|
if (matchValue == null) {
|
|
@@ -116,36 +121,32 @@ export function MaterialAttributeValue_genID(m) {
|
|
|
116
121
|
}
|
|
117
122
|
|
|
118
123
|
export function MaterialAttributeValue_encoder(options, oa) {
|
|
119
|
-
return
|
|
124
|
+
return new Json(5, [choose((tupledArg) => {
|
|
120
125
|
const v = tupledArg[1];
|
|
121
|
-
if (equals(v,
|
|
126
|
+
if (equals(v, new Json(3, []))) {
|
|
122
127
|
return void 0;
|
|
123
128
|
}
|
|
124
129
|
else {
|
|
125
130
|
return [tupledArg[0], v];
|
|
126
131
|
}
|
|
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
|
-
}))));
|
|
132
|
+
}, toList(delay(() => append(ConverterOptions__get_SetID(options) ? singleton(["@id", new Json(0, [MaterialAttributeValue_genID(oa)])]) : singleton(tryInclude("@id", (value_1) => (new Json(0, [value_1])), oa.ID)), delay(() => append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", list_1(ofArray([new Json(0, ["MaterialAttributeValue"]), new Json(0, ["ArcMaterialAttributeValue"])]))]) : empty(), delay(() => append(singleton(tryInclude("category", (oa_1) => MaterialAttribute_encoder(options, oa_1), oa.Category)), delay(() => append(singleton(tryInclude("value", (value_5) => Value_encoder(options, value_5), oa.Value)), delay(() => append(singleton(tryInclude("unit", (oa_2) => OntologyAnnotation_encoder(options, oa_2), oa.Unit)), delay(() => (ConverterOptions__get_IncludeContext(options) ? singleton(["@context", context_jsonvalue_1]) : empty()))))))))))))))]);
|
|
138
133
|
}
|
|
139
134
|
|
|
140
135
|
export function MaterialAttributeValue_decoder(options) {
|
|
141
|
-
return (
|
|
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",
|
|
144
|
-
}
|
|
136
|
+
return object((get$) => {
|
|
137
|
+
let objectArg, arg_3, objectArg_1, arg_5, objectArg_2, arg_7, objectArg_3;
|
|
138
|
+
return new MaterialAttributeValue((objectArg = get$.Optional, objectArg.Field("@id", uri)), (arg_3 = MaterialAttribute_decoder(options), (objectArg_1 = get$.Optional, objectArg_1.Field("category", arg_3))), (arg_5 = Value_decoder(options), (objectArg_2 = get$.Optional, objectArg_2.Field("value", arg_5))), (arg_7 = OntologyAnnotation_decoder(options), (objectArg_3 = get$.Optional, objectArg_3.Field("unit", arg_7))));
|
|
139
|
+
});
|
|
145
140
|
}
|
|
146
141
|
|
|
147
142
|
export function MaterialAttributeValue_fromJsonString(s) {
|
|
148
|
-
|
|
143
|
+
const matchValue = fromString(MaterialAttributeValue_decoder(ConverterOptions_$ctor()), s);
|
|
144
|
+
if (matchValue.tag === 1) {
|
|
145
|
+
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
return matchValue.fields[0];
|
|
149
|
+
}
|
|
149
150
|
}
|
|
150
151
|
|
|
151
152
|
export function MaterialAttributeValue_toJsonString(m) {
|
|
@@ -155,11 +156,16 @@ export function MaterialAttributeValue_toJsonString(m) {
|
|
|
155
156
|
/**
|
|
156
157
|
* exports in json-ld format
|
|
157
158
|
*/
|
|
158
|
-
export function
|
|
159
|
+
export function MaterialAttributeValue_toJsonldString(m) {
|
|
159
160
|
let returnVal;
|
|
160
161
|
return toString(2, MaterialAttributeValue_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), m));
|
|
161
162
|
}
|
|
162
163
|
|
|
164
|
+
export function MaterialAttributeValue_toJsonldStringWithContext(a) {
|
|
165
|
+
let returnVal;
|
|
166
|
+
return toString(2, MaterialAttributeValue_encoder((returnVal = ConverterOptions_$ctor(), (((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), ConverterOptions__set_IncludeContext_Z1FBCCD16(returnVal, true)), returnVal)), a));
|
|
167
|
+
}
|
|
168
|
+
|
|
163
169
|
export function Material_genID(m) {
|
|
164
170
|
const matchValue = m.ID;
|
|
165
171
|
if (matchValue == null) {
|
|
@@ -177,46 +183,34 @@ export function Material_genID(m) {
|
|
|
177
183
|
}
|
|
178
184
|
|
|
179
185
|
export function Material_encoder(options, oa) {
|
|
180
|
-
return
|
|
186
|
+
return new Json(5, [choose((tupledArg) => {
|
|
181
187
|
const v = tupledArg[1];
|
|
182
|
-
if (equals(v,
|
|
188
|
+
if (equals(v, new Json(3, []))) {
|
|
183
189
|
return void 0;
|
|
184
190
|
}
|
|
185
191
|
else {
|
|
186
192
|
return [tupledArg[0], v];
|
|
187
193
|
}
|
|
188
|
-
}, toList(delay(() =>
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
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
|
-
}
|
|
194
|
+
}, toList(delay(() => append(ConverterOptions__get_SetID(options) ? singleton(["@id", new Json(0, [Material_genID(oa)])]) : singleton(tryInclude("@id", (value_1) => (new Json(0, [value_1])), oa.ID)), delay(() => append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", list_1(ofArray([new Json(0, ["Material"]), new Json(0, ["ArcMaterial"])]))]) : empty(), delay(() => append(singleton(tryInclude("name", (value_5) => (new Json(0, [value_5])), oa.Name)), delay(() => append(singleton(tryInclude("type", (value_7) => MaterialType_encoder(options, value_7), oa.MaterialType)), delay(() => append(singleton(tryIncludeList("characteristics", (oa_1) => MaterialAttributeValue_encoder(options, oa_1), oa.Characteristics)), delay(() => append(singleton(tryIncludeList("derivesFrom", (oa_2) => Material_encoder(options, oa_2), oa.DerivesFrom)), delay(() => (ConverterOptions__get_IncludeContext(options) ? singleton(["@context", context_jsonvalue_2]) : empty()))))))))))))))))]);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export const Material_allowedFields = ofArray(["@id", "@type", "name", "type", "characteristics", "derivesFrom", "@context"]);
|
|
198
|
+
|
|
199
|
+
export function Material_decoder(options) {
|
|
200
|
+
return object_1(Material_allowedFields, (get$) => {
|
|
201
|
+
let objectArg, objectArg_1, arg_5, objectArg_2, arg_7, objectArg_3, arg_9, objectArg_4;
|
|
202
|
+
return new Material((objectArg = get$.Optional, objectArg.Field("@id", uri)), (objectArg_1 = get$.Optional, objectArg_1.Field("name", string)), (arg_5 = MaterialType_decoder(options), (objectArg_2 = get$.Optional, objectArg_2.Field("type", arg_5))), (arg_7 = list_2(MaterialAttributeValue_decoder(options)), (objectArg_3 = get$.Optional, objectArg_3.Field("characteristics", arg_7))), (arg_9 = list_2(Material_decoder(options)), (objectArg_4 = get$.Optional, objectArg_4.Field("derivesFrom", arg_9))));
|
|
203
|
+
});
|
|
215
204
|
}
|
|
216
205
|
|
|
217
206
|
export function Material_fromJsonString(s) {
|
|
218
|
-
|
|
219
|
-
|
|
207
|
+
const matchValue = fromString(Material_decoder(ConverterOptions_$ctor()), s);
|
|
208
|
+
if (matchValue.tag === 1) {
|
|
209
|
+
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
210
|
+
}
|
|
211
|
+
else {
|
|
212
|
+
return matchValue.fields[0];
|
|
213
|
+
}
|
|
220
214
|
}
|
|
221
215
|
|
|
222
216
|
export function Material_toJsonString(m) {
|
|
@@ -226,8 +220,13 @@ export function Material_toJsonString(m) {
|
|
|
226
220
|
/**
|
|
227
221
|
* exports in json-ld format
|
|
228
222
|
*/
|
|
229
|
-
export function
|
|
223
|
+
export function Material_toJsonldString(m) {
|
|
230
224
|
let returnVal;
|
|
231
225
|
return toString(2, Material_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), m));
|
|
232
226
|
}
|
|
233
227
|
|
|
228
|
+
export function Material_toJsonldStringWithContext(a) {
|
|
229
|
+
let returnVal;
|
|
230
|
+
return toString(2, Material_encoder((returnVal = ConverterOptions_$ctor(), (((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), ConverterOptions__set_IncludeContext_Z1FBCCD16(returnVal, true)), returnVal)), a));
|
|
231
|
+
}
|
|
232
|
+
|
package/ISA/ISA.Json/Ontology.js
CHANGED
|
@@ -1,43 +1,46 @@
|
|
|
1
|
-
import { array, object
|
|
2
|
-
import { FSharpResult$2 } from "../../fable_modules/fable-library.4.
|
|
3
|
-
import {
|
|
4
|
-
import { replace } from "../../fable_modules/fable-library.4.
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { empty, singleton, append, delay, toList } from "../../fable_modules/fable-library.4.
|
|
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";
|
|
1
|
+
import { array, object, string, float, int } from "../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
2
|
+
import { FSharpResult$2 } from "../../fable_modules/fable-library-js.4.13.0/Result.js";
|
|
3
|
+
import { equals, int32ToString } from "../../fable_modules/fable-library-js.4.13.0/Util.js";
|
|
4
|
+
import { printf, toText, replace } from "../../fable_modules/fable-library-js.4.13.0/String.js";
|
|
5
|
+
import { choose } from "../../fable_modules/fable-library-js.4.13.0/List.js";
|
|
6
|
+
import { Json } from "../../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
|
|
7
|
+
import { empty, singleton, append, delay, toList } from "../../fable_modules/fable-library-js.4.13.0/Seq.js";
|
|
8
|
+
import { ConverterOptions__set_IncludeContext_Z1FBCCD16, ConverterOptions__set_IncludeType_Z1FBCCD16, ConverterOptions__set_SetID_Z1FBCCD16, ConverterOptions_$ctor, ConverterOptions__get_IncludeContext, ConverterOptions__get_IncludeType, ConverterOptions__get_SetID } from "./ConverterOptions.js";
|
|
9
|
+
import { tryIncludeArray, tryInclude } from "./GEncode.js";
|
|
10
10
|
import { decoder as decoder_1, encoder } from "./Comment.js";
|
|
11
|
-
import {
|
|
11
|
+
import { context_jsonvalue } from "./context/rocrate/isa_ontology_source_reference_context.js";
|
|
12
|
+
import { uri } from "./Decode.js";
|
|
12
13
|
import { OntologySourceReference } from "../ISA/JsonTypes/OntologySourceReference.js";
|
|
14
|
+
import { fromString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
|
|
15
|
+
import { toString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
|
|
13
16
|
import { URIModule_toString } from "../ISA/JsonTypes/URI.js";
|
|
17
|
+
import { context_jsonvalue as context_jsonvalue_1 } from "./context/rocrate/isa_ontology_annotation_context.js";
|
|
14
18
|
import { OntologyAnnotation } from "../ISA/JsonTypes/OntologyAnnotation.js";
|
|
15
|
-
import { unwrap } from "../../fable_modules/fable-library.4.
|
|
19
|
+
import { unwrap } from "../../fable_modules/fable-library-js.4.13.0/Option.js";
|
|
16
20
|
import { StringTable_decodeString, StringTable_encodeString } from "./StringTable.js";
|
|
17
21
|
|
|
18
22
|
/**
|
|
19
23
|
* This decodes from integer, float or string to string only!
|
|
20
24
|
*/
|
|
21
|
-
export function AnnotationValue_decoder(options
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
export function AnnotationValue_decoder(options) {
|
|
26
|
+
return {
|
|
27
|
+
Decode(s, json) {
|
|
28
|
+
const matchValue = int.Decode(s, json);
|
|
29
|
+
if (matchValue.tag === 1) {
|
|
30
|
+
const matchValue_1 = float.Decode(s, json);
|
|
31
|
+
if (matchValue_1.tag === 1) {
|
|
32
|
+
const matchValue_2 = string.Decode(s, json);
|
|
33
|
+
return (matchValue_2.tag === 1) ? (new FSharpResult$2(1, [matchValue_2.fields[0]])) : (new FSharpResult$2(0, [matchValue_2.fields[0]]));
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
return new FSharpResult$2(0, [matchValue_1.fields[0].toString()]);
|
|
37
|
+
}
|
|
29
38
|
}
|
|
30
39
|
else {
|
|
31
|
-
return new FSharpResult$2(0, [
|
|
40
|
+
return new FSharpResult$2(0, [int32ToString(matchValue.fields[0])]);
|
|
32
41
|
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
return new FSharpResult$2(0, [matchValue_1.fields[0].toString()]);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
return new FSharpResult$2(0, [int32ToString(matchValue.fields[0])]);
|
|
40
|
-
}
|
|
42
|
+
},
|
|
43
|
+
};
|
|
41
44
|
}
|
|
42
45
|
|
|
43
46
|
export function OntologySourceReference_genID(o) {
|
|
@@ -57,48 +60,32 @@ export function OntologySourceReference_genID(o) {
|
|
|
57
60
|
}
|
|
58
61
|
|
|
59
62
|
export function OntologySourceReference_encoder(options, osr) {
|
|
60
|
-
return
|
|
63
|
+
return new Json(5, [choose((tupledArg) => {
|
|
61
64
|
const v = tupledArg[1];
|
|
62
|
-
if (equals(v,
|
|
65
|
+
if (equals(v, new Json(3, []))) {
|
|
63
66
|
return void 0;
|
|
64
67
|
}
|
|
65
68
|
else {
|
|
66
69
|
return [tupledArg[0], v];
|
|
67
70
|
}
|
|
68
|
-
}, toList(delay(() =>
|
|
69
|
-
let value, s;
|
|
70
|
-
return append(ConverterOptions__get_SetID(options) ? singleton(["@id", (value = OntologySourceReference_genID(osr), (typeof value === "string") ? ((s = value, s)) : nil)]) : empty(), delay(() => {
|
|
71
|
-
let value_2, s_1;
|
|
72
|
-
return append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", (value_2 = "OntologySourceReference", (typeof value_2 === "string") ? ((s_1 = value_2, s_1)) : nil)]) : empty(), delay(() => append(singleton(tryInclude("description", (value_4) => {
|
|
73
|
-
let s_2;
|
|
74
|
-
const value_5 = value_4;
|
|
75
|
-
return (typeof value_5 === "string") ? ((s_2 = value_5, s_2)) : nil;
|
|
76
|
-
}, osr["Description"])), delay(() => append(singleton(tryInclude("file", (value_7) => {
|
|
77
|
-
let s_3;
|
|
78
|
-
const value_8 = value_7;
|
|
79
|
-
return (typeof value_8 === "string") ? ((s_3 = value_8, s_3)) : nil;
|
|
80
|
-
}, osr["File"])), delay(() => append(singleton(tryInclude("name", (value_10) => {
|
|
81
|
-
let s_4;
|
|
82
|
-
const value_11 = value_10;
|
|
83
|
-
return (typeof value_11 === "string") ? ((s_4 = value_11, s_4)) : nil;
|
|
84
|
-
}, osr["Name"])), delay(() => append(singleton(tryInclude("version", (value_13) => {
|
|
85
|
-
let s_5;
|
|
86
|
-
const value_14 = value_13;
|
|
87
|
-
return (typeof value_14 === "string") ? ((s_5 = value_14, s_5)) : nil;
|
|
88
|
-
}, osr["Version"])), delay(() => singleton(tryInclude("comments", (comment) => encoder(options, comment), osr["Comments"]))))))))))));
|
|
89
|
-
}));
|
|
90
|
-
}))));
|
|
71
|
+
}, toList(delay(() => append(ConverterOptions__get_SetID(options) ? singleton(["@id", new Json(0, [OntologySourceReference_genID(osr)])]) : empty(), delay(() => append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", new Json(0, ["OntologySourceReference"])]) : empty(), delay(() => append(singleton(tryInclude("description", (value_2) => (new Json(0, [value_2])), osr.Description)), delay(() => append(singleton(tryInclude("file", (value_4) => (new Json(0, [value_4])), osr.File)), delay(() => append(singleton(tryInclude("name", (value_6) => (new Json(0, [value_6])), osr.Name)), delay(() => append(singleton(tryInclude("version", (value_8) => (new Json(0, [value_8])), osr.Version)), delay(() => append(singleton(tryIncludeArray("comments", (comment) => encoder(options, comment), osr.Comments)), delay(() => (ConverterOptions__get_IncludeContext(options) ? singleton(["@context", context_jsonvalue]) : empty()))))))))))))))))))]);
|
|
91
72
|
}
|
|
92
73
|
|
|
93
74
|
export function OntologySourceReference_decoder(options) {
|
|
94
|
-
return (
|
|
95
|
-
let objectArg, objectArg_1, objectArg_2, objectArg_3, arg_9,
|
|
96
|
-
return new OntologySourceReference((objectArg = get$.Optional, objectArg.Field("description", uri)), (objectArg_1 = get$.Optional, objectArg_1.Field("file", string)), (objectArg_2 = get$.Optional, objectArg_2.Field("name", string)), (objectArg_3 = get$.Optional, objectArg_3.Field("version", string)), (arg_9 = (
|
|
97
|
-
}
|
|
75
|
+
return object((get$) => {
|
|
76
|
+
let objectArg, objectArg_1, objectArg_2, objectArg_3, arg_9, objectArg_4;
|
|
77
|
+
return new OntologySourceReference((objectArg = get$.Optional, objectArg.Field("description", uri)), (objectArg_1 = get$.Optional, objectArg_1.Field("file", string)), (objectArg_2 = get$.Optional, objectArg_2.Field("name", string)), (objectArg_3 = get$.Optional, objectArg_3.Field("version", string)), (arg_9 = array(decoder_1(options)), (objectArg_4 = get$.Optional, objectArg_4.Field("comments", arg_9))));
|
|
78
|
+
});
|
|
98
79
|
}
|
|
99
80
|
|
|
100
81
|
export function OntologySourceReference_fromJsonString(s) {
|
|
101
|
-
|
|
82
|
+
const matchValue = fromString(OntologySourceReference_decoder(ConverterOptions_$ctor()), s);
|
|
83
|
+
if (matchValue.tag === 1) {
|
|
84
|
+
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
return matchValue.fields[0];
|
|
88
|
+
}
|
|
102
89
|
}
|
|
103
90
|
|
|
104
91
|
export function OntologySourceReference_toJsonString(oa) {
|
|
@@ -108,11 +95,16 @@ export function OntologySourceReference_toJsonString(oa) {
|
|
|
108
95
|
/**
|
|
109
96
|
* exports in json-ld format
|
|
110
97
|
*/
|
|
111
|
-
export function
|
|
98
|
+
export function OntologySourceReference_toJsonldString(oa) {
|
|
112
99
|
let returnVal;
|
|
113
100
|
return toString(2, OntologySourceReference_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), oa));
|
|
114
101
|
}
|
|
115
102
|
|
|
103
|
+
export function OntologySourceReference_toJsonldStringWithContext(a) {
|
|
104
|
+
let returnVal;
|
|
105
|
+
return toString(2, OntologySourceReference_encoder((returnVal = ConverterOptions_$ctor(), (((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), ConverterOptions__set_IncludeContext_Z1FBCCD16(returnVal, true)), returnVal)), a));
|
|
106
|
+
}
|
|
107
|
+
|
|
116
108
|
export function OntologyAnnotation_genID(o) {
|
|
117
109
|
const matchValue = o.ID;
|
|
118
110
|
if (matchValue == null) {
|
|
@@ -120,14 +112,20 @@ export function OntologyAnnotation_genID(o) {
|
|
|
120
112
|
if (matchValue_1 == null) {
|
|
121
113
|
const matchValue_2 = o.TermSourceREF;
|
|
122
114
|
if (matchValue_2 == null) {
|
|
123
|
-
|
|
115
|
+
const matchValue_3 = o.Name;
|
|
116
|
+
if (matchValue_3 == null) {
|
|
117
|
+
return "#DummyOntologyAnnotation";
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
return "#UserTerm_" + replace(matchValue_3, " ", "_");
|
|
121
|
+
}
|
|
124
122
|
}
|
|
125
123
|
else {
|
|
126
124
|
return "#" + replace(matchValue_2, " ", "_");
|
|
127
125
|
}
|
|
128
126
|
}
|
|
129
127
|
else {
|
|
130
|
-
return matchValue_1;
|
|
128
|
+
return URIModule_toString(matchValue_1);
|
|
131
129
|
}
|
|
132
130
|
}
|
|
133
131
|
else {
|
|
@@ -136,77 +134,51 @@ export function OntologyAnnotation_genID(o) {
|
|
|
136
134
|
}
|
|
137
135
|
|
|
138
136
|
export function OntologyAnnotation_encoder(options, oa) {
|
|
139
|
-
return
|
|
137
|
+
return new Json(5, [choose((tupledArg) => {
|
|
140
138
|
const v = tupledArg[1];
|
|
141
|
-
if (equals(v,
|
|
139
|
+
if (equals(v, new Json(3, []))) {
|
|
142
140
|
return void 0;
|
|
143
141
|
}
|
|
144
142
|
else {
|
|
145
143
|
return [tupledArg[0], v];
|
|
146
144
|
}
|
|
147
|
-
}, toList(delay(() =>
|
|
148
|
-
let value, s;
|
|
149
|
-
return append(ConverterOptions__get_SetID(options) ? singleton(["@id", (value = OntologyAnnotation_genID(oa), (typeof value === "string") ? ((s = value, s)) : nil)]) : singleton(tryInclude("@id", (value_2) => {
|
|
150
|
-
let s_1;
|
|
151
|
-
const value_3 = value_2;
|
|
152
|
-
return (typeof value_3 === "string") ? ((s_1 = value_3, s_1)) : nil;
|
|
153
|
-
}, oa["ID"])), delay(() => {
|
|
154
|
-
let value_5, s_2;
|
|
155
|
-
return append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", (value_5 = "OntologyAnnotation", (typeof value_5 === "string") ? ((s_2 = value_5, s_2)) : nil)]) : empty(), delay(() => append(singleton(tryInclude("annotationValue", (value_7) => {
|
|
156
|
-
let s_3;
|
|
157
|
-
const value_8 = value_7;
|
|
158
|
-
return (typeof value_8 === "string") ? ((s_3 = value_8, s_3)) : nil;
|
|
159
|
-
}, oa["Name"])), delay(() => append(singleton(tryInclude("termSource", (value_10) => {
|
|
160
|
-
let s_4;
|
|
161
|
-
const value_11 = value_10;
|
|
162
|
-
return (typeof value_11 === "string") ? ((s_4 = value_11, s_4)) : nil;
|
|
163
|
-
}, oa["TermSourceREF"])), delay(() => append(singleton(tryInclude("termAccession", (value_13) => {
|
|
164
|
-
let s_5;
|
|
165
|
-
const value_14 = value_13;
|
|
166
|
-
return (typeof value_14 === "string") ? ((s_5 = value_14, s_5)) : nil;
|
|
167
|
-
}, oa["TermAccessionNumber"])), delay(() => singleton(tryInclude("comments", (comment) => encoder(options, comment), oa["Comments"]))))))))));
|
|
168
|
-
}));
|
|
169
|
-
}))));
|
|
145
|
+
}, toList(delay(() => append(ConverterOptions__get_SetID(options) ? singleton(["@id", new Json(0, [OntologyAnnotation_genID(oa)])]) : singleton(tryInclude("@id", (value_1) => (new Json(0, [value_1])), oa.ID)), delay(() => append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", new Json(0, ["OntologyAnnotation"])]) : empty(), delay(() => append(singleton(tryInclude("annotationValue", (value_4) => (new Json(0, [value_4])), oa.Name)), delay(() => append(singleton(tryInclude("termSource", (value_6) => (new Json(0, [value_6])), oa.TermSourceREF)), delay(() => append(singleton(tryInclude("termAccession", (value_8) => (new Json(0, [value_8])), oa.TermAccessionNumber)), delay(() => append(singleton(tryIncludeArray("comments", (comment) => encoder(options, comment), oa.Comments)), delay(() => (ConverterOptions__get_IncludeContext(options) ? singleton(["@context", context_jsonvalue_1]) : empty()))))))))))))))))]);
|
|
170
146
|
}
|
|
171
147
|
|
|
172
148
|
export function OntologyAnnotation_decoder(options) {
|
|
173
|
-
return (
|
|
174
|
-
let objectArg, objectArg_1, objectArg_2, objectArg_3, arg_9,
|
|
175
|
-
return OntologyAnnotation.create(unwrap((objectArg = get$.Optional, objectArg.Field("@id", uri))), unwrap((objectArg_1 = get$.Optional, objectArg_1.Field("annotationValue",
|
|
176
|
-
}
|
|
149
|
+
return object((get$) => {
|
|
150
|
+
let objectArg, arg_3, objectArg_1, objectArg_2, objectArg_3, arg_9, objectArg_4;
|
|
151
|
+
return OntologyAnnotation.create(unwrap((objectArg = get$.Optional, objectArg.Field("@id", uri))), unwrap((arg_3 = AnnotationValue_decoder(options), (objectArg_1 = get$.Optional, objectArg_1.Field("annotationValue", arg_3)))), unwrap((objectArg_2 = get$.Optional, objectArg_2.Field("termSource", string))), unwrap((objectArg_3 = get$.Optional, objectArg_3.Field("termAccession", string))), unwrap((arg_9 = array(decoder_1(options)), (objectArg_4 = get$.Optional, objectArg_4.Field("comments", arg_9)))));
|
|
152
|
+
});
|
|
177
153
|
}
|
|
178
154
|
|
|
179
155
|
export function OntologyAnnotation_compressedEncoder(stringTable, options, oa) {
|
|
180
|
-
return
|
|
156
|
+
return new Json(5, [choose((tupledArg) => {
|
|
181
157
|
const v = tupledArg[1];
|
|
182
|
-
if (equals(v,
|
|
158
|
+
if (equals(v, new Json(3, []))) {
|
|
183
159
|
return void 0;
|
|
184
160
|
}
|
|
185
161
|
else {
|
|
186
162
|
return [tupledArg[0], v];
|
|
187
163
|
}
|
|
188
|
-
}, toList(delay(() =>
|
|
189
|
-
let value, s;
|
|
190
|
-
return append(ConverterOptions__get_SetID(options) ? singleton(["@id", (value = OntologyAnnotation_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 = "OntologyAnnotation", (typeof value_5 === "string") ? ((s_2 = value_5, s_2)) : nil)]) : empty(), delay(() => append(singleton(tryInclude("a", (s_3) => StringTable_encodeString(stringTable, s_3), oa["Name"])), delay(() => append(singleton(tryInclude("ts", (s_4) => StringTable_encodeString(stringTable, s_4), oa["TermSourceREF"])), delay(() => append(singleton(tryInclude("ta", (s_5) => StringTable_encodeString(stringTable, s_5), oa["TermAccessionNumber"])), delay(() => singleton(tryInclude("comments", (comment) => encoder(options, comment), oa["Comments"]))))))))));
|
|
197
|
-
}));
|
|
198
|
-
}))));
|
|
164
|
+
}, toList(delay(() => append(ConverterOptions__get_SetID(options) ? singleton(["@id", new Json(0, [OntologyAnnotation_genID(oa)])]) : singleton(tryInclude("@id", (value_1) => (new Json(0, [value_1])), oa.ID)), delay(() => append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", new Json(0, ["OntologyAnnotation"])]) : empty(), delay(() => append(singleton(tryInclude("a", (s) => StringTable_encodeString(stringTable, s), oa.Name)), delay(() => append(singleton(tryInclude("ts", (s_1) => StringTable_encodeString(stringTable, s_1), oa.TermSourceREF)), delay(() => append(singleton(tryInclude("ta", (s_2) => StringTable_encodeString(stringTable, s_2), oa.TermAccessionNumber)), delay(() => singleton(tryIncludeArray("comments", (comment) => encoder(options, comment), oa.Comments)))))))))))))))]);
|
|
199
165
|
}
|
|
200
166
|
|
|
201
167
|
export function OntologyAnnotation_compressedDecoder(stringTable, options) {
|
|
202
|
-
return (
|
|
203
|
-
let objectArg, objectArg_1, objectArg_2, objectArg_3, arg_9,
|
|
204
|
-
return OntologyAnnotation.create(unwrap((objectArg = get$.Optional, objectArg.Field("@id", uri))), unwrap((objectArg_1 = get$.Optional, objectArg_1.Field("a",
|
|
205
|
-
}
|
|
168
|
+
return object((get$) => {
|
|
169
|
+
let objectArg, arg_3, objectArg_1, arg_5, objectArg_2, arg_7, objectArg_3, arg_9, objectArg_4;
|
|
170
|
+
return OntologyAnnotation.create(unwrap((objectArg = get$.Optional, objectArg.Field("@id", uri))), unwrap((arg_3 = StringTable_decodeString(stringTable), (objectArg_1 = get$.Optional, objectArg_1.Field("a", arg_3)))), unwrap((arg_5 = StringTable_decodeString(stringTable), (objectArg_2 = get$.Optional, objectArg_2.Field("ts", arg_5)))), unwrap((arg_7 = StringTable_decodeString(stringTable), (objectArg_3 = get$.Optional, objectArg_3.Field("ta", arg_7)))), unwrap((arg_9 = array(decoder_1(options)), (objectArg_4 = get$.Optional, objectArg_4.Field("comments", arg_9)))));
|
|
171
|
+
});
|
|
206
172
|
}
|
|
207
173
|
|
|
208
174
|
export function OntologyAnnotation_fromJsonString(s) {
|
|
209
|
-
|
|
175
|
+
const matchValue = fromString(OntologyAnnotation_decoder(ConverterOptions_$ctor()), s);
|
|
176
|
+
if (matchValue.tag === 1) {
|
|
177
|
+
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
178
|
+
}
|
|
179
|
+
else {
|
|
180
|
+
return matchValue.fields[0];
|
|
181
|
+
}
|
|
210
182
|
}
|
|
211
183
|
|
|
212
184
|
export function OntologyAnnotation_toJsonString(oa) {
|
|
@@ -216,8 +188,13 @@ export function OntologyAnnotation_toJsonString(oa) {
|
|
|
216
188
|
/**
|
|
217
189
|
* exports in json-ld format
|
|
218
190
|
*/
|
|
219
|
-
export function
|
|
191
|
+
export function OntologyAnnotation_toJsonldString(oa) {
|
|
220
192
|
let returnVal;
|
|
221
193
|
return toString(2, OntologyAnnotation_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), oa));
|
|
222
194
|
}
|
|
223
195
|
|
|
196
|
+
export function OntologyAnnotation_toJsonldStringWithContext(a) {
|
|
197
|
+
let returnVal;
|
|
198
|
+
return toString(2, OntologyAnnotation_encoder((returnVal = ConverterOptions_$ctor(), (((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), ConverterOptions__set_IncludeContext_Z1FBCCD16(returnVal, true)), returnVal)), a));
|
|
199
|
+
}
|
|
200
|
+
|