@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,142 @@
|
|
|
1
|
+
import { ofArray, 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, tryIncludeSeq, tryInclude } from "./Encode.js";
|
|
5
|
+
import { OntologyAnnotation_ROCrate_decoderDefinedTerm, OntologyAnnotation_ROCrate_encoderDefinedTerm, OntologyAnnotation_decoder, OntologyAnnotation_encoder } from "./OntologyAnnotation.js";
|
|
6
|
+
import { Comment_ISAJson_encoder, Comment_ROCrate_decoderDisambiguatingDescription, Comment_ROCrate_encoderDisambiguatingDescription, Comment_decoder, Comment_encoder } from "./Comment.js";
|
|
7
|
+
import { string, object } from "../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
8
|
+
import { Publication } from "../Core/Publication.js";
|
|
9
|
+
import { unwrap } from "../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
10
|
+
import { Decode_noAdditionalProperties, Decode_resizeArray, Decode_uri } from "./Decode.js";
|
|
11
|
+
import { printf, toText, replace } from "../fable_modules/fable-library-js.4.16.0/String.js";
|
|
12
|
+
import { Person_ROCrate_decodeAuthorListString, Person_ROCrate_encodeAuthorListString } from "./Person.js";
|
|
13
|
+
import { context_jsonvalue } from "./context/rocrate/isa_publication_context.js";
|
|
14
|
+
import { fromString } from "../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
|
|
15
|
+
import { toString } from "../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
|
|
16
|
+
|
|
17
|
+
export function Publication_encoder(oa) {
|
|
18
|
+
return new Json(5, [choose((tupledArg) => {
|
|
19
|
+
const v = tupledArg[1];
|
|
20
|
+
if (equals(v, new Json(3, []))) {
|
|
21
|
+
return void 0;
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
return [tupledArg[0], v];
|
|
25
|
+
}
|
|
26
|
+
}, ofArray([tryInclude("pubMedID", (value) => (new Json(0, [value])), oa.PubMedID), tryInclude("doi", (value_2) => (new Json(0, [value_2])), oa.DOI), tryInclude("authorList", (value_4) => (new Json(0, [value_4])), oa.Authors), tryInclude("title", (value_6) => (new Json(0, [value_6])), oa.Title), tryInclude("status", OntologyAnnotation_encoder, oa.Status), tryIncludeSeq("comments", Comment_encoder, oa.Comments)]))]);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export const Publication_decoder = object((get$) => {
|
|
30
|
+
let objectArg, objectArg_1, objectArg_2, objectArg_3, objectArg_4, arg_11, objectArg_5;
|
|
31
|
+
return new Publication(unwrap((objectArg = get$.Optional, objectArg.Field("pubMedID", Decode_uri))), unwrap((objectArg_1 = get$.Optional, objectArg_1.Field("doi", string))), unwrap((objectArg_2 = get$.Optional, objectArg_2.Field("authorList", string))), unwrap((objectArg_3 = get$.Optional, objectArg_3.Field("title", string))), unwrap((objectArg_4 = get$.Optional, objectArg_4.Field("status", OntologyAnnotation_decoder))), unwrap((arg_11 = Decode_resizeArray(Comment_decoder), (objectArg_5 = get$.Optional, objectArg_5.Field("comments", arg_11)))));
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
export function Publication_ROCrate_genID(p) {
|
|
35
|
+
const matchValue = p.DOI;
|
|
36
|
+
if (matchValue == null) {
|
|
37
|
+
const matchValue_1 = p.PubMedID;
|
|
38
|
+
if (matchValue_1 == null) {
|
|
39
|
+
const matchValue_2 = p.Title;
|
|
40
|
+
if (matchValue_2 == null) {
|
|
41
|
+
return "#EmptyPublication";
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
return "#Pub_" + replace(matchValue_2, " ", "_");
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
return matchValue_1;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
return matchValue;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function Publication_ROCrate_encoder(oa) {
|
|
57
|
+
return new Json(5, [choose((tupledArg) => {
|
|
58
|
+
const v = tupledArg[1];
|
|
59
|
+
if (equals(v, new Json(3, []))) {
|
|
60
|
+
return void 0;
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
return [tupledArg[0], v];
|
|
64
|
+
}
|
|
65
|
+
}, ofArray([["@id", new Json(0, [Publication_ROCrate_genID(oa)])], ["@type", new Json(0, ["Publication"])], tryInclude("pubMedID", (value_2) => (new Json(0, [value_2])), oa.PubMedID), tryInclude("doi", (value_4) => (new Json(0, [value_4])), oa.DOI), tryInclude("authorList", Person_ROCrate_encodeAuthorListString, oa.Authors), tryInclude("title", (value_6) => (new Json(0, [value_6])), oa.Title), tryInclude("status", OntologyAnnotation_ROCrate_encoderDefinedTerm, oa.Status), tryIncludeSeq("comments", Comment_ROCrate_encoderDisambiguatingDescription, oa.Comments), ["@context", context_jsonvalue]]))]);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export const Publication_ROCrate_decoder = object((get$) => {
|
|
69
|
+
let objectArg, objectArg_1, objectArg_2, objectArg_3, objectArg_4, arg_11, objectArg_5;
|
|
70
|
+
return new Publication(unwrap((objectArg = get$.Optional, objectArg.Field("pubMedID", Decode_uri))), unwrap((objectArg_1 = get$.Optional, objectArg_1.Field("doi", string))), unwrap((objectArg_2 = get$.Optional, objectArg_2.Field("authorList", Person_ROCrate_decodeAuthorListString))), unwrap((objectArg_3 = get$.Optional, objectArg_3.Field("title", string))), unwrap((objectArg_4 = get$.Optional, objectArg_4.Field("status", OntologyAnnotation_ROCrate_decoderDefinedTerm))), unwrap((arg_11 = Decode_resizeArray(Comment_ROCrate_decoderDisambiguatingDescription), (objectArg_5 = get$.Optional, objectArg_5.Field("comments", arg_11)))));
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
export function Publication_ISAJson_encoder(oa) {
|
|
74
|
+
return new Json(5, [choose((tupledArg) => {
|
|
75
|
+
const v = tupledArg[1];
|
|
76
|
+
if (equals(v, new Json(3, []))) {
|
|
77
|
+
return void 0;
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
return [tupledArg[0], v];
|
|
81
|
+
}
|
|
82
|
+
}, ofArray([tryInclude("pubMedID", (value) => (new Json(0, [value])), oa.PubMedID), tryInclude("doi", (value_2) => (new Json(0, [value_2])), oa.DOI), tryInclude("authorList", (value_4) => (new Json(0, [value_4])), oa.Authors), tryInclude("title", (value_6) => (new Json(0, [value_6])), oa.Title), tryInclude("status", OntologyAnnotation_encoder, oa.Status), tryIncludeSeq("comments", Comment_ISAJson_encoder, oa.Comments)]))]);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export const Publication_ISAJson_allowedFields = ofArray(["pubMedID", "doi", "authorList", "title", "status", "comments"]);
|
|
86
|
+
|
|
87
|
+
export const Publication_ISAJson_decoder = Decode_noAdditionalProperties(Publication_ISAJson_allowedFields, Publication_decoder);
|
|
88
|
+
|
|
89
|
+
export function ARCtrl_Publication__Publication_fromJsonString_Static_Z721C83C5(s) {
|
|
90
|
+
const matchValue = fromString(Publication_decoder, s);
|
|
91
|
+
if (matchValue.tag === 1) {
|
|
92
|
+
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
return matchValue.fields[0];
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export function ARCtrl_Publication__Publication_toJsonString_Static_71136F3F(spaces) {
|
|
100
|
+
return (obj) => {
|
|
101
|
+
const value = Publication_encoder(obj);
|
|
102
|
+
return toString(defaultSpaces(spaces), value);
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export function ARCtrl_Publication__Publication_fromROCrateJsonString_Static_Z721C83C5(s) {
|
|
107
|
+
const matchValue = fromString(Publication_ROCrate_decoder, s);
|
|
108
|
+
if (matchValue.tag === 1) {
|
|
109
|
+
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
return matchValue.fields[0];
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* exports in json-ld format
|
|
118
|
+
*/
|
|
119
|
+
export function ARCtrl_Publication__Publication_toROCrateJsonString_Static_71136F3F(spaces) {
|
|
120
|
+
return (obj) => {
|
|
121
|
+
const value = Publication_ROCrate_encoder(obj);
|
|
122
|
+
return toString(defaultSpaces(spaces), value);
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export function ARCtrl_Publication__Publication_toISAJsonString_Static_71136F3F(spaces) {
|
|
127
|
+
return (obj) => {
|
|
128
|
+
const value = Publication_ISAJson_encoder(obj);
|
|
129
|
+
return toString(defaultSpaces(spaces), value);
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export function ARCtrl_Publication__Publication_fromISAJsonString_Static_Z721C83C5(s) {
|
|
134
|
+
const matchValue = fromString(Publication_ISAJson_decoder, s);
|
|
135
|
+
if (matchValue.tag === 1) {
|
|
136
|
+
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
return matchValue.fields[0];
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { item, map, setItem, fill } from "../fable_modules/fable-library-js.4.16.0/Array.js";
|
|
2
|
+
import { iterate } from "../fable_modules/fable-library-js.4.16.0/Seq.js";
|
|
3
|
+
import { Json } from "../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
|
|
4
|
+
import { int, string, array as array_1 } from "../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
5
|
+
import { Dictionary_tryFind } from "../Core/Helper/Collections.js";
|
|
6
|
+
import { addToDict } from "../fable_modules/fable-library-js.4.16.0/MapUtil.js";
|
|
7
|
+
import { FSharpResult$2 } from "../fable_modules/fable-library-js.4.16.0/Result.js";
|
|
8
|
+
|
|
9
|
+
export function arrayFromMap(otm) {
|
|
10
|
+
const a = fill(new Array(otm.size), 0, otm.size, "");
|
|
11
|
+
iterate((kv) => {
|
|
12
|
+
setItem(a, kv[1], kv[0]);
|
|
13
|
+
}, otm);
|
|
14
|
+
return a;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function encoder(ot) {
|
|
18
|
+
return new Json(6, [map((value) => (new Json(0, [value])), ot)]);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const decoder = array_1(string);
|
|
22
|
+
|
|
23
|
+
export function encodeString(otm, s) {
|
|
24
|
+
const matchValue = Dictionary_tryFind(s, otm);
|
|
25
|
+
if (matchValue == null) {
|
|
26
|
+
const i_1 = otm.size | 0;
|
|
27
|
+
addToDict(otm, s, i_1);
|
|
28
|
+
return new Json(7, [i_1 >>> 0]);
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
const i = matchValue | 0;
|
|
32
|
+
return new Json(7, [i >>> 0]);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function decodeString(ot) {
|
|
37
|
+
return {
|
|
38
|
+
Decode(s, json) {
|
|
39
|
+
const matchValue = int.Decode(s, json);
|
|
40
|
+
return (matchValue.tag === 1) ? (new FSharpResult$2(1, [matchValue.fields[0]])) : (new FSharpResult$2(0, [item(matchValue.fields[0], ot)]));
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
|
package/Json/Study.js
ADDED
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
import { Option_fromValueWithDefault, ResizeArray_map } from "../Core/Helper/Collections.js";
|
|
2
|
+
import { defaultArgWith, map, bind, unwrap, value as value_14, defaultArg } from "../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
3
|
+
import { empty, map as map_1, singleton, ofArray, choose, tryFind } from "../fable_modules/fable-library-js.4.16.0/List.js";
|
|
4
|
+
import { ArcStudy, ArcAssay } from "../Core/ArcTypes.js";
|
|
5
|
+
import { disposeSafe, getEnumerator, equals } from "../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
6
|
+
import { Json } from "../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
|
|
7
|
+
import { defaultSpaces, tryIncludeList, tryIncludeSeq, tryInclude } from "./Encode.js";
|
|
8
|
+
import { Publication_ISAJson_decoder, Publication_ISAJson_encoder, Publication_ROCrate_decoder, Publication_ROCrate_encoder, Publication_decoder, Publication_encoder } from "./Publication.js";
|
|
9
|
+
import { Person_ISAJson_decoder, Person_ISAJson_encoder, Person_ROCrate_decoder, Person_ROCrate_encoder, Person_decoder, Person_encoder } from "./Person.js";
|
|
10
|
+
import { OntologyAnnotation_ISAJson_decoder, OntologyAnnotation_ISAJson_encoder, OntologyAnnotation_ROCrate_decoderDefinedTerm, OntologyAnnotation_ROCrate_encoderDefinedTerm, OntologyAnnotation_decoder, OntologyAnnotation_encoder } from "./OntologyAnnotation.js";
|
|
11
|
+
import { ArcTable_decoderCompressed, ArcTable_encoderCompressed, ArcTable_decoder, ArcTable_encoder } from "./Table/ArcTable.js";
|
|
12
|
+
import { Comment_ISAJson_decoder, Comment_ISAJson_encoder, Comment_ROCrate_decoder, Comment_ROCrate_encoder, Comment_decoder, Comment_encoder } from "./Comment.js";
|
|
13
|
+
import { list as list_2, string, object } from "../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
14
|
+
import { Decode_objectNoAdditionalProperties, Decode_resizeArray } from "./Decode.js";
|
|
15
|
+
import { toFail, printf, toText, replace } from "../fable_modules/fable-library-js.4.16.0/String.js";
|
|
16
|
+
import { Assay_fileNameFromIdentifier, createMissingIdentifier, Study_tryIdentifierFromFileName, Study_tryFileNameFromIdentifier } from "../Core/Helper/Identifier.js";
|
|
17
|
+
import { Person_removeSourceAssayComments, Person_getSourceAssayIdentifiersFromComments, Person_setSourceAssayComment, ARCtrl_ArcTables__ArcTables_fromProcesses_Static_62A3309D, ARCtrl_ArcTables__ArcTables_GetProcesses } from "../Core/Conversion.js";
|
|
18
|
+
import { list as list_1 } from "../fable_modules/Thoth.Json.Core.0.2.1/Encode.fs.js";
|
|
19
|
+
import { Process_ISAJson_decoder, Process_ISAJson_encoder, Process_ROCrate_decoder, Process_ROCrate_encoder } from "./Process/Process.js";
|
|
20
|
+
import { Assay_ISAJson_decoder, Assay_ISAJson_encoder, Assay_ROCrate_decoder, Assay_ROCrate_encoder } from "./Assay.js";
|
|
21
|
+
import { context_jsonvalue } from "./context/rocrate/isa_study_context.js";
|
|
22
|
+
import { getUnits, getCharacteristics, getFactors, getProtocols } from "../Core/Process/ProcessSequence.js";
|
|
23
|
+
import { Protocol_ISAJson_encoder } from "./Process/Protocol.js";
|
|
24
|
+
import { encoder } from "./Process/StudyMaterials.js";
|
|
25
|
+
import { Factor_ISAJson_encoder } from "./Process/Factor.js";
|
|
26
|
+
import { MaterialAttribute_ISAJson_encoder } from "./Process/MaterialAttribute.js";
|
|
27
|
+
import { isEmpty } from "../fable_modules/fable-library-js.4.16.0/Seq.js";
|
|
28
|
+
import { fromString } from "../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
|
|
29
|
+
import { toString } from "../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
|
|
30
|
+
import { encode, decode } from "./Table/Compression.js";
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Get registered assays or get assays from `assays` if IsSome
|
|
34
|
+
*/
|
|
35
|
+
export function Study_Helper_getAssayInformation(assays, study) {
|
|
36
|
+
if (assays != null) {
|
|
37
|
+
return ResizeArray_map((assayId) => defaultArg(tryFind((a) => (a.Identifier === assayId), value_14(assays)), ArcAssay.init(assayId)), study.RegisteredAssayIdentifiers);
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
return study.GetRegisteredAssaysOrIdentifier();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function Study_encoder(study) {
|
|
45
|
+
return new Json(5, [choose((tupledArg) => {
|
|
46
|
+
const v = tupledArg[1];
|
|
47
|
+
if (equals(v, new Json(3, []))) {
|
|
48
|
+
return void 0;
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
return [tupledArg[0], v];
|
|
52
|
+
}
|
|
53
|
+
}, ofArray([["Identifier", new Json(0, [study.Identifier])], tryInclude("Title", (value_1) => (new Json(0, [value_1])), study.Title), tryInclude("Description", (value_3) => (new Json(0, [value_3])), study.Description), tryInclude("SubmissionDate", (value_5) => (new Json(0, [value_5])), study.SubmissionDate), tryInclude("PublicReleaseDate", (value_7) => (new Json(0, [value_7])), study.PublicReleaseDate), tryIncludeSeq("Publications", Publication_encoder, study.Publications), tryIncludeSeq("Contacts", Person_encoder, study.Contacts), tryIncludeSeq("StudyDesignDescriptors", OntologyAnnotation_encoder, study.StudyDesignDescriptors), tryIncludeSeq("Tables", ArcTable_encoder, study.Tables), tryIncludeSeq("RegisteredAssayIdentifiers", (value_9) => (new Json(0, [value_9])), study.RegisteredAssayIdentifiers), tryIncludeSeq("Comments", Comment_encoder, study.Comments)]))]);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export const Study_decoder = object((get$) => {
|
|
57
|
+
let objectArg, objectArg_1, objectArg_2, objectArg_3, objectArg_4, arg_11, objectArg_5, arg_13, objectArg_6, arg_15, objectArg_7, arg_17, objectArg_8, arg_19, objectArg_9, arg_21, objectArg_10;
|
|
58
|
+
return new ArcStudy((objectArg = get$.Required, objectArg.Field("Identifier", string)), unwrap((objectArg_1 = get$.Optional, objectArg_1.Field("Title", string))), unwrap((objectArg_2 = get$.Optional, objectArg_2.Field("Description", string))), unwrap((objectArg_3 = get$.Optional, objectArg_3.Field("SubmissionDate", string))), unwrap((objectArg_4 = get$.Optional, objectArg_4.Field("PublicReleaseDate", string))), unwrap((arg_11 = Decode_resizeArray(Publication_decoder), (objectArg_5 = get$.Optional, objectArg_5.Field("Publications", arg_11)))), unwrap((arg_13 = Decode_resizeArray(Person_decoder), (objectArg_6 = get$.Optional, objectArg_6.Field("Contacts", arg_13)))), unwrap((arg_15 = Decode_resizeArray(OntologyAnnotation_decoder), (objectArg_7 = get$.Optional, objectArg_7.Field("StudyDesignDescriptors", arg_15)))), unwrap((arg_17 = Decode_resizeArray(ArcTable_decoder), (objectArg_8 = get$.Optional, objectArg_8.Field("Tables", arg_17)))), unwrap((arg_19 = Decode_resizeArray(string), (objectArg_9 = get$.Optional, objectArg_9.Field("RegisteredAssayIdentifiers", arg_19)))), unwrap((arg_21 = Decode_resizeArray(Comment_decoder), (objectArg_10 = get$.Optional, objectArg_10.Field("Comments", arg_21)))));
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
export function Study_encoderCompressed(stringTable, oaTable, cellTable, study) {
|
|
62
|
+
return new Json(5, [choose((tupledArg) => {
|
|
63
|
+
const v = tupledArg[1];
|
|
64
|
+
if (equals(v, new Json(3, []))) {
|
|
65
|
+
return void 0;
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
return [tupledArg[0], v];
|
|
69
|
+
}
|
|
70
|
+
}, ofArray([["Identifier", new Json(0, [study.Identifier])], tryInclude("Title", (value_1) => (new Json(0, [value_1])), study.Title), tryInclude("Description", (value_3) => (new Json(0, [value_3])), study.Description), tryInclude("SubmissionDate", (value_5) => (new Json(0, [value_5])), study.SubmissionDate), tryInclude("PublicReleaseDate", (value_7) => (new Json(0, [value_7])), study.PublicReleaseDate), tryIncludeSeq("Publications", Publication_encoder, study.Publications), tryIncludeSeq("Contacts", Person_encoder, study.Contacts), tryIncludeSeq("StudyDesignDescriptors", OntologyAnnotation_encoder, study.StudyDesignDescriptors), tryIncludeSeq("Tables", (table) => ArcTable_encoderCompressed(stringTable, oaTable, cellTable, table), study.Tables), tryIncludeSeq("RegisteredAssayIdentifiers", (value_9) => (new Json(0, [value_9])), study.RegisteredAssayIdentifiers), tryIncludeSeq("Comments", Comment_encoder, study.Comments)]))]);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function Study_decoderCompressed(stringTable, oaTable, cellTable) {
|
|
74
|
+
return object((get$) => {
|
|
75
|
+
let objectArg, objectArg_1, objectArg_2, objectArg_3, objectArg_4, arg_11, objectArg_5, arg_13, objectArg_6, arg_15, objectArg_7, arg_17, objectArg_8, arg_19, objectArg_9, arg_21, objectArg_10;
|
|
76
|
+
return new ArcStudy((objectArg = get$.Required, objectArg.Field("Identifier", string)), unwrap((objectArg_1 = get$.Optional, objectArg_1.Field("Title", string))), unwrap((objectArg_2 = get$.Optional, objectArg_2.Field("Description", string))), unwrap((objectArg_3 = get$.Optional, objectArg_3.Field("SubmissionDate", string))), unwrap((objectArg_4 = get$.Optional, objectArg_4.Field("PublicReleaseDate", string))), unwrap((arg_11 = Decode_resizeArray(Publication_decoder), (objectArg_5 = get$.Optional, objectArg_5.Field("Publications", arg_11)))), unwrap((arg_13 = Decode_resizeArray(Person_decoder), (objectArg_6 = get$.Optional, objectArg_6.Field("Contacts", arg_13)))), unwrap((arg_15 = Decode_resizeArray(OntologyAnnotation_decoder), (objectArg_7 = get$.Optional, objectArg_7.Field("StudyDesignDescriptors", arg_15)))), unwrap((arg_17 = Decode_resizeArray(ArcTable_decoderCompressed(stringTable, oaTable, cellTable)), (objectArg_8 = get$.Optional, objectArg_8.Field("Tables", arg_17)))), unwrap((arg_19 = Decode_resizeArray(string), (objectArg_9 = get$.Optional, objectArg_9.Field("RegisteredAssayIdentifiers", arg_19)))), unwrap((arg_21 = Decode_resizeArray(Comment_decoder), (objectArg_10 = get$.Optional, objectArg_10.Field("Comments", arg_21)))));
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function Study_ROCrate_genID(a) {
|
|
81
|
+
const matchValue = a.Identifier;
|
|
82
|
+
if (matchValue === "") {
|
|
83
|
+
return "#EmptyStudy";
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
return `#study/${replace(matchValue, " ", "_")}`;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function Study_ROCrate_encoder(assays, s) {
|
|
91
|
+
let studyName, studyName_1;
|
|
92
|
+
const fileName = Study_tryFileNameFromIdentifier(s.Identifier);
|
|
93
|
+
const processes = ARCtrl_ArcTables__ArcTables_GetProcesses(s);
|
|
94
|
+
const assays_1 = Study_Helper_getAssayInformation(assays, s);
|
|
95
|
+
return new Json(5, [choose((tupledArg) => {
|
|
96
|
+
const v = tupledArg[1];
|
|
97
|
+
if (equals(v, new Json(3, []))) {
|
|
98
|
+
return void 0;
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
return [tupledArg[0], v];
|
|
102
|
+
}
|
|
103
|
+
}, ofArray([["@id", new Json(0, [Study_ROCrate_genID(s)])], ["@type", list_1(singleton(new Json(0, ["Study"])))], ["additionalType", new Json(0, ["Study"])], ["identifier", new Json(0, [s.Identifier])], tryInclude("filename", (value_4) => (new Json(0, [value_4])), fileName), tryInclude("title", (value_6) => (new Json(0, [value_6])), s.Title), tryInclude("description", (value_8) => (new Json(0, [value_8])), s.Description), tryIncludeSeq("studyDesignDescriptors", OntologyAnnotation_ROCrate_encoderDefinedTerm, s.StudyDesignDescriptors), tryInclude("submissionDate", (value_10) => (new Json(0, [value_10])), s.SubmissionDate), tryInclude("publicReleaseDate", (value_12) => (new Json(0, [value_12])), s.PublicReleaseDate), tryIncludeSeq("publications", Publication_ROCrate_encoder, s.Publications), tryIncludeSeq("people", Person_ROCrate_encoder, s.Contacts), tryIncludeList("processSequence", (studyName = s.Identifier, (oa_3) => Process_ROCrate_encoder(studyName, void 0, oa_3)), processes), tryIncludeSeq("assays", (studyName_1 = s.Identifier, (a_1) => Assay_ROCrate_encoder(studyName_1, a_1)), assays_1), tryIncludeSeq("comments", Comment_ROCrate_encoder, s.Comments), ["@context", context_jsonvalue]]))]);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export const Study_ROCrate_decoder = object((get$) => {
|
|
107
|
+
let objectArg, arg_6, objectArg_2, objectArg_3, objectArg_4, objectArg_5, objectArg_6, arg_16, objectArg_7, arg_18, objectArg_8, arg_20, objectArg_9, arg_22, objectArg_10;
|
|
108
|
+
const identifier = defaultArg(bind(Study_tryIdentifierFromFileName, (objectArg = get$.Optional, objectArg.Field("filename", string))), createMissingIdentifier());
|
|
109
|
+
let assays;
|
|
110
|
+
const arg_3 = list_2(Assay_ROCrate_decoder);
|
|
111
|
+
const objectArg_1 = get$.Optional;
|
|
112
|
+
assays = objectArg_1.Field("assays", arg_3);
|
|
113
|
+
const assayIdentifiers = map((arg_4) => {
|
|
114
|
+
const collection = map_1((a) => a.Identifier, arg_4);
|
|
115
|
+
return Array.from(collection);
|
|
116
|
+
}, assays);
|
|
117
|
+
const tables = map((ps) => ARCtrl_ArcTables__ArcTables_fromProcesses_Static_62A3309D(ps).Tables, (arg_6 = list_2(Process_ROCrate_decoder), (objectArg_2 = get$.Optional, objectArg_2.Field("processSequence", arg_6))));
|
|
118
|
+
return [new ArcStudy(identifier, unwrap((objectArg_3 = get$.Optional, objectArg_3.Field("title", string))), unwrap((objectArg_4 = get$.Optional, objectArg_4.Field("description", string))), unwrap((objectArg_5 = get$.Optional, objectArg_5.Field("submissionDate", string))), unwrap((objectArg_6 = get$.Optional, objectArg_6.Field("publicReleaseDate", string))), unwrap((arg_16 = Decode_resizeArray(Publication_ROCrate_decoder), (objectArg_7 = get$.Optional, objectArg_7.Field("publications", arg_16)))), unwrap((arg_18 = Decode_resizeArray(Person_ROCrate_decoder), (objectArg_8 = get$.Optional, objectArg_8.Field("people", arg_18)))), unwrap((arg_20 = Decode_resizeArray(OntologyAnnotation_ROCrate_decoderDefinedTerm), (objectArg_9 = get$.Optional, objectArg_9.Field("studyDesignDescriptors", arg_20)))), unwrap(tables), unwrap(assayIdentifiers), unwrap((arg_22 = Decode_resizeArray(Comment_ROCrate_decoder), (objectArg_10 = get$.Optional, objectArg_10.Field("comments", arg_22))))), defaultArg(assays, empty())];
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* If assays.IsSome then try to get registered assays from external list, otherwise try to access investigation or create empty defaults.
|
|
123
|
+
*/
|
|
124
|
+
export function Study_ISAJson_encoder(assays, s) {
|
|
125
|
+
const study = s.Copy(true);
|
|
126
|
+
const fileName = Assay_fileNameFromIdentifier(study.Identifier);
|
|
127
|
+
let assays_1;
|
|
128
|
+
const n = [];
|
|
129
|
+
let enumerator = getEnumerator(Study_Helper_getAssayInformation(assays, study));
|
|
130
|
+
try {
|
|
131
|
+
while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
132
|
+
const a = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
133
|
+
const assay = a.Copy();
|
|
134
|
+
let enumerator_1 = getEnumerator(assay.Performers);
|
|
135
|
+
try {
|
|
136
|
+
while (enumerator_1["System.Collections.IEnumerator.MoveNext"]()) {
|
|
137
|
+
const person_1 = Person_setSourceAssayComment(enumerator_1["System.Collections.Generic.IEnumerator`1.get_Current"](), assay.Identifier);
|
|
138
|
+
void (study.Contacts.push(person_1));
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
finally {
|
|
142
|
+
disposeSafe(enumerator_1);
|
|
143
|
+
}
|
|
144
|
+
assay.Performers = [];
|
|
145
|
+
void (n.push(assay));
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
finally {
|
|
149
|
+
disposeSafe(enumerator);
|
|
150
|
+
}
|
|
151
|
+
assays_1 = n;
|
|
152
|
+
const processes = ARCtrl_ArcTables__ArcTables_GetProcesses(study);
|
|
153
|
+
const protocols = getProtocols(processes);
|
|
154
|
+
const factors = getFactors(processes);
|
|
155
|
+
const characteristics = getCharacteristics(processes);
|
|
156
|
+
const units = getUnits(processes);
|
|
157
|
+
return new Json(5, [choose((tupledArg) => {
|
|
158
|
+
const v = tupledArg[1];
|
|
159
|
+
if (equals(v, new Json(3, []))) {
|
|
160
|
+
return void 0;
|
|
161
|
+
}
|
|
162
|
+
else {
|
|
163
|
+
return [tupledArg[0], v];
|
|
164
|
+
}
|
|
165
|
+
}, ofArray([["filename", new Json(0, [fileName])], ["identifier", new Json(0, [study.Identifier])], tryInclude("title", (value_2) => (new Json(0, [value_2])), study.Title), tryInclude("description", (value_4) => (new Json(0, [value_4])), study.Description), tryInclude("submissionDate", (value_6) => (new Json(0, [value_6])), study.SubmissionDate), tryInclude("publicReleaseDate", (value_8) => (new Json(0, [value_8])), study.PublicReleaseDate), tryIncludeSeq("publications", Publication_ISAJson_encoder, study.Publications), tryIncludeSeq("people", Person_ISAJson_encoder, study.Contacts), tryIncludeSeq("studyDesignDescriptors", OntologyAnnotation_ISAJson_encoder, study.StudyDesignDescriptors), tryIncludeList("protocols", Protocol_ISAJson_encoder, protocols), tryInclude("materials", encoder, Option_fromValueWithDefault(empty(), processes)), tryIncludeList("factors", Factor_ISAJson_encoder, factors), tryIncludeList("characteristicCategories", MaterialAttribute_ISAJson_encoder, characteristics), tryIncludeList("unitCategories", OntologyAnnotation_ISAJson_encoder, units), tryIncludeList("processSequence", Process_ISAJson_encoder, processes), tryIncludeSeq("assays", Assay_ISAJson_encoder, assays_1), tryIncludeSeq("comments", Comment_ISAJson_encoder, study.Comments)]))]);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export const Study_ISAJson_allowedFields = ofArray(["@id", "filename", "identifier", "title", "description", "submissionDate", "publicReleaseDate", "publications", "people", "studyDesignDescriptors", "protocols", "materials", "assays", "factors", "characteristicCategories", "unitCategories", "processSequence", "comments", "@type", "@context"]);
|
|
169
|
+
|
|
170
|
+
export const Study_ISAJson_decoder = Decode_objectNoAdditionalProperties(Study_ISAJson_allowedFields, (get$) => {
|
|
171
|
+
let objectArg, arg_5, objectArg_2, objectArg_5, objectArg_6, objectArg_7, objectArg_8, arg_21, objectArg_9, arg_23, objectArg_10, arg_25, objectArg_11;
|
|
172
|
+
const identifier = defaultArgWith((objectArg = get$.Optional, objectArg.Field("identifier", string)), () => {
|
|
173
|
+
let objectArg_1;
|
|
174
|
+
return defaultArg(bind(Study_tryIdentifierFromFileName, (objectArg_1 = get$.Optional, objectArg_1.Field("filename", string))), createMissingIdentifier());
|
|
175
|
+
});
|
|
176
|
+
const tables = map((arg_6) => {
|
|
177
|
+
const a = ARCtrl_ArcTables__ArcTables_fromProcesses_Static_62A3309D(arg_6);
|
|
178
|
+
return a.Tables;
|
|
179
|
+
}, (arg_5 = list_2(Process_ISAJson_decoder), (objectArg_2 = get$.Optional, objectArg_2.Field("processSequence", arg_5))));
|
|
180
|
+
let assays;
|
|
181
|
+
const arg_8 = list_2(Assay_ISAJson_decoder);
|
|
182
|
+
const objectArg_3 = get$.Optional;
|
|
183
|
+
assays = objectArg_3.Field("assays", arg_8);
|
|
184
|
+
let personsRaw;
|
|
185
|
+
const arg_10 = Decode_resizeArray(Person_ISAJson_decoder);
|
|
186
|
+
const objectArg_4 = get$.Optional;
|
|
187
|
+
personsRaw = objectArg_4.Field("people", arg_10);
|
|
188
|
+
const persons = [];
|
|
189
|
+
if (personsRaw != null) {
|
|
190
|
+
let enumerator = getEnumerator(value_14(personsRaw));
|
|
191
|
+
try {
|
|
192
|
+
while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
193
|
+
const person = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
194
|
+
const sourceAssays = Person_getSourceAssayIdentifiersFromComments(person);
|
|
195
|
+
const enumerator_1 = getEnumerator(sourceAssays);
|
|
196
|
+
try {
|
|
197
|
+
while (enumerator_1["System.Collections.IEnumerator.MoveNext"]()) {
|
|
198
|
+
const assayIdentifier = enumerator_1["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
199
|
+
const enumerator_2 = getEnumerator(value_14(assays));
|
|
200
|
+
try {
|
|
201
|
+
while (enumerator_2["System.Collections.IEnumerator.MoveNext"]()) {
|
|
202
|
+
const assay = enumerator_2["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
203
|
+
if (assay.Identifier === assayIdentifier) {
|
|
204
|
+
void (assay.Performers.push(person));
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
finally {
|
|
209
|
+
disposeSafe(enumerator_2);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
finally {
|
|
214
|
+
disposeSafe(enumerator_1);
|
|
215
|
+
}
|
|
216
|
+
person.Comments = Person_removeSourceAssayComments(person);
|
|
217
|
+
if (isEmpty(sourceAssays)) {
|
|
218
|
+
void (persons.push(person));
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
finally {
|
|
223
|
+
disposeSafe(enumerator);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
const assayIdentifiers = map((arg_11) => {
|
|
227
|
+
const collection = map_1((a_1) => a_1.Identifier, arg_11);
|
|
228
|
+
return Array.from(collection);
|
|
229
|
+
}, assays);
|
|
230
|
+
return [new ArcStudy(identifier, unwrap((objectArg_5 = get$.Optional, objectArg_5.Field("title", string))), unwrap((objectArg_6 = get$.Optional, objectArg_6.Field("description", string))), unwrap((objectArg_7 = get$.Optional, objectArg_7.Field("submissionDate", string))), unwrap((objectArg_8 = get$.Optional, objectArg_8.Field("publicReleaseDate", string))), unwrap((arg_21 = Decode_resizeArray(Publication_ISAJson_decoder), (objectArg_9 = get$.Optional, objectArg_9.Field("publications", arg_21)))), unwrap((persons.length === 0) ? void 0 : persons), unwrap((arg_23 = Decode_resizeArray(OntologyAnnotation_ISAJson_decoder), (objectArg_10 = get$.Optional, objectArg_10.Field("studyDesignDescriptors", arg_23)))), unwrap(tables), unwrap(assayIdentifiers), unwrap((arg_25 = Decode_resizeArray(Comment_ISAJson_decoder), (objectArg_11 = get$.Optional, objectArg_11.Field("comments", arg_25))))), defaultArg(assays, empty())];
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
export function ARCtrl_ArcStudy__ArcStudy_fromJsonString_Static_Z721C83C5(s) {
|
|
234
|
+
const matchValue = fromString(Study_decoder, s);
|
|
235
|
+
if (matchValue.tag === 1) {
|
|
236
|
+
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
237
|
+
}
|
|
238
|
+
else {
|
|
239
|
+
return matchValue.fields[0];
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export function ARCtrl_ArcStudy__ArcStudy_toJsonString_Static_71136F3F(spaces) {
|
|
244
|
+
return (obj) => {
|
|
245
|
+
const value = Study_encoder(obj);
|
|
246
|
+
return toString(defaultSpaces(spaces), value);
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
export function ARCtrl_ArcStudy__ArcStudy_fromCompressedJsonString_Static_Z721C83C5(s) {
|
|
251
|
+
try {
|
|
252
|
+
const matchValue = fromString(decode(Study_decoderCompressed), 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
|
+
catch (e_1) {
|
|
261
|
+
const arg_1 = e_1.message;
|
|
262
|
+
return toFail(printf("Error. Unable to parse json string to ArcStudy: %s"))(arg_1);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
export function ARCtrl_ArcStudy__ArcStudy_toCompressedJsonString_Static_71136F3F(spaces) {
|
|
267
|
+
return (obj) => toString(defaultArg(spaces, 0), encode(Study_encoderCompressed, obj));
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* exports in json-ld format
|
|
272
|
+
*/
|
|
273
|
+
export function ARCtrl_ArcStudy__ArcStudy_toROCrateJsonString_Static_3BA23086(assays, spaces) {
|
|
274
|
+
return (obj) => {
|
|
275
|
+
const value = Study_ROCrate_encoder(assays, obj);
|
|
276
|
+
return toString(defaultSpaces(spaces), value);
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
export function ARCtrl_ArcStudy__ArcStudy_fromROCrateJsonString_Static_Z721C83C5(s) {
|
|
281
|
+
const matchValue = fromString(Study_ROCrate_decoder, s);
|
|
282
|
+
if (matchValue.tag === 1) {
|
|
283
|
+
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
284
|
+
}
|
|
285
|
+
else {
|
|
286
|
+
return matchValue.fields[0];
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
export function ARCtrl_ArcStudy__ArcStudy_toISAJsonString_Static_3BA23086(assays, spaces) {
|
|
291
|
+
return (obj) => {
|
|
292
|
+
const value = Study_ISAJson_encoder(assays, obj);
|
|
293
|
+
return toString(defaultSpaces(spaces), value);
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
export function ARCtrl_ArcStudy__ArcStudy_fromISAJsonString_Static_Z721C83C5(s) {
|
|
298
|
+
const matchValue = fromString(Study_ISAJson_decoder, s);
|
|
299
|
+
if (matchValue.tag === 1) {
|
|
300
|
+
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
301
|
+
}
|
|
302
|
+
else {
|
|
303
|
+
return matchValue.fields[0];
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
|