@nfdi4plants/arctrl 1.0.7 → 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 +47 -11
- package/Contract/Contract.js +3 -3
- package/Contracts/Contracts.ArcTypes.js +30 -18
- 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 +23 -31
- package/ISA/ISA/ArcTypes/ArcTableAux.js +27 -16
- package/ISA/ISA/ArcTypes/ArcTables.js +11 -11
- package/ISA/ISA/ArcTypes/ArcTypes.js +118 -83
- 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 +157 -65
- package/ISA/ISA.Json/ArcTypes/ArcInvestigation.js +78 -49
- package/ISA/ISA.Json/ArcTypes/ArcStudy.js +136 -24
- package/ISA/ISA.Json/ArcTypes/ArcTable.js +183 -21
- package/ISA/ISA.Json/ArcTypes/CellTable.js +40 -0
- package/ISA/ISA.Json/ArcTypes/CompositeCell.js +34 -23
- 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 +42 -0
- 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 +99 -92
- 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 +44 -0
- 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 +56 -43
- package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeCell.js +3 -3
- package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeColumn.js +11 -11
- package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeHeader.js +5 -5
- package/ISA/ISA.Spreadsheet/ArcAssay.js +100 -88
- package/ISA/ISA.Spreadsheet/ArcInvestigation.js +12 -12
- package/ISA/ISA.Spreadsheet/ArcStudy.js +36 -24
- 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 +28 -23
- 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 +12 -12
- 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.2 → FsSpreadsheet.5.1.3}/Cells/FsCell.fs.js +14 -14
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Cells/FsCellsCollection.fs.js +6 -6
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/CellBuilder.fs.js +4 -4
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/ColumnBuilder.fs.js +3 -3
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/DSL.fs.js +2 -2
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/Expression.fs.js +1 -1
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/RowBuilder.fs.js +3 -3
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/SheetBuilder.fs.js +3 -3
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/TableBuilder.fs.js +3 -3
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/Transform.fs.js +6 -6
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/Types.fs.js +4 -4
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/WorkbookBuilder.fs.js +3 -3
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsAddress.fs +22 -8
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsAddress.fs.js +24 -14
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsColumn.fs.js +3 -3
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsRow.fs.js +3 -3
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsWorkbook.fs.js +6 -6
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsWorksheet.fs +12 -6
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsWorksheet.fs.js +21 -17
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Ranges/FsRange.fs.js +3 -3
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Ranges/FsRangeAddress.fs.js +4 -3
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Ranges/FsRangeBase.fs.js +3 -3
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Ranges/FsRangeColumn.fs.js +3 -3
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Ranges/FsRangeRow.fs.js +1 -1
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/SheetBuilder.fs.js +8 -8
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Tables/FsTable.fs.js +7 -7
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Tables/FsTableField.fs.js +4 -4
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Tables/FsTableRow.fs.js +1 -1
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/obj/Release/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +3 -3
- 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/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Cells/FsCell.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Cells/FsCellsCollection.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/CellBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/ColumnBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/DSL.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/Expression.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/Operators.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/Operators.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/RowBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/SheetBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/TableBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/Transform.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/Types.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/WorkbookBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsColumn.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsRow.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsSpreadsheet.fableproj +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsWorkbook.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Ranges/FsRange.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Ranges/FsRangeAddress.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Ranges/FsRangeBase.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Ranges/FsRangeColumn.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Ranges/FsRangeRow.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/SheetBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Tables/FsTable.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Tables/FsTableField.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Tables/FsTableRow.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/obj/Debug/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
- /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,42 +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";
|
|
20
|
+
import { StringTable_decodeString, StringTable_encodeString } from "./StringTable.js";
|
|
16
21
|
|
|
17
22
|
/**
|
|
18
23
|
* This decodes from integer, float or string to string only!
|
|
19
24
|
*/
|
|
20
|
-
export function AnnotationValue_decoder(options
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
+
}
|
|
28
38
|
}
|
|
29
39
|
else {
|
|
30
|
-
return new FSharpResult$2(0, [
|
|
40
|
+
return new FSharpResult$2(0, [int32ToString(matchValue.fields[0])]);
|
|
31
41
|
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
return new FSharpResult$2(0, [matchValue_1.fields[0].toString()]);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
return new FSharpResult$2(0, [int32ToString(matchValue.fields[0])]);
|
|
39
|
-
}
|
|
42
|
+
},
|
|
43
|
+
};
|
|
40
44
|
}
|
|
41
45
|
|
|
42
46
|
export function OntologySourceReference_genID(o) {
|
|
@@ -56,48 +60,32 @@ export function OntologySourceReference_genID(o) {
|
|
|
56
60
|
}
|
|
57
61
|
|
|
58
62
|
export function OntologySourceReference_encoder(options, osr) {
|
|
59
|
-
return
|
|
63
|
+
return new Json(5, [choose((tupledArg) => {
|
|
60
64
|
const v = tupledArg[1];
|
|
61
|
-
if (equals(v,
|
|
65
|
+
if (equals(v, new Json(3, []))) {
|
|
62
66
|
return void 0;
|
|
63
67
|
}
|
|
64
68
|
else {
|
|
65
69
|
return [tupledArg[0], v];
|
|
66
70
|
}
|
|
67
|
-
}, toList(delay(() =>
|
|
68
|
-
let value, s;
|
|
69
|
-
return append(ConverterOptions__get_SetID(options) ? singleton(["@id", (value = OntologySourceReference_genID(osr), (typeof value === "string") ? ((s = value, s)) : nil)]) : empty(), delay(() => {
|
|
70
|
-
let value_2, s_1;
|
|
71
|
-
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) => {
|
|
72
|
-
let s_2;
|
|
73
|
-
const value_5 = value_4;
|
|
74
|
-
return (typeof value_5 === "string") ? ((s_2 = value_5, s_2)) : nil;
|
|
75
|
-
}, osr["Description"])), delay(() => append(singleton(tryInclude("file", (value_7) => {
|
|
76
|
-
let s_3;
|
|
77
|
-
const value_8 = value_7;
|
|
78
|
-
return (typeof value_8 === "string") ? ((s_3 = value_8, s_3)) : nil;
|
|
79
|
-
}, osr["File"])), delay(() => append(singleton(tryInclude("name", (value_10) => {
|
|
80
|
-
let s_4;
|
|
81
|
-
const value_11 = value_10;
|
|
82
|
-
return (typeof value_11 === "string") ? ((s_4 = value_11, s_4)) : nil;
|
|
83
|
-
}, osr["Name"])), delay(() => append(singleton(tryInclude("version", (value_13) => {
|
|
84
|
-
let s_5;
|
|
85
|
-
const value_14 = value_13;
|
|
86
|
-
return (typeof value_14 === "string") ? ((s_5 = value_14, s_5)) : nil;
|
|
87
|
-
}, osr["Version"])), delay(() => singleton(tryInclude("comments", (comment) => encoder(options, comment), osr["Comments"]))))))))))));
|
|
88
|
-
}));
|
|
89
|
-
}))));
|
|
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()))))))))))))))))))]);
|
|
90
72
|
}
|
|
91
73
|
|
|
92
74
|
export function OntologySourceReference_decoder(options) {
|
|
93
|
-
return (
|
|
94
|
-
let objectArg, objectArg_1, objectArg_2, objectArg_3, arg_9,
|
|
95
|
-
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 = (
|
|
96
|
-
}
|
|
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
|
+
});
|
|
97
79
|
}
|
|
98
80
|
|
|
99
81
|
export function OntologySourceReference_fromJsonString(s) {
|
|
100
|
-
|
|
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
|
+
}
|
|
101
89
|
}
|
|
102
90
|
|
|
103
91
|
export function OntologySourceReference_toJsonString(oa) {
|
|
@@ -107,11 +95,16 @@ export function OntologySourceReference_toJsonString(oa) {
|
|
|
107
95
|
/**
|
|
108
96
|
* exports in json-ld format
|
|
109
97
|
*/
|
|
110
|
-
export function
|
|
98
|
+
export function OntologySourceReference_toJsonldString(oa) {
|
|
111
99
|
let returnVal;
|
|
112
100
|
return toString(2, OntologySourceReference_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), oa));
|
|
113
101
|
}
|
|
114
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
|
+
|
|
115
108
|
export function OntologyAnnotation_genID(o) {
|
|
116
109
|
const matchValue = o.ID;
|
|
117
110
|
if (matchValue == null) {
|
|
@@ -119,14 +112,20 @@ export function OntologyAnnotation_genID(o) {
|
|
|
119
112
|
if (matchValue_1 == null) {
|
|
120
113
|
const matchValue_2 = o.TermSourceREF;
|
|
121
114
|
if (matchValue_2 == null) {
|
|
122
|
-
|
|
115
|
+
const matchValue_3 = o.Name;
|
|
116
|
+
if (matchValue_3 == null) {
|
|
117
|
+
return "#DummyOntologyAnnotation";
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
return "#UserTerm_" + replace(matchValue_3, " ", "_");
|
|
121
|
+
}
|
|
123
122
|
}
|
|
124
123
|
else {
|
|
125
124
|
return "#" + replace(matchValue_2, " ", "_");
|
|
126
125
|
}
|
|
127
126
|
}
|
|
128
127
|
else {
|
|
129
|
-
return matchValue_1;
|
|
128
|
+
return URIModule_toString(matchValue_1);
|
|
130
129
|
}
|
|
131
130
|
}
|
|
132
131
|
else {
|
|
@@ -135,48 +134,51 @@ export function OntologyAnnotation_genID(o) {
|
|
|
135
134
|
}
|
|
136
135
|
|
|
137
136
|
export function OntologyAnnotation_encoder(options, oa) {
|
|
138
|
-
return
|
|
137
|
+
return new Json(5, [choose((tupledArg) => {
|
|
139
138
|
const v = tupledArg[1];
|
|
140
|
-
if (equals(v,
|
|
139
|
+
if (equals(v, new Json(3, []))) {
|
|
141
140
|
return void 0;
|
|
142
141
|
}
|
|
143
142
|
else {
|
|
144
143
|
return [tupledArg[0], v];
|
|
145
144
|
}
|
|
146
|
-
}, toList(delay(() =>
|
|
147
|
-
let value, s;
|
|
148
|
-
return append(ConverterOptions__get_SetID(options) ? singleton(["@id", (value = OntologyAnnotation_genID(oa), (typeof value === "string") ? ((s = value, s)) : nil)]) : singleton(tryInclude("@id", (value_2) => {
|
|
149
|
-
let s_1;
|
|
150
|
-
const value_3 = value_2;
|
|
151
|
-
return (typeof value_3 === "string") ? ((s_1 = value_3, s_1)) : nil;
|
|
152
|
-
}, oa["ID"])), delay(() => {
|
|
153
|
-
let value_5, s_2;
|
|
154
|
-
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) => {
|
|
155
|
-
let s_3;
|
|
156
|
-
const value_8 = value_7;
|
|
157
|
-
return (typeof value_8 === "string") ? ((s_3 = value_8, s_3)) : nil;
|
|
158
|
-
}, oa["Name"])), delay(() => append(singleton(tryInclude("termSource", (value_10) => {
|
|
159
|
-
let s_4;
|
|
160
|
-
const value_11 = value_10;
|
|
161
|
-
return (typeof value_11 === "string") ? ((s_4 = value_11, s_4)) : nil;
|
|
162
|
-
}, oa["TermSourceREF"])), delay(() => append(singleton(tryInclude("termAccession", (value_13) => {
|
|
163
|
-
let s_5;
|
|
164
|
-
const value_14 = value_13;
|
|
165
|
-
return (typeof value_14 === "string") ? ((s_5 = value_14, s_5)) : nil;
|
|
166
|
-
}, oa["TermAccessionNumber"])), delay(() => singleton(tryInclude("comments", (comment) => encoder(options, comment), oa["Comments"]))))))))));
|
|
167
|
-
}));
|
|
168
|
-
}))));
|
|
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()))))))))))))))))]);
|
|
169
146
|
}
|
|
170
147
|
|
|
171
148
|
export function OntologyAnnotation_decoder(options) {
|
|
172
|
-
return (
|
|
173
|
-
let objectArg, objectArg_1, objectArg_2, objectArg_3, arg_9,
|
|
174
|
-
return OntologyAnnotation.create(unwrap((objectArg = get$.Optional, objectArg.Field("@id", uri))), unwrap((objectArg_1 = get$.Optional, objectArg_1.Field("annotationValue",
|
|
175
|
-
}
|
|
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
|
+
});
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export function OntologyAnnotation_compressedEncoder(stringTable, options, oa) {
|
|
156
|
+
return new Json(5, [choose((tupledArg) => {
|
|
157
|
+
const v = tupledArg[1];
|
|
158
|
+
if (equals(v, new Json(3, []))) {
|
|
159
|
+
return void 0;
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
return [tupledArg[0], v];
|
|
163
|
+
}
|
|
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)))))))))))))))]);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export function OntologyAnnotation_compressedDecoder(stringTable, options) {
|
|
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
|
+
});
|
|
176
172
|
}
|
|
177
173
|
|
|
178
174
|
export function OntologyAnnotation_fromJsonString(s) {
|
|
179
|
-
|
|
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
|
+
}
|
|
180
182
|
}
|
|
181
183
|
|
|
182
184
|
export function OntologyAnnotation_toJsonString(oa) {
|
|
@@ -186,8 +188,13 @@ export function OntologyAnnotation_toJsonString(oa) {
|
|
|
186
188
|
/**
|
|
187
189
|
* exports in json-ld format
|
|
188
190
|
*/
|
|
189
|
-
export function
|
|
191
|
+
export function OntologyAnnotation_toJsonldString(oa) {
|
|
190
192
|
let returnVal;
|
|
191
193
|
return toString(2, OntologyAnnotation_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), oa));
|
|
192
194
|
}
|
|
193
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
|
+
|