@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
package/ISA/ISA.Json/Process.js
DELETED
|
@@ -1,305 +0,0 @@
|
|
|
1
|
-
import { printf, toText, replace } from "../../fable_modules/fable-library-js.4.13.0/String.js";
|
|
2
|
-
import { ProtocolParameter } from "../ISA/JsonTypes/ProtocolParameter.js";
|
|
3
|
-
import { Value } from "../ISA/JsonTypes/Value.js";
|
|
4
|
-
import { map, ofArray, choose } from "../../fable_modules/fable-library-js.4.13.0/List.js";
|
|
5
|
-
import { equals } from "../../fable_modules/fable-library-js.4.13.0/Util.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 { list as list_1 } from "../../fable_modules/Thoth.Json.Core.0.2.1/Encode.fs.js";
|
|
10
|
-
import { tryIncludeList, tryInclude } from "./GEncode.js";
|
|
11
|
-
import { Protocol_decoder, Protocol_encoder, ProtocolParameter_decoder, ProtocolParameter_encoder } from "./Protocol.js";
|
|
12
|
-
import { Value_decoder, Value_encoder } from "./Factor.js";
|
|
13
|
-
import { OntologyAnnotation_decoder, OntologyAnnotation_encoder } from "./Ontology.js";
|
|
14
|
-
import { context_jsonvalue } from "./context/rocrate/isa_process_parameter_value_context.js";
|
|
15
|
-
import { list as list_2, string, object } from "../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
16
|
-
import { ProcessParameterValue } from "../ISA/JsonTypes/ProcessParameterValue.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
|
-
import { Data_decoder, Sample_decoder, Source_decoder, Source_encoder, Data_encoder, Sample_encoder } from "./Data.js";
|
|
20
|
-
import { Material_decoder, Material_encoder } from "./Material.js";
|
|
21
|
-
import { FSharpResult$2 } from "../../fable_modules/fable-library-js.4.13.0/Result.js";
|
|
22
|
-
import { ProcessInput } from "../ISA/JsonTypes/ProcessInput.js";
|
|
23
|
-
import { ProcessOutput } from "../ISA/JsonTypes/ProcessOutput.js";
|
|
24
|
-
import { URIModule_toString } from "../ISA/JsonTypes/URI.js";
|
|
25
|
-
import { decoder as decoder_1, encoder } from "./Comment.js";
|
|
26
|
-
import { context_jsonvalue as context_jsonvalue_1 } from "./context/rocrate/isa_process_context.js";
|
|
27
|
-
import { uri } from "./Decode.js";
|
|
28
|
-
import { Process } from "../ISA/JsonTypes/Process.js";
|
|
29
|
-
|
|
30
|
-
export function ProcessParameterValue_genID(p) {
|
|
31
|
-
const matchValue = p.Value;
|
|
32
|
-
const matchValue_1 = p.Category;
|
|
33
|
-
let matchResult, c, v;
|
|
34
|
-
if (matchValue != null) {
|
|
35
|
-
if (matchValue_1 != null) {
|
|
36
|
-
matchResult = 0;
|
|
37
|
-
c = matchValue_1;
|
|
38
|
-
v = matchValue;
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
matchResult = 1;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
matchResult = 1;
|
|
46
|
-
}
|
|
47
|
-
switch (matchResult) {
|
|
48
|
-
case 0:
|
|
49
|
-
return (("#Param_" + replace(ProtocolParameter.getNameText(c), " ", "_")) + "_") + replace(Value.getText(v), " ", "_");
|
|
50
|
-
default:
|
|
51
|
-
return "#EmptyParameterValue";
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export function ProcessParameterValue_encoder(options, oa) {
|
|
56
|
-
return new Json(5, [choose((tupledArg) => {
|
|
57
|
-
const v = tupledArg[1];
|
|
58
|
-
if (equals(v, new Json(3, []))) {
|
|
59
|
-
return void 0;
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
return [tupledArg[0], v];
|
|
63
|
-
}
|
|
64
|
-
}, toList(delay(() => append(ConverterOptions__get_SetID(options) ? singleton(["@id", new Json(0, [ProcessParameterValue_genID(oa)])]) : empty(), delay(() => append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", list_1(ofArray([new Json(0, ["ProcessParameterValue"]), new Json(0, ["ArcProcessParameterValue"])]))]) : empty(), delay(() => append(singleton(tryInclude("category", (oa_1) => ProtocolParameter_encoder(options, oa_1), oa.Category)), delay(() => append(singleton(tryInclude("value", (value_3) => Value_encoder(options, value_3), 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]) : empty()))))))))))))))]);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export function ProcessParameterValue_decoder(options) {
|
|
68
|
-
return object((get$) => {
|
|
69
|
-
let arg_1, objectArg, arg_3, objectArg_1, arg_5, objectArg_2;
|
|
70
|
-
return new ProcessParameterValue((arg_1 = ProtocolParameter_decoder(options), (objectArg = get$.Optional, objectArg.Field("category", arg_1))), (arg_3 = Value_decoder(options), (objectArg_1 = get$.Optional, objectArg_1.Field("value", arg_3))), (arg_5 = OntologyAnnotation_decoder(options), (objectArg_2 = get$.Optional, objectArg_2.Field("unit", arg_5))));
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export function ProcessParameterValue_fromJsonString(s) {
|
|
75
|
-
const matchValue = fromString(ProcessParameterValue_decoder(ConverterOptions_$ctor()), s);
|
|
76
|
-
if (matchValue.tag === 1) {
|
|
77
|
-
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
78
|
-
}
|
|
79
|
-
else {
|
|
80
|
-
return matchValue.fields[0];
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export function ProcessParameterValue_toJsonString(p) {
|
|
85
|
-
return toString(2, ProcessParameterValue_encoder(ConverterOptions_$ctor(), p));
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* exports in json-ld format
|
|
90
|
-
*/
|
|
91
|
-
export function ProcessParameterValue_toJsonldString(p) {
|
|
92
|
-
let returnVal;
|
|
93
|
-
return toString(2, ProcessParameterValue_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), p));
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
export function ProcessParameterValue_toJsonldStringWithContext(a) {
|
|
97
|
-
let returnVal;
|
|
98
|
-
return toString(2, ProcessParameterValue_encoder((returnVal = ConverterOptions_$ctor(), (((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), ConverterOptions__set_IncludeContext_Z1FBCCD16(returnVal, true)), returnVal)), a));
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
export function ProcessInput_encoder(options, value) {
|
|
102
|
-
switch (value.tag) {
|
|
103
|
-
case 1:
|
|
104
|
-
return Sample_encoder(options, value.fields[0]);
|
|
105
|
-
case 2:
|
|
106
|
-
return Data_encoder(options, value.fields[0]);
|
|
107
|
-
case 3:
|
|
108
|
-
return Material_encoder(options, value.fields[0]);
|
|
109
|
-
default:
|
|
110
|
-
return Source_encoder(options, value.fields[0]);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
export function ProcessInput_decoder(options) {
|
|
115
|
-
return {
|
|
116
|
-
Decode(s, json) {
|
|
117
|
-
const matchValue = Source_decoder(options).Decode(s, json);
|
|
118
|
-
if (matchValue.tag === 1) {
|
|
119
|
-
const matchValue_1 = Sample_decoder(options).Decode(s, json);
|
|
120
|
-
if (matchValue_1.tag === 1) {
|
|
121
|
-
const matchValue_2 = Data_decoder(options).Decode(s, json);
|
|
122
|
-
if (matchValue_2.tag === 1) {
|
|
123
|
-
const matchValue_3 = Material_decoder(options).Decode(s, json);
|
|
124
|
-
return (matchValue_3.tag === 1) ? (new FSharpResult$2(1, [matchValue_3.fields[0]])) : (new FSharpResult$2(0, [new ProcessInput(3, [matchValue_3.fields[0]])]));
|
|
125
|
-
}
|
|
126
|
-
else {
|
|
127
|
-
return new FSharpResult$2(0, [new ProcessInput(2, [matchValue_2.fields[0]])]);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
else {
|
|
131
|
-
return new FSharpResult$2(0, [new ProcessInput(1, [matchValue_1.fields[0]])]);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
else {
|
|
135
|
-
return new FSharpResult$2(0, [new ProcessInput(0, [matchValue.fields[0]])]);
|
|
136
|
-
}
|
|
137
|
-
},
|
|
138
|
-
};
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
export function ProcessInput_fromJsonString(s) {
|
|
142
|
-
const matchValue = fromString(ProcessInput_decoder(ConverterOptions_$ctor()), s);
|
|
143
|
-
if (matchValue.tag === 1) {
|
|
144
|
-
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
145
|
-
}
|
|
146
|
-
else {
|
|
147
|
-
return matchValue.fields[0];
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
export function ProcessInput_toJsonString(m) {
|
|
152
|
-
return toString(2, ProcessInput_encoder(ConverterOptions_$ctor(), m));
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
export function ProcessInput_toJsonldString(m) {
|
|
156
|
-
let returnVal;
|
|
157
|
-
return toString(2, ProcessInput_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), m));
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
export function ProcessInput_toJsonldStringWithContext(a) {
|
|
161
|
-
let returnVal;
|
|
162
|
-
return toString(2, ProcessInput_encoder((returnVal = ConverterOptions_$ctor(), (((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), ConverterOptions__set_IncludeContext_Z1FBCCD16(returnVal, true)), returnVal)), a));
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
export function ProcessOutput_encoder(options, value) {
|
|
166
|
-
switch (value.tag) {
|
|
167
|
-
case 1:
|
|
168
|
-
return Data_encoder(options, value.fields[0]);
|
|
169
|
-
case 2:
|
|
170
|
-
return Material_encoder(options, value.fields[0]);
|
|
171
|
-
default:
|
|
172
|
-
return Sample_encoder(options, value.fields[0]);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
export function ProcessOutput_decoder(options) {
|
|
177
|
-
return {
|
|
178
|
-
Decode(s, json) {
|
|
179
|
-
const matchValue = Sample_decoder(options).Decode(s, json);
|
|
180
|
-
if (matchValue.tag === 1) {
|
|
181
|
-
const matchValue_1 = Data_decoder(options).Decode(s, json);
|
|
182
|
-
if (matchValue_1.tag === 1) {
|
|
183
|
-
const matchValue_2 = Material_decoder(options).Decode(s, json);
|
|
184
|
-
return (matchValue_2.tag === 1) ? (new FSharpResult$2(1, [matchValue_2.fields[0]])) : (new FSharpResult$2(0, [new ProcessOutput(2, [matchValue_2.fields[0]])]));
|
|
185
|
-
}
|
|
186
|
-
else {
|
|
187
|
-
return new FSharpResult$2(0, [new ProcessOutput(1, [matchValue_1.fields[0]])]);
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
else {
|
|
191
|
-
return new FSharpResult$2(0, [new ProcessOutput(0, [matchValue.fields[0]])]);
|
|
192
|
-
}
|
|
193
|
-
},
|
|
194
|
-
};
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
export function ProcessOutput_fromJsonString(s) {
|
|
198
|
-
const matchValue = fromString(ProcessOutput_decoder(ConverterOptions_$ctor()), s);
|
|
199
|
-
if (matchValue.tag === 1) {
|
|
200
|
-
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
201
|
-
}
|
|
202
|
-
else {
|
|
203
|
-
return matchValue.fields[0];
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
export function ProcessOutput_toJsonString(m) {
|
|
208
|
-
return toString(2, ProcessOutput_encoder(ConverterOptions_$ctor(), m));
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
export function ProcessOutput_toJsonldStringWithContext(a) {
|
|
212
|
-
let returnVal;
|
|
213
|
-
return toString(2, ProcessOutput_encoder((returnVal = ConverterOptions_$ctor(), (((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), ConverterOptions__set_IncludeContext_Z1FBCCD16(returnVal, true)), returnVal)), a));
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
export function Process_genID(p) {
|
|
217
|
-
const matchValue = p.ID;
|
|
218
|
-
if (matchValue == null) {
|
|
219
|
-
const matchValue_1 = p.Name;
|
|
220
|
-
if (matchValue_1 == null) {
|
|
221
|
-
return "#EmptyProcess";
|
|
222
|
-
}
|
|
223
|
-
else {
|
|
224
|
-
return "#Process_" + replace(matchValue_1, " ", "_");
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
else {
|
|
228
|
-
return URIModule_toString(matchValue);
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
export function Process_encoder(options, studyName, assayName, oa) {
|
|
233
|
-
return new Json(5, [choose((tupledArg) => {
|
|
234
|
-
const v = tupledArg[1];
|
|
235
|
-
if (equals(v, new Json(3, []))) {
|
|
236
|
-
return void 0;
|
|
237
|
-
}
|
|
238
|
-
else {
|
|
239
|
-
return [tupledArg[0], v];
|
|
240
|
-
}
|
|
241
|
-
}, toList(delay(() => append(ConverterOptions__get_SetID(options) ? singleton(["@id", new Json(0, [Process_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, ["Process"]), new Json(0, ["ArcProcess"])]))]) : empty(), delay(() => append(singleton(tryInclude("name", (value_5) => (new Json(0, [value_5])), oa.Name)), delay(() => append(singleton(tryInclude("executesProtocol", (oa_1) => Protocol_encoder(options, studyName, assayName, oa.Name, oa_1), oa.ExecutesProtocol)), delay(() => append(singleton(tryIncludeList("parameterValues", (oa_2) => ProcessParameterValue_encoder(options, oa_2), oa.ParameterValues)), delay(() => append(singleton(tryInclude("performer", (value_7) => (new Json(0, [value_7])), oa.Performer)), delay(() => append(singleton(tryInclude("date", (value_9) => (new Json(0, [value_9])), oa.Date)), delay(() => append(singleton(tryInclude("previousProcess", (oa_3) => Process_encoder(options, studyName, assayName, oa_3), oa.PreviousProcess)), delay(() => append(singleton(tryInclude("nextProcess", (oa_4) => Process_encoder(options, studyName, assayName, oa_4), oa.NextProcess)), delay(() => append(singleton(tryIncludeList("inputs", (value_11) => ProcessInput_encoder(options, value_11), oa.Inputs)), delay(() => append(singleton(tryIncludeList("outputs", (value_12) => ProcessOutput_encoder(options, value_12), oa.Outputs)), delay(() => append(singleton(tryIncludeList("comments", (comment) => encoder(options, comment), oa.Comments)), delay(() => (ConverterOptions__get_IncludeContext(options) ? singleton(["@context", context_jsonvalue_1]) : empty()))))))))))))))))))))))))))))]);
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
export function Process_decoder(options) {
|
|
245
|
-
return object((get$) => {
|
|
246
|
-
let objectArg, objectArg_1, arg_5, objectArg_2, arg_7, objectArg_3, objectArg_4, objectArg_5, arg_13, objectArg_6, arg_15, objectArg_7, arg_17, objectArg_8, arg_19, objectArg_9, arg_21, objectArg_10;
|
|
247
|
-
return new Process((objectArg = get$.Optional, objectArg.Field("@id", uri)), (objectArg_1 = get$.Optional, objectArg_1.Field("name", string)), (arg_5 = Protocol_decoder(options), (objectArg_2 = get$.Optional, objectArg_2.Field("executesProtocol", arg_5))), (arg_7 = list_2(ProcessParameterValue_decoder(options)), (objectArg_3 = get$.Optional, objectArg_3.Field("parameterValues", arg_7))), (objectArg_4 = get$.Optional, objectArg_4.Field("performer", string)), (objectArg_5 = get$.Optional, objectArg_5.Field("date", string)), (arg_13 = Process_decoder(options), (objectArg_6 = get$.Optional, objectArg_6.Field("previousProcess", arg_13))), (arg_15 = Process_decoder(options), (objectArg_7 = get$.Optional, objectArg_7.Field("nextProcess", arg_15))), (arg_17 = list_2(ProcessInput_decoder(options)), (objectArg_8 = get$.Optional, objectArg_8.Field("inputs", arg_17))), (arg_19 = list_2(ProcessOutput_decoder(options)), (objectArg_9 = get$.Optional, objectArg_9.Field("outputs", arg_19))), (arg_21 = list_2(decoder_1(options)), (objectArg_10 = get$.Optional, objectArg_10.Field("comments", arg_21))));
|
|
248
|
-
});
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
export function Process_fromJsonString(s) {
|
|
252
|
-
const matchValue = fromString(Process_decoder(ConverterOptions_$ctor()), s);
|
|
253
|
-
if (matchValue.tag === 1) {
|
|
254
|
-
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
255
|
-
}
|
|
256
|
-
else {
|
|
257
|
-
return matchValue.fields[0];
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
export function Process_toJsonString(p) {
|
|
262
|
-
return toString(2, Process_encoder(ConverterOptions_$ctor(), void 0, void 0, p));
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
/**
|
|
266
|
-
* exports in json-ld format
|
|
267
|
-
*/
|
|
268
|
-
export function Process_toJsonldString(p) {
|
|
269
|
-
let returnVal;
|
|
270
|
-
return toString(2, Process_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), void 0, void 0, p));
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
export function Process_toJsonldStringWithContext(a) {
|
|
274
|
-
let returnVal;
|
|
275
|
-
return toString(2, Process_encoder((returnVal = ConverterOptions_$ctor(), (((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), ConverterOptions__set_IncludeContext_Z1FBCCD16(returnVal, true)), returnVal)), void 0, void 0, a));
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
export function ProcessSequence_fromJsonString(s) {
|
|
279
|
-
const matchValue = fromString(list_2(Process_decoder(ConverterOptions_$ctor())), s);
|
|
280
|
-
if (matchValue.tag === 1) {
|
|
281
|
-
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
282
|
-
}
|
|
283
|
-
else {
|
|
284
|
-
return matchValue.fields[0];
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
export function ProcessSequence_toJsonString(p) {
|
|
289
|
-
let options;
|
|
290
|
-
return toString(2, list_1(map((options = ConverterOptions_$ctor(), (oa) => Process_encoder(options, void 0, void 0, oa)), p)));
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
/**
|
|
294
|
-
* exports in json-ld format
|
|
295
|
-
*/
|
|
296
|
-
export function ProcessSequence_toJsonldString(p) {
|
|
297
|
-
let options, returnVal;
|
|
298
|
-
return toString(2, list_1(map((options = ((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal))), (oa) => Process_encoder(options, void 0, void 0, oa)), p)));
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
export function ProcessSequence_toJsonldStringWithContext(p) {
|
|
302
|
-
let options, returnVal;
|
|
303
|
-
return toString(2, list_1(map((options = ((returnVal = ConverterOptions_$ctor(), (((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), ConverterOptions__set_IncludeContext_Z1FBCCD16(returnVal, true)), returnVal))), (oa) => Process_encoder(options, void 0, void 0, oa)), p)));
|
|
304
|
-
}
|
|
305
|
-
|
package/ISA/ISA.Json/Protocol.js
DELETED
|
@@ -1,281 +0,0 @@
|
|
|
1
|
-
import { value as value_13 } from "../../fable_modules/fable-library-js.4.13.0/Option.js";
|
|
2
|
-
import { URIModule_toString } from "../ISA/JsonTypes/URI.js";
|
|
3
|
-
import { ofArray, choose } from "../../fable_modules/fable-library-js.4.13.0/List.js";
|
|
4
|
-
import { equals } from "../../fable_modules/fable-library-js.4.13.0/Util.js";
|
|
5
|
-
import { Json } from "../../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
|
|
6
|
-
import { empty, singleton, append, delay, toList } from "../../fable_modules/fable-library-js.4.13.0/Seq.js";
|
|
7
|
-
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";
|
|
8
|
-
import { tryIncludeList, tryInclude } from "./GEncode.js";
|
|
9
|
-
import { list as list_1 } from "../../fable_modules/Thoth.Json.Core.0.2.1/Encode.fs.js";
|
|
10
|
-
import { OntologyAnnotation_decoder, OntologyAnnotation_encoder } from "./Ontology.js";
|
|
11
|
-
import { context_jsonvalue } from "./context/rocrate/isa_protocol_parameter_context.js";
|
|
12
|
-
import { list as list_2, string, object } from "../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
13
|
-
import { uri } from "./Decode.js";
|
|
14
|
-
import { ProtocolParameter } from "../ISA/JsonTypes/ProtocolParameter.js";
|
|
15
|
-
import { fromString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
|
|
16
|
-
import { replace, printf, toText } from "../../fable_modules/fable-library-js.4.13.0/String.js";
|
|
17
|
-
import { toString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
|
|
18
|
-
import { context_jsonvalue as context_jsonvalue_1 } from "./context/rocrate/isa_component_context.js";
|
|
19
|
-
import { Result_Map } from "../../fable_modules/fable-library-js.4.13.0/Result.js";
|
|
20
|
-
import { Component, Component_decomposeName_Z721C83C5 } from "../ISA/JsonTypes/Component.js";
|
|
21
|
-
import { decoder as decoder_1, encoder } from "./Comment.js";
|
|
22
|
-
import { context_jsonvalue as context_jsonvalue_2 } from "./context/rocrate/isa_protocol_context.js";
|
|
23
|
-
import { Protocol } from "../ISA/JsonTypes/Protocol.js";
|
|
24
|
-
|
|
25
|
-
export function ProtocolParameter_genID(pp) {
|
|
26
|
-
const matchValue = pp.ID;
|
|
27
|
-
if (matchValue == null) {
|
|
28
|
-
const matchValue_1 = pp.ParameterName;
|
|
29
|
-
let matchResult, n_1;
|
|
30
|
-
if (matchValue_1 != null) {
|
|
31
|
-
if (!(matchValue_1.ID == null)) {
|
|
32
|
-
matchResult = 0;
|
|
33
|
-
n_1 = matchValue_1;
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
matchResult = 1;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
matchResult = 1;
|
|
41
|
-
}
|
|
42
|
-
switch (matchResult) {
|
|
43
|
-
case 0:
|
|
44
|
-
return "#Param_" + value_13(n_1.ID);
|
|
45
|
-
default:
|
|
46
|
-
return "#EmptyProtocolParameter";
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
return URIModule_toString(matchValue);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export function ProtocolParameter_encoder(options, oa) {
|
|
55
|
-
return new Json(5, [choose((tupledArg) => {
|
|
56
|
-
const v = tupledArg[1];
|
|
57
|
-
if (equals(v, new Json(3, []))) {
|
|
58
|
-
return void 0;
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
return [tupledArg[0], v];
|
|
62
|
-
}
|
|
63
|
-
}, toList(delay(() => append(ConverterOptions__get_SetID(options) ? singleton(["@id", new Json(0, [ProtocolParameter_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, ["ProtocolParameter"]), new Json(0, ["ArcProtocolParameter"])]))]) : empty(), delay(() => append(singleton(tryInclude("parameterName", (oa_1) => OntologyAnnotation_encoder(options, oa_1), oa.ParameterName)), delay(() => (ConverterOptions__get_IncludeContext(options) ? singleton(["@context", context_jsonvalue]) : empty()))))))))))]);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export function ProtocolParameter_decoder(options) {
|
|
67
|
-
return object((get$) => {
|
|
68
|
-
let objectArg, arg_3, objectArg_1;
|
|
69
|
-
return new ProtocolParameter((objectArg = get$.Optional, objectArg.Field("@id", uri)), (arg_3 = OntologyAnnotation_decoder(options), (objectArg_1 = get$.Optional, objectArg_1.Field("parameterName", arg_3))));
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export function ProtocolParameter_fromJsonString(s) {
|
|
74
|
-
const matchValue = fromString(ProtocolParameter_decoder(ConverterOptions_$ctor()), s);
|
|
75
|
-
if (matchValue.tag === 1) {
|
|
76
|
-
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
79
|
-
return matchValue.fields[0];
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export function ProtocolParameter_toString(p) {
|
|
84
|
-
return toString(2, ProtocolParameter_encoder(ConverterOptions_$ctor(), p));
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* exports in json-ld format
|
|
89
|
-
*/
|
|
90
|
-
export function ProtocolParameter_toJsonldString(p) {
|
|
91
|
-
let returnVal;
|
|
92
|
-
return toString(2, ProtocolParameter_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), p));
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export function ProtocolParameter_toJsonldStringWithContext(a) {
|
|
96
|
-
let returnVal;
|
|
97
|
-
return toString(2, ProtocolParameter_encoder((returnVal = ConverterOptions_$ctor(), (((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), ConverterOptions__set_IncludeContext_Z1FBCCD16(returnVal, true)), returnVal)), a));
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
export function Component_genID(c) {
|
|
101
|
-
const matchValue = c.ComponentName;
|
|
102
|
-
if (matchValue == null) {
|
|
103
|
-
return "#EmptyComponent";
|
|
104
|
-
}
|
|
105
|
-
else {
|
|
106
|
-
return "#Component_" + replace(matchValue, " ", "_");
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
export function Component_encoder(options, oa) {
|
|
111
|
-
return new Json(5, [choose((tupledArg) => {
|
|
112
|
-
const v = tupledArg[1];
|
|
113
|
-
if (equals(v, new Json(3, []))) {
|
|
114
|
-
return void 0;
|
|
115
|
-
}
|
|
116
|
-
else {
|
|
117
|
-
return [tupledArg[0], v];
|
|
118
|
-
}
|
|
119
|
-
}, toList(delay(() => append(ConverterOptions__get_SetID(options) ? singleton(["@id", new Json(0, [Component_genID(oa)])]) : empty(), delay(() => append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", list_1(ofArray([new Json(0, ["Component"]), new Json(0, ["ArcComponent"])]))]) : empty(), delay(() => append(singleton(tryInclude("componentName", (value_3) => (new Json(0, [value_3])), oa.ComponentName)), delay(() => append(singleton(tryInclude("componentType", (oa_1) => OntologyAnnotation_encoder(options, oa_1), oa.ComponentType)), delay(() => (ConverterOptions__get_IncludeContext(options) ? singleton(["@context", context_jsonvalue_1]) : empty()))))))))))))]);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
export function Component_decoder(options) {
|
|
123
|
-
return {
|
|
124
|
-
Decode(s, json) {
|
|
125
|
-
return Result_Map((c) => {
|
|
126
|
-
let patternInput;
|
|
127
|
-
const matchValue = c.ComponentName;
|
|
128
|
-
if (matchValue == null) {
|
|
129
|
-
patternInput = [void 0, void 0];
|
|
130
|
-
}
|
|
131
|
-
else {
|
|
132
|
-
const tupledArg = Component_decomposeName_Z721C83C5(matchValue);
|
|
133
|
-
patternInput = [tupledArg[0], tupledArg[1]];
|
|
134
|
-
}
|
|
135
|
-
return new Component(c.ComponentName, patternInput[0], patternInput[1], c.ComponentType);
|
|
136
|
-
}, object((get$) => {
|
|
137
|
-
let objectArg, arg_3, objectArg_1;
|
|
138
|
-
return new Component((objectArg = get$.Optional, objectArg.Field("componentName", uri)), void 0, void 0, (arg_3 = OntologyAnnotation_decoder(options), (objectArg_1 = get$.Optional, objectArg_1.Field("componentType", arg_3))));
|
|
139
|
-
}).Decode(s, json));
|
|
140
|
-
},
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
export function Component_fromJsonString(s) {
|
|
145
|
-
const matchValue = fromString(Component_decoder(ConverterOptions_$ctor()), s);
|
|
146
|
-
if (matchValue.tag === 1) {
|
|
147
|
-
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
148
|
-
}
|
|
149
|
-
else {
|
|
150
|
-
return matchValue.fields[0];
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
export function Component_toJsonString(p) {
|
|
155
|
-
return toString(2, Component_encoder(ConverterOptions_$ctor(), p));
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* exports in json-ld format
|
|
160
|
-
*/
|
|
161
|
-
export function Component_toJsonldString(p) {
|
|
162
|
-
let returnVal;
|
|
163
|
-
return toString(2, Component_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), p));
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
export function Component_toJsonldStringWithContext(a) {
|
|
167
|
-
let returnVal;
|
|
168
|
-
return toString(2, Component_encoder((returnVal = ConverterOptions_$ctor(), (((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), ConverterOptions__set_IncludeContext_Z1FBCCD16(returnVal, true)), returnVal)), a));
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
export function Protocol_genID(studyName, assayName, processName, p) {
|
|
172
|
-
const matchValue = p.ID;
|
|
173
|
-
if (matchValue == null) {
|
|
174
|
-
const matchValue_1 = p.Uri;
|
|
175
|
-
if (matchValue_1 == null) {
|
|
176
|
-
const matchValue_2 = p.Name;
|
|
177
|
-
if (matchValue_2 == null) {
|
|
178
|
-
let matchResult, an, pn, sn, pn_1, sn_1, pn_2;
|
|
179
|
-
if (studyName == null) {
|
|
180
|
-
if (assayName == null) {
|
|
181
|
-
if (processName != null) {
|
|
182
|
-
matchResult = 2;
|
|
183
|
-
pn_2 = processName;
|
|
184
|
-
}
|
|
185
|
-
else {
|
|
186
|
-
matchResult = 3;
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
else {
|
|
190
|
-
matchResult = 3;
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
else if (assayName == null) {
|
|
194
|
-
if (processName != null) {
|
|
195
|
-
matchResult = 1;
|
|
196
|
-
pn_1 = processName;
|
|
197
|
-
sn_1 = studyName;
|
|
198
|
-
}
|
|
199
|
-
else {
|
|
200
|
-
matchResult = 3;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
else if (processName != null) {
|
|
204
|
-
matchResult = 0;
|
|
205
|
-
an = assayName;
|
|
206
|
-
pn = processName;
|
|
207
|
-
sn = studyName;
|
|
208
|
-
}
|
|
209
|
-
else {
|
|
210
|
-
matchResult = 3;
|
|
211
|
-
}
|
|
212
|
-
switch (matchResult) {
|
|
213
|
-
case 0:
|
|
214
|
-
return (((("#Protocol_" + replace(sn, " ", "_")) + "_") + replace(an, " ", "_")) + "_") + replace(pn, " ", "_");
|
|
215
|
-
case 1:
|
|
216
|
-
return (("#Protocol_" + replace(sn_1, " ", "_")) + "_") + replace(pn_1, " ", "_");
|
|
217
|
-
case 2:
|
|
218
|
-
return "#Protocol_" + replace(pn_2, " ", "_");
|
|
219
|
-
default:
|
|
220
|
-
return "#EmptyProtocol";
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
else {
|
|
224
|
-
return "#Protocol_" + replace(matchValue_2, " ", "_");
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
else {
|
|
228
|
-
return matchValue_1;
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
else {
|
|
232
|
-
return URIModule_toString(matchValue);
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
export function Protocol_encoder(options, studyName, assayName, processName, oa) {
|
|
237
|
-
return new Json(5, [choose((tupledArg) => {
|
|
238
|
-
const v = tupledArg[1];
|
|
239
|
-
if (equals(v, new Json(3, []))) {
|
|
240
|
-
return void 0;
|
|
241
|
-
}
|
|
242
|
-
else {
|
|
243
|
-
return [tupledArg[0], v];
|
|
244
|
-
}
|
|
245
|
-
}, toList(delay(() => append(ConverterOptions__get_SetID(options) ? singleton(["@id", new Json(0, [Protocol_genID(studyName, assayName, processName, 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, ["Protocol"]), new Json(0, ["ArcProtocol"])]))]) : empty(), delay(() => append(singleton(tryInclude("name", (value_5) => (new Json(0, [value_5])), oa.Name)), delay(() => append(singleton(tryInclude("protocolType", (oa_1) => OntologyAnnotation_encoder(options, oa_1), oa.ProtocolType)), delay(() => append(singleton(tryInclude("description", (value_7) => (new Json(0, [value_7])), oa.Description)), delay(() => append(singleton(tryInclude("uri", (value_9) => (new Json(0, [value_9])), oa.Uri)), delay(() => append(singleton(tryInclude("version", (value_11) => (new Json(0, [value_11])), oa.Version)), delay(() => append(singleton(tryIncludeList("parameters", (oa_2) => ProtocolParameter_encoder(options, oa_2), oa.Parameters)), delay(() => append(singleton(tryIncludeList("components", (oa_3) => Component_encoder(options, oa_3), oa.Components)), delay(() => append(singleton(tryIncludeList("comments", (comment) => encoder(options, comment), oa.Comments)), delay(() => (ConverterOptions__get_IncludeContext(options) ? singleton(["@context", context_jsonvalue_2]) : empty()))))))))))))))))))))))))]);
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
export function Protocol_decoder(options) {
|
|
249
|
-
return object((get$) => {
|
|
250
|
-
let objectArg, objectArg_1, arg_5, objectArg_2, objectArg_3, objectArg_4, objectArg_5, arg_13, objectArg_6, arg_15, objectArg_7, arg_17, objectArg_8;
|
|
251
|
-
return new Protocol((objectArg = get$.Optional, objectArg.Field("@id", uri)), (objectArg_1 = get$.Optional, objectArg_1.Field("name", string)), (arg_5 = OntologyAnnotation_decoder(options), (objectArg_2 = get$.Optional, objectArg_2.Field("protocolType", arg_5))), (objectArg_3 = get$.Optional, objectArg_3.Field("description", string)), (objectArg_4 = get$.Optional, objectArg_4.Field("uri", uri)), (objectArg_5 = get$.Optional, objectArg_5.Field("version", string)), (arg_13 = list_2(ProtocolParameter_decoder(options)), (objectArg_6 = get$.Optional, objectArg_6.Field("parameters", arg_13))), (arg_15 = list_2(Component_decoder(options)), (objectArg_7 = get$.Optional, objectArg_7.Field("components", arg_15))), (arg_17 = list_2(decoder_1(options)), (objectArg_8 = get$.Optional, objectArg_8.Field("comments", arg_17))));
|
|
252
|
-
});
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
export function Protocol_fromJsonString(s) {
|
|
256
|
-
const matchValue = fromString(Protocol_decoder(ConverterOptions_$ctor()), s);
|
|
257
|
-
if (matchValue.tag === 1) {
|
|
258
|
-
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
259
|
-
}
|
|
260
|
-
else {
|
|
261
|
-
return matchValue.fields[0];
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
export function Protocol_toJsonString(p) {
|
|
266
|
-
return toString(2, Protocol_encoder(ConverterOptions_$ctor(), void 0, void 0, void 0, p));
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
/**
|
|
270
|
-
* exports in json-ld format
|
|
271
|
-
*/
|
|
272
|
-
export function Protocol_toJsonldString(p) {
|
|
273
|
-
let returnVal;
|
|
274
|
-
return toString(2, Protocol_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), void 0, void 0, void 0, p));
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
export function Protocol_toJsonldStringWithContext(a) {
|
|
278
|
-
let returnVal;
|
|
279
|
-
return toString(2, Protocol_encoder((returnVal = ConverterOptions_$ctor(), (((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), ConverterOptions__set_IncludeContext_Z1FBCCD16(returnVal, true)), returnVal)), void 0, void 0, void 0, a));
|
|
280
|
-
}
|
|
281
|
-
|