@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.
Files changed (366) hide show
  1. package/ARC.js +53 -35
  2. package/{Contracts/Contracts.ARCtrl.js → Contract/ARC.js} +4 -2
  3. package/Contract/ArcAssay.js +102 -0
  4. package/Contract/ArcInvestigation.js +78 -0
  5. package/Contract/ArcStudy.js +102 -0
  6. package/Contract/Contract.js +3 -3
  7. package/{Contracts/Contracts.Git.js → Contract/Git.js} +5 -5
  8. package/{ISA/ISA/ArcTypes → Core}/ArcTypes.js +307 -295
  9. package/Core/Comment.js +97 -0
  10. package/{ISA/ISA/JsonTypes → Core}/CommentList.js +12 -18
  11. package/Core/Conversion.js +1056 -0
  12. package/Core/Helper/Collections.js +318 -0
  13. package/Core/Helper/HashCodes.js +39 -0
  14. package/{ISA/ISA → Core/Helper}/Identifier.js +67 -2
  15. package/{ISA/ISA → Core/Helper}/Regex.js +3 -3
  16. package/{SemVer.js → Core/Helper/SemVer.js} +8 -8
  17. package/{ISA/ISA/ArcTypes → Core}/IdentifierSetters.js +1 -1
  18. package/Core/OntologyAnnotation.js +186 -0
  19. package/Core/OntologySourceReference.js +92 -0
  20. package/Core/Person.js +194 -0
  21. package/Core/Process/ColumnIndex.js +248 -0
  22. package/Core/Process/Component.js +188 -0
  23. package/{ISA/ISA/JsonTypes → Core/Process}/Data.js +8 -8
  24. package/{ISA/ISA/JsonTypes → Core/Process}/DataFile.js +3 -3
  25. package/Core/Process/Factor.js +109 -0
  26. package/{ISA/ISA/JsonTypes → Core/Process}/FactorValue.js +32 -13
  27. package/{ISA/ISA/JsonTypes → Core/Process}/Material.js +9 -9
  28. package/{ISA/ISA/JsonTypes → Core/Process}/MaterialAttribute.js +17 -17
  29. package/{ISA/ISA/JsonTypes → Core/Process}/MaterialAttributeValue.js +35 -16
  30. package/{ISA/ISA/JsonTypes → Core/Process}/MaterialType.js +3 -3
  31. package/{ISA/ISA/JsonTypes → Core/Process}/Process.js +46 -79
  32. package/{ISA/ISA/JsonTypes → Core/Process}/ProcessInput.js +42 -42
  33. package/{ISA/ISA/JsonTypes → Core/Process}/ProcessOutput.js +36 -36
  34. package/{ISA/ISA/JsonTypes → Core/Process}/ProcessParameterValue.js +26 -7
  35. package/{ISA/ISA/JsonTypes → Core/Process}/ProcessSequence.js +21 -25
  36. package/{ISA/ISA/JsonTypes → Core/Process}/Protocol.js +26 -57
  37. package/{ISA/ISA/JsonTypes → Core/Process}/ProtocolParameter.js +10 -10
  38. package/{ISA/ISA/JsonTypes → Core/Process}/Sample.js +12 -12
  39. package/{ISA/ISA/JsonTypes → Core/Process}/Source.js +9 -9
  40. package/{ISA/ISA/JsonTypes → Core/Process}/Value.js +13 -13
  41. package/Core/Publication.js +116 -0
  42. package/{ISA/ISA/ArcTypes → Core/Table}/ArcTable.js +43 -149
  43. package/Core/Table/ArcTableAux.js +532 -0
  44. package/{ISA/ISA/ArcTypes → Core/Table}/ArcTables.js +20 -32
  45. package/{ISA/ISA/ArcTypes → Core/Table}/CompositeCell.js +19 -76
  46. package/{ISA/ISA/ArcTypes → Core/Table}/CompositeColumn.js +6 -6
  47. package/{ISA/ISA/ArcTypes → Core/Table}/CompositeHeader.js +14 -34
  48. package/{Templates → Core}/Template.js +16 -17
  49. package/Core/Templates.js +84 -0
  50. package/FileSystem/Commit.js +2 -2
  51. package/FileSystem/FileSystem.js +4 -4
  52. package/FileSystem/FileSystemTree.js +46 -8
  53. package/FileSystem/Path.js +10 -2
  54. package/Json/ARC.js +25 -0
  55. package/Json/Assay.js +202 -0
  56. package/Json/Comment.js +130 -0
  57. package/Json/ConverterOptions.js +18 -0
  58. package/Json/Decode.js +128 -0
  59. package/Json/Encode.js +45 -0
  60. package/Json/Investigation.js +220 -0
  61. package/Json/OntologyAnnotation.js +169 -0
  62. package/Json/OntologySourceReference.js +122 -0
  63. package/Json/Person.js +250 -0
  64. package/Json/Process/AssayMaterials.js +22 -0
  65. package/Json/Process/Component.js +79 -0
  66. package/Json/Process/Data.js +102 -0
  67. package/Json/Process/DataFile.js +81 -0
  68. package/Json/Process/Factor.js +48 -0
  69. package/Json/Process/FactorValue.js +53 -0
  70. package/Json/Process/Material.js +107 -0
  71. package/Json/Process/MaterialAttribute.js +45 -0
  72. package/Json/Process/MaterialAttributeValue.js +70 -0
  73. package/Json/Process/MaterialType.js +60 -0
  74. package/Json/Process/Process.js +107 -0
  75. package/Json/Process/ProcessInput.js +59 -0
  76. package/Json/Process/ProcessOutput.js +71 -0
  77. package/Json/Process/ProcessParameterValue.js +69 -0
  78. package/Json/Process/ProcessSequence.js +53 -0
  79. package/Json/Process/PropertyValue.js +82 -0
  80. package/Json/Process/Protocol.js +147 -0
  81. package/Json/Process/ProtocolParameter.js +45 -0
  82. package/Json/Process/Sample.js +134 -0
  83. package/Json/Process/Source.js +101 -0
  84. package/Json/Process/StudyMaterials.js +24 -0
  85. package/Json/Process/Value.js +42 -0
  86. package/Json/Publication.js +142 -0
  87. package/Json/StringTable.js +44 -0
  88. package/Json/Study.js +306 -0
  89. package/{ISA/ISA.Json/ArcTypes → Json/Table}/ArcTable.js +53 -49
  90. package/Json/Table/CellTable.js +40 -0
  91. package/Json/Table/CompositeCell.js +65 -0
  92. package/{ISA/ISA.Json/ArcTypes → Json/Table}/CompositeHeader.js +22 -19
  93. package/Json/Table/Compression.js +38 -0
  94. package/Json/Table/IOType.js +37 -0
  95. package/Json/Table/OATable.js +40 -0
  96. package/Json/Table/Templates.js +107 -0
  97. package/Json/context/rocrate/isa_assay_context.js +32 -0
  98. package/Json/context/rocrate/isa_comment_context.js +23 -0
  99. package/Json/context/rocrate/isa_component_context.js +24 -0
  100. package/Json/context/rocrate/isa_data_context.js +25 -0
  101. package/Json/context/rocrate/isa_factor_context.js +25 -0
  102. package/Json/context/rocrate/isa_factor_value_context.js +23 -0
  103. package/{ISA/ISA.Json → Json}/context/rocrate/isa_investigation_context.js +5 -5
  104. package/{ISA/ISA.Json → Json}/context/rocrate/isa_material_attribute_context.js +4 -4
  105. package/Json/context/rocrate/isa_material_attribute_value_context.js +23 -0
  106. package/Json/context/rocrate/isa_material_context.js +26 -0
  107. package/Json/context/rocrate/isa_ontology_annotation_context.js +23 -0
  108. package/Json/context/rocrate/isa_ontology_source_reference_context.js +26 -0
  109. package/Json/context/rocrate/isa_organization_context.js +22 -0
  110. package/Json/context/rocrate/isa_person_context.js +33 -0
  111. package/Json/context/rocrate/isa_process_context.js +29 -0
  112. package/Json/context/rocrate/isa_process_parameter_value_context.js +23 -0
  113. package/Json/context/rocrate/isa_protocol_context.js +28 -0
  114. package/{ISA/ISA.Json → Json}/context/rocrate/isa_protocol_parameter_context.js +4 -4
  115. package/Json/context/rocrate/isa_publication_context.js +25 -0
  116. package/Json/context/rocrate/isa_sample_context.js +24 -0
  117. package/Json/context/rocrate/isa_source_context.js +25 -0
  118. package/Json/context/rocrate/isa_study_context.js +40 -0
  119. package/Json/context/rocrate/property_value_context.js +4 -0
  120. package/Json/context/rocrate/rocrate_context.js +23 -0
  121. package/Json.js +193 -0
  122. package/README.md +33 -12
  123. package/{ISA/ISA.Spreadsheet → Spreadsheet}/AnnotationTable/ArcTable.js +12 -12
  124. package/{ISA/ISA.Spreadsheet → Spreadsheet}/AnnotationTable/CompositeCell.js +8 -7
  125. package/{ISA/ISA.Spreadsheet → Spreadsheet}/AnnotationTable/CompositeColumn.js +10 -10
  126. package/{ISA/ISA.Spreadsheet → Spreadsheet}/AnnotationTable/CompositeHeader.js +10 -10
  127. package/{ISA/ISA.Spreadsheet → Spreadsheet}/ArcAssay.js +11 -11
  128. package/{ISA/ISA.Spreadsheet → Spreadsheet}/ArcInvestigation.js +34 -37
  129. package/{ISA/ISA.Spreadsheet → Spreadsheet}/ArcStudy.js +12 -12
  130. package/{ISA/ISA.Spreadsheet → Spreadsheet}/CollectionAux.js +7 -7
  131. package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/Assays.js +32 -32
  132. package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/Comment.js +5 -5
  133. package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/Contacts.js +28 -30
  134. package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/Conversions.js +22 -16
  135. package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/DesignDescriptors.js +1 -1
  136. package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/Factors.js +23 -22
  137. package/Spreadsheet/Metadata/OntologyAnnotation.js +64 -0
  138. package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/OntologySourceReference.js +22 -24
  139. package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/Protocols.js +17 -17
  140. package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/Publication.js +29 -31
  141. package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/SparseTable.js +23 -22
  142. package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/Study.js +38 -40
  143. package/{Templates/Template.Spreadsheet.js → Spreadsheet/Template.js} +31 -31
  144. package/Template.Web.js +27 -0
  145. package/WebRequest/WebRequest.Node.js +2 -2
  146. package/WebRequest/WebRequest.js +2 -2
  147. package/Xlsx.js +85 -0
  148. package/fable_modules/Fable.Fetch.2.6.0/Fetch.fs.js +7 -7
  149. package/fable_modules/Fable.Promise.2.2.2/Promise.fs.js +3 -3
  150. package/fable_modules/Fable.SimpleHttp.3.5.0/Http.fs.js +8 -8
  151. package/fable_modules/Fable.SimpleHttp.3.5.0/Types.fs.js +2 -2
  152. package/fable_modules/FsSpreadsheet.5.1.3/Cells/FsCell.fs.js +14 -14
  153. package/fable_modules/FsSpreadsheet.5.1.3/Cells/FsCellsCollection.fs.js +6 -6
  154. package/fable_modules/FsSpreadsheet.5.1.3/DSL/CellBuilder.fs.js +4 -4
  155. package/fable_modules/FsSpreadsheet.5.1.3/DSL/ColumnBuilder.fs.js +3 -3
  156. package/fable_modules/FsSpreadsheet.5.1.3/DSL/DSL.fs.js +2 -2
  157. package/fable_modules/FsSpreadsheet.5.1.3/DSL/Expression.fs.js +1 -1
  158. package/fable_modules/FsSpreadsheet.5.1.3/DSL/RowBuilder.fs.js +3 -3
  159. package/fable_modules/FsSpreadsheet.5.1.3/DSL/SheetBuilder.fs.js +3 -3
  160. package/fable_modules/FsSpreadsheet.5.1.3/DSL/TableBuilder.fs.js +3 -3
  161. package/fable_modules/FsSpreadsheet.5.1.3/DSL/Transform.fs.js +6 -6
  162. package/fable_modules/FsSpreadsheet.5.1.3/DSL/Types.fs.js +4 -4
  163. package/fable_modules/FsSpreadsheet.5.1.3/DSL/WorkbookBuilder.fs.js +3 -3
  164. package/fable_modules/FsSpreadsheet.5.1.3/FsAddress.fs.js +8 -8
  165. package/fable_modules/FsSpreadsheet.5.1.3/FsColumn.fs.js +3 -3
  166. package/fable_modules/FsSpreadsheet.5.1.3/FsRow.fs.js +3 -3
  167. package/fable_modules/FsSpreadsheet.5.1.3/FsWorkbook.fs.js +6 -6
  168. package/fable_modules/FsSpreadsheet.5.1.3/FsWorksheet.fs.js +9 -9
  169. package/fable_modules/FsSpreadsheet.5.1.3/Ranges/FsRange.fs.js +3 -3
  170. package/fable_modules/FsSpreadsheet.5.1.3/Ranges/FsRangeAddress.fs.js +3 -3
  171. package/fable_modules/FsSpreadsheet.5.1.3/Ranges/FsRangeBase.fs.js +3 -3
  172. package/fable_modules/FsSpreadsheet.5.1.3/Ranges/FsRangeColumn.fs.js +3 -3
  173. package/fable_modules/FsSpreadsheet.5.1.3/Ranges/FsRangeRow.fs.js +1 -1
  174. package/fable_modules/FsSpreadsheet.5.1.3/SheetBuilder.fs.js +8 -8
  175. package/fable_modules/FsSpreadsheet.5.1.3/Tables/FsTable.fs.js +7 -7
  176. package/fable_modules/FsSpreadsheet.5.1.3/Tables/FsTableField.fs.js +4 -4
  177. package/fable_modules/FsSpreadsheet.5.1.3/Tables/FsTableRow.fs.js +1 -1
  178. package/fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js +19 -19
  179. package/fable_modules/Thoth.Json.Core.0.2.1/Encode.fs.js +5 -5
  180. package/fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js +2 -2
  181. package/fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js +1 -1
  182. package/fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js +2 -2
  183. package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Boolean.js +2 -2
  184. package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/CHANGELOG.md +18 -0
  185. package/fable_modules/fable-library-js.4.16.0/ConditionalWeakTable.d.ts +9 -0
  186. package/fable_modules/fable-library-js.4.16.0/ConditionalWeakTable.js +21 -0
  187. package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Date.js +337 -40
  188. package/fable_modules/fable-library-js.4.16.0/MapUtil.d.ts +12 -0
  189. package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/MapUtil.js +15 -0
  190. package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Util.d.ts +6 -3
  191. package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Util.js +2 -13
  192. package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/package.json +1 -1
  193. package/fable_modules/project_cracked.json +1 -1
  194. package/index.js +14 -12
  195. package/package.json +1 -1
  196. package/Contracts/Contracts.ArcTypes.js +0 -268
  197. package/FileSystemTree.js +0 -51
  198. package/ISA/ISA/ArcTypes/ArcTableAux.js +0 -1155
  199. package/ISA/ISA/ArcTypes/CompositeRow.js +0 -111
  200. package/ISA/ISA/Builder/Types.js +0 -243
  201. package/ISA/ISA/Fable.js +0 -123
  202. package/ISA/ISA/Helper.js +0 -505
  203. package/ISA/ISA/JsonTypes/Assay.js +0 -620
  204. package/ISA/ISA/JsonTypes/AssayMaterials.js +0 -39
  205. package/ISA/ISA/JsonTypes/ColumnIndex.js +0 -246
  206. package/ISA/ISA/JsonTypes/Comment.js +0 -58
  207. package/ISA/ISA/JsonTypes/Component.js +0 -165
  208. package/ISA/ISA/JsonTypes/Factor.js +0 -128
  209. package/ISA/ISA/JsonTypes/Investigation.js +0 -204
  210. package/ISA/ISA/JsonTypes/OntologyAnnotation.js +0 -196
  211. package/ISA/ISA/JsonTypes/OntologySourceReference.js +0 -85
  212. package/ISA/ISA/JsonTypes/Person.js +0 -152
  213. package/ISA/ISA/JsonTypes/Publication.js +0 -105
  214. package/ISA/ISA/JsonTypes/Study.js +0 -942
  215. package/ISA/ISA/JsonTypes/StudyMaterials.js +0 -45
  216. package/ISA/ISA/UIHelper.js +0 -19
  217. package/ISA/ISA.Json/ArcTypes/ArcAssay.js +0 -303
  218. package/ISA/ISA.Json/ArcTypes/ArcInvestigation.js +0 -122
  219. package/ISA/ISA.Json/ArcTypes/ArcStudy.js +0 -203
  220. package/ISA/ISA.Json/ArcTypes/CellTable.js +0 -40
  221. package/ISA/ISA.Json/ArcTypes/CompositeCell.js +0 -62
  222. package/ISA/ISA.Json/ArcTypes/IOType.js +0 -33
  223. package/ISA/ISA.Json/ArcTypes/OATable.js +0 -42
  224. package/ISA/ISA.Json/Assay.js +0 -129
  225. package/ISA/ISA.Json/Comment.js +0 -80
  226. package/ISA/ISA.Json/ConverterOptions.js +0 -51
  227. package/ISA/ISA.Json/Data.js +0 -253
  228. package/ISA/ISA.Json/Decode.js +0 -61
  229. package/ISA/ISA.Json/Factor.js +0 -194
  230. package/ISA/ISA.Json/GEncode.js +0 -40
  231. package/ISA/ISA.Json/Investigation.js +0 -89
  232. package/ISA/ISA.Json/Material.js +0 -232
  233. package/ISA/ISA.Json/Ontology.js +0 -200
  234. package/ISA/ISA.Json/Person.js +0 -186
  235. package/ISA/ISA.Json/Process.js +0 -305
  236. package/ISA/ISA.Json/Protocol.js +0 -281
  237. package/ISA/ISA.Json/Publication.js +0 -86
  238. package/ISA/ISA.Json/StringTable.js +0 -44
  239. package/ISA/ISA.Json/Study.js +0 -186
  240. package/ISA/ISA.Json/context/rocrate/isa_assay_context.js +0 -34
  241. package/ISA/ISA.Json/context/rocrate/isa_comment_context.js +0 -23
  242. package/ISA/ISA.Json/context/rocrate/isa_component_context.js +0 -24
  243. package/ISA/ISA.Json/context/rocrate/isa_data_context.js +0 -25
  244. package/ISA/ISA.Json/context/rocrate/isa_factor_context.js +0 -25
  245. package/ISA/ISA.Json/context/rocrate/isa_factor_value_context.js +0 -25
  246. package/ISA/ISA.Json/context/rocrate/isa_material_attribute_value_context.js +0 -25
  247. package/ISA/ISA.Json/context/rocrate/isa_material_context.js +0 -26
  248. package/ISA/ISA.Json/context/rocrate/isa_ontology_annotation_context.js +0 -25
  249. package/ISA/ISA.Json/context/rocrate/isa_ontology_source_reference_context.js +0 -26
  250. package/ISA/ISA.Json/context/rocrate/isa_organization_context.js +0 -22
  251. package/ISA/ISA.Json/context/rocrate/isa_person_context.js +0 -31
  252. package/ISA/ISA.Json/context/rocrate/isa_process_context.js +0 -31
  253. package/ISA/ISA.Json/context/rocrate/isa_process_parameter_value_context.js +0 -25
  254. package/ISA/ISA.Json/context/rocrate/isa_protocol_context.js +0 -30
  255. package/ISA/ISA.Json/context/rocrate/isa_publication_context.js +0 -27
  256. package/ISA/ISA.Json/context/rocrate/isa_sample_context.js +0 -26
  257. package/ISA/ISA.Json/context/rocrate/isa_source_context.js +0 -25
  258. package/ISA/ISA.Json/context/rocrate/isa_study_context.js +0 -42
  259. package/ISA/ISA.Json/context/rocrate/rocrate_context.js +0 -25
  260. package/ISA/ISA.Spreadsheet/Metadata/OntologyAnnotation.js +0 -65
  261. package/Path.js +0 -10
  262. package/Templates/Template.Json.js +0 -90
  263. package/Templates/Template.Web.js +0 -27
  264. package/Templates/Templates.js +0 -82
  265. package/fable_modules/fable-library-js.4.13.0/MapUtil.d.ts +0 -10
  266. /package/{ISA/ISA/JsonTypes → Core}/URI.js +0 -0
  267. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Array.d.ts +0 -0
  268. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Array.js +0 -0
  269. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Async.d.ts +0 -0
  270. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Async.js +0 -0
  271. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/AsyncBuilder.d.ts +0 -0
  272. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/AsyncBuilder.js +0 -0
  273. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/BigInt.d.ts +0 -0
  274. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/BigInt.js +0 -0
  275. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/BitConverter.d.ts +0 -0
  276. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/BitConverter.js +0 -0
  277. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Boolean.d.ts +0 -0
  278. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Char.d.ts +0 -0
  279. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Char.js +0 -0
  280. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Choice.d.ts +0 -0
  281. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Choice.js +0 -0
  282. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Date.d.ts +0 -0
  283. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/DateOffset.d.ts +0 -0
  284. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/DateOffset.js +0 -0
  285. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/DateOnly.d.ts +0 -0
  286. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/DateOnly.js +0 -0
  287. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Decimal.d.ts +0 -0
  288. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Decimal.js +0 -0
  289. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Double.d.ts +0 -0
  290. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Double.js +0 -0
  291. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Encoding.d.ts +0 -0
  292. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Encoding.js +0 -0
  293. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Event.d.ts +0 -0
  294. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Event.js +0 -0
  295. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/FSharp.Collections.d.ts +0 -0
  296. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/FSharp.Collections.js +0 -0
  297. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/FSharp.Core.CompilerServices.d.ts +0 -0
  298. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/FSharp.Core.CompilerServices.js +0 -0
  299. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/FSharp.Core.d.ts +0 -0
  300. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/FSharp.Core.js +0 -0
  301. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Global.d.ts +0 -0
  302. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Global.js +0 -0
  303. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Guid.d.ts +0 -0
  304. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Guid.js +0 -0
  305. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Int32.d.ts +0 -0
  306. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Int32.js +0 -0
  307. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/List.d.ts +0 -0
  308. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/List.js +0 -0
  309. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Long.d.ts +0 -0
  310. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Long.js +0 -0
  311. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/MailboxProcessor.d.ts +0 -0
  312. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/MailboxProcessor.js +0 -0
  313. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Map.d.ts +0 -0
  314. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Map.js +0 -0
  315. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/MutableMap.d.ts +0 -0
  316. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/MutableMap.js +0 -0
  317. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/MutableSet.d.ts +0 -0
  318. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/MutableSet.js +0 -0
  319. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Native.d.ts +0 -0
  320. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Native.js +0 -0
  321. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Numeric.d.ts +0 -0
  322. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Numeric.js +0 -0
  323. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Observable.d.ts +0 -0
  324. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Observable.js +0 -0
  325. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Option.d.ts +0 -0
  326. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Option.js +0 -0
  327. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/README.md +0 -0
  328. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Random.d.ts +0 -0
  329. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Random.js +0 -0
  330. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Range.d.ts +0 -0
  331. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Range.js +0 -0
  332. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Reflection.d.ts +0 -0
  333. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Reflection.js +0 -0
  334. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/RegExp.d.ts +0 -0
  335. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/RegExp.js +0 -0
  336. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Result.d.ts +0 -0
  337. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Result.js +0 -0
  338. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Seq.d.ts +0 -0
  339. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Seq.js +0 -0
  340. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Seq2.d.ts +0 -0
  341. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Seq2.js +0 -0
  342. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Set.d.ts +0 -0
  343. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Set.js +0 -0
  344. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/String.d.ts +0 -0
  345. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/String.js +0 -0
  346. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/System.Collections.Generic.d.ts +0 -0
  347. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/System.Collections.Generic.js +0 -0
  348. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/System.Text.d.ts +0 -0
  349. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/System.Text.js +0 -0
  350. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/SystemException.d.ts +0 -0
  351. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/SystemException.js +0 -0
  352. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/TimeOnly.d.ts +0 -0
  353. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/TimeOnly.js +0 -0
  354. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/TimeSpan.d.ts +0 -0
  355. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/TimeSpan.js +0 -0
  356. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Timer.d.ts +0 -0
  357. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Timer.js +0 -0
  358. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Types.d.ts +0 -0
  359. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Types.js +0 -0
  360. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Unicode.13.0.0.d.ts +0 -0
  361. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Unicode.13.0.0.js +0 -0
  362. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Uri.d.ts +0 -0
  363. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Uri.js +0 -0
  364. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/big.d.ts +0 -0
  365. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/lib/big.d.ts +0 -0
  366. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/lib/big.js +0 -0
