@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
package/Json/Person.js ADDED
@@ -0,0 +1,250 @@
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_ROCrate_decoderDisambiguatingDescription, Comment_ROCrate_encoderDisambiguatingDescription, Comment_decoder, Comment_encoder } from "./Comment.js";
7
+ import { array as array_2, map as map_1, string, object } from "../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
8
+ import { Person } from "../Core/Person.js";
9
+ import { defaultArg, unwrap } from "../fable_modules/fable-library-js.4.16.0/Option.js";
10
+ import { Decode_objectNoAdditionalProperties, Decode_resizeArray } from "./Decode.js";
11
+ import { tryPick } from "../fable_modules/fable-library-js.4.16.0/Seq.js";
12
+ import { printf, toText, join, split, replace } from "../fable_modules/fable-library-js.4.16.0/String.js";
13
+ import { context_jsonvalue } from "./context/rocrate/isa_organization_context.js";
14
+ import { contextMinimal_jsonValue, context_jsonvalue as context_jsonvalue_1 } from "./context/rocrate/isa_person_context.js";
15
+ import { map } from "../fable_modules/fable-library-js.4.16.0/Array.js";
16
+ import { Person_setOrcidFromComments, Person_setCommentFromORCID } from "../Core/Conversion.js";
17
+ import { fromString } from "../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
18
+ import { toString } from "../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
19
+
20
+ export function Person_encoder(person) {
21
+ return new Json(5, [choose((tupledArg) => {
22
+ const v = tupledArg[1];
23
+ if (equals(v, new Json(3, []))) {
24
+ return void 0;
25
+ }
26
+ else {
27
+ return [tupledArg[0], v];
28
+ }
29
+ }, ofArray([tryInclude("firstName", (value) => (new Json(0, [value])), person.FirstName), tryInclude("lastName", (value_2) => (new Json(0, [value_2])), person.LastName), tryInclude("midInitials", (value_4) => (new Json(0, [value_4])), person.MidInitials), tryInclude("orcid", (value_6) => (new Json(0, [value_6])), person.ORCID), tryInclude("email", (value_8) => (new Json(0, [value_8])), person.EMail), tryInclude("phone", (value_10) => (new Json(0, [value_10])), person.Phone), tryInclude("fax", (value_12) => (new Json(0, [value_12])), person.Fax), tryInclude("address", (value_14) => (new Json(0, [value_14])), person.Address), tryInclude("affiliation", (value_16) => (new Json(0, [value_16])), person.Affiliation), tryIncludeSeq("roles", OntologyAnnotation_encoder, person.Roles), tryIncludeSeq("comments", Comment_encoder, person.Comments)]))]);
30
+ }
31
+
32
+ export const Person_decoder = object((get$) => {
33
+ let objectArg, objectArg_1, objectArg_2, objectArg_3, objectArg_4, objectArg_5, objectArg_6, objectArg_7, objectArg_8, arg_19, objectArg_9, arg_21, objectArg_10;
34
+ return new Person(unwrap((objectArg = get$.Optional, objectArg.Field("orcid", string))), unwrap((objectArg_1 = get$.Optional, objectArg_1.Field("lastName", string))), unwrap((objectArg_2 = get$.Optional, objectArg_2.Field("firstName", string))), unwrap((objectArg_3 = get$.Optional, objectArg_3.Field("midInitials", string))), unwrap((objectArg_4 = get$.Optional, objectArg_4.Field("email", string))), unwrap((objectArg_5 = get$.Optional, objectArg_5.Field("phone", string))), unwrap((objectArg_6 = get$.Optional, objectArg_6.Field("fax", string))), unwrap((objectArg_7 = get$.Optional, objectArg_7.Field("address", string))), unwrap((objectArg_8 = get$.Optional, objectArg_8.Field("affiliation", string))), unwrap((arg_19 = Decode_resizeArray(OntologyAnnotation_decoder), (objectArg_9 = get$.Optional, objectArg_9.Field("roles", arg_19)))), unwrap((arg_21 = Decode_resizeArray(Comment_decoder), (objectArg_10 = get$.Optional, objectArg_10.Field("comments", arg_21)))));
35
+ });
36
+
37
+ export function Person_ROCrate_genID(p) {
38
+ const orcid = tryPick((c) => {
39
+ const matchValue = c.Name;
40
+ const matchValue_1 = c.Value;
41
+ let matchResult, n, v;
42
+ if (matchValue != null) {
43
+ if (matchValue_1 != null) {
44
+ matchResult = 0;
45
+ n = matchValue;
46
+ v = matchValue_1;
47
+ }
48
+ else {
49
+ matchResult = 1;
50
+ }
51
+ }
52
+ else {
53
+ matchResult = 1;
54
+ }
55
+ switch (matchResult) {
56
+ case 0:
57
+ if (((n === "orcid") ? true : (n === "Orcid")) ? true : (n === "ORCID")) {
58
+ return v;
59
+ }
60
+ else {
61
+ return void 0;
62
+ }
63
+ default:
64
+ return void 0;
65
+ }
66
+ }, p.Comments);
67
+ if (orcid == null) {
68
+ const matchValue_3 = p.EMail;
69
+ if (matchValue_3 == null) {
70
+ const matchValue_4 = p.FirstName;
71
+ const matchValue_5 = p.MidInitials;
72
+ const matchValue_6 = p.LastName;
73
+ let matchResult_1, fn, ln, mn, fn_1, ln_1, ln_2, fn_2;
74
+ if (matchValue_4 == null) {
75
+ if (matchValue_5 == null) {
76
+ if (matchValue_6 != null) {
77
+ matchResult_1 = 2;
78
+ ln_2 = matchValue_6;
79
+ }
80
+ else {
81
+ matchResult_1 = 4;
82
+ }
83
+ }
84
+ else {
85
+ matchResult_1 = 4;
86
+ }
87
+ }
88
+ else if (matchValue_5 == null) {
89
+ if (matchValue_6 == null) {
90
+ matchResult_1 = 3;
91
+ fn_2 = matchValue_4;
92
+ }
93
+ else {
94
+ matchResult_1 = 1;
95
+ fn_1 = matchValue_4;
96
+ ln_1 = matchValue_6;
97
+ }
98
+ }
99
+ else if (matchValue_6 != null) {
100
+ matchResult_1 = 0;
101
+ fn = matchValue_4;
102
+ ln = matchValue_6;
103
+ mn = matchValue_5;
104
+ }
105
+ else {
106
+ matchResult_1 = 4;
107
+ }
108
+ switch (matchResult_1) {
109
+ case 0:
110
+ return (((("#" + replace(fn, " ", "_")) + "_") + replace(mn, " ", "_")) + "_") + replace(ln, " ", "_");
111
+ case 1:
112
+ return (("#" + replace(fn_1, " ", "_")) + "_") + replace(ln_1, " ", "_");
113
+ case 2:
114
+ return "#" + replace(ln_2, " ", "_");
115
+ case 3:
116
+ return "#" + replace(fn_2, " ", "_");
117
+ default:
118
+ return "#EmptyPerson";
119
+ }
120
+ }
121
+ else {
122
+ return matchValue_3;
123
+ }
124
+ }
125
+ else {
126
+ return orcid;
127
+ }
128
+ }
129
+
130
+ export function Person_ROCrate_Affiliation_encoder(affiliation) {
131
+ return new Json(5, [[["@type", new Json(0, ["Organization"])], ["@id", new Json(0, [replace(`#Organization_${affiliation}`, " ", "_")])], ["name", new Json(0, [affiliation])], ["@context", context_jsonvalue]]]);
132
+ }
133
+
134
+ export const Person_ROCrate_Affiliation_decoder = object((get$) => {
135
+ const objectArg = get$.Required;
136
+ return objectArg.Field("name", string);
137
+ });
138
+
139
+ export function Person_ROCrate_encoder(oa) {
140
+ return new Json(5, [choose((tupledArg) => {
141
+ const v = tupledArg[1];
142
+ if (equals(v, new Json(3, []))) {
143
+ return void 0;
144
+ }
145
+ else {
146
+ return [tupledArg[0], v];
147
+ }
148
+ }, ofArray([["@id", new Json(0, [Person_ROCrate_genID(oa)])], ["@type", new Json(0, ["Person"])], tryInclude("orcid", (value_2) => (new Json(0, [value_2])), oa.ORCID), tryInclude("firstName", (value_4) => (new Json(0, [value_4])), oa.FirstName), tryInclude("lastName", (value_6) => (new Json(0, [value_6])), oa.LastName), tryInclude("midInitials", (value_8) => (new Json(0, [value_8])), oa.MidInitials), tryInclude("email", (value_10) => (new Json(0, [value_10])), oa.EMail), tryInclude("phone", (value_12) => (new Json(0, [value_12])), oa.Phone), tryInclude("fax", (value_14) => (new Json(0, [value_14])), oa.Fax), tryInclude("address", (value_16) => (new Json(0, [value_16])), oa.Address), tryInclude("affiliation", Person_ROCrate_Affiliation_encoder, oa.Affiliation), tryIncludeSeq("roles", OntologyAnnotation_ROCrate_encoderDefinedTerm, oa.Roles), tryIncludeSeq("comments", Comment_ROCrate_encoderDisambiguatingDescription, oa.Comments), ["@context", context_jsonvalue_1]]))]);
149
+ }
150
+
151
+ export const Person_ROCrate_decoder = object((get$) => {
152
+ let objectArg, objectArg_1, objectArg_2, objectArg_3, objectArg_4, objectArg_5, objectArg_6, objectArg_7, objectArg_8, arg_19, objectArg_9, arg_21, objectArg_10;
153
+ return new Person(unwrap((objectArg = get$.Optional, objectArg.Field("orcid", string))), unwrap((objectArg_1 = get$.Optional, objectArg_1.Field("lastName", string))), unwrap((objectArg_2 = get$.Optional, objectArg_2.Field("firstName", string))), unwrap((objectArg_3 = get$.Optional, objectArg_3.Field("midInitials", string))), unwrap((objectArg_4 = get$.Optional, objectArg_4.Field("email", string))), unwrap((objectArg_5 = get$.Optional, objectArg_5.Field("phone", string))), unwrap((objectArg_6 = get$.Optional, objectArg_6.Field("fax", string))), unwrap((objectArg_7 = get$.Optional, objectArg_7.Field("address", string))), unwrap((objectArg_8 = get$.Optional, objectArg_8.Field("affiliation", Person_ROCrate_Affiliation_decoder))), unwrap((arg_19 = Decode_resizeArray(OntologyAnnotation_ROCrate_decoderDefinedTerm), (objectArg_9 = get$.Optional, objectArg_9.Field("roles", arg_19)))), unwrap((arg_21 = Decode_resizeArray(Comment_ROCrate_decoderDisambiguatingDescription), (objectArg_10 = get$.Optional, objectArg_10.Field("comments", arg_21)))));
154
+ });
155
+
156
+ /**
157
+ * This is only used for ro-crate creation. In ISA publication authors are only a string. ro-crate requires person object.
158
+ * Therefore, we try to split the string by common separators and create a minimal person object for ro-crate.
159
+ */
160
+ export function Person_ROCrate_encodeAuthorListString(authorList) {
161
+ return new Json(6, [map((name) => (new Json(5, [choose((tupledArg) => {
162
+ const v = tupledArg[1];
163
+ if (equals(v, new Json(3, []))) {
164
+ return void 0;
165
+ }
166
+ else {
167
+ return [tupledArg[0], v];
168
+ }
169
+ }, ofArray([["@type", new Json(0, ["Person"])], tryInclude("name", (value_1) => (new Json(0, [value_1])), name), ["@context", contextMinimal_jsonValue]]))])), map((s) => s.trim(), split(authorList, [(authorList.indexOf("\t") >= 0) ? "\t" : ((authorList.indexOf(";") >= 0) ? ";" : ",")], void 0, 0)))]);
170
+ }
171
+
172
+ export const Person_ROCrate_decodeAuthorListString = map_1((v) => join(", ", v), array_2(object((get$) => {
173
+ let objectArg;
174
+ return defaultArg((objectArg = get$.Optional, objectArg.Field("name", string)), "");
175
+ })));
176
+
177
+ export const Person_ISAJson_allowedFields = ofArray(["@id", "firstName", "lastName", "midInitials", "email", "phone", "fax", "address", "affiliation", "roles", "comments", "@type", "@context"]);
178
+
179
+ export function Person_ISAJson_encoder(person) {
180
+ const person_1 = Person_setCommentFromORCID(person);
181
+ return new Json(5, [choose((tupledArg) => {
182
+ const v = tupledArg[1];
183
+ if (equals(v, new Json(3, []))) {
184
+ return void 0;
185
+ }
186
+ else {
187
+ return [tupledArg[0], v];
188
+ }
189
+ }, ofArray([tryInclude("firstName", (value) => (new Json(0, [value])), person_1.FirstName), tryInclude("lastName", (value_2) => (new Json(0, [value_2])), person_1.LastName), tryInclude("midInitials", (value_4) => (new Json(0, [value_4])), person_1.MidInitials), tryInclude("email", (value_6) => (new Json(0, [value_6])), person_1.EMail), tryInclude("phone", (value_8) => (new Json(0, [value_8])), person_1.Phone), tryInclude("fax", (value_10) => (new Json(0, [value_10])), person_1.Fax), tryInclude("address", (value_12) => (new Json(0, [value_12])), person_1.Address), tryInclude("affiliation", (value_14) => (new Json(0, [value_14])), person_1.Affiliation), tryIncludeSeq("roles", OntologyAnnotation_encoder, person_1.Roles), tryIncludeSeq("comments", Comment_encoder, person_1.Comments)]))]);
190
+ }
191
+
192
+ export const Person_ISAJson_decoder = Decode_objectNoAdditionalProperties(Person_ISAJson_allowedFields, (get$) => {
193
+ let objectArg, objectArg_1, objectArg_2, objectArg_3, objectArg_4, objectArg_5, objectArg_6, objectArg_7, arg_17, objectArg_8, arg_19, objectArg_9;
194
+ return Person_setOrcidFromComments(new Person(void 0, unwrap((objectArg = get$.Optional, objectArg.Field("lastName", string))), unwrap((objectArg_1 = get$.Optional, objectArg_1.Field("firstName", string))), unwrap((objectArg_2 = get$.Optional, objectArg_2.Field("midInitials", string))), unwrap((objectArg_3 = get$.Optional, objectArg_3.Field("email", string))), unwrap((objectArg_4 = get$.Optional, objectArg_4.Field("phone", string))), unwrap((objectArg_5 = get$.Optional, objectArg_5.Field("fax", string))), unwrap((objectArg_6 = get$.Optional, objectArg_6.Field("address", string))), unwrap((objectArg_7 = get$.Optional, objectArg_7.Field("affiliation", string))), unwrap((arg_17 = Decode_resizeArray(OntologyAnnotation_decoder), (objectArg_8 = get$.Optional, objectArg_8.Field("roles", arg_17)))), unwrap((arg_19 = Decode_resizeArray(Comment_decoder), (objectArg_9 = get$.Optional, objectArg_9.Field("comments", arg_19))))));
195
+ });
196
+
197
+ export function ARCtrl_Person__Person_fromJsonString_Static_Z721C83C5(s) {
198
+ const matchValue = fromString(Person_decoder, s);
199
+ if (matchValue.tag === 1) {
200
+ throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
201
+ }
202
+ else {
203
+ return matchValue.fields[0];
204
+ }
205
+ }
206
+
207
+ export function ARCtrl_Person__Person_toJsonString_Static_71136F3F(spaces) {
208
+ return (obj) => {
209
+ const value = Person_encoder(obj);
210
+ return toString(defaultSpaces(spaces), value);
211
+ };
212
+ }
213
+
214
+ export function ARCtrl_Person__Person_fromROCrateJsonString_Static_Z721C83C5(s) {
215
+ const matchValue = fromString(Person_ROCrate_decoder, s);
216
+ if (matchValue.tag === 1) {
217
+ throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
218
+ }
219
+ else {
220
+ return matchValue.fields[0];
221
+ }
222
+ }
223
+
224
+ /**
225
+ * exports in json-ld format
226
+ */
227
+ export function ARCtrl_Person__Person_toROCrateJsonString_Static_71136F3F(spaces) {
228
+ return (obj) => {
229
+ const value = Person_ROCrate_encoder(obj);
230
+ return toString(defaultSpaces(spaces), value);
231
+ };
232
+ }
233
+
234
+ export function ARCtrl_Person__Person_toISAJsonString_Static_71136F3F(spaces) {
235
+ return (obj) => {
236
+ const value = Person_ISAJson_encoder(obj);
237
+ return toString(defaultSpaces(spaces), value);
238
+ };
239
+ }
240
+
241
+ export function ARCtrl_Person__Person_fromISAJsonString_Static_Z721C83C5(s) {
242
+ const matchValue = fromString(Person_ISAJson_decoder, s);
243
+ if (matchValue.tag === 1) {
244
+ throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
245
+ }
246
+ else {
247
+ return matchValue.fields[0];
248
+ }
249
+ }
250
+
@@ -0,0 +1,22 @@
1
+ import { getMaterials, getSamples } from "../../Core/Process/ProcessSequence.js";
2
+ import { ofArray, choose } from "../../fable_modules/fable-library-js.4.16.0/List.js";
3
+ import { equals } from "../../fable_modules/fable-library-js.4.16.0/Util.js";
4
+ import { Json } from "../../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
5
+ import { tryIncludeList } from "../Encode.js";
6
+ import { Sample_ISAJson_encoder } from "./Sample.js";
7
+ import { Material_ISAJson_encoder } from "./Material.js";
8
+
9
+ export function encoder(ps) {
10
+ const samples = getSamples(ps);
11
+ const materials = getMaterials(ps);
12
+ return new Json(5, [choose((tupledArg) => {
13
+ const v = tupledArg[1];
14
+ if (equals(v, new Json(3, []))) {
15
+ return void 0;
16
+ }
17
+ else {
18
+ return [tupledArg[0], v];
19
+ }
20
+ }, ofArray([tryIncludeList("samples", Sample_ISAJson_encoder, samples), tryIncludeList("otherMaterials", Material_ISAJson_encoder, materials)]))]);
21
+ }
22
+
@@ -0,0 +1,79 @@
1
+ import { decoder as decoder_1, encoder } from "./PropertyValue.js";
2
+ import { Component, Component_decomposeName_Z721C83C5, Component__get_ComponentName, Component_createAsPV } from "../../Core/Process/Component.js";
3
+ import { ofArray, choose } from "../../fable_modules/fable-library-js.4.16.0/List.js";
4
+ import { equals } from "../../fable_modules/fable-library-js.4.16.0/Util.js";
5
+ import { Json } from "../../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
6
+ import { defaultSpaces, tryInclude } from "../Encode.js";
7
+ import { OntologyAnnotation_ISAJson_decoder, OntologyAnnotation_ISAJson_encoder } from "../OntologyAnnotation.js";
8
+ import { object } from "../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
9
+ import { Decode_uri } from "../Decode.js";
10
+ import { fromString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
11
+ import { printf, toText } from "../../fable_modules/fable-library-js.4.16.0/String.js";
12
+ import { toString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
13
+
14
+ export const Component_ROCrate_encoder = encoder;
15
+
16
+ export const Component_ROCrate_decoder = decoder_1(Component_createAsPV);
17
+
18
+ export function Component_ISAJson_encoder(c) {
19
+ return new Json(5, [choose((tupledArg) => {
20
+ const v = tupledArg[1];
21
+ if (equals(v, new Json(3, []))) {
22
+ return void 0;
23
+ }
24
+ else {
25
+ return [tupledArg[0], v];
26
+ }
27
+ }, ofArray([tryInclude("componentName", (value) => (new Json(0, [value])), Component__get_ComponentName(c)), tryInclude("componentType", OntologyAnnotation_ISAJson_encoder, c.ComponentType)]))]);
28
+ }
29
+
30
+ export const Component_ISAJson_decoder = object((get$) => {
31
+ let objectArg_1;
32
+ let name;
33
+ const objectArg = get$.Optional;
34
+ name = objectArg.Field("componentName", Decode_uri);
35
+ let patternInput_1;
36
+ if (name == null) {
37
+ patternInput_1 = [void 0, void 0];
38
+ }
39
+ else {
40
+ const patternInput = Component_decomposeName_Z721C83C5(name);
41
+ patternInput_1 = [patternInput[0], patternInput[1]];
42
+ }
43
+ return new Component(patternInput_1[0], patternInput_1[1], (objectArg_1 = get$.Optional, objectArg_1.Field("componentType", OntologyAnnotation_ISAJson_decoder)));
44
+ });
45
+
46
+ export function ARCtrl_Process_Component__Component_fromISAJsonString_Static_Z721C83C5(s) {
47
+ const matchValue = fromString(Component_ISAJson_decoder, s);
48
+ if (matchValue.tag === 1) {
49
+ throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
50
+ }
51
+ else {
52
+ return matchValue.fields[0];
53
+ }
54
+ }
55
+
56
+ export function ARCtrl_Process_Component__Component_toISAJsonString_Static_71136F3F(spaces) {
57
+ return (f) => {
58
+ const value = Component_ISAJson_encoder(f);
59
+ return toString(defaultSpaces(spaces), value);
60
+ };
61
+ }
62
+
63
+ export function ARCtrl_Process_Component__Component_fromROCrateJsonString_Static_Z721C83C5(s) {
64
+ const matchValue = fromString(Component_ROCrate_decoder, s);
65
+ if (matchValue.tag === 1) {
66
+ throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
67
+ }
68
+ else {
69
+ return matchValue.fields[0];
70
+ }
71
+ }
72
+
73
+ export function ARCtrl_Process_Component__Component_toROCrateJsonString_Static_71136F3F(spaces) {
74
+ return (f) => {
75
+ const value = Component_ROCrate_encoder(f);
76
+ return toString(defaultSpaces(spaces), value);
77
+ };
78
+ }
79
+
@@ -0,0 +1,102 @@
1
+ import { printf, toText, replace } from "../../fable_modules/fable-library-js.4.16.0/String.js";
2
+ import { URIModule_toString } from "../../Core/URI.js";
3
+ import { ofArray, singleton, choose } from "../../fable_modules/fable-library-js.4.16.0/List.js";
4
+ import { equals } from "../../fable_modules/fable-library-js.4.16.0/Util.js";
5
+ import { Json } from "../../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
6
+ import { list as list_1 } from "../../fable_modules/Thoth.Json.Core.0.2.1/Encode.fs.js";
7
+ import { defaultSpaces, tryIncludeListOpt, tryInclude } from "../Encode.js";
8
+ import { DataFile_ISAJson_decoder, DataFile_ISAJson_encoder, DataFile_ROCrate_decoder, DataFile_ROCrate_encoder } from "./DataFile.js";
9
+ import { Comment_ISAJson_decoder, Comment_ISAJson_encoder, Comment_ROCrate_decoder, Comment_ROCrate_encoder } from "../Comment.js";
10
+ import { context_jsonvalue } from "../context/rocrate/isa_data_context.js";
11
+ import { list as list_2, string, object } from "../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
12
+ import { Decode_objectNoAdditionalProperties, Decode_uri } from "../Decode.js";
13
+ import { Data } from "../../Core/Process/Data.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 Data_ROCrate_genID(d) {
18
+ const matchValue = d.ID;
19
+ if (matchValue == null) {
20
+ const matchValue_1 = d.Name;
21
+ if (matchValue_1 == null) {
22
+ return "#EmptyData";
23
+ }
24
+ else {
25
+ return replace(matchValue_1, " ", "_");
26
+ }
27
+ }
28
+ else {
29
+ return URIModule_toString(matchValue);
30
+ }
31
+ }
32
+
33
+ export function Data_ROCrate_encoder(oa) {
34
+ return new Json(5, [choose((tupledArg) => {
35
+ const v = tupledArg[1];
36
+ if (equals(v, new Json(3, []))) {
37
+ return void 0;
38
+ }
39
+ else {
40
+ return [tupledArg[0], v];
41
+ }
42
+ }, ofArray([["@id", new Json(0, [Data_ROCrate_genID(oa)])], ["@type", list_1(singleton(new Json(0, ["Data"])))], tryInclude("name", (value_2) => (new Json(0, [value_2])), oa.Name), tryInclude("type", DataFile_ROCrate_encoder, oa.DataType), tryIncludeListOpt("comments", Comment_ROCrate_encoder, oa.Comments), ["@context", context_jsonvalue]]))]);
43
+ }
44
+
45
+ export const Data_ROCrate_decoder = object((get$) => {
46
+ let objectArg, objectArg_1, objectArg_2, arg_7, objectArg_3;
47
+ return new Data((objectArg = get$.Optional, objectArg.Field("@id", Decode_uri)), (objectArg_1 = get$.Optional, objectArg_1.Field("name", string)), (objectArg_2 = get$.Optional, objectArg_2.Field("type", DataFile_ROCrate_decoder)), (arg_7 = list_2(Comment_ROCrate_decoder), (objectArg_3 = get$.Optional, objectArg_3.Field("comments", arg_7))));
48
+ });
49
+
50
+ export function Data_ISAJson_encoder(oa) {
51
+ return new Json(5, [choose((tupledArg) => {
52
+ const v = tupledArg[1];
53
+ if (equals(v, new Json(3, []))) {
54
+ return void 0;
55
+ }
56
+ else {
57
+ return [tupledArg[0], v];
58
+ }
59
+ }, ofArray([tryInclude("@id", (value) => (new Json(0, [value])), oa.ID), tryInclude("name", (value_2) => (new Json(0, [value_2])), oa.Name), tryInclude("type", DataFile_ISAJson_encoder, oa.DataType), tryIncludeListOpt("comments", Comment_ISAJson_encoder, oa.Comments)]))]);
60
+ }
61
+
62
+ export const Data_ISAJson_allowedFields = ofArray(["@id", "name", "type", "comments", "@type", "@context"]);
63
+
64
+ export const Data_ISAJson_decoder = Decode_objectNoAdditionalProperties(Data_ISAJson_allowedFields, (get$) => {
65
+ let objectArg, objectArg_1, objectArg_2, arg_7, objectArg_3;
66
+ return new Data((objectArg = get$.Optional, objectArg.Field("@id", Decode_uri)), (objectArg_1 = get$.Optional, objectArg_1.Field("name", string)), (objectArg_2 = get$.Optional, objectArg_2.Field("type", DataFile_ISAJson_decoder)), (arg_7 = list_2(Comment_ISAJson_decoder), (objectArg_3 = get$.Optional, objectArg_3.Field("comments", arg_7))));
67
+ });
68
+
69
+ export function ARCtrl_Process_Data__Data_fromISAJsonString_Static_Z721C83C5(s) {
70
+ const matchValue = fromString(Data_ISAJson_decoder, s);
71
+ if (matchValue.tag === 1) {
72
+ throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
73
+ }
74
+ else {
75
+ return matchValue.fields[0];
76
+ }
77
+ }
78
+
79
+ export function ARCtrl_Process_Data__Data_toISAJsonString_Static_71136F3F(spaces) {
80
+ return (f) => {
81
+ const value = Data_ISAJson_encoder(f);
82
+ return toString(defaultSpaces(spaces), value);
83
+ };
84
+ }
85
+
86
+ export function ARCtrl_Process_Data__Data_fromROCrateJsonString_Static_Z721C83C5(s) {
87
+ const matchValue = fromString(Data_ROCrate_decoder, s);
88
+ if (matchValue.tag === 1) {
89
+ throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
90
+ }
91
+ else {
92
+ return matchValue.fields[0];
93
+ }
94
+ }
95
+
96
+ export function ARCtrl_Process_Data__Data_toROCrateJsonString_Static_71136F3F(spaces) {
97
+ return (f) => {
98
+ const value = Data_ROCrate_encoder(f);
99
+ return toString(defaultSpaces(spaces), value);
100
+ };
101
+ }
102
+
@@ -0,0 +1,81 @@
1
+ import { ErrorReason$1, Json } from "../../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
2
+ import { string } from "../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
3
+ import { FSharpResult$2 } from "../../fable_modules/fable-library-js.4.16.0/Result.js";
4
+ import { DataFile } from "../../Core/Process/DataFile.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.16.0/String.js";
7
+ import { toString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
8
+ import { defaultSpaces } from "../Encode.js";
9
+
10
+ export function DataFile_ROCrate_encoder(value) {
11
+ switch (value.tag) {
12
+ case 1:
13
+ return new Json(0, ["Derived Data File"]);
14
+ case 2:
15
+ return new Json(0, ["Image File"]);
16
+ default:
17
+ return new Json(0, ["Raw Data File"]);
18
+ }
19
+ }
20
+
21
+ export const DataFile_ROCrate_decoder = {
22
+ Decode(s, json) {
23
+ const matchValue = string.Decode(s, json);
24
+ if (matchValue.tag === 1) {
25
+ return new FSharpResult$2(1, [matchValue.fields[0]]);
26
+ }
27
+ else {
28
+ switch (matchValue.fields[0]) {
29
+ case "Raw Data File":
30
+ return new FSharpResult$2(0, [new DataFile(0, [])]);
31
+ case "Derived Data File":
32
+ return new FSharpResult$2(0, [new DataFile(1, [])]);
33
+ case "Image File":
34
+ return new FSharpResult$2(0, [new DataFile(2, [])]);
35
+ default: {
36
+ const s_1 = matchValue.fields[0];
37
+ return new FSharpResult$2(1, [[`Could not parse ${s_1}.`, new ErrorReason$1(0, [s_1, json])]]);
38
+ }
39
+ }
40
+ }
41
+ },
42
+ };
43
+
44
+ export const DataFile_ISAJson_encoder = DataFile_ROCrate_encoder;
45
+
46
+ export const DataFile_ISAJson_decoder = DataFile_ROCrate_decoder;
47
+
48
+ export function ARCtrl_Process_DataFile__DataFile_fromISAJsonString_Static_Z721C83C5(s) {
49
+ const matchValue = fromString(DataFile_ISAJson_decoder, s);
50
+ if (matchValue.tag === 1) {
51
+ throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
52
+ }
53
+ else {
54
+ return matchValue.fields[0];
55
+ }
56
+ }
57
+
58
+ export function ARCtrl_Process_DataFile__DataFile_toISAJsonString_Static_71136F3F(spaces) {
59
+ return (f) => {
60
+ const value = DataFile_ISAJson_encoder(f);
61
+ return toString(defaultSpaces(spaces), value);
62
+ };
63
+ }
64
+
65
+ export function ARCtrl_Process_DataFile__DataFile_fromROCrateJsonString_Static_Z721C83C5(s) {
66
+ const matchValue = fromString(DataFile_ROCrate_decoder, s);
67
+ if (matchValue.tag === 1) {
68
+ throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
69
+ }
70
+ else {
71
+ return matchValue.fields[0];
72
+ }
73
+ }
74
+
75
+ export function ARCtrl_Process_DataFile__DataFile_toROCrateJsonString_Static_71136F3F(spaces) {
76
+ return (f) => {
77
+ const value = DataFile_ROCrate_encoder(f);
78
+ return toString(defaultSpaces(spaces), value);
79
+ };
80
+ }
81
+
@@ -0,0 +1,48 @@
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_ISAJson_decoder, OntologyAnnotation_ISAJson_encoder } from "../OntologyAnnotation.js";
6
+ import { Comment_ISAJson_decoder, Comment_ISAJson_encoder } from "../Comment.js";
7
+ import { defaultArg } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
8
+ import { string, object } from "../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
9
+ import { Decode_resizeArray } from "../Decode.js";
10
+ import { Factor } from "../../Core/Process/Factor.js";
11
+ import { fromString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
12
+ import { printf, toText } from "../../fable_modules/fable-library-js.4.16.0/String.js";
13
+ import { toString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
14
+
15
+ export function Factor_ISAJson_encoder(value) {
16
+ return new Json(5, [choose((tupledArg) => {
17
+ const v = tupledArg[1];
18
+ if (equals(v, new Json(3, []))) {
19
+ return void 0;
20
+ }
21
+ else {
22
+ return [tupledArg[0], v];
23
+ }
24
+ }, ofArray([tryInclude("factorName", (value_1) => (new Json(0, [value_1])), value.Name), tryInclude("factorType", OntologyAnnotation_ISAJson_encoder, value.FactorType), tryIncludeSeq("comments", Comment_ISAJson_encoder, defaultArg(value.Comments, []))]))]);
25
+ }
26
+
27
+ export const Factor_ISAJson_decoder = object((get$) => {
28
+ let objectArg, objectArg_1, arg_5, objectArg_2;
29
+ return new Factor((objectArg = get$.Optional, objectArg.Field("factorName", string)), (objectArg_1 = get$.Optional, objectArg_1.Field("factorType", OntologyAnnotation_ISAJson_decoder)), (arg_5 = Decode_resizeArray(Comment_ISAJson_decoder), (objectArg_2 = get$.Optional, objectArg_2.Field("comments", arg_5))));
30
+ });
31
+
32
+ export function ARCtrl_Process_Factor__Factor_fromISAJsonString_Static_Z721C83C5(s) {
33
+ const matchValue = fromString(Factor_ISAJson_decoder, s);
34
+ if (matchValue.tag === 1) {
35
+ throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
36
+ }
37
+ else {
38
+ return matchValue.fields[0];
39
+ }
40
+ }
41
+
42
+ export function ARCtrl_Process_Factor__Factor_toISAJsonString_Static_71136F3F(spaces) {
43
+ return (f) => {
44
+ const value = Factor_ISAJson_encoder(f);
45
+ return toString(defaultSpaces(spaces), value);
46
+ };
47
+ }
48
+
@@ -0,0 +1,53 @@
1
+ import { decoder as decoder_1, encoder } from "./PropertyValue.js";
2
+ import { FactorValue, FactorValue_createAsPV } from "../../Core/Process/FactorValue.js";
3
+ import { ofArray, choose } from "../../fable_modules/fable-library-js.4.16.0/List.js";
4
+ import { equals } from "../../fable_modules/fable-library-js.4.16.0/Util.js";
5
+ import { Json } from "../../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
6
+ import { defaultSpaces, tryInclude } from "../Encode.js";
7
+ import { Factor_ISAJson_decoder, Factor_ISAJson_encoder } from "./Factor.js";
8
+ import { Value_ISAJson_decoder, Value_ISAJson_encoder } from "./Value.js";
9
+ import { OntologyAnnotation_ISAJson_decoder, OntologyAnnotation_ISAJson_encoder } from "../OntologyAnnotation.js";
10
+ import { object } from "../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
11
+ import { Decode_uri } from "../Decode.js";
12
+ import { fromString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
13
+ import { printf, toText } from "../../fable_modules/fable-library-js.4.16.0/String.js";
14
+ import { toString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
15
+
16
+ export const FactorValue_ROCrate_encoder = encoder;
17
+
18
+ export const FactorValue_ROCrate_decoder = decoder_1(FactorValue_createAsPV);
19
+
20
+ export function FactorValue_ISAJson_encoder(fv) {
21
+ return new Json(5, [choose((tupledArg) => {
22
+ const v = tupledArg[1];
23
+ if (equals(v, new Json(3, []))) {
24
+ return void 0;
25
+ }
26
+ else {
27
+ return [tupledArg[0], v];
28
+ }
29
+ }, ofArray([tryInclude("@id", (value) => (new Json(0, [value])), fv.ID), tryInclude("category", Factor_ISAJson_encoder, fv.Category), tryInclude("value", Value_ISAJson_encoder, fv.Value), tryInclude("unit", OntologyAnnotation_ISAJson_encoder, fv.Unit)]))]);
30
+ }
31
+
32
+ export const FactorValue_ISAJson_decoder = object((get$) => {
33
+ let objectArg, objectArg_1, objectArg_2, objectArg_3;
34
+ return new FactorValue((objectArg = get$.Optional, objectArg.Field("@id", Decode_uri)), (objectArg_1 = get$.Optional, objectArg_1.Field("category", Factor_ISAJson_decoder)), (objectArg_2 = get$.Optional, objectArg_2.Field("value", Value_ISAJson_decoder)), (objectArg_3 = get$.Optional, objectArg_3.Field("unit", OntologyAnnotation_ISAJson_decoder)));
35
+ });
36
+
37
+ export function ARCtrl_Process_FactorValue__FactorValue_fromISAJsonString_Static_Z721C83C5(s) {
38
+ const matchValue = fromString(FactorValue_ISAJson_decoder, s);
39
+ if (matchValue.tag === 1) {
40
+ throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
41
+ }
42
+ else {
43
+ return matchValue.fields[0];
44
+ }
45
+ }
46
+
47
+ export function ARCtrl_Process_FactorValue__FactorValue_toISAJsonString_Static_71136F3F(spaces) {
48
+ return (f) => {
49
+ const value = FactorValue_ISAJson_encoder(f);
50
+ return toString(defaultSpaces(spaces), value);
51
+ };
52
+ }
53
+