@nfdi4plants/arctrl 1.2.0 → 2.0.0-alpha.2
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 +53 -35
- package/{Contracts/Contracts.ARCtrl.js → Contract/ARC.js} +4 -2
- package/Contract/ArcAssay.js +102 -0
- package/Contract/ArcInvestigation.js +78 -0
- package/Contract/ArcStudy.js +102 -0
- package/Contract/Contract.js +3 -3
- package/{Contracts/Contracts.Git.js → Contract/Git.js} +5 -5
- package/{ISA/ISA/ArcTypes → Core}/ArcTypes.js +307 -295
- package/Core/Comment.js +97 -0
- package/{ISA/ISA/JsonTypes → Core}/CommentList.js +12 -18
- package/Core/Conversion.js +1056 -0
- package/Core/Helper/Collections.js +318 -0
- package/Core/Helper/HashCodes.js +39 -0
- package/{ISA/ISA → Core/Helper}/Identifier.js +67 -2
- package/{ISA/ISA → Core/Helper}/Regex.js +3 -3
- package/{SemVer.js → Core/Helper/SemVer.js} +8 -8
- package/{ISA/ISA/ArcTypes → Core}/IdentifierSetters.js +1 -1
- package/Core/OntologyAnnotation.js +186 -0
- package/Core/OntologySourceReference.js +92 -0
- package/Core/Person.js +194 -0
- package/Core/Process/ColumnIndex.js +248 -0
- package/Core/Process/Component.js +188 -0
- package/{ISA/ISA/JsonTypes → Core/Process}/Data.js +8 -8
- package/{ISA/ISA/JsonTypes → Core/Process}/DataFile.js +3 -3
- package/Core/Process/Factor.js +109 -0
- package/{ISA/ISA/JsonTypes → Core/Process}/FactorValue.js +32 -13
- package/{ISA/ISA/JsonTypes → Core/Process}/Material.js +9 -9
- package/{ISA/ISA/JsonTypes → Core/Process}/MaterialAttribute.js +17 -17
- package/{ISA/ISA/JsonTypes → Core/Process}/MaterialAttributeValue.js +35 -16
- package/{ISA/ISA/JsonTypes → Core/Process}/MaterialType.js +3 -3
- package/{ISA/ISA/JsonTypes → Core/Process}/Process.js +46 -79
- package/{ISA/ISA/JsonTypes → Core/Process}/ProcessInput.js +42 -42
- package/{ISA/ISA/JsonTypes → Core/Process}/ProcessOutput.js +36 -36
- package/{ISA/ISA/JsonTypes → Core/Process}/ProcessParameterValue.js +26 -7
- package/{ISA/ISA/JsonTypes → Core/Process}/ProcessSequence.js +21 -25
- package/{ISA/ISA/JsonTypes → Core/Process}/Protocol.js +26 -57
- package/{ISA/ISA/JsonTypes → Core/Process}/ProtocolParameter.js +10 -10
- package/{ISA/ISA/JsonTypes → Core/Process}/Sample.js +12 -12
- package/{ISA/ISA/JsonTypes → Core/Process}/Source.js +9 -9
- package/{ISA/ISA/JsonTypes → Core/Process}/Value.js +13 -13
- package/Core/Publication.js +116 -0
- package/{ISA/ISA/ArcTypes → Core/Table}/ArcTable.js +43 -149
- package/Core/Table/ArcTableAux.js +532 -0
- package/{ISA/ISA/ArcTypes → Core/Table}/ArcTables.js +20 -32
- package/{ISA/ISA/ArcTypes → Core/Table}/CompositeCell.js +19 -76
- package/{ISA/ISA/ArcTypes → Core/Table}/CompositeColumn.js +6 -6
- package/{ISA/ISA/ArcTypes → Core/Table}/CompositeHeader.js +14 -34
- package/{Templates → Core}/Template.js +16 -17
- package/Core/Templates.js +84 -0
- package/FileSystem/Commit.js +2 -2
- package/FileSystem/FileSystem.js +4 -4
- package/FileSystem/FileSystemTree.js +46 -8
- package/FileSystem/Path.js +10 -2
- package/Json/ARC.js +25 -0
- package/Json/Assay.js +202 -0
- package/Json/Comment.js +130 -0
- package/Json/ConverterOptions.js +18 -0
- package/Json/Decode.js +128 -0
- package/Json/Encode.js +45 -0
- package/Json/Investigation.js +220 -0
- package/Json/OntologyAnnotation.js +169 -0
- package/Json/OntologySourceReference.js +122 -0
- package/Json/Person.js +250 -0
- package/Json/Process/AssayMaterials.js +22 -0
- package/Json/Process/Component.js +79 -0
- package/Json/Process/Data.js +102 -0
- package/Json/Process/DataFile.js +81 -0
- package/Json/Process/Factor.js +48 -0
- package/Json/Process/FactorValue.js +53 -0
- package/Json/Process/Material.js +107 -0
- package/Json/Process/MaterialAttribute.js +45 -0
- package/Json/Process/MaterialAttributeValue.js +70 -0
- package/Json/Process/MaterialType.js +60 -0
- package/Json/Process/Process.js +107 -0
- package/Json/Process/ProcessInput.js +59 -0
- package/Json/Process/ProcessOutput.js +71 -0
- package/Json/Process/ProcessParameterValue.js +69 -0
- package/Json/Process/ProcessSequence.js +53 -0
- package/Json/Process/PropertyValue.js +82 -0
- package/Json/Process/Protocol.js +147 -0
- package/Json/Process/ProtocolParameter.js +45 -0
- package/Json/Process/Sample.js +134 -0
- package/Json/Process/Source.js +101 -0
- package/Json/Process/StudyMaterials.js +24 -0
- package/Json/Process/Value.js +42 -0
- package/Json/Publication.js +142 -0
- package/Json/StringTable.js +44 -0
- package/Json/Study.js +306 -0
- package/{ISA/ISA.Json/ArcTypes → Json/Table}/ArcTable.js +53 -49
- package/Json/Table/CellTable.js +40 -0
- package/Json/Table/CompositeCell.js +65 -0
- package/{ISA/ISA.Json/ArcTypes → Json/Table}/CompositeHeader.js +22 -19
- package/Json/Table/Compression.js +38 -0
- package/Json/Table/IOType.js +37 -0
- package/Json/Table/OATable.js +40 -0
- package/Json/Table/Templates.js +107 -0
- package/Json/context/rocrate/isa_assay_context.js +32 -0
- package/Json/context/rocrate/isa_comment_context.js +23 -0
- package/Json/context/rocrate/isa_component_context.js +24 -0
- package/Json/context/rocrate/isa_data_context.js +25 -0
- package/Json/context/rocrate/isa_factor_context.js +25 -0
- package/Json/context/rocrate/isa_factor_value_context.js +23 -0
- package/{ISA/ISA.Json → Json}/context/rocrate/isa_investigation_context.js +5 -5
- package/{ISA/ISA.Json → Json}/context/rocrate/isa_material_attribute_context.js +4 -4
- package/Json/context/rocrate/isa_material_attribute_value_context.js +23 -0
- package/Json/context/rocrate/isa_material_context.js +26 -0
- package/Json/context/rocrate/isa_ontology_annotation_context.js +23 -0
- package/Json/context/rocrate/isa_ontology_source_reference_context.js +26 -0
- package/Json/context/rocrate/isa_organization_context.js +22 -0
- package/Json/context/rocrate/isa_person_context.js +33 -0
- package/Json/context/rocrate/isa_process_context.js +29 -0
- package/Json/context/rocrate/isa_process_parameter_value_context.js +23 -0
- package/Json/context/rocrate/isa_protocol_context.js +28 -0
- package/{ISA/ISA.Json → Json}/context/rocrate/isa_protocol_parameter_context.js +4 -4
- package/Json/context/rocrate/isa_publication_context.js +25 -0
- package/Json/context/rocrate/isa_sample_context.js +24 -0
- package/Json/context/rocrate/isa_source_context.js +25 -0
- package/Json/context/rocrate/isa_study_context.js +40 -0
- package/Json/context/rocrate/property_value_context.js +4 -0
- package/Json/context/rocrate/rocrate_context.js +23 -0
- package/Json.js +193 -0
- package/README.md +33 -12
- package/{ISA/ISA.Spreadsheet → Spreadsheet}/AnnotationTable/ArcTable.js +12 -12
- package/{ISA/ISA.Spreadsheet → Spreadsheet}/AnnotationTable/CompositeCell.js +8 -7
- package/{ISA/ISA.Spreadsheet → Spreadsheet}/AnnotationTable/CompositeColumn.js +10 -10
- package/{ISA/ISA.Spreadsheet → Spreadsheet}/AnnotationTable/CompositeHeader.js +10 -10
- package/{ISA/ISA.Spreadsheet → Spreadsheet}/ArcAssay.js +11 -11
- package/{ISA/ISA.Spreadsheet → Spreadsheet}/ArcInvestigation.js +34 -37
- package/{ISA/ISA.Spreadsheet → Spreadsheet}/ArcStudy.js +12 -12
- package/{ISA/ISA.Spreadsheet → Spreadsheet}/CollectionAux.js +7 -7
- package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/Assays.js +32 -32
- package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/Comment.js +5 -5
- package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/Contacts.js +28 -30
- package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/Conversions.js +22 -16
- package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/DesignDescriptors.js +1 -1
- package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/Factors.js +23 -22
- package/Spreadsheet/Metadata/OntologyAnnotation.js +64 -0
- package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/OntologySourceReference.js +22 -24
- package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/Protocols.js +17 -17
- package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/Publication.js +29 -31
- package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/SparseTable.js +23 -22
- package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/Study.js +38 -40
- package/{Templates/Template.Spreadsheet.js → Spreadsheet/Template.js} +31 -31
- package/Template.Web.js +27 -0
- package/WebRequest/WebRequest.Node.js +2 -2
- package/WebRequest/WebRequest.js +2 -2
- package/Xlsx.js +85 -0
- 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 +3 -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.js +19 -19
- package/fable_modules/Thoth.Json.Core.0.2.1/Encode.fs.js +5 -5
- package/fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js +2 -2
- package/fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js +1 -1
- package/fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js +2 -2
- package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Boolean.js +2 -2
- package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/CHANGELOG.md +18 -0
- package/fable_modules/fable-library-js.4.16.0/ConditionalWeakTable.d.ts +9 -0
- package/fable_modules/fable-library-js.4.16.0/ConditionalWeakTable.js +21 -0
- package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Date.js +337 -40
- package/fable_modules/fable-library-js.4.16.0/MapUtil.d.ts +12 -0
- package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/MapUtil.js +15 -0
- package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Util.d.ts +6 -3
- package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Util.js +2 -13
- package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/package.json +1 -1
- package/fable_modules/project_cracked.json +1 -1
- package/index.js +14 -12
- package/package.json +1 -1
- package/Contracts/Contracts.ArcTypes.js +0 -268
- package/FileSystemTree.js +0 -51
- package/ISA/ISA/ArcTypes/ArcTableAux.js +0 -1155
- package/ISA/ISA/ArcTypes/CompositeRow.js +0 -111
- package/ISA/ISA/Builder/Types.js +0 -243
- package/ISA/ISA/Fable.js +0 -123
- package/ISA/ISA/Helper.js +0 -505
- package/ISA/ISA/JsonTypes/Assay.js +0 -620
- package/ISA/ISA/JsonTypes/AssayMaterials.js +0 -39
- package/ISA/ISA/JsonTypes/ColumnIndex.js +0 -246
- package/ISA/ISA/JsonTypes/Comment.js +0 -58
- package/ISA/ISA/JsonTypes/Component.js +0 -165
- package/ISA/ISA/JsonTypes/Factor.js +0 -128
- package/ISA/ISA/JsonTypes/Investigation.js +0 -204
- package/ISA/ISA/JsonTypes/OntologyAnnotation.js +0 -196
- package/ISA/ISA/JsonTypes/OntologySourceReference.js +0 -85
- package/ISA/ISA/JsonTypes/Person.js +0 -152
- package/ISA/ISA/JsonTypes/Publication.js +0 -105
- package/ISA/ISA/JsonTypes/Study.js +0 -942
- package/ISA/ISA/JsonTypes/StudyMaterials.js +0 -45
- package/ISA/ISA/UIHelper.js +0 -19
- package/ISA/ISA.Json/ArcTypes/ArcAssay.js +0 -303
- package/ISA/ISA.Json/ArcTypes/ArcInvestigation.js +0 -122
- package/ISA/ISA.Json/ArcTypes/ArcStudy.js +0 -203
- package/ISA/ISA.Json/ArcTypes/CellTable.js +0 -40
- package/ISA/ISA.Json/ArcTypes/CompositeCell.js +0 -62
- package/ISA/ISA.Json/ArcTypes/IOType.js +0 -33
- package/ISA/ISA.Json/ArcTypes/OATable.js +0 -42
- package/ISA/ISA.Json/Assay.js +0 -129
- package/ISA/ISA.Json/Comment.js +0 -80
- package/ISA/ISA.Json/ConverterOptions.js +0 -51
- package/ISA/ISA.Json/Data.js +0 -253
- package/ISA/ISA.Json/Decode.js +0 -61
- package/ISA/ISA.Json/Factor.js +0 -194
- package/ISA/ISA.Json/GEncode.js +0 -40
- package/ISA/ISA.Json/Investigation.js +0 -89
- package/ISA/ISA.Json/Material.js +0 -232
- package/ISA/ISA.Json/Ontology.js +0 -200
- package/ISA/ISA.Json/Person.js +0 -186
- package/ISA/ISA.Json/Process.js +0 -305
- package/ISA/ISA.Json/Protocol.js +0 -281
- package/ISA/ISA.Json/Publication.js +0 -86
- package/ISA/ISA.Json/StringTable.js +0 -44
- package/ISA/ISA.Json/Study.js +0 -186
- package/ISA/ISA.Json/context/rocrate/isa_assay_context.js +0 -34
- package/ISA/ISA.Json/context/rocrate/isa_comment_context.js +0 -23
- package/ISA/ISA.Json/context/rocrate/isa_component_context.js +0 -24
- package/ISA/ISA.Json/context/rocrate/isa_data_context.js +0 -25
- package/ISA/ISA.Json/context/rocrate/isa_factor_context.js +0 -25
- package/ISA/ISA.Json/context/rocrate/isa_factor_value_context.js +0 -25
- package/ISA/ISA.Json/context/rocrate/isa_material_attribute_value_context.js +0 -25
- package/ISA/ISA.Json/context/rocrate/isa_material_context.js +0 -26
- package/ISA/ISA.Json/context/rocrate/isa_ontology_annotation_context.js +0 -25
- package/ISA/ISA.Json/context/rocrate/isa_ontology_source_reference_context.js +0 -26
- package/ISA/ISA.Json/context/rocrate/isa_organization_context.js +0 -22
- package/ISA/ISA.Json/context/rocrate/isa_person_context.js +0 -31
- package/ISA/ISA.Json/context/rocrate/isa_process_context.js +0 -31
- package/ISA/ISA.Json/context/rocrate/isa_process_parameter_value_context.js +0 -25
- package/ISA/ISA.Json/context/rocrate/isa_protocol_context.js +0 -30
- package/ISA/ISA.Json/context/rocrate/isa_publication_context.js +0 -27
- package/ISA/ISA.Json/context/rocrate/isa_sample_context.js +0 -26
- package/ISA/ISA.Json/context/rocrate/isa_source_context.js +0 -25
- package/ISA/ISA.Json/context/rocrate/isa_study_context.js +0 -42
- package/ISA/ISA.Json/context/rocrate/rocrate_context.js +0 -25
- package/ISA/ISA.Spreadsheet/Metadata/OntologyAnnotation.js +0 -65
- package/Path.js +0 -10
- package/Templates/Template.Json.js +0 -90
- package/Templates/Template.Web.js +0 -27
- package/Templates/Templates.js +0 -82
- package/fable_modules/fable-library-js.4.13.0/MapUtil.d.ts +0 -10
- /package/{ISA/ISA/JsonTypes → Core}/URI.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Array.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Array.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Async.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Async.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/AsyncBuilder.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/AsyncBuilder.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/BigInt.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/BigInt.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/BitConverter.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/BitConverter.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Boolean.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Char.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Char.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Choice.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Choice.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Date.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/DateOffset.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/DateOffset.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/DateOnly.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/DateOnly.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Decimal.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Decimal.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Double.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Double.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Encoding.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Encoding.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Event.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Event.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/FSharp.Collections.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/FSharp.Collections.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/FSharp.Core.CompilerServices.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/FSharp.Core.CompilerServices.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/FSharp.Core.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/FSharp.Core.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Global.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Global.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Guid.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Guid.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Int32.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Int32.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/List.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/List.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Long.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Long.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/MailboxProcessor.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/MailboxProcessor.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Map.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Map.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/MutableMap.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/MutableMap.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/MutableSet.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/MutableSet.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Native.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Native.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Numeric.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Numeric.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Observable.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Observable.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Option.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Option.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/README.md +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Random.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Random.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Range.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Range.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Reflection.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Reflection.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/RegExp.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/RegExp.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Result.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Result.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Seq.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Seq.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Seq2.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Seq2.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Set.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Set.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/String.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/String.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/System.Collections.Generic.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/System.Collections.Generic.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/System.Text.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/System.Text.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/SystemException.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/SystemException.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/TimeOnly.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/TimeOnly.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/TimeSpan.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/TimeSpan.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Timer.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Timer.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Types.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Types.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Unicode.13.0.0.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Unicode.13.0.0.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Uri.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Uri.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/big.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/lib/big.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/lib/big.js +0 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { Json } from "../../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
|
|
2
|
+
import { map } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
3
|
+
import { ofArray, choose } from "../../fable_modules/fable-library-js.4.16.0/List.js";
|
|
4
|
+
import { equals } from "../../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
5
|
+
import { tryInclude } from "../Encode.js";
|
|
6
|
+
import { context_jsonvalue } from "../context/rocrate/property_value_context.js";
|
|
7
|
+
import { string, object } from "../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
8
|
+
import { OntologyAnnotation } from "../../Core/OntologyAnnotation.js";
|
|
9
|
+
import { Value } from "../../Core/Process/Value.js";
|
|
10
|
+
|
|
11
|
+
export function genID(p) {
|
|
12
|
+
const matchValue = p.GetCategory();
|
|
13
|
+
if (matchValue == null) {
|
|
14
|
+
return `#Empty${() => p.GetAdditionalType()}`;
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
return `${() => p.GetAdditionalType()}/${matchValue}${p.GetValue()}${p.GetUnit()}`;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function encoder(pv) {
|
|
22
|
+
let patternInput;
|
|
23
|
+
const matchValue = pv.GetCategory();
|
|
24
|
+
if (matchValue == null) {
|
|
25
|
+
patternInput = [void 0, void 0];
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
const oa = matchValue;
|
|
29
|
+
patternInput = [oa.Name, oa.TermAccessionNumber];
|
|
30
|
+
}
|
|
31
|
+
let patternInput_1;
|
|
32
|
+
const matchValue_1 = pv.GetValue();
|
|
33
|
+
if (matchValue_1 == null) {
|
|
34
|
+
patternInput_1 = [void 0, void 0];
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
const v = matchValue_1;
|
|
38
|
+
switch (v.tag) {
|
|
39
|
+
case 1: {
|
|
40
|
+
patternInput_1 = [new Json(7, [v.fields[0] >>> 0]), void 0];
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
case 2: {
|
|
44
|
+
patternInput_1 = [new Json(2, [v.fields[0]]), void 0];
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
case 0: {
|
|
48
|
+
const oa_1 = v.fields[0];
|
|
49
|
+
patternInput_1 = [map((value_3) => (new Json(0, [value_3])), oa_1.Name), map((value_5) => (new Json(0, [value_5])), oa_1.TermAccessionNumber)];
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
default:
|
|
53
|
+
patternInput_1 = [new Json(0, [v.fields[0]]), void 0];
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
let patternInput_2;
|
|
57
|
+
const matchValue_2 = pv.GetUnit();
|
|
58
|
+
if (matchValue_2 == null) {
|
|
59
|
+
patternInput_2 = [void 0, void 0];
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
const oa_2 = matchValue_2;
|
|
63
|
+
patternInput_2 = [oa_2.Name, oa_2.TermAccessionNumber];
|
|
64
|
+
}
|
|
65
|
+
return new Json(5, [choose((tupledArg) => {
|
|
66
|
+
const v_1 = tupledArg[1];
|
|
67
|
+
if (equals(v_1, new Json(3, []))) {
|
|
68
|
+
return void 0;
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
return [tupledArg[0], v_1];
|
|
72
|
+
}
|
|
73
|
+
}, ofArray([["@id", new Json(0, [genID(pv)])], ["@type", new Json(0, ["PropertyValue"])], ["additionalType", new Json(0, [pv.GetAdditionalType()])], tryInclude("category", (value_11) => (new Json(0, [value_11])), patternInput[0]), tryInclude("categoryCode", (value_13) => (new Json(0, [value_13])), patternInput[1]), tryInclude("value", (x) => x, patternInput_1[0]), tryInclude("valueCode", (x_1) => x_1, patternInput_1[1]), tryInclude("unit", (value_15) => (new Json(0, [value_15])), patternInput_2[0]), tryInclude("unitCode", (value_17) => (new Json(0, [value_17])), patternInput_2[1]), ["@context", context_jsonvalue]]))]);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function decoder(create) {
|
|
77
|
+
return object((get$) => {
|
|
78
|
+
let name, objectArg, code, objectArg_1, value, objectArg_2, code_1, objectArg_3, name_1, objectArg_4, code_2, objectArg_5;
|
|
79
|
+
return create((name = ((objectArg = get$.Optional, objectArg.Field("category", string))), (code = ((objectArg_1 = get$.Optional, objectArg_1.Field("categoryCode", string))), ((name == null) && (code == null)) ? void 0 : OntologyAnnotation.create(name, void 0, code))), (value = ((objectArg_2 = get$.Optional, objectArg_2.Field("value", string))), (code_1 = ((objectArg_3 = get$.Optional, objectArg_3.Field("valueCode", string))), ((value == null) && (code_1 == null)) ? void 0 : Value.fromOptions(value, void 0, code_1))), (name_1 = ((objectArg_4 = get$.Optional, objectArg_4.Field("unit", string))), (code_2 = ((objectArg_5 = get$.Optional, objectArg_5.Field("unitCode", string))), ((name_1 == null) && (code_2 == null)) ? void 0 : OntologyAnnotation.create(name_1, void 0, code_2))));
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { printf, toText, replace } from "../../fable_modules/fable-library-js.4.16.0/String.js";
|
|
2
|
+
import { append, empty, ofArray, singleton, choose } from "../../fable_modules/fable-library-js.4.16.0/List.js";
|
|
3
|
+
import { equals } from "../../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
4
|
+
import { Json } from "../../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
|
|
5
|
+
import { list as list_4 } from "../../fable_modules/Thoth.Json.Core.0.2.1/Encode.fs.js";
|
|
6
|
+
import { defaultSpaces, tryIncludeListOpt, tryInclude } from "../Encode.js";
|
|
7
|
+
import { OntologyAnnotation_ISAJson_decoder, OntologyAnnotation_ISAJson_encoder, OntologyAnnotation_ROCrate_decoderDefinedTerm, OntologyAnnotation_ROCrate_encoderDefinedTerm } from "../OntologyAnnotation.js";
|
|
8
|
+
import { Component_ISAJson_decoder, Component_ISAJson_encoder, Component_ROCrate_decoder, Component_ROCrate_encoder } from "./Component.js";
|
|
9
|
+
import { Comment_ISAJson_decoder, Comment_ISAJson_encoder, Comment_ROCrate_decoder, Comment_ROCrate_encoder } from "../Comment.js";
|
|
10
|
+
import { context_jsonvalue } from "../context/rocrate/isa_protocol_context.js";
|
|
11
|
+
import { string, list as list_5, object } from "../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
12
|
+
import { Option_fromValueWithDefault } from "../../Core/Helper/Collections.js";
|
|
13
|
+
import { defaultArg } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
14
|
+
import { Decode_uri } from "../Decode.js";
|
|
15
|
+
import { Protocol } from "../../Core/Process/Protocol.js";
|
|
16
|
+
import { ProtocolParameter_ISAJson_decoder, ProtocolParameter_ISAJson_encoder } from "./ProtocolParameter.js";
|
|
17
|
+
import { fromString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
|
|
18
|
+
import { toString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
|
|
19
|
+
|
|
20
|
+
export function Protocol_ROCrate_genID(studyName, assayName, processName, p) {
|
|
21
|
+
const matchValue = p.Uri;
|
|
22
|
+
if (matchValue == null) {
|
|
23
|
+
const matchValue_1 = p.Name;
|
|
24
|
+
if (matchValue_1 == null) {
|
|
25
|
+
let matchResult, an, pn, sn, pn_1, sn_1, pn_2;
|
|
26
|
+
if (studyName == null) {
|
|
27
|
+
if (assayName == null) {
|
|
28
|
+
if (processName != null) {
|
|
29
|
+
matchResult = 2;
|
|
30
|
+
pn_2 = processName;
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
matchResult = 3;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
matchResult = 3;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
else if (assayName == null) {
|
|
41
|
+
if (processName != null) {
|
|
42
|
+
matchResult = 1;
|
|
43
|
+
pn_1 = processName;
|
|
44
|
+
sn_1 = studyName;
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
matchResult = 3;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
else if (processName != null) {
|
|
51
|
+
matchResult = 0;
|
|
52
|
+
an = assayName;
|
|
53
|
+
pn = processName;
|
|
54
|
+
sn = studyName;
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
matchResult = 3;
|
|
58
|
+
}
|
|
59
|
+
switch (matchResult) {
|
|
60
|
+
case 0:
|
|
61
|
+
return (((("#Protocol_" + replace(sn, " ", "_")) + "_") + replace(an, " ", "_")) + "_") + replace(pn, " ", "_");
|
|
62
|
+
case 1:
|
|
63
|
+
return (("#Protocol_" + replace(sn_1, " ", "_")) + "_") + replace(pn_1, " ", "_");
|
|
64
|
+
case 2:
|
|
65
|
+
return "#Protocol_" + replace(pn_2, " ", "_");
|
|
66
|
+
default:
|
|
67
|
+
return "#EmptyProtocol";
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
return "#Protocol_" + replace(matchValue_1, " ", "_");
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
return matchValue;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function Protocol_ROCrate_encoder(studyName, assayName, processName, oa) {
|
|
80
|
+
return new Json(5, [choose((tupledArg) => {
|
|
81
|
+
const v = tupledArg[1];
|
|
82
|
+
if (equals(v, new Json(3, []))) {
|
|
83
|
+
return void 0;
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
return [tupledArg[0], v];
|
|
87
|
+
}
|
|
88
|
+
}, ofArray([["@id", new Json(0, [Protocol_ROCrate_genID(studyName, assayName, processName, oa)])], ["@type", list_4(singleton(new Json(0, ["Protocol"])))], tryInclude("name", (value_2) => (new Json(0, [value_2])), oa.Name), tryInclude("protocolType", OntologyAnnotation_ROCrate_encoderDefinedTerm, oa.ProtocolType), tryInclude("description", (value_4) => (new Json(0, [value_4])), oa.Description), tryInclude("uri", (value_6) => (new Json(0, [value_6])), oa.Uri), tryInclude("version", (value_8) => (new Json(0, [value_8])), oa.Version), tryIncludeListOpt("components", Component_ROCrate_encoder, oa.Components), tryIncludeListOpt("comments", Comment_ROCrate_encoder, oa.Comments), ["@context", context_jsonvalue]]))]);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export const Protocol_ROCrate_decoder = object((get$) => {
|
|
92
|
+
let list_3, list_1, arg_1, objectArg, arg_3, objectArg_1, arg_5, objectArg_2, objectArg_3, objectArg_4, objectArg_5, objectArg_6, objectArg_7, objectArg_8, arg_19, objectArg_9;
|
|
93
|
+
const components = Option_fromValueWithDefault(empty(), (list_3 = ((list_1 = defaultArg((arg_1 = list_5(Component_ROCrate_decoder), (objectArg = get$.Optional, objectArg.Field("components", arg_1))), empty()), append(defaultArg((arg_3 = list_5(Component_ROCrate_decoder), (objectArg_1 = get$.Optional, objectArg_1.Field("reagents", arg_3))), empty()), list_1))), append(defaultArg((arg_5 = list_5(Component_ROCrate_decoder), (objectArg_2 = get$.Optional, objectArg_2.Field("computationalTools", arg_5))), empty()), list_3)));
|
|
94
|
+
return new Protocol((objectArg_3 = get$.Optional, objectArg_3.Field("@id", Decode_uri)), (objectArg_4 = get$.Optional, objectArg_4.Field("name", string)), (objectArg_5 = get$.Optional, objectArg_5.Field("protocolType", OntologyAnnotation_ROCrate_decoderDefinedTerm)), (objectArg_6 = get$.Optional, objectArg_6.Field("description", string)), (objectArg_7 = get$.Optional, objectArg_7.Field("uri", Decode_uri)), (objectArg_8 = get$.Optional, objectArg_8.Field("version", string)), void 0, components, (arg_19 = list_5(Comment_ROCrate_decoder), (objectArg_9 = get$.Optional, objectArg_9.Field("comments", arg_19))));
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
export function Protocol_ISAJson_encoder(oa) {
|
|
98
|
+
return new Json(5, [choose((tupledArg) => {
|
|
99
|
+
const v = tupledArg[1];
|
|
100
|
+
if (equals(v, new Json(3, []))) {
|
|
101
|
+
return void 0;
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
return [tupledArg[0], v];
|
|
105
|
+
}
|
|
106
|
+
}, ofArray([tryInclude("@id", (value) => (new Json(0, [value])), oa.ID), tryInclude("name", (value_2) => (new Json(0, [value_2])), oa.Name), tryInclude("protocolType", OntologyAnnotation_ISAJson_encoder, oa.ProtocolType), tryInclude("description", (value_4) => (new Json(0, [value_4])), oa.Description), tryInclude("uri", (value_6) => (new Json(0, [value_6])), oa.Uri), tryInclude("version", (value_8) => (new Json(0, [value_8])), oa.Version), tryIncludeListOpt("parameters", ProtocolParameter_ISAJson_encoder, oa.Parameters), tryIncludeListOpt("components", Component_ISAJson_encoder, oa.Components), tryIncludeListOpt("comments", Comment_ISAJson_encoder, oa.Comments)]))]);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export const Protocol_ISAJson_decoder = object((get$) => {
|
|
110
|
+
let objectArg, objectArg_1, objectArg_2, objectArg_3, objectArg_4, objectArg_5, arg_13, objectArg_6, arg_15, objectArg_7, arg_17, objectArg_8;
|
|
111
|
+
return new Protocol((objectArg = get$.Optional, objectArg.Field("@id", Decode_uri)), (objectArg_1 = get$.Optional, objectArg_1.Field("name", string)), (objectArg_2 = get$.Optional, objectArg_2.Field("protocolType", OntologyAnnotation_ISAJson_decoder)), (objectArg_3 = get$.Optional, objectArg_3.Field("description", string)), (objectArg_4 = get$.Optional, objectArg_4.Field("uri", Decode_uri)), (objectArg_5 = get$.Optional, objectArg_5.Field("version", string)), (arg_13 = list_5(ProtocolParameter_ISAJson_decoder), (objectArg_6 = get$.Optional, objectArg_6.Field("parameters", arg_13))), (arg_15 = list_5(Component_ISAJson_decoder), (objectArg_7 = get$.Optional, objectArg_7.Field("components", arg_15))), (arg_17 = list_5(Comment_ISAJson_decoder), (objectArg_8 = get$.Optional, objectArg_8.Field("comments", arg_17))));
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
export function ARCtrl_Process_Protocol__Protocol_fromISAJsonString_Static_Z721C83C5(s) {
|
|
115
|
+
const matchValue = fromString(Protocol_ISAJson_decoder, s);
|
|
116
|
+
if (matchValue.tag === 1) {
|
|
117
|
+
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
return matchValue.fields[0];
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export function ARCtrl_Process_Protocol__Protocol_toISAJsonString_Static_71136F3F(spaces) {
|
|
125
|
+
return (f) => {
|
|
126
|
+
const value = Protocol_ISAJson_encoder(f);
|
|
127
|
+
return toString(defaultSpaces(spaces), value);
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export function ARCtrl_Process_Protocol__Protocol_fromROCrateString_Static_Z721C83C5(s) {
|
|
132
|
+
const matchValue = fromString(Protocol_ROCrate_decoder, s);
|
|
133
|
+
if (matchValue.tag === 1) {
|
|
134
|
+
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
return matchValue.fields[0];
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export function ARCtrl_Process_Protocol__Protocol_toROCrateString_Static(studyName, assayName, processName, spaces) {
|
|
142
|
+
return (f) => {
|
|
143
|
+
const value = Protocol_ROCrate_encoder(studyName, assayName, processName, f);
|
|
144
|
+
return toString(defaultSpaces(spaces), value);
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { singleton, choose } from "../../fable_modules/fable-library-js.4.16.0/List.js";
|
|
2
|
+
import { equals } from "../../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
3
|
+
import { Json } from "../../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
|
|
4
|
+
import { defaultSpaces, tryInclude } from "../Encode.js";
|
|
5
|
+
import { OntologyAnnotation_ISAJson_decoder, OntologyAnnotation_ISAJson_encoder } from "../OntologyAnnotation.js";
|
|
6
|
+
import { object } from "../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
7
|
+
import { ProtocolParameter } from "../../Core/Process/ProtocolParameter.js";
|
|
8
|
+
import { fromString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
|
|
9
|
+
import { printf, toText } from "../../fable_modules/fable-library-js.4.16.0/String.js";
|
|
10
|
+
import { toString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
|
|
11
|
+
|
|
12
|
+
export function ProtocolParameter_ISAJson_encoder(value) {
|
|
13
|
+
return new Json(5, [choose((tupledArg) => {
|
|
14
|
+
const v = tupledArg[1];
|
|
15
|
+
if (equals(v, new Json(3, []))) {
|
|
16
|
+
return void 0;
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
return [tupledArg[0], v];
|
|
20
|
+
}
|
|
21
|
+
}, singleton(tryInclude("parameterName", OntologyAnnotation_ISAJson_encoder, value.ParameterName)))]);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const ProtocolParameter_ISAJson_decoder = object((get$) => {
|
|
25
|
+
let objectArg;
|
|
26
|
+
return new ProtocolParameter(void 0, (objectArg = get$.Optional, objectArg.Field("parameterName", OntologyAnnotation_ISAJson_decoder)));
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export function ARCtrl_Process_ProtocolParameter__ProtocolParameter_fromISAJsonString_Static_Z721C83C5(s) {
|
|
30
|
+
const matchValue = fromString(ProtocolParameter_ISAJson_decoder, s);
|
|
31
|
+
if (matchValue.tag === 1) {
|
|
32
|
+
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
return matchValue.fields[0];
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function ARCtrl_Process_ProtocolParameter__ProtocolParameter_toISAJsonString_Static_71136F3F(spaces) {
|
|
40
|
+
return (v) => {
|
|
41
|
+
const value = ProtocolParameter_ISAJson_encoder(v);
|
|
42
|
+
return toString(defaultSpaces(spaces), value);
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { printf, toText, replace } from "../../fable_modules/fable-library-js.4.16.0/String.js";
|
|
2
|
+
import { ofArray, singleton, choose, append, empty, map } from "../../fable_modules/fable-library-js.4.16.0/List.js";
|
|
3
|
+
import { MaterialAttributeValue_ISAJson_decoder, MaterialAttributeValue_ISAJson_encoder, MaterialAttributeValue_ROCrate_decoder, MaterialAttributeValue_ROCrate_encoder } from "./MaterialAttributeValue.js";
|
|
4
|
+
import { defaultArg } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
5
|
+
import { FactorValue_ISAJson_decoder, FactorValue_ISAJson_encoder, FactorValue_ROCrate_decoder, FactorValue_ROCrate_encoder } from "./FactorValue.js";
|
|
6
|
+
import { equals } from "../../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
7
|
+
import { Json } from "../../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
|
|
8
|
+
import { list as list_5 } from "../../fable_modules/Thoth.Json.Core.0.2.1/Encode.fs.js";
|
|
9
|
+
import { defaultSpaces, tryIncludeListOpt, tryIncludeList, tryInclude } from "../Encode.js";
|
|
10
|
+
import { context_jsonvalue } from "../context/rocrate/isa_sample_context.js";
|
|
11
|
+
import { list as list_6, object, string } from "../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
12
|
+
import { FSharpResult$2 } from "../../fable_modules/fable-library-js.4.16.0/Result.js";
|
|
13
|
+
import { Option_fromValueWithDefault } from "../../Core/Helper/Collections.js";
|
|
14
|
+
import { Decode_objectNoAdditionalProperties, Decode_uri } from "../Decode.js";
|
|
15
|
+
import { Source_ISAJson_decoder, Source_ISAJson_encoder, Source_ROCrate_decoder } from "./Source.js";
|
|
16
|
+
import { Sample } from "../../Core/Process/Sample.js";
|
|
17
|
+
import { fromString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
|
|
18
|
+
import { toString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
|
|
19
|
+
|
|
20
|
+
export function Sample_ROCrate_genID(s) {
|
|
21
|
+
const matchValue = s.ID;
|
|
22
|
+
if (matchValue == null) {
|
|
23
|
+
const matchValue_1 = s.Name;
|
|
24
|
+
if (matchValue_1 == null) {
|
|
25
|
+
return "#EmptySample";
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
return "#Sample_" + replace(matchValue_1, " ", "_");
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
return matchValue;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function Sample_ROCrate_encoder(oa) {
|
|
37
|
+
let additionalProperties;
|
|
38
|
+
const list_3 = map(MaterialAttributeValue_ROCrate_encoder, defaultArg(oa.Characteristics, empty()));
|
|
39
|
+
additionalProperties = append(map(FactorValue_ROCrate_encoder, defaultArg(oa.FactorValues, empty())), list_3);
|
|
40
|
+
return new Json(5, [choose((tupledArg) => {
|
|
41
|
+
const v = tupledArg[1];
|
|
42
|
+
if (equals(v, new Json(3, []))) {
|
|
43
|
+
return void 0;
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
return [tupledArg[0], v];
|
|
47
|
+
}
|
|
48
|
+
}, ofArray([["@id", new Json(0, [Sample_ROCrate_genID(oa)])], ["@type", list_5(singleton(new Json(0, ["Sample"])))], tryInclude("name", (value_4) => (new Json(0, [value_4])), oa.Name), tryIncludeList("additionalProperties", (x) => x, additionalProperties), ["@context", context_jsonvalue]]))]);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export const Sample_ROCrate_additionalPropertyDecoder = {
|
|
52
|
+
Decode(s, json) {
|
|
53
|
+
let matchValue;
|
|
54
|
+
if ((s.hasProperty("additionalType", json) ? ((matchValue = string.Decode(s, s.getProperty("additionalType", json)), (matchValue.tag === 0) ? matchValue.fields[0] : "")) : "") === "FactorValue") {
|
|
55
|
+
const matchValue_1 = FactorValue_ROCrate_decoder.Decode(s, json);
|
|
56
|
+
return (matchValue_1.tag === 1) ? (new FSharpResult$2(1, [matchValue_1.fields[0]])) : (new FSharpResult$2(0, [[void 0, matchValue_1.fields[0]]]));
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
const matchValue_2 = MaterialAttributeValue_ROCrate_decoder.Decode(s, json);
|
|
60
|
+
return (matchValue_2.tag === 1) ? (new FSharpResult$2(1, [matchValue_2.fields[0]])) : (new FSharpResult$2(0, [[matchValue_2.fields[0], void 0]]));
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export const Sample_ROCrate_decoder = object((get$) => {
|
|
66
|
+
let objectArg_1, objectArg_2, arg_7, objectArg_3;
|
|
67
|
+
let additionalProperties;
|
|
68
|
+
const arg_1 = list_6(Sample_ROCrate_additionalPropertyDecoder);
|
|
69
|
+
const objectArg = get$.Optional;
|
|
70
|
+
additionalProperties = objectArg.Field("additionalProperties", arg_1);
|
|
71
|
+
let patternInput;
|
|
72
|
+
if (additionalProperties != null) {
|
|
73
|
+
const additionalProperties_1 = additionalProperties;
|
|
74
|
+
patternInput = [Option_fromValueWithDefault(empty(), choose((tuple) => tuple[0], additionalProperties_1)), Option_fromValueWithDefault(empty(), choose((tuple_1) => tuple_1[1], additionalProperties_1))];
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
patternInput = [void 0, void 0];
|
|
78
|
+
}
|
|
79
|
+
return new Sample((objectArg_1 = get$.Optional, objectArg_1.Field("@id", Decode_uri)), (objectArg_2 = get$.Optional, objectArg_2.Field("name", string)), patternInput[0], patternInput[1], (arg_7 = list_6(Source_ROCrate_decoder), (objectArg_3 = get$.Optional, objectArg_3.Field("derivesFrom", arg_7))));
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
export function Sample_ISAJson_encoder(oa) {
|
|
83
|
+
return new Json(5, [choose((tupledArg) => {
|
|
84
|
+
const v = tupledArg[1];
|
|
85
|
+
if (equals(v, new Json(3, []))) {
|
|
86
|
+
return void 0;
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
return [tupledArg[0], v];
|
|
90
|
+
}
|
|
91
|
+
}, ofArray([tryInclude("@id", (value) => (new Json(0, [value])), oa.ID), tryInclude("name", (value_2) => (new Json(0, [value_2])), oa.Name), tryIncludeListOpt("characteristics", MaterialAttributeValue_ISAJson_encoder, oa.Characteristics), tryIncludeListOpt("factorValues", FactorValue_ISAJson_encoder, oa.FactorValues), tryIncludeListOpt("derivesFrom", Source_ISAJson_encoder, oa.DerivesFrom)]))]);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export const Sample_ISAJson_allowedFields = ofArray(["@id", "name", "characteristics", "factorValues", "derivesFrom", "@type", "@context"]);
|
|
95
|
+
|
|
96
|
+
export const Sample_ISAJson_decoder = Decode_objectNoAdditionalProperties(Sample_ISAJson_allowedFields, (get$) => {
|
|
97
|
+
let objectArg, objectArg_1, arg_5, objectArg_2, arg_7, objectArg_3, arg_9, objectArg_4;
|
|
98
|
+
return new Sample((objectArg = get$.Optional, objectArg.Field("@id", Decode_uri)), (objectArg_1 = get$.Optional, objectArg_1.Field("name", string)), (arg_5 = list_6(MaterialAttributeValue_ISAJson_decoder), (objectArg_2 = get$.Optional, objectArg_2.Field("characteristics", arg_5))), (arg_7 = list_6(FactorValue_ISAJson_decoder), (objectArg_3 = get$.Optional, objectArg_3.Field("factorValues", arg_7))), (arg_9 = list_6(Source_ISAJson_decoder), (objectArg_4 = get$.Optional, objectArg_4.Field("derivesFrom", arg_9))));
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
export function ARCtrl_Process_Sample__Sample_fromISAJsonString_Static_Z721C83C5(s) {
|
|
102
|
+
const matchValue = fromString(Sample_ISAJson_decoder, s);
|
|
103
|
+
if (matchValue.tag === 1) {
|
|
104
|
+
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
return matchValue.fields[0];
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function ARCtrl_Process_Sample__Sample_toISAJsonString_Static_71136F3F(spaces) {
|
|
112
|
+
return (f) => {
|
|
113
|
+
const value = Sample_ISAJson_encoder(f);
|
|
114
|
+
return toString(defaultSpaces(spaces), value);
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export function ARCtrl_Process_Sample__Sample_fromROCrateString_Static_Z721C83C5(s) {
|
|
119
|
+
const matchValue = fromString(Sample_ROCrate_decoder, s);
|
|
120
|
+
if (matchValue.tag === 1) {
|
|
121
|
+
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
return matchValue.fields[0];
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export function ARCtrl_Process_Sample__Sample_toROCrateString_Static_71136F3F(spaces) {
|
|
129
|
+
return (f) => {
|
|
130
|
+
const value = Sample_ROCrate_encoder(f);
|
|
131
|
+
return toString(defaultSpaces(spaces), value);
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { printf, toText, replace } from "../../fable_modules/fable-library-js.4.16.0/String.js";
|
|
2
|
+
import { URIModule_toString } from "../../Core/URI.js";
|
|
3
|
+
import { ofArray, singleton, choose } from "../../fable_modules/fable-library-js.4.16.0/List.js";
|
|
4
|
+
import { equals } from "../../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
5
|
+
import { Json } from "../../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
|
|
6
|
+
import { list as list_1 } from "../../fable_modules/Thoth.Json.Core.0.2.1/Encode.fs.js";
|
|
7
|
+
import { defaultSpaces, tryIncludeListOpt, tryInclude } from "../Encode.js";
|
|
8
|
+
import { MaterialAttributeValue_ISAJson_decoder, MaterialAttributeValue_ISAJson_encoder, MaterialAttributeValue_ROCrate_decoder, MaterialAttributeValue_ROCrate_encoder } from "./MaterialAttributeValue.js";
|
|
9
|
+
import { context_jsonvalue } from "../context/rocrate/isa_source_context.js";
|
|
10
|
+
import { list as list_2, string, object } from "../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
11
|
+
import { Decode_objectNoAdditionalProperties, Decode_uri } from "../Decode.js";
|
|
12
|
+
import { Source } from "../../Core/Process/Source.js";
|
|
13
|
+
import { fromString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
|
|
14
|
+
import { toString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
|
|
15
|
+
|
|
16
|
+
export function Source_ROCrate_genID(s) {
|
|
17
|
+
const matchValue = s.ID;
|
|
18
|
+
if (matchValue == null) {
|
|
19
|
+
const matchValue_1 = s.Name;
|
|
20
|
+
if (matchValue_1 == null) {
|
|
21
|
+
return "#EmptySource";
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
return "#Source_" + replace(matchValue_1, " ", "_");
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
return URIModule_toString(matchValue);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function Source_ROCrate_encoder(oa) {
|
|
33
|
+
return new Json(5, [choose((tupledArg) => {
|
|
34
|
+
const v = tupledArg[1];
|
|
35
|
+
if (equals(v, new Json(3, []))) {
|
|
36
|
+
return void 0;
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
return [tupledArg[0], v];
|
|
40
|
+
}
|
|
41
|
+
}, ofArray([["@id", new Json(0, [Source_ROCrate_genID(oa)])], ["@type", list_1(singleton(new Json(0, ["Source"])))], tryInclude("name", (value_2) => (new Json(0, [value_2])), oa.Name), tryIncludeListOpt("characteristics", MaterialAttributeValue_ROCrate_encoder, oa.Characteristics), ["@context", context_jsonvalue]]))]);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export const Source_ROCrate_decoder = object((get$) => {
|
|
45
|
+
let objectArg, objectArg_1, arg_5, objectArg_2;
|
|
46
|
+
return new Source((objectArg = get$.Optional, objectArg.Field("@id", Decode_uri)), (objectArg_1 = get$.Optional, objectArg_1.Field("name", string)), (arg_5 = list_2(MaterialAttributeValue_ROCrate_decoder), (objectArg_2 = get$.Optional, objectArg_2.Field("characteristics", arg_5))));
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
export function Source_ISAJson_encoder(oa) {
|
|
50
|
+
return new Json(5, [choose((tupledArg) => {
|
|
51
|
+
const v = tupledArg[1];
|
|
52
|
+
if (equals(v, new Json(3, []))) {
|
|
53
|
+
return void 0;
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
return [tupledArg[0], v];
|
|
57
|
+
}
|
|
58
|
+
}, ofArray([tryInclude("@id", (value) => (new Json(0, [value])), oa.ID), tryInclude("name", (value_2) => (new Json(0, [value_2])), oa.Name), tryIncludeListOpt("characteristics", MaterialAttributeValue_ISAJson_encoder, oa.Characteristics)]))]);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export const Source_ISAJson_allowedFields = ofArray(["@id", "name", "characteristics", "@type", "@context"]);
|
|
62
|
+
|
|
63
|
+
export const Source_ISAJson_decoder = Decode_objectNoAdditionalProperties(Source_ISAJson_allowedFields, (get$) => {
|
|
64
|
+
let objectArg, objectArg_1, arg_5, objectArg_2;
|
|
65
|
+
return new Source((objectArg = get$.Optional, objectArg.Field("@id", Decode_uri)), (objectArg_1 = get$.Optional, objectArg_1.Field("name", string)), (arg_5 = list_2(MaterialAttributeValue_ISAJson_decoder), (objectArg_2 = get$.Optional, objectArg_2.Field("characteristics", arg_5))));
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
export function ARCtrl_Process_Source__Source_fromISAJsonString_Static_Z721C83C5(s) {
|
|
69
|
+
const matchValue = fromString(Source_ISAJson_decoder, s);
|
|
70
|
+
if (matchValue.tag === 1) {
|
|
71
|
+
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
return matchValue.fields[0];
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function ARCtrl_Process_Source__Source_toISAJsonString_Static_71136F3F(spaces) {
|
|
79
|
+
return (f) => {
|
|
80
|
+
const value = Source_ISAJson_encoder(f);
|
|
81
|
+
return toString(defaultSpaces(spaces), value);
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function ARCtrl_Process_Source__Source_fromROCrateString_Static_Z721C83C5(s) {
|
|
86
|
+
const matchValue = fromString(Source_ROCrate_decoder, s);
|
|
87
|
+
if (matchValue.tag === 1) {
|
|
88
|
+
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
return matchValue.fields[0];
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function ARCtrl_Process_Source__Source_toROCrateString_Static_71136F3F(spaces) {
|
|
96
|
+
return (f) => {
|
|
97
|
+
const value = Source_ROCrate_encoder(f);
|
|
98
|
+
return toString(defaultSpaces(spaces), value);
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { getMaterials, getSamples, getSources } from "../../Core/Process/ProcessSequence.js";
|
|
2
|
+
import { ofArray, choose } from "../../fable_modules/fable-library-js.4.16.0/List.js";
|
|
3
|
+
import { equals } from "../../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
4
|
+
import { Json } from "../../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
|
|
5
|
+
import { tryIncludeList } from "../Encode.js";
|
|
6
|
+
import { Source_ISAJson_encoder } from "./Source.js";
|
|
7
|
+
import { Sample_ISAJson_encoder } from "./Sample.js";
|
|
8
|
+
import { Material_ISAJson_encoder } from "./Material.js";
|
|
9
|
+
|
|
10
|
+
export function encoder(ps) {
|
|
11
|
+
const source = getSources(ps);
|
|
12
|
+
const samples = getSamples(ps);
|
|
13
|
+
const materials = getMaterials(ps);
|
|
14
|
+
return new Json(5, [choose((tupledArg) => {
|
|
15
|
+
const v = tupledArg[1];
|
|
16
|
+
if (equals(v, new Json(3, []))) {
|
|
17
|
+
return void 0;
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
return [tupledArg[0], v];
|
|
21
|
+
}
|
|
22
|
+
}, ofArray([tryIncludeList("sources", Source_ISAJson_encoder, source), tryIncludeList("samples", Sample_ISAJson_encoder, samples), tryIncludeList("otherMaterials", Material_ISAJson_encoder, materials)]))]);
|
|
23
|
+
}
|
|
24
|
+
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Json } from "../../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
|
|
2
|
+
import { OntologyAnnotation_ISAJson_decoder, OntologyAnnotation_ISAJson_encoder } from "../OntologyAnnotation.js";
|
|
3
|
+
import { string, float, int, map, oneOf } from "../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
4
|
+
import { Value } from "../../Core/Process/Value.js";
|
|
5
|
+
import { ofArray } from "../../fable_modules/fable-library-js.4.16.0/List.js";
|
|
6
|
+
import { fromString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
|
|
7
|
+
import { printf, toText } from "../../fable_modules/fable-library-js.4.16.0/String.js";
|
|
8
|
+
import { toString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
|
|
9
|
+
import { defaultSpaces } from "../Encode.js";
|
|
10
|
+
|
|
11
|
+
export function Value_ISAJson_encoder(value) {
|
|
12
|
+
switch (value.tag) {
|
|
13
|
+
case 1:
|
|
14
|
+
return new Json(7, [value.fields[0] >>> 0]);
|
|
15
|
+
case 3:
|
|
16
|
+
return new Json(0, [value.fields[0]]);
|
|
17
|
+
case 0:
|
|
18
|
+
return OntologyAnnotation_ISAJson_encoder(value.fields[0]);
|
|
19
|
+
default:
|
|
20
|
+
return new Json(2, [value.fields[0]]);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const Value_ISAJson_decoder = oneOf(ofArray([map((Item) => (new Value(1, [Item])), int), map((Item_1) => (new Value(2, [Item_1])), float), map((Item_2) => (new Value(0, [Item_2])), OntologyAnnotation_ISAJson_decoder), map((Item_3) => (new Value(3, [Item_3])), string)]));
|
|
25
|
+
|
|
26
|
+
export function ARCtrl_Process_Value__Value_fromISAJsonString_Static_Z721C83C5(s) {
|
|
27
|
+
const matchValue = fromString(Value_ISAJson_decoder, s);
|
|
28
|
+
if (matchValue.tag === 1) {
|
|
29
|
+
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
return matchValue.fields[0];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function ARCtrl_Process_Value__Value_toISAJsonString_Static_71136F3F(spaces) {
|
|
37
|
+
return (v) => {
|
|
38
|
+
const value = Value_ISAJson_encoder(v);
|
|
39
|
+
return toString(defaultSpaces(spaces), value);
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|