@@ -1,203 +0,0 @@
1
- import { map, empty, singleton, append, delay, toList } from "../../../fable_modules/fable-library-js.4.13.0/Seq.js";
2
- import { Json } from "../../../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
3
- import { map as map_1, defaultArg, value as value_7 } from "../../../fable_modules/fable-library-js.4.13.0/Option.js";
4
- import { JsonHelper_tryGetComments, JsonHelper_tryGetFactors, JsonHelper_tryGetStringResizeArray, JsonHelper_tryGetTables, JsonHelper_tryGetOAs, JsonHelper_tryGetPersons, JsonHelper_tryGetPublications, JsonHelper_EncoderComments, JsonHelper_EncoderFactors, JsonHelper_EncoderTables, JsonHelper_EncoderOAs, JsonHelper_EncoderPersons, JsonHelper_EncoderPublications } from "./ArcAssay.js";
5
- import { seq } from "../../../fable_modules/Thoth.Json.Core.0.2.1/Encode.fs.js";
6
- import { array, string, object } from "../../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
7
- import { ArcStudy } from "../../ISA/ArcTypes/ArcTypes.js";
8
- import { ArcTable_compressedDecoder, ArcTable_compressedEncoder } from "./ArcTable.js";
9
- import { toString } from "../../../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
10
- import { Study_decoder, Study_encoder } from "../Study.js";
11
- import { ConverterOptions__set_IncludeContext_Z1FBCCD16, ConverterOptions__set_IncludeType_Z1FBCCD16, ConverterOptions__set_SetID_Z1FBCCD16, ConverterOptions_$ctor } from "../ConverterOptions.js";
12
- import { fromString } from "../../../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
13
- import { toFail, printf, toText } from "../../../fable_modules/fable-library-js.4.13.0/String.js";
14
- import { StringTable_arrayFromMap, StringTable_encoder, StringTable_decoder } from "../StringTable.js";
15
- import { OATable_arrayFromMap, OATable_encoder, OATable_decoder } from "./OATable.js";
16
- import { CellTable_arrayFromMap, CellTable_encoder, CellTable_decoder } from "./CellTable.js";
17
- import { Dictionary } from "../../../fable_modules/fable-library-js.4.13.0/MutableMap.js";
18
- import { safeHash, equals } from "../../../fable_modules/fable-library-js.4.13.0/Util.js";
19
-
20
- export function ArcStudy_encoder(study) {
21
- return new Json(5, [toList(delay(() => append(singleton(["Identifier", new Json(0, [study.Identifier])]), delay(() => append((study.Title != null) ? singleton(["Title", new Json(0, [value_7(study.Title)])]) : empty(), delay(() => append((study.Description != null) ? singleton(["Description", new Json(0, [value_7(study.Description)])]) : empty(), delay(() => append((study.SubmissionDate != null) ? singleton(["SubmissionDate", new Json(0, [value_7(study.SubmissionDate)])]) : empty(), delay(() => append((study.PublicReleaseDate != null) ? singleton(["PublicReleaseDate", new Json(0, [value_7(study.PublicReleaseDate)])]) : empty(), delay(() => append((study.Publications.length !== 0) ? singleton(["Publications", JsonHelper_EncoderPublications(study.Publications)]) : empty(), delay(() => append((study.Contacts.length !== 0) ? singleton(["Contacts", JsonHelper_EncoderPersons(study.Contacts)]) : empty(), delay(() => append((study.StudyDesignDescriptors.length !== 0) ? singleton(["StudyDesignDescriptors", JsonHelper_EncoderOAs(study.StudyDesignDescriptors)]) : empty(), delay(() => append((study.TableCount !== 0) ? singleton(["Tables", JsonHelper_EncoderTables(study.Tables)]) : empty(), delay(() => append((study.RegisteredAssayIdentifiers.length !== 0) ? singleton(["RegisteredAssayIdentifiers", seq(map((value_5) => (new Json(0, [value_5])), study.RegisteredAssayIdentifiers))]) : empty(), delay(() => append((study.Factors.length !== 0) ? singleton(["Factors", JsonHelper_EncoderFactors(study.Factors)]) : empty(), delay(() => ((study.Comments.length !== 0) ? singleton(["Comments", JsonHelper_EncoderComments(study.Comments)]) : empty())))))))))))))))))))))))))]);
22
- }
23
-
24
- export const ArcStudy_decoder = object((get$) => {
25
- let identifier;
26
- const objectArg = get$.Required;
27
- identifier = objectArg.Field("Identifier", string);
28
- let title;
29
- const objectArg_1 = get$.Optional;
30
- title = objectArg_1.Field("Title", string);
31
- let description;
32
- const objectArg_2 = get$.Optional;
33
- description = objectArg_2.Field("Description", string);
34
- let submissionDate;
35
- const objectArg_3 = get$.Optional;
36
- submissionDate = objectArg_3.Field("SubmissionDate", string);
37
- let publicReleaseDate;
38
- const objectArg_4 = get$.Optional;
39
- publicReleaseDate = objectArg_4.Field("PublicReleaseDate", string);
40
- const publications = JsonHelper_tryGetPublications(get$, "Publications");
41
- const contacts = JsonHelper_tryGetPersons(get$, "Contacts");
42
- const studyDesignDescriptors = JsonHelper_tryGetOAs(get$, "StudyDesignDescriptors");
43
- const tables = JsonHelper_tryGetTables(get$, "Tables");
44
- const registeredAssayIdentifiers = JsonHelper_tryGetStringResizeArray(get$, "RegisteredAssayIdentifiers");
45
- const factors = JsonHelper_tryGetFactors(get$, "Factors");
46
- const comments = JsonHelper_tryGetComments(get$, "Comments");
47
- return ArcStudy.make(identifier, title, description, submissionDate, publicReleaseDate, publications, contacts, studyDesignDescriptors, tables, registeredAssayIdentifiers, factors, comments);
48
- });
49
-
50
- export function ArcStudy_compressedEncoder(stringTable, oaTable, cellTable, study) {
51
- return new Json(5, [toList(delay(() => append(singleton(["Identifier", new Json(0, [study.Identifier])]), delay(() => append((study.Title != null) ? singleton(["Title", new Json(0, [value_7(study.Title)])]) : empty(), delay(() => append((study.Description != null) ? singleton(["Description", new Json(0, [value_7(study.Description)])]) : empty(), delay(() => append((study.SubmissionDate != null) ? singleton(["SubmissionDate", new Json(0, [value_7(study.SubmissionDate)])]) : empty(), delay(() => append((study.PublicReleaseDate != null) ? singleton(["PublicReleaseDate", new Json(0, [value_7(study.PublicReleaseDate)])]) : empty(), delay(() => append((study.Publications.length !== 0) ? singleton(["Publications", JsonHelper_EncoderPublications(study.Publications)]) : empty(), delay(() => append((study.Contacts.length !== 0) ? singleton(["Contacts", JsonHelper_EncoderPersons(study.Contacts)]) : empty(), delay(() => append((study.StudyDesignDescriptors.length !== 0) ? singleton(["StudyDesignDescriptors", JsonHelper_EncoderOAs(study.StudyDesignDescriptors)]) : empty(), delay(() => append((study.TableCount !== 0) ? singleton(["Tables", seq(map((table) => ArcTable_compressedEncoder(stringTable, oaTable, cellTable, table), study.Tables))]) : empty(), delay(() => append((study.RegisteredAssayIdentifiers.length !== 0) ? singleton(["RegisteredAssayIdentifiers", seq(map((value_5) => (new Json(0, [value_5])), study.RegisteredAssayIdentifiers))]) : empty(), delay(() => append((study.Factors.length !== 0) ? singleton(["Factors", JsonHelper_EncoderFactors(study.Factors)]) : empty(), delay(() => ((study.Comments.length !== 0) ? singleton(["Comments", JsonHelper_EncoderComments(study.Comments)]) : empty())))))))))))))))))))))))))]);
52
- }
53
-
54
- export function ArcStudy_compressedDecoder(stringTable, oaTable, cellTable) {
55
- return object((get$) => {
56
- let arg_1, objectArg;
57
- const tables = defaultArg(map_1((collection) => Array.from(collection), (arg_1 = array(ArcTable_compressedDecoder(stringTable, oaTable, cellTable)), (objectArg = get$.Optional, objectArg.Field("Tables", arg_1)))), []);
58
- let identifier;
59
- const objectArg_1 = get$.Required;
60
- identifier = objectArg_1.Field("Identifier", string);
61
- let title;
62
- const objectArg_2 = get$.Optional;
63
- title = objectArg_2.Field("Title", string);
64
- let description;
65
- const objectArg_3 = get$.Optional;
66
- description = objectArg_3.Field("Description", string);
67
- let submissionDate;
68
- const objectArg_4 = get$.Optional;
69
- submissionDate = objectArg_4.Field("SubmissionDate", string);
70
- let publicReleaseDate;
71
- const objectArg_5 = get$.Optional;
72
- publicReleaseDate = objectArg_5.Field("PublicReleaseDate", string);
73
- const publications = JsonHelper_tryGetPublications(get$, "Publications");
74
- const contacts = JsonHelper_tryGetPersons(get$, "Contacts");
75
- const studyDesignDescriptors = JsonHelper_tryGetOAs(get$, "StudyDesignDescriptors");
76
- const registeredAssayIdentifiers = JsonHelper_tryGetStringResizeArray(get$, "RegisteredAssayIdentifiers");
77
- const factors = JsonHelper_tryGetFactors(get$, "Factors");
78
- const comments = JsonHelper_tryGetComments(get$, "Comments");
79
- return ArcStudy.make(identifier, title, description, submissionDate, publicReleaseDate, publications, contacts, studyDesignDescriptors, tables, registeredAssayIdentifiers, factors, comments);
80
- });
81
- }
82
-
83
- /**
84
- * exports in json-ld format
85
- */
86
- export function ArcStudy_toJsonldString(a, assays) {
87
- let returnVal;
88
- return toString(2, Study_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), a.ToStudy(assays)));
89
- }
90
-
91
- export function ArcStudy_toJsonldStringWithContext(a, assays) {
92
- let returnVal;
93
- return toString(2, Study_encoder((returnVal = ConverterOptions_$ctor(), (((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), ConverterOptions__set_IncludeContext_Z1FBCCD16(returnVal, true)), returnVal)), a.ToStudy(assays)));
94
- }
95
-
96
- export function ArcStudy_fromJsonString(s) {
97
- let s_2;
98
- const matchValue = fromString(Study_decoder(ConverterOptions_$ctor()), s);
99
- if (matchValue.tag === 1) {
100
- throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
101
- }
102
- else {
103
- s_2 = matchValue.fields[0];
104
- }
105
- return ArcStudy.fromStudy(s_2);
106
- }
107
-
108
- export function ArcStudy_toJsonString(a, assays) {
109
- return toString(2, Study_encoder(ConverterOptions_$ctor(), a.ToStudy(assays)));
110
- }
111
-
112
- export function ArcStudy_toArcJsonString(a) {
113
- return toString(0, ArcStudy_encoder(a));
114
- }
115
-
116
- export function ArcStudy_fromArcJsonString(jsonString) {
117
- try {
118
- const matchValue = fromString(ArcStudy_decoder, jsonString);
119
- if (matchValue.tag === 1) {
120
- throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
121
- }
122
- else {
123
- return matchValue.fields[0];
124
- }
125
- }
126
- catch (e_1) {
127
- const arg_1 = e_1.message;
128
- return toFail(printf("Error. Unable to parse json string to ArcStudy: %s"))(arg_1);
129
- }
130
- }
131
-
132
- export function ARCtrl_ISA_ArcStudy__ArcStudy_fromArcJsonString_Static_Z721C83C5(jsonString) {
133
- try {
134
- const matchValue = fromString(ArcStudy_decoder, jsonString);
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
- catch (e_1) {
143
- const arg_1 = e_1.message;
144
- return toFail(printf("Error. Unable to parse json string to ArcStudy: %s"))(arg_1);
145
- }
146
- }
147
-
148
- export function ARCtrl_ISA_ArcStudy__ArcStudy_ToArcJsonString_71136F3F(this$, spaces) {
149
- return toString(defaultArg(spaces, 0), ArcStudy_encoder(this$));
150
- }
151
-
152
- export function ARCtrl_ISA_ArcStudy__ArcStudy_toArcJsonString_Static_1B3D5E9B(a) {
153
- return ARCtrl_ISA_ArcStudy__ArcStudy_ToArcJsonString_71136F3F(a);
154
- }
155
-
156
- export function ARCtrl_ISA_ArcStudy__ArcStudy_fromCompressedJsonString_Static_Z721C83C5(jsonString) {
157
- const decoder = object((get$) => {
158
- let arg_5, objectArg_2;
159
- let stringTable;
160
- const objectArg = get$.Required;
161
- stringTable = objectArg.Field("stringTable", StringTable_decoder);
162
- let oaTable;
163
- const arg_3 = OATable_decoder(stringTable);
164
- const objectArg_1 = get$.Required;
165
- oaTable = objectArg_1.Field("oaTable", arg_3);
166
- const arg_7 = ArcStudy_compressedDecoder(stringTable, oaTable, (arg_5 = CellTable_decoder(stringTable, oaTable), (objectArg_2 = get$.Required, objectArg_2.Field("cellTable", arg_5))));
167
- const objectArg_3 = get$.Required;
168
- return objectArg_3.Field("study", arg_7);
169
- });
170
- try {
171
- const matchValue = fromString(decoder, jsonString);
172
- if (matchValue.tag === 1) {
173
- throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
174
- }
175
- else {
176
- return matchValue.fields[0];
177
- }
178
- }
179
- catch (e_1) {
180
- const arg_9 = e_1.message;
181
- return toFail(printf("Error. Unable to parse json string to ArcAssay: %s"))(arg_9);
182
- }
183
- }
184
-
185
- export function ARCtrl_ISA_ArcStudy__ArcStudy_ToCompressedJsonString_71136F3F(this$, spaces) {
186
- const spaces_1 = defaultArg(spaces, 0) | 0;
187
- const stringTable = new Map([]);
188
- const oaTable = new Dictionary([], {
189
- Equals: equals,
190
- GetHashCode: safeHash,
191
- });
192
- const cellTable = new Dictionary([], {
193
- Equals: equals,
194
- GetHashCode: safeHash,
195
- });
196
- const arcStudy = ArcStudy_compressedEncoder(stringTable, oaTable, cellTable, this$);
197
- return toString(spaces_1, new Json(5, [[["cellTable", CellTable_encoder(stringTable, oaTable, CellTable_arrayFromMap(cellTable))], ["oaTable", OATable_encoder(stringTable, OATable_arrayFromMap(oaTable))], ["stringTable", StringTable_encoder(StringTable_arrayFromMap(stringTable))], ["study", arcStudy]]]));
198
- }
199
-
200
- export function ARCtrl_ISA_ArcStudy__ArcStudy_toCompressedJsonString_Static_1B3D5E9B(s) {
201
- return ARCtrl_ISA_ArcStudy__ArcStudy_ToCompressedJsonString_71136F3F(s);
202
- }
203
-
@@ -1,40 +0,0 @@
1
- import { sortBy, map, toArray } from "../../../fable_modules/fable-library-js.4.13.0/Seq.js";
2
- import { comparePrimitives } from "../../../fable_modules/fable-library-js.4.13.0/Util.js";
3
- import { item, map as map_1 } from "../../../fable_modules/fable-library-js.4.13.0/Array.js";
4
- import { CompositeCell_compressedDecoder, CompositeCell_compressedEncoder } from "./CompositeCell.js";
5
- import { Json } from "../../../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
6
- import { int, object, array as array_1 } from "../../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
7
- import { Dict_tryFind } from "../../ISA/Helper.js";
8
- import { addToDict } from "../../../fable_modules/fable-library-js.4.13.0/MapUtil.js";
9
-
10
- export function CellTable_arrayFromMap(otm) {
11
- return toArray(map((kv_1) => kv_1[0], sortBy((kv) => kv[1], otm, {
12
- Compare: comparePrimitives,
13
- })));
14
- }
15
-
16
- export function CellTable_encoder(stringTable, oaTable, ot) {
17
- return new Json(6, [map_1((cc) => CompositeCell_compressedEncoder(stringTable, oaTable, cc), ot)]);
18
- }
19
-
20
- export function CellTable_decoder(stringTable, oaTable) {
21
- return array_1(CompositeCell_compressedDecoder(stringTable, oaTable));
22
- }
23
-
24
- export function CellTable_encodeCell(otm, cc) {
25
- const matchValue = Dict_tryFind(cc, otm);
26
- if (matchValue == null) {
27
- const i_1 = otm.size | 0;
28
- addToDict(otm, cc, i_1);
29
- return new Json(7, [i_1 >>> 0]);
30
- }
31
- else {
32
- const i = matchValue | 0;
33
- return new Json(7, [i >>> 0]);
34
- }
35
- }
36
-
37
- export function CellTable_decodeCell(ot) {
38
- return object((get$) => item(get$.Required.Raw(int), ot));
39
- }
40
-
@@ -1,62 +0,0 @@
1
- import { OntologyAnnotation_decoder, OntologyAnnotation_encoder } from "../Ontology.js";
2
- import { ConverterOptions_$ctor } from "../ConverterOptions.js";
3
- import { ofArray, singleton } from "../../../fable_modules/fable-library-js.4.13.0/List.js";
4
- import { Json } from "../../../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
5
- import { list } from "../../../fable_modules/Thoth.Json.Core.0.2.1/Encode.fs.js";
6
- import { index, string, object } from "../../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
7
- import { CompositeCell } from "../../ISA/ArcTypes/CompositeCell.js";
8
- import { toText, printf, toFail } from "../../../fable_modules/fable-library-js.4.13.0/String.js";
9
- import { OATable_decodeOA, OATable_encodeOA } from "./OATable.js";
10
- import { StringTable_decodeString, StringTable_encodeString } from "../StringTable.js";
11
- import { fromString } from "../../../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
12
- import { toString } from "../../../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
13
- import { defaultArg } from "../../../fable_modules/fable-library-js.4.13.0/Option.js";
14
-
15
- export function CompositeCell_encoder(cc) {
16
- const oaToJsonString = (oa) => OntologyAnnotation_encoder(ConverterOptions_$ctor(), oa);
17
- const patternInput = (cc.tag === 0) ? ["Term", singleton(oaToJsonString(cc.fields[0]))] : ((cc.tag === 2) ? ["Unitized", ofArray([new Json(0, [cc.fields[0]]), oaToJsonString(cc.fields[1])])] : ["FreeText", singleton(new Json(0, [cc.fields[0]]))]);
18
- return new Json(5, [[["celltype", new Json(0, [patternInput[0]])], ["values", list(patternInput[1])]]]);
19
- }
20
-
21
- export const CompositeCell_decoder = object((get$) => {
22
- let arg_3, objectArg_1, arg_5, objectArg_2, arg_7, objectArg_3, arg_9, objectArg_4;
23
- let matchValue;
24
- const objectArg = get$.Required;
25
- matchValue = objectArg.Field("celltype", string);
26
- return (matchValue === "FreeText") ? (new CompositeCell(1, [(arg_3 = index(0, string), (objectArg_1 = get$.Required, objectArg_1.Field("values", arg_3)))])) : ((matchValue === "Term") ? (new CompositeCell(0, [(arg_5 = index(0, OntologyAnnotation_decoder(ConverterOptions_$ctor())), (objectArg_2 = get$.Required, objectArg_2.Field("values", arg_5)))])) : ((matchValue === "Unitized") ? (new CompositeCell(2, [(arg_7 = index(0, string), (objectArg_3 = get$.Required, objectArg_3.Field("values", arg_7))), (arg_9 = index(1, OntologyAnnotation_decoder(ConverterOptions_$ctor())), (objectArg_4 = get$.Required, objectArg_4.Field("values", arg_9)))])) : toFail(printf("Error reading CompositeCell from json string: %A"))(matchValue)));
27
- });
28
-
29
- export function CompositeCell_compressedEncoder(stringTable, oaTable, cc) {
30
- const patternInput = (cc.tag === 0) ? ["Term", singleton(OATable_encodeOA(oaTable, cc.fields[0]))] : ((cc.tag === 2) ? ["Unitized", ofArray([StringTable_encodeString(stringTable, cc.fields[0]), OATable_encodeOA(oaTable, cc.fields[1])])] : ["FreeText", singleton(StringTable_encodeString(stringTable, cc.fields[0]))]);
31
- return new Json(5, [[["t", StringTable_encodeString(stringTable, patternInput[0])], ["v", list(patternInput[1])]]]);
32
- }
33
-
34
- export function CompositeCell_compressedDecoder(stringTable, oaTable) {
35
- return object((get$) => {
36
- let arg_3, objectArg_1, arg_5, objectArg_2, arg_7, objectArg_3, arg_9, objectArg_4;
37
- let matchValue;
38
- const arg_1 = StringTable_decodeString(stringTable);
39
- const objectArg = get$.Required;
40
- matchValue = objectArg.Field("t", arg_1);
41
- return (matchValue === "FreeText") ? (new CompositeCell(1, [(arg_3 = index(0, StringTable_decodeString(stringTable)), (objectArg_1 = get$.Required, objectArg_1.Field("v", arg_3)))])) : ((matchValue === "Term") ? (new CompositeCell(0, [(arg_5 = index(0, OATable_decodeOA(oaTable)), (objectArg_2 = get$.Required, objectArg_2.Field("v", arg_5)))])) : ((matchValue === "Unitized") ? (new CompositeCell(2, [(arg_7 = index(0, StringTable_decodeString(stringTable)), (objectArg_3 = get$.Required, objectArg_3.Field("v", arg_7))), (arg_9 = index(1, OATable_decodeOA(oaTable)), (objectArg_4 = get$.Required, objectArg_4.Field("v", arg_9)))])) : toFail(printf("Error reading CompositeCell from json string: %A"))(matchValue)));
42
- });
43
- }
44
-
45
- export function ARCtrl_ISA_CompositeCell__CompositeCell_fromJsonString_Static_Z721C83C5(jsonString) {
46
- const matchValue = fromString(CompositeCell_decoder, jsonString);
47
- if (matchValue.tag === 1) {
48
- throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
49
- }
50
- else {
51
- return matchValue.fields[0];
52
- }
53
- }
54
-
55
- export function ARCtrl_ISA_CompositeCell__CompositeCell_ToJsonString_71136F3F(this$, spaces) {
56
- return toString(defaultArg(spaces, 0), CompositeCell_encoder(this$));
57
- }
58
-
59
- export function ARCtrl_ISA_CompositeCell__CompositeCell_toJsonString_Static_1B703D57(a) {
60
- return ARCtrl_ISA_CompositeCell__CompositeCell_ToJsonString_71136F3F(a);
61
- }
62
-
@@ -1,33 +0,0 @@
1
- import { toString } from "../../../fable_modules/fable-library-js.4.13.0/Types.js";
2
- import { Json } from "../../../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
3
- import { string, succeed, andThen } from "../../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
4
- import { IOType } from "../../ISA/ArcTypes/CompositeHeader.js";
5
- import { fromString } from "../../../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
6
- import { printf, toText } from "../../../fable_modules/fable-library-js.4.13.0/String.js";
7
- import { toString as toString_1 } from "../../../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
8
- import { defaultArg } from "../../../fable_modules/fable-library-js.4.13.0/Option.js";
9
-
10
- export function IOType_encoder(io) {
11
- return new Json(0, [toString(io)]);
12
- }
13
-
14
- export const IOType_decoder = andThen((s) => succeed(IOType.ofString(s)), string);
15
-
16
- export function ARCtrl_ISA_IOType__IOType_fromJsonString_Static_Z721C83C5(jsonString) {
17
- const matchValue = fromString(IOType_decoder, jsonString);
18
- if (matchValue.tag === 1) {
19
- throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
20
- }
21
- else {
22
- return matchValue.fields[0];
23
- }
24
- }
25
-
26
- export function ARCtrl_ISA_IOType__IOType_ToJsonString_71136F3F(this$, spaces) {
27
- return toString_1(defaultArg(spaces, 0), IOType_encoder(this$));
28
- }
29
-
30
- export function ARCtrl_ISA_IOType__IOType_toJsonString_Static_Z359DBB26(a) {
31
- return ARCtrl_ISA_IOType__IOType_ToJsonString_71136F3F(a);
32
- }
33
-
@@ -1,42 +0,0 @@
1
- import { sortBy, map, toArray } from "../../../fable_modules/fable-library-js.4.13.0/Seq.js";
2
- import { comparePrimitives } from "../../../fable_modules/fable-library-js.4.13.0/Util.js";
3
- import { item, map as map_1 } from "../../../fable_modules/fable-library-js.4.13.0/Array.js";
4
- import { ConverterOptions_$ctor } from "../ConverterOptions.js";
5
- import { OntologyAnnotation_compressedDecoder, OntologyAnnotation_compressedEncoder } from "../Ontology.js";
6
- import { Json } from "../../../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
7
- import { int, object, array as array_1 } from "../../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
8
- import { Dict_tryFind } from "../../ISA/Helper.js";
9
- import { addToDict } from "../../../fable_modules/fable-library-js.4.13.0/MapUtil.js";
10
-
11
- export function OATable_arrayFromMap(otm) {
12
- return toArray(map((kv_1) => kv_1[0], sortBy((kv) => kv[1], otm, {
13
- Compare: comparePrimitives,
14
- })));
15
- }
16
-
17
- export function OATable_encoder(stringTable, ot) {
18
- let options;
19
- return new Json(6, [map_1((options = ConverterOptions_$ctor(), (oa) => OntologyAnnotation_compressedEncoder(stringTable, options, oa)), ot)]);
20
- }
21
-
22
- export function OATable_decoder(stringTable) {
23
- return array_1(OntologyAnnotation_compressedDecoder(stringTable, ConverterOptions_$ctor()));
24
- }
25
-
26
- export function OATable_encodeOA(otm, oa) {
27
- const matchValue = Dict_tryFind(oa, otm);
28
- if (matchValue == null) {
29
- const i_1 = otm.size | 0;
30
- addToDict(otm, oa, i_1);
31
- return new Json(7, [i_1 >>> 0]);
32
- }
33
- else {
34
- const i = matchValue | 0;
35
- return new Json(7, [i >>> 0]);
36
- }
37
- }
38
-
39
- export function OATable_decodeOA(ot) {
40
- return object((get$) => item(get$.Required.Raw(int), ot));
41
- }
42
-
@@ -1,129 +0,0 @@
1
- import { ofArray, choose } from "../../fable_modules/fable-library-js.4.13.0/List.js";
2
- import { equals } from "../../fable_modules/fable-library-js.4.13.0/Util.js";
3
- import { Json } from "../../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
4
- import { tryInclude, tryIncludeList } from "./GEncode.js";
5
- import { Data_decoder, Data_encoder, Sample_decoder, Sample_encoder } from "./Data.js";
6
- import { MaterialAttribute_decoder, MaterialAttribute_encoder, Material_decoder, Material_encoder } from "./Material.js";
7
- import { uri, object } from "./Decode.js";
8
- import { string, list as list_1 } from "../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
9
- import { AssayMaterials } from "../ISA/JsonTypes/AssayMaterials.js";
10
- import { printf, toText, replace, remove } from "../../fable_modules/fable-library-js.4.13.0/String.js";
11
- import { max } from "../../fable_modules/fable-library-js.4.13.0/Double.js";
12
- import { URIModule_toString } from "../ISA/JsonTypes/URI.js";
13
- import { Operators_FailurePattern } from "../../fable_modules/fable-library-js.4.13.0/FSharp.Core.js";
14
- import { Assay_identifierFromFileName } from "../ISA/Identifier.js";
15
- import { empty, singleton, append, delay, toList } from "../../fable_modules/fable-library-js.4.13.0/Seq.js";
16
- import { ConverterOptions__set_IncludeContext_Z1FBCCD16, ConverterOptions__set_IncludeType_Z1FBCCD16, ConverterOptions__set_SetID_Z1FBCCD16, ConverterOptions_$ctor, ConverterOptions__get_IncludeContext, ConverterOptions__get_IsRoCrate, ConverterOptions__get_IncludeType, ConverterOptions__get_SetID } from "./ConverterOptions.js";
17
- import { list as list_2 } from "../../fable_modules/Thoth.Json.Core.0.2.1/Encode.fs.js";
18
- import { OntologyAnnotation_decoder, OntologyAnnotation_encoder } from "./Ontology.js";
19
- import { Process_decoder, Process_encoder } from "./Process.js";
20
- import { decoder as decoder_1, encoder } from "./Comment.js";
21
- import { context_jsonvalue } from "./context/rocrate/isa_assay_context.js";
22
- import { Assay } from "../ISA/JsonTypes/Assay.js";
23
- import { fromString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
24
- import { toString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
25
-
26
- export function AssayMaterials_encoder(options, oa) {
27
- return new Json(5, [choose((tupledArg) => {
28
- const v = tupledArg[1];
29
- if (equals(v, new Json(3, []))) {
30
- return void 0;
31
- }
32
- else {
33
- return [tupledArg[0], v];
34
- }
35
- }, ofArray([tryIncludeList("samples", (oa_1) => Sample_encoder(options, oa_1), oa.Samples), tryIncludeList("otherMaterials", (oa_2) => Material_encoder(options, oa_2), oa.OtherMaterials)]))]);
36
- }
37
-
38
- export const AssayMaterials_allowedFields = ofArray(["samples", "otherMaterials"]);
39
-
40
- export function AssayMaterials_decoder(options) {
41
- return object(AssayMaterials_allowedFields, (get$) => {
42
- let arg_1, objectArg, arg_3, objectArg_1;
43
- return new AssayMaterials((arg_1 = list_1(Sample_decoder(options)), (objectArg = get$.Optional, objectArg.Field("samples", arg_1))), (arg_3 = list_1(Material_decoder(options)), (objectArg_1 = get$.Optional, objectArg_1.Field("otherMaterials", arg_3))));
44
- });
45
- }
46
-
47
- export function Assay_genID(a) {
48
- const matchValue = a.ID;
49
- if (matchValue == null) {
50
- const matchValue_1 = a.FileName;
51
- if (matchValue_1 == null) {
52
- return "#EmptyAssay";
53
- }
54
- else {
55
- const n = matchValue_1;
56
- return remove(replace(n, " ", "_"), 0, 1 + max(n.lastIndexOf("/"), n.lastIndexOf("\\")));
57
- }
58
- }
59
- else {
60
- return URIModule_toString(matchValue);
61
- }
62
- }
63
-
64
- export function Assay_encoder(options, studyName, oa) {
65
- let assayName;
66
- try {
67
- const matchValue = oa.FileName;
68
- assayName = ((matchValue == null) ? void 0 : Assay_identifierFromFileName(matchValue));
69
- }
70
- catch (matchValue_1) {
71
- const activePatternResult = Operators_FailurePattern(matchValue_1);
72
- if (activePatternResult != null) {
73
- const msg = activePatternResult;
74
- assayName = void 0;
75
- }
76
- else {
77
- throw matchValue_1;
78
- }
79
- }
80
- return new Json(5, [choose((tupledArg) => {
81
- const v = tupledArg[1];
82
- if (equals(v, new Json(3, []))) {
83
- return void 0;
84
- }
85
- else {
86
- return [tupledArg[0], v];
87
- }
88
- }, toList(delay(() => append(ConverterOptions__get_SetID(options) ? singleton(["@id", new Json(0, [Assay_genID(oa)])]) : singleton(tryInclude("@id", (value_1) => (new Json(0, [value_1])), oa.ID)), delay(() => append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", list_2(ofArray([new Json(0, ["Assay"]), new Json(0, ["ArcAssay"])]))]) : empty(), delay(() => append(singleton(tryInclude("filename", (value_5) => (new Json(0, [value_5])), oa.FileName)), delay(() => append(singleton(tryInclude("measurementType", (oa_1) => OntologyAnnotation_encoder(options, oa_1), oa.MeasurementType)), delay(() => append(singleton(tryInclude("technologyType", (oa_2) => OntologyAnnotation_encoder(options, oa_2), oa.TechnologyType)), delay(() => append(singleton(tryInclude("technologyPlatform", (value_7) => (new Json(0, [value_7])), oa.TechnologyPlatform)), delay(() => append(singleton(tryIncludeList("dataFiles", (oa_3) => Data_encoder(options, oa_3), oa.DataFiles)), delay(() => {
89
- let matchValue_2, m;
90
- return append(ConverterOptions__get_IsRoCrate(options) ? ((matchValue_2 = oa.Materials, (matchValue_2 == null) ? (empty()) : ((m = matchValue_2, append(singleton(tryIncludeList("samples", (oa_4) => Sample_encoder(options, oa_4), m.Samples)), delay(() => singleton(tryIncludeList("materials", (oa_5) => Material_encoder(options, oa_5), m.OtherMaterials)))))))) : empty(), delay(() => append(!ConverterOptions__get_IsRoCrate(options) ? singleton(tryInclude("materials", (oa_6) => AssayMaterials_encoder(options, oa_6), oa.Materials)) : empty(), delay(() => append(singleton(tryIncludeList("characteristicCategories", (oa_7) => MaterialAttribute_encoder(options, oa_7), oa.CharacteristicCategories)), delay(() => append(singleton(tryIncludeList("unitCategories", (oa_8) => OntologyAnnotation_encoder(options, oa_8), oa.UnitCategories)), delay(() => append(singleton(tryIncludeList("processSequence", (oa_9) => Process_encoder(options, studyName, assayName, oa_9), oa.ProcessSequence)), delay(() => append(singleton(tryIncludeList("comments", (comment) => encoder(options, comment), oa.Comments)), delay(() => (ConverterOptions__get_IncludeContext(options) ? singleton(["@context", context_jsonvalue]) : empty())))))))))))));
91
- })))))))))))))))))]);
92
- }
93
-
94
- export const Assay_allowedFields = ofArray(["@id", "filename", "measurementType", "technologyType", "technologyPlatform", "dataFiles", "materials", "characteristicCategories", "unitCategories", "processSequence", "comments", "@type", "@context"]);
95
-
96
- export function Assay_decoder(options) {
97
- return object(Assay_allowedFields, (get$) => {
98
- let objectArg, objectArg_1, arg_5, objectArg_2, arg_7, 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;
99
- return new Assay((objectArg = get$.Optional, objectArg.Field("@id", uri)), (objectArg_1 = get$.Optional, objectArg_1.Field("filename", string)), (arg_5 = OntologyAnnotation_decoder(options), (objectArg_2 = get$.Optional, objectArg_2.Field("measurementType", arg_5))), (arg_7 = OntologyAnnotation_decoder(options), (objectArg_3 = get$.Optional, objectArg_3.Field("technologyType", arg_7))), (objectArg_4 = get$.Optional, objectArg_4.Field("technologyPlatform", string)), (arg_11 = list_1(Data_decoder(options)), (objectArg_5 = get$.Optional, objectArg_5.Field("dataFiles", arg_11))), (arg_13 = AssayMaterials_decoder(options), (objectArg_6 = get$.Optional, objectArg_6.Field("materials", arg_13))), (arg_15 = list_1(MaterialAttribute_decoder(options)), (objectArg_7 = get$.Optional, objectArg_7.Field("characteristicCategories", arg_15))), (arg_17 = list_1(OntologyAnnotation_decoder(options)), (objectArg_8 = get$.Optional, objectArg_8.Field("unitCategories", arg_17))), (arg_19 = list_1(Process_decoder(options)), (objectArg_9 = get$.Optional, objectArg_9.Field("processSequence", arg_19))), (arg_21 = list_1(decoder_1(options)), (objectArg_10 = get$.Optional, objectArg_10.Field("comments", arg_21))));
100
- });
101
- }
102
-
103
- export function Assay_fromJsonString(s) {
104
- const matchValue = fromString(Assay_decoder(ConverterOptions_$ctor()), s);
105
- if (matchValue.tag === 1) {
106
- throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
107
- }
108
- else {
109
- return matchValue.fields[0];
110
- }
111
- }
112
-
113
- export function Assay_toJsonString(p) {
114
- return toString(2, Assay_encoder(ConverterOptions_$ctor(), void 0, p));
115
- }
116
-
117
- /**
118
- * exports in json-ld format
119
- */
120
- export function Assay_toJsonldString(a) {
121
- let returnVal;
122
- return toString(2, Assay_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), void 0, a));
123
- }
124
-
125
- export function Assay_toJsonldStringWithContext(a) {
126
- let returnVal;
127
- return toString(2, Assay_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, a));
128
- }
129
-
@@ -1,80 +0,0 @@
1
- import { printf, toText, replace } from "../../fable_modules/fable-library-js.4.13.0/String.js";
2
- import { value as value_8 } from "../../fable_modules/fable-library-js.4.13.0/Option.js";
3
- import { URIModule_toString } from "../ISA/JsonTypes/URI.js";
4
- import { 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 { tryInclude } from "./GEncode.js";
10
- import { context_jsonvalue } from "./context/rocrate/isa_comment_context.js";
11
- import { string, object } from "../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
12
- import { uri } from "./Decode.js";
13
- import { Comment$ } from "../ISA/JsonTypes/Comment.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 genID(c) {
18
- const matchValue = c.ID;
19
- if (matchValue == null) {
20
- const matchValue_1 = c.Name;
21
- if (matchValue_1 == null) {
22
- return "#EmptyComment";
23
- }
24
- else {
25
- const n = matchValue_1;
26
- const v = (c.Value != null) ? ("_" + replace(value_8(c.Value), " ", "_")) : "";
27
- return ("#Comment_" + replace(n, " ", "_")) + v;
28
- }
29
- }
30
- else {
31
- return URIModule_toString(matchValue);
32
- }
33
- }
34
-
35
- export function encoder(options, comment) {
36
- return new Json(5, [choose((tupledArg) => {
37
- const v = tupledArg[1];
38
- if (equals(v, new Json(3, []))) {
39
- return void 0;
40
- }
41
- else {
42
- return [tupledArg[0], v];
43
- }
44
- }, toList(delay(() => append(ConverterOptions__get_SetID(options) ? singleton(["@id", new Json(0, [genID(comment)])]) : singleton(tryInclude("@id", (value_1) => (new Json(0, [value_1])), comment.ID)), delay(() => append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", new Json(0, ["Comment"])]) : empty(), delay(() => append(singleton(tryInclude("name", (value_4) => (new Json(0, [value_4])), comment.Name)), delay(() => append(singleton(tryInclude("value", (value_6) => (new Json(0, [value_6])), comment.Value)), delay(() => (ConverterOptions__get_IncludeContext(options) ? singleton(["@context", context_jsonvalue]) : empty()))))))))))))]);
45
- }
46
-
47
- export function decoder(options) {
48
- return object((get$) => {
49
- let objectArg, objectArg_1, objectArg_2;
50
- return new Comment$((objectArg = get$.Optional, objectArg.Field("@id", uri)), (objectArg_1 = get$.Optional, objectArg_1.Field("name", string)), (objectArg_2 = get$.Optional, objectArg_2.Field("value", string)));
51
- });
52
- }
53
-
54
- export function fromJsonString(s) {
55
- const matchValue = fromString(decoder(ConverterOptions_$ctor()), s);
56
- if (matchValue.tag === 1) {
57
- throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
58
- }
59
- else {
60
- return matchValue.fields[0];
61
- }
62
- }
63
-
64
- export function toJsonString(c) {
65
- return toString(2, encoder(ConverterOptions_$ctor(), c));
66
- }
67
-
68
- /**
69
- * exports in json-ld format
70
- */
71
- export function toJsonldString(c) {
72
- let returnVal;
73
- return toString(2, encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), c));
74
- }
75
-
76
- export function toJsonldStringWithContext(a) {
77
- let returnVal;
78
- return toString(2, encoder((returnVal = ConverterOptions_$ctor(), (((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), ConverterOptions__set_IncludeContext_Z1FBCCD16(returnVal, true)), returnVal)), a));
79
- }
80
-
@@ -1,51 +0,0 @@
1
- import { class_type } from "../../fable_modules/fable-library-js.4.13.0/Reflection.js";
2
-
3
- export class ConverterOptions {
4
- constructor() {
5
- this.setID = false;
6
- this.includeType = false;
7
- this.includeContext = false;
8
- this.isRoCrate = false;
9
- }
10
- }
11
-
12
- export function ConverterOptions_$reflection() {
13
- return class_type("ARCtrl.ISA.Json.ConverterOptions", void 0, ConverterOptions);
14
- }
15
-
16
- export function ConverterOptions_$ctor() {
17
- return new ConverterOptions();
18
- }
19
-
20
- export function ConverterOptions__get_SetID(this$) {
21
- return this$.setID;
22
- }
23
-
24
- export function ConverterOptions__set_SetID_Z1FBCCD16(this$, setId) {
25
- this$.setID = setId;
26
- }
27
-
28
- export function ConverterOptions__get_IncludeType(this$) {
29
- return this$.includeType;
30
- }
31
-
32
- export function ConverterOptions__set_IncludeType_Z1FBCCD16(this$, iT) {
33
- this$.includeType = iT;
34
- }
35
-
36
- export function ConverterOptions__get_IncludeContext(this$) {
37
- return this$.includeContext;
38
- }
39
-
40
- export function ConverterOptions__set_IncludeContext_Z1FBCCD16(this$, iC) {
41
- this$.includeContext = iC;
42
- }
43
-
44
- export function ConverterOptions__get_IsRoCrate(this$) {
45
- return this$.isRoCrate;
46
- }
47
-
48
- export function ConverterOptions__set_IsRoCrate_Z1FBCCD16(this$, iR) {
49
- this$.isRoCrate = iR;
50
- }
51
-