@nfdi4plants/arctrl 1.0.0-alpha6

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 (277) hide show
  1. package/ARCtrl.js +257 -0
  2. package/Contract/Contract.js +95 -0
  3. package/Contracts/Contracts.ARCtrl.js +35 -0
  4. package/Contracts/Contracts.ArcAssay.js +65 -0
  5. package/Contracts/Contracts.ArcInvestigation.js +58 -0
  6. package/Contracts/Contracts.ArcStudy.js +65 -0
  7. package/Contracts/Contracts.Git.js +91 -0
  8. package/FileSystem/Commit.js +18 -0
  9. package/FileSystem/DefaultGitignore.js +3 -0
  10. package/FileSystem/FileSystem.js +53 -0
  11. package/FileSystem/FileSystemTree.js +223 -0
  12. package/FileSystem/Path.js +38 -0
  13. package/FileSystemTree.js +51 -0
  14. package/ISA/ISA/ArcTypes/ArcTable.js +744 -0
  15. package/ISA/ISA/ArcTypes/ArcTableAux.js +1142 -0
  16. package/ISA/ISA/ArcTypes/ArcTables.js +380 -0
  17. package/ISA/ISA/ArcTypes/ArcTypes.js +2018 -0
  18. package/ISA/ISA/ArcTypes/CompositeCell.js +180 -0
  19. package/ISA/ISA/ArcTypes/CompositeColumn.js +42 -0
  20. package/ISA/ISA/ArcTypes/CompositeHeader.js +358 -0
  21. package/ISA/ISA/ArcTypes/CompositeRow.js +111 -0
  22. package/ISA/ISA/ArcTypes/IdentifierSetters.js +26 -0
  23. package/ISA/ISA/Builder/Types.js +243 -0
  24. package/ISA/ISA/Fable.js +50 -0
  25. package/ISA/ISA/Helper.js +326 -0
  26. package/ISA/ISA/Identifier.js +76 -0
  27. package/ISA/ISA/JsonTypes/AnnotationValue.js +56 -0
  28. package/ISA/ISA/JsonTypes/Assay.js +620 -0
  29. package/ISA/ISA/JsonTypes/AssayMaterials.js +39 -0
  30. package/ISA/ISA/JsonTypes/ColumnIndex.js +246 -0
  31. package/ISA/ISA/JsonTypes/Comment.js +58 -0
  32. package/ISA/ISA/JsonTypes/CommentList.js +139 -0
  33. package/ISA/ISA/JsonTypes/Component.js +158 -0
  34. package/ISA/ISA/JsonTypes/Data.js +55 -0
  35. package/ISA/ISA/JsonTypes/DataFile.js +68 -0
  36. package/ISA/ISA/JsonTypes/Factor.js +128 -0
  37. package/ISA/ISA/JsonTypes/FactorValue.js +109 -0
  38. package/ISA/ISA/JsonTypes/Investigation.js +204 -0
  39. package/ISA/ISA/JsonTypes/Material.js +66 -0
  40. package/ISA/ISA/JsonTypes/MaterialAttribute.js +101 -0
  41. package/ISA/ISA/JsonTypes/MaterialAttributeValue.js +126 -0
  42. package/ISA/ISA/JsonTypes/MaterialType.js +41 -0
  43. package/ISA/ISA/JsonTypes/OntologyAnnotation.js +219 -0
  44. package/ISA/ISA/JsonTypes/OntologySourceReference.js +85 -0
  45. package/ISA/ISA/JsonTypes/Person.js +137 -0
  46. package/ISA/ISA/JsonTypes/Process.js +401 -0
  47. package/ISA/ISA/JsonTypes/ProcessInput.js +297 -0
  48. package/ISA/ISA/JsonTypes/ProcessOutput.js +263 -0
  49. package/ISA/ISA/JsonTypes/ProcessParameterValue.js +129 -0
  50. package/ISA/ISA/JsonTypes/ProcessSequence.js +255 -0
  51. package/ISA/ISA/JsonTypes/Protocol.js +277 -0
  52. package/ISA/ISA/JsonTypes/ProtocolParameter.js +101 -0
  53. package/ISA/ISA/JsonTypes/Publication.js +105 -0
  54. package/ISA/ISA/JsonTypes/Sample.js +71 -0
  55. package/ISA/ISA/JsonTypes/Source.js +54 -0
  56. package/ISA/ISA/JsonTypes/Study.js +942 -0
  57. package/ISA/ISA/JsonTypes/StudyMaterials.js +45 -0
  58. package/ISA/ISA/JsonTypes/URI.js +19 -0
  59. package/ISA/ISA/JsonTypes/Value.js +210 -0
  60. package/ISA/ISA/Regex.js +588 -0
  61. package/ISA/ISA.Json/Assay.js +123 -0
  62. package/ISA/ISA.Json/Comment.js +84 -0
  63. package/ISA/ISA.Json/ConverterOptions.js +33 -0
  64. package/ISA/ISA.Json/Data.js +271 -0
  65. package/ISA/ISA.Json/Decode.js +46 -0
  66. package/ISA/ISA.Json/Factor.js +194 -0
  67. package/ISA/ISA.Json/GEncode.js +15 -0
  68. package/ISA/ISA.Json/Investigation.js +132 -0
  69. package/ISA/ISA.Json/Material.js +233 -0
  70. package/ISA/ISA.Json/Ontology.js +204 -0
  71. package/ISA/ISA.Json/Person.js +204 -0
  72. package/ISA/ISA.Json/Process.js +291 -0
  73. package/ISA/ISA.Json/Protocol.js +242 -0
  74. package/ISA/ISA.Json/Publication.js +92 -0
  75. package/ISA/ISA.Json/Study.js +230 -0
  76. package/ISA/ISA.Json/Validation/Fable.js +69 -0
  77. package/ISA/ISA.Json/Validation/JsonSchemaValidation.js +88 -0
  78. package/ISA/ISA.Json/Validation/ValidationResult.js +45 -0
  79. package/ISA/ISA.Spreadsheet/AnnotationTable/ArcTable.js +137 -0
  80. package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeCell.js +78 -0
  81. package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeColumn.js +59 -0
  82. package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeHeader.js +478 -0
  83. package/ISA/ISA.Spreadsheet/ArcAssay.js +150 -0
  84. package/ISA/ISA.Spreadsheet/ArcInvestigation.js +314 -0
  85. package/ISA/ISA.Spreadsheet/ArcStudy.js +67 -0
  86. package/ISA/ISA.Spreadsheet/CollectionAux.js +128 -0
  87. package/ISA/ISA.Spreadsheet/Metadata/Assays.js +81 -0
  88. package/ISA/ISA.Spreadsheet/Metadata/Comment.js +60 -0
  89. package/ISA/ISA.Spreadsheet/Metadata/Contacts.js +104 -0
  90. package/ISA/ISA.Spreadsheet/Metadata/Conversions.js +180 -0
  91. package/ISA/ISA.Spreadsheet/Metadata/DesignDescriptors.js +27 -0
  92. package/ISA/ISA.Spreadsheet/Metadata/Factors.js +85 -0
  93. package/ISA/ISA.Spreadsheet/Metadata/OntologyAnnotation.js +65 -0
  94. package/ISA/ISA.Spreadsheet/Metadata/OntologySourceReference.js +73 -0
  95. package/ISA/ISA.Spreadsheet/Metadata/Protocols.js +116 -0
  96. package/ISA/ISA.Spreadsheet/Metadata/Publication.js +96 -0
  97. package/ISA/ISA.Spreadsheet/Metadata/SparseTable.js +451 -0
  98. package/ISA/ISA.Spreadsheet/Metadata/Study.js +260 -0
  99. package/README.md +277 -0
  100. package/SemVer.js +60 -0
  101. package/Templates/Templates.Json.js +40 -0
  102. package/Templates/Templates.Spreadsheet.js +315 -0
  103. package/Templates/Templates.js +179 -0
  104. package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCell.fs +387 -0
  105. package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCell.fs.js +240 -0
  106. package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCellsCollection.fs +725 -0
  107. package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCellsCollection.fs.js +522 -0
  108. package/fable_modules/FsSpreadsheet.4.1.0/DSL/CellBuilder.fs +195 -0
  109. package/fable_modules/FsSpreadsheet.4.1.0/DSL/CellBuilder.fs.js +208 -0
  110. package/fable_modules/FsSpreadsheet.4.1.0/DSL/ColumnBuilder.fs +209 -0
  111. package/fable_modules/FsSpreadsheet.4.1.0/DSL/ColumnBuilder.fs.js +137 -0
  112. package/fable_modules/FsSpreadsheet.4.1.0/DSL/DSL.fs +61 -0
  113. package/fable_modules/FsSpreadsheet.4.1.0/DSL/DSL.fs.js +62 -0
  114. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Expression.fs +24 -0
  115. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Expression.fs.js +56 -0
  116. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Operators.fs +102 -0
  117. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Operators.fs.js +6 -0
  118. package/fable_modules/FsSpreadsheet.4.1.0/DSL/RowBuilder.fs +200 -0
  119. package/fable_modules/FsSpreadsheet.4.1.0/DSL/RowBuilder.fs.js +137 -0
  120. package/fable_modules/FsSpreadsheet.4.1.0/DSL/SheetBuilder.fs +139 -0
  121. package/fable_modules/FsSpreadsheet.4.1.0/DSL/SheetBuilder.fs.js +116 -0
  122. package/fable_modules/FsSpreadsheet.4.1.0/DSL/TableBuilder.fs +120 -0
  123. package/fable_modules/FsSpreadsheet.4.1.0/DSL/TableBuilder.fs.js +120 -0
  124. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Transform.fs +229 -0
  125. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Transform.fs.js +421 -0
  126. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Types.fs +151 -0
  127. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Types.fs.js +277 -0
  128. package/fable_modules/FsSpreadsheet.4.1.0/DSL/WorkbookBuilder.fs +114 -0
  129. package/fable_modules/FsSpreadsheet.4.1.0/DSL/WorkbookBuilder.fs.js +104 -0
  130. package/fable_modules/FsSpreadsheet.4.1.0/FsAddress.fs +177 -0
  131. package/fable_modules/FsSpreadsheet.4.1.0/FsAddress.fs.js +249 -0
  132. package/fable_modules/FsSpreadsheet.4.1.0/FsColumn.fs +200 -0
  133. package/fable_modules/FsSpreadsheet.4.1.0/FsColumn.fs.js +125 -0
  134. package/fable_modules/FsSpreadsheet.4.1.0/FsRow.fs +202 -0
  135. package/fable_modules/FsSpreadsheet.4.1.0/FsRow.fs.js +135 -0
  136. package/fable_modules/FsSpreadsheet.4.1.0/FsSpreadsheet.fableproj +58 -0
  137. package/fable_modules/FsSpreadsheet.4.1.0/FsWorkbook.fs +183 -0
  138. package/fable_modules/FsSpreadsheet.4.1.0/FsWorkbook.fs.js +138 -0
  139. package/fable_modules/FsSpreadsheet.4.1.0/FsWorksheet.fs +628 -0
  140. package/fable_modules/FsSpreadsheet.4.1.0/FsWorksheet.fs.js +398 -0
  141. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRange.fs +19 -0
  142. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRange.fs.js +41 -0
  143. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeAddress.fs +222 -0
  144. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeAddress.fs.js +235 -0
  145. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeBase.fs +93 -0
  146. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeBase.fs.js +91 -0
  147. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeColumn.fs +65 -0
  148. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeColumn.fs.js +74 -0
  149. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeRow.fs +22 -0
  150. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeRow.fs.js +40 -0
  151. package/fable_modules/FsSpreadsheet.4.1.0/SheetBuilder.fs +249 -0
  152. package/fable_modules/FsSpreadsheet.4.1.0/SheetBuilder.fs.js +325 -0
  153. package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTable.fs +455 -0
  154. package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTable.fs.js +310 -0
  155. package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableField.fs +140 -0
  156. package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableField.fs.js +173 -0
  157. package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableRow.fs +6 -0
  158. package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableRow.fs.js +17 -0
  159. package/fable_modules/FsSpreadsheet.4.1.0/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
  160. package/fable_modules/FsSpreadsheet.4.1.0/obj/Debug/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +19 -0
  161. package/fable_modules/FsSpreadsheet.4.1.0/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
  162. package/fable_modules/FsSpreadsheet.4.1.0/obj/Release/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +19 -0
  163. package/fable_modules/Thoth.Json.10.1.0/Decode.fs +1366 -0
  164. package/fable_modules/Thoth.Json.10.1.0/Decode.fs.js +1798 -0
  165. package/fable_modules/Thoth.Json.10.1.0/Encode.fs +621 -0
  166. package/fable_modules/Thoth.Json.10.1.0/Encode.fs.js +472 -0
  167. package/fable_modules/Thoth.Json.10.1.0/Extra.fs +31 -0
  168. package/fable_modules/Thoth.Json.10.1.0/Extra.fs.js +8 -0
  169. package/fable_modules/Thoth.Json.10.1.0/Thoth.Json.fableproj +30 -0
  170. package/fable_modules/Thoth.Json.10.1.0/Types.fs +59 -0
  171. package/fable_modules/Thoth.Json.10.1.0/Types.fs.js +98 -0
  172. package/fable_modules/Thoth.Json.10.1.0/obj/Release/netstandard2.0/Thoth.Json.AssemblyInfo.fs +19 -0
  173. package/fable_modules/Thoth.Json.10.1.0/package.json +5 -0
  174. package/fable_modules/fable-library.4.1.4/Array.d.ts +120 -0
  175. package/fable_modules/fable-library.4.1.4/Array.js +1204 -0
  176. package/fable_modules/fable-library.4.1.4/Async.d.ts +32 -0
  177. package/fable_modules/fable-library.4.1.4/Async.js +158 -0
  178. package/fable_modules/fable-library.4.1.4/AsyncBuilder.d.ts +59 -0
  179. package/fable_modules/fable-library.4.1.4/AsyncBuilder.js +183 -0
  180. package/fable_modules/fable-library.4.1.4/BigInt.d.ts +115 -0
  181. package/fable_modules/fable-library.4.1.4/BigInt.js +282 -0
  182. package/fable_modules/fable-library.4.1.4/BitConverter.d.ts +27 -0
  183. package/fable_modules/fable-library.4.1.4/BitConverter.js +138 -0
  184. package/fable_modules/fable-library.4.1.4/Boolean.d.ts +3 -0
  185. package/fable_modules/fable-library.4.1.4/Boolean.js +21 -0
  186. package/fable_modules/fable-library.4.1.4/Char.d.ts +65 -0
  187. package/fable_modules/fable-library.4.1.4/Char.js +169 -0
  188. package/fable_modules/fable-library.4.1.4/Choice.d.ts +138 -0
  189. package/fable_modules/fable-library.4.1.4/Choice.js +227 -0
  190. package/fable_modules/fable-library.4.1.4/Date.d.ts +70 -0
  191. package/fable_modules/fable-library.4.1.4/Date.js +451 -0
  192. package/fable_modules/fable-library.4.1.4/DateOffset.d.ts +63 -0
  193. package/fable_modules/fable-library.4.1.4/DateOffset.js +268 -0
  194. package/fable_modules/fable-library.4.1.4/DateOnly.d.ts +18 -0
  195. package/fable_modules/fable-library.4.1.4/DateOnly.js +124 -0
  196. package/fable_modules/fable-library.4.1.4/Decimal.d.ts +45 -0
  197. package/fable_modules/fable-library.4.1.4/Decimal.js +212 -0
  198. package/fable_modules/fable-library.4.1.4/Double.d.ts +11 -0
  199. package/fable_modules/fable-library.4.1.4/Double.js +46 -0
  200. package/fable_modules/fable-library.4.1.4/Encoding.d.ts +12 -0
  201. package/fable_modules/fable-library.4.1.4/Encoding.js +173 -0
  202. package/fable_modules/fable-library.4.1.4/Event.d.ts +31 -0
  203. package/fable_modules/fable-library.4.1.4/Event.js +93 -0
  204. package/fable_modules/fable-library.4.1.4/FSharp.Collections.d.ts +7 -0
  205. package/fable_modules/fable-library.4.1.4/FSharp.Collections.js +27 -0
  206. package/fable_modules/fable-library.4.1.4/FSharp.Core.d.ts +17 -0
  207. package/fable_modules/fable-library.4.1.4/FSharp.Core.js +69 -0
  208. package/fable_modules/fable-library.4.1.4/Global.d.ts +24 -0
  209. package/fable_modules/fable-library.4.1.4/Global.js +8 -0
  210. package/fable_modules/fable-library.4.1.4/Guid.d.ts +10 -0
  211. package/fable_modules/fable-library.4.1.4/Guid.js +142 -0
  212. package/fable_modules/fable-library.4.1.4/Int32.d.ts +28 -0
  213. package/fable_modules/fable-library.4.1.4/Int32.js +135 -0
  214. package/fable_modules/fable-library.4.1.4/List.d.ts +143 -0
  215. package/fable_modules/fable-library.4.1.4/List.js +1273 -0
  216. package/fable_modules/fable-library.4.1.4/Long.d.ts +3 -0
  217. package/fable_modules/fable-library.4.1.4/Long.js +46 -0
  218. package/fable_modules/fable-library.4.1.4/MailboxProcessor.d.ts +25 -0
  219. package/fable_modules/fable-library.4.1.4/MailboxProcessor.js +93 -0
  220. package/fable_modules/fable-library.4.1.4/Map.d.ts +178 -0
  221. package/fable_modules/fable-library.4.1.4/Map.js +1396 -0
  222. package/fable_modules/fable-library.4.1.4/MapUtil.d.ts +10 -0
  223. package/fable_modules/fable-library.4.1.4/MapUtil.js +112 -0
  224. package/fable_modules/fable-library.4.1.4/MutableMap.d.ts +52 -0
  225. package/fable_modules/fable-library.4.1.4/MutableMap.js +326 -0
  226. package/fable_modules/fable-library.4.1.4/MutableSet.d.ts +39 -0
  227. package/fable_modules/fable-library.4.1.4/MutableSet.js +232 -0
  228. package/fable_modules/fable-library.4.1.4/Native.d.ts +2 -0
  229. package/fable_modules/fable-library.4.1.4/Native.js +8 -0
  230. package/fable_modules/fable-library.4.1.4/Numeric.d.ts +19 -0
  231. package/fable_modules/fable-library.4.1.4/Numeric.js +71 -0
  232. package/fable_modules/fable-library.4.1.4/Observable.d.ts +32 -0
  233. package/fable_modules/fable-library.4.1.4/Observable.js +113 -0
  234. package/fable_modules/fable-library.4.1.4/Option.d.ts +28 -0
  235. package/fable_modules/fable-library.4.1.4/Option.js +96 -0
  236. package/fable_modules/fable-library.4.1.4/README.md +3 -0
  237. package/fable_modules/fable-library.4.1.4/Random.d.ts +37 -0
  238. package/fable_modules/fable-library.4.1.4/Random.js +170 -0
  239. package/fable_modules/fable-library.4.1.4/Range.d.ts +12 -0
  240. package/fable_modules/fable-library.4.1.4/Range.js +45 -0
  241. package/fable_modules/fable-library.4.1.4/Reflection.d.ts +119 -0
  242. package/fable_modules/fable-library.4.1.4/Reflection.js +461 -0
  243. package/fable_modules/fable-library.4.1.4/RegExp.d.ts +10 -0
  244. package/fable_modules/fable-library.4.1.4/RegExp.js +132 -0
  245. package/fable_modules/fable-library.4.1.4/Seq.d.ts +165 -0
  246. package/fable_modules/fable-library.4.1.4/Seq.js +1379 -0
  247. package/fable_modules/fable-library.4.1.4/Seq2.d.ts +18 -0
  248. package/fable_modules/fable-library.4.1.4/Seq2.js +111 -0
  249. package/fable_modules/fable-library.4.1.4/Set.d.ts +190 -0
  250. package/fable_modules/fable-library.4.1.4/Set.js +1789 -0
  251. package/fable_modules/fable-library.4.1.4/String.d.ts +49 -0
  252. package/fable_modules/fable-library.4.1.4/String.js +540 -0
  253. package/fable_modules/fable-library.4.1.4/System.Collections.Generic.d.ts +71 -0
  254. package/fable_modules/fable-library.4.1.4/System.Collections.Generic.js +307 -0
  255. package/fable_modules/fable-library.4.1.4/System.Text.d.ts +30 -0
  256. package/fable_modules/fable-library.4.1.4/System.Text.js +110 -0
  257. package/fable_modules/fable-library.4.1.4/SystemException.d.ts +5 -0
  258. package/fable_modules/fable-library.4.1.4/SystemException.js +5 -0
  259. package/fable_modules/fable-library.4.1.4/TimeOnly.d.ts +15 -0
  260. package/fable_modules/fable-library.4.1.4/TimeOnly.js +122 -0
  261. package/fable_modules/fable-library.4.1.4/TimeSpan.d.ts +34 -0
  262. package/fable_modules/fable-library.4.1.4/TimeSpan.js +177 -0
  263. package/fable_modules/fable-library.4.1.4/Timer.d.ts +19 -0
  264. package/fable_modules/fable-library.4.1.4/Timer.js +67 -0
  265. package/fable_modules/fable-library.4.1.4/Types.d.ts +58 -0
  266. package/fable_modules/fable-library.4.1.4/Types.js +208 -0
  267. package/fable_modules/fable-library.4.1.4/Unicode.13.0.0.d.ts +2 -0
  268. package/fable_modules/fable-library.4.1.4/Unicode.13.0.0.js +4 -0
  269. package/fable_modules/fable-library.4.1.4/Uri.d.ts +29 -0
  270. package/fable_modules/fable-library.4.1.4/Uri.js +142 -0
  271. package/fable_modules/fable-library.4.1.4/Util.d.ts +187 -0
  272. package/fable_modules/fable-library.4.1.4/Util.js +662 -0
  273. package/fable_modules/fable-library.4.1.4/lib/big.d.ts +338 -0
  274. package/fable_modules/fable-library.4.1.4/lib/big.js +826 -0
  275. package/fable_modules/fable-library.4.1.4/package.json +23 -0
  276. package/fable_modules/project_cracked.json +1 -0
  277. package/package.json +22 -0
@@ -0,0 +1,123 @@
1
+ import { toString, nil, object as object_22 } from "../../fable_modules/Thoth.Json.10.1.0/Encode.fs.js";
2
+ import { ofArray, choose } from "../../fable_modules/fable-library.4.1.4/List.js";
3
+ import { uncurry2, equals } from "../../fable_modules/fable-library.4.1.4/Util.js";
4
+ import { tryInclude } 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 { string, list as list_1, object as object_23 } from "../../fable_modules/Thoth.Json.10.1.0/Decode.fs.js";
8
+ import { AssayMaterials } from "../ISA/JsonTypes/AssayMaterials.js";
9
+ import { URIModule_toString } from "../ISA/JsonTypes/URI.js";
10
+ import { empty, singleton, append, delay, toList } from "../../fable_modules/fable-library.4.1.4/Seq.js";
11
+ import { ConverterOptions__set_IncludeType_Z1FBCCD16, ConverterOptions__set_SetID_Z1FBCCD16, ConverterOptions_$ctor, ConverterOptions__get_IncludeType, ConverterOptions__get_SetID } from "./ConverterOptions.js";
12
+ import { OntologyAnnotation_decoder, OntologyAnnotation_encoder } from "./Ontology.js";
13
+ import { Process_decoder, Process_encoder } from "./Process.js";
14
+ import { decoder as decoder_5, encoder } from "./Comment.js";
15
+ import { fromString, uri } from "./Decode.js";
16
+ import { Assay } from "../ISA/JsonTypes/Assay.js";
17
+ import { ArcAssay } from "../ISA/ArcTypes/ArcTypes.js";
18
+
19
+ export function AssayMaterials_encoder(options, oa) {
20
+ return object_22(choose((tupledArg) => {
21
+ const v = tupledArg[1];
22
+ if (equals(v, nil)) {
23
+ return void 0;
24
+ }
25
+ else {
26
+ return [tupledArg[0], v];
27
+ }
28
+ }, ofArray([tryInclude("samples", (oa_1) => Sample_encoder(options, oa_1), oa["Samples"]), tryInclude("otherMaterials", (oa_2) => Material_encoder(options, oa_2), oa["OtherMaterials"])])));
29
+ }
30
+
31
+ export function AssayMaterials_decoder(options) {
32
+ return (path_2) => ((v) => object_23((get$) => {
33
+ let objectArg, objectArg_1;
34
+ return new AssayMaterials((objectArg = get$.Optional, objectArg.Field("samples", (path, value) => list_1((s, json) => Sample_decoder(options, s, json), path, value))), (objectArg_1 = get$.Optional, objectArg_1.Field("otherMaterials", (path_1, value_1) => list_1((s_1, json_1) => Material_decoder(options, s_1, json_1), path_1, value_1))));
35
+ }, path_2, v));
36
+ }
37
+
38
+ export function Assay_genID(a) {
39
+ const matchValue = a.ID;
40
+ if (matchValue == null) {
41
+ const matchValue_1 = a.FileName;
42
+ if (matchValue_1 == null) {
43
+ return "#EmptyAssay";
44
+ }
45
+ else {
46
+ return matchValue_1;
47
+ }
48
+ }
49
+ else {
50
+ return URIModule_toString(matchValue);
51
+ }
52
+ }
53
+
54
+ export function Assay_encoder(options, oa) {
55
+ return object_22(choose((tupledArg) => {
56
+ const v = tupledArg[1];
57
+ if (equals(v, nil)) {
58
+ return void 0;
59
+ }
60
+ else {
61
+ return [tupledArg[0], v];
62
+ }
63
+ }, toList(delay(() => {
64
+ let value, s;
65
+ return append(ConverterOptions__get_SetID(options) ? singleton(["@id", (value = Assay_genID(oa), (typeof value === "string") ? ((s = value, s)) : nil)]) : singleton(tryInclude("@id", (value_2) => {
66
+ let s_1;
67
+ const value_3 = value_2;
68
+ return (typeof value_3 === "string") ? ((s_1 = value_3, s_1)) : nil;
69
+ }, oa["ID"])), delay(() => {
70
+ let value_5, s_2;
71
+ return append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", (value_5 = "Assay", (typeof value_5 === "string") ? ((s_2 = value_5, s_2)) : nil)]) : empty(), delay(() => append(singleton(tryInclude("filename", (value_7) => {
72
+ let s_3;
73
+ const value_8 = value_7;
74
+ return (typeof value_8 === "string") ? ((s_3 = value_8, s_3)) : nil;
75
+ }, 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_10) => {
76
+ let s_4;
77
+ const value_11 = value_10;
78
+ return (typeof value_11 === "string") ? ((s_4 = value_11, s_4)) : nil;
79
+ }, oa["TechnologyPlatform"])), delay(() => append(singleton(tryInclude("dataFiles", (oa_3) => Data_encoder(options, oa_3), oa["DataFiles"])), delay(() => append(singleton(tryInclude("materials", (oa_4) => AssayMaterials_encoder(options, oa_4), oa["Materials"])), delay(() => append(singleton(tryInclude("characteristicCategories", (oa_5) => MaterialAttribute_encoder(options, oa_5), oa["CharacteristicCategories"])), delay(() => append(singleton(tryInclude("unitCategories", (oa_6) => OntologyAnnotation_encoder(options, oa_6), oa["UnitCategories"])), delay(() => append(singleton(tryInclude("processSequence", (oa_7) => Process_encoder(options, oa_7), oa["ProcessSequence"])), delay(() => singleton(tryInclude("comments", (comment) => encoder(options, comment), oa["Comments"]))))))))))))))))))))));
80
+ }));
81
+ }))));
82
+ }
83
+
84
+ export function Assay_decoder(options) {
85
+ return (path_7) => ((v) => object_23((get$) => {
86
+ let objectArg, objectArg_1, arg_5, objectArg_2, arg_7, objectArg_3, objectArg_4, objectArg_5, arg_13, objectArg_6, arg_15, decoder_1, objectArg_7, arg_17, decoder_2, objectArg_8, arg_19, decoder_3, objectArg_9, arg_21, decoder_4, objectArg_10;
87
+ 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", uncurry2(arg_5)))), (arg_7 = OntologyAnnotation_decoder(options), (objectArg_3 = get$.Optional, objectArg_3.Field("technologyType", uncurry2(arg_7)))), (objectArg_4 = get$.Optional, objectArg_4.Field("technologyPlatform", string)), (objectArg_5 = get$.Optional, objectArg_5.Field("dataFiles", (path_2, value_2) => list_1((s_1, json_1) => Data_decoder(options, s_1, json_1), path_2, value_2))), (arg_13 = AssayMaterials_decoder(options), (objectArg_6 = get$.Optional, objectArg_6.Field("materials", uncurry2(arg_13)))), (arg_15 = ((decoder_1 = MaterialAttribute_decoder(options), (path_3) => ((value_3) => list_1(uncurry2(decoder_1), path_3, value_3)))), (objectArg_7 = get$.Optional, objectArg_7.Field("characteristicCategories", uncurry2(arg_15)))), (arg_17 = ((decoder_2 = OntologyAnnotation_decoder(options), (path_4) => ((value_4) => list_1(uncurry2(decoder_2), path_4, value_4)))), (objectArg_8 = get$.Optional, objectArg_8.Field("unitCategories", uncurry2(arg_17)))), (arg_19 = ((decoder_3 = Process_decoder(options), (path_5) => ((value_5) => list_1(uncurry2(decoder_3), path_5, value_5)))), (objectArg_9 = get$.Optional, objectArg_9.Field("processSequence", uncurry2(arg_19)))), (arg_21 = ((decoder_4 = decoder_5(options), (path_6) => ((value_6) => list_1(uncurry2(decoder_4), path_6, value_6)))), (objectArg_10 = get$.Optional, objectArg_10.Field("comments", uncurry2(arg_21)))));
88
+ }, path_7, v));
89
+ }
90
+
91
+ export function Assay_fromString(s) {
92
+ return fromString(uncurry2(Assay_decoder(ConverterOptions_$ctor())), s);
93
+ }
94
+
95
+ export function Assay_toString(p) {
96
+ return toString(2, Assay_encoder(ConverterOptions_$ctor(), p));
97
+ }
98
+
99
+ /**
100
+ * exports in json-ld format
101
+ */
102
+ export function Assay_toStringLD(a) {
103
+ let returnVal;
104
+ return toString(2, Assay_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), a));
105
+ }
106
+
107
+ export function ArcAssay_fromString(s) {
108
+ const arg = fromString(uncurry2(Assay_decoder(ConverterOptions_$ctor())), s);
109
+ return ArcAssay.fromAssay(arg);
110
+ }
111
+
112
+ export function ArcAssay_toString(a) {
113
+ return toString(2, Assay_encoder(ConverterOptions_$ctor(), a.ToAssay()));
114
+ }
115
+
116
+ /**
117
+ * exports in json-ld format
118
+ */
119
+ export function ArcAssay_toStringLD(a) {
120
+ let returnVal;
121
+ return toString(2, Assay_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), a.ToAssay()));
122
+ }
123
+
@@ -0,0 +1,84 @@
1
+ import { replace } from "../../fable_modules/fable-library.4.1.4/String.js";
2
+ import { value as value_13 } from "../../fable_modules/fable-library.4.1.4/Option.js";
3
+ import { URIModule_toString } from "../ISA/JsonTypes/URI.js";
4
+ import { toString as toString_1, nil, object as object_6 } from "../../fable_modules/Thoth.Json.10.1.0/Encode.fs.js";
5
+ import { choose } from "../../fable_modules/fable-library.4.1.4/List.js";
6
+ import { uncurry2, equals } from "../../fable_modules/fable-library.4.1.4/Util.js";
7
+ import { empty, singleton, append, delay, toList } from "../../fable_modules/fable-library.4.1.4/Seq.js";
8
+ import { ConverterOptions__set_IncludeType_Z1FBCCD16, ConverterOptions__set_SetID_Z1FBCCD16, ConverterOptions_$ctor, ConverterOptions__get_IncludeType, ConverterOptions__get_SetID } from "./ConverterOptions.js";
9
+ import { tryInclude } from "./GEncode.js";
10
+ import { string, object as object_7 } from "../../fable_modules/Thoth.Json.10.1.0/Decode.fs.js";
11
+ import { fromString as fromString_1, uri } from "./Decode.js";
12
+ import { Comment$ } from "../ISA/JsonTypes/Comment.js";
13
+
14
+ export function genID(c) {
15
+ const matchValue = c.ID;
16
+ if (matchValue == null) {
17
+ const matchValue_1 = c.Name;
18
+ if (matchValue_1 == null) {
19
+ return "#EmptyComment";
20
+ }
21
+ else {
22
+ const n = matchValue_1;
23
+ const v = (c.Value != null) ? ("_" + replace(value_13(c.Value), " ", "_")) : "";
24
+ return ("#Comment_" + replace(n, " ", "_")) + v;
25
+ }
26
+ }
27
+ else {
28
+ return URIModule_toString(matchValue);
29
+ }
30
+ }
31
+
32
+ export function encoder(options, comment) {
33
+ return object_6(choose((tupledArg) => {
34
+ const v = tupledArg[1];
35
+ if (equals(v, nil)) {
36
+ return void 0;
37
+ }
38
+ else {
39
+ return [tupledArg[0], v];
40
+ }
41
+ }, toList(delay(() => {
42
+ let value, s;
43
+ return append(ConverterOptions__get_SetID(options) ? singleton(["@id", (value = genID(comment), (typeof value === "string") ? ((s = value, s)) : nil)]) : singleton(tryInclude("@id", (value_2) => {
44
+ let s_1;
45
+ const value_3 = value_2;
46
+ return (typeof value_3 === "string") ? ((s_1 = value_3, s_1)) : nil;
47
+ }, comment["ID"])), delay(() => {
48
+ let value_5, s_2;
49
+ return append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", (value_5 = "Comment", (typeof value_5 === "string") ? ((s_2 = value_5, s_2)) : nil)]) : empty(), delay(() => append(singleton(tryInclude("name", (value_7) => {
50
+ let s_3;
51
+ const value_8 = value_7;
52
+ return (typeof value_8 === "string") ? ((s_3 = value_8, s_3)) : nil;
53
+ }, comment["Name"])), delay(() => singleton(tryInclude("value", (value_10) => {
54
+ let s_4;
55
+ const value_11 = value_10;
56
+ return (typeof value_11 === "string") ? ((s_4 = value_11, s_4)) : nil;
57
+ }, comment["Value"]))))));
58
+ }));
59
+ }))));
60
+ }
61
+
62
+ export function decoder(options) {
63
+ return (path_2) => ((v) => object_7((get$) => {
64
+ let objectArg, objectArg_1, objectArg_2;
65
+ 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)));
66
+ }, path_2, v));
67
+ }
68
+
69
+ export function fromString(s) {
70
+ return fromString_1(uncurry2(decoder(ConverterOptions_$ctor())), s);
71
+ }
72
+
73
+ export function toString(c) {
74
+ return toString_1(2, encoder(ConverterOptions_$ctor(), c));
75
+ }
76
+
77
+ /**
78
+ * exports in json-ld format
79
+ */
80
+ export function toStringLD(c) {
81
+ let returnVal;
82
+ return toString_1(2, encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), c));
83
+ }
84
+
@@ -0,0 +1,33 @@
1
+ import { class_type } from "../../fable_modules/fable-library.4.1.4/Reflection.js";
2
+
3
+ export class ConverterOptions {
4
+ constructor() {
5
+ this.setID = false;
6
+ this.includeType = false;
7
+ }
8
+ }
9
+
10
+ export function ConverterOptions_$reflection() {
11
+ return class_type("ARCtrl.ISA.Json.ConverterOptions", void 0, ConverterOptions);
12
+ }
13
+
14
+ export function ConverterOptions_$ctor() {
15
+ return new ConverterOptions();
16
+ }
17
+
18
+ export function ConverterOptions__get_SetID(this$) {
19
+ return this$.setID;
20
+ }
21
+
22
+ export function ConverterOptions__set_SetID_Z1FBCCD16(this$, setId) {
23
+ this$.setID = setId;
24
+ }
25
+
26
+ export function ConverterOptions__get_IncludeType(this$) {
27
+ return this$.includeType;
28
+ }
29
+
30
+ export function ConverterOptions__set_IncludeType_Z1FBCCD16(this$, iT) {
31
+ this$.includeType = iT;
32
+ }
33
+
@@ -0,0 +1,271 @@
1
+ import { DataFile } from "../ISA/JsonTypes/DataFile.js";
2
+ import { toString, object as object_10, nil } from "../../fable_modules/Thoth.Json.10.1.0/Encode.fs.js";
3
+ import { list as list_1, object as object_11, string } from "../../fable_modules/Thoth.Json.10.1.0/Decode.fs.js";
4
+ import { FSharpResult$2 } from "../../fable_modules/fable-library.4.1.4/Choice.js";
5
+ import { ErrorReason } from "../../fable_modules/Thoth.Json.10.1.0/Types.fs.js";
6
+ import { URIModule_toString } from "../ISA/JsonTypes/URI.js";
7
+ import { ofArray, choose } from "../../fable_modules/fable-library.4.1.4/List.js";
8
+ import { uncurry2, equals } from "../../fable_modules/fable-library.4.1.4/Util.js";
9
+ import { empty, singleton, append, delay, toList } from "../../fable_modules/fable-library.4.1.4/Seq.js";
10
+ import { ConverterOptions__set_IncludeType_Z1FBCCD16, ConverterOptions__set_SetID_Z1FBCCD16, ConverterOptions_$ctor, ConverterOptions__get_IncludeType, ConverterOptions__get_SetID } from "./ConverterOptions.js";
11
+ import { tryInclude } from "./GEncode.js";
12
+ import { decoder as decoder_3, encoder } from "./Comment.js";
13
+ import { fromString, uri, hasUnknownFields } from "./Decode.js";
14
+ import { Data } from "../ISA/JsonTypes/Data.js";
15
+ import { replace } from "../../fable_modules/fable-library.4.1.4/String.js";
16
+ import { MaterialAttributeValue_decoder, MaterialAttributeValue_encoder } from "./Material.js";
17
+ import { Source } from "../ISA/JsonTypes/Source.js";
18
+ import { FactorValue_decoder, FactorValue_encoder } from "./Factor.js";
19
+ import { Sample } from "../ISA/JsonTypes/Sample.js";
20
+
21
+ export function DataFile_encoder(options, value) {
22
+ if (value instanceof DataFile) {
23
+ if (value.tag === 1) {
24
+ return "Derived Data File";
25
+ }
26
+ else if (value.tag === 2) {
27
+ return "Image File";
28
+ }
29
+ else {
30
+ return "Raw Data File";
31
+ }
32
+ }
33
+ else {
34
+ return nil;
35
+ }
36
+ }
37
+
38
+ export function DataFile_decoder(options, s, json) {
39
+ const matchValue = string(s, json);
40
+ if (matchValue.tag === 1) {
41
+ return new FSharpResult$2(1, [matchValue.fields[0]]);
42
+ }
43
+ else {
44
+ switch (matchValue.fields[0]) {
45
+ case "Raw Data File":
46
+ return new FSharpResult$2(0, [new DataFile(0, [])]);
47
+ case "Derived Data File":
48
+ return new FSharpResult$2(0, [new DataFile(1, [])]);
49
+ case "Image File":
50
+ return new FSharpResult$2(0, [new DataFile(2, [])]);
51
+ default: {
52
+ const s_1 = matchValue.fields[0];
53
+ return new FSharpResult$2(1, [[`Could not parse ${s_1}.`, new ErrorReason(0, [s_1, nil])]]);
54
+ }
55
+ }
56
+ }
57
+ }
58
+
59
+ export function Data_genID(d) {
60
+ const matchValue = d.ID;
61
+ if (matchValue == null) {
62
+ const matchValue_1 = d.Name;
63
+ if (matchValue_1 == null) {
64
+ return "#EmptyData";
65
+ }
66
+ else {
67
+ return matchValue_1;
68
+ }
69
+ }
70
+ else {
71
+ return URIModule_toString(matchValue);
72
+ }
73
+ }
74
+
75
+ export function Data_encoder(options, oa) {
76
+ return object_10(choose((tupledArg) => {
77
+ const v = tupledArg[1];
78
+ if (equals(v, nil)) {
79
+ return void 0;
80
+ }
81
+ else {
82
+ return [tupledArg[0], v];
83
+ }
84
+ }, toList(delay(() => {
85
+ let value, s;
86
+ return append(ConverterOptions__get_SetID(options) ? singleton(["@id", (value = Data_genID(oa), (typeof value === "string") ? ((s = value, s)) : nil)]) : singleton(tryInclude("@id", (value_2) => {
87
+ let s_1;
88
+ const value_3 = value_2;
89
+ return (typeof value_3 === "string") ? ((s_1 = value_3, s_1)) : nil;
90
+ }, oa["ID"])), delay(() => {
91
+ let value_5, s_2;
92
+ return append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", (value_5 = "Data", (typeof value_5 === "string") ? ((s_2 = value_5, s_2)) : nil)]) : empty(), delay(() => append(singleton(tryInclude("name", (value_7) => {
93
+ let s_3;
94
+ const value_8 = value_7;
95
+ return (typeof value_8 === "string") ? ((s_3 = value_8, s_3)) : nil;
96
+ }, oa["Name"])), delay(() => append(singleton(tryInclude("type", (value_10) => DataFile_encoder(options, value_10), oa["DataType"])), delay(() => singleton(tryInclude("comments", (comment) => encoder(options, comment), oa["Comments"]))))))));
97
+ }));
98
+ }))));
99
+ }
100
+
101
+ export function Data_decoder(options, s, json) {
102
+ if (hasUnknownFields(ofArray(["@id", "name", "type", "comments", "@type"]), json)) {
103
+ return new FSharpResult$2(1, [["Unknown fields in Data", new ErrorReason(0, [s, nil])]]);
104
+ }
105
+ else {
106
+ return object_11((get$) => {
107
+ let objectArg, objectArg_1, objectArg_2, arg_7, decoder, objectArg_3;
108
+ return new Data((objectArg = get$.Optional, objectArg.Field("@id", uri)), (objectArg_1 = get$.Optional, objectArg_1.Field("name", string)), (objectArg_2 = get$.Optional, objectArg_2.Field("type", (s_2, json_2) => DataFile_decoder(options, s_2, json_2))), (arg_7 = ((decoder = decoder_3(options), (path_1) => ((value_1) => list_1(uncurry2(decoder), path_1, value_1)))), (objectArg_3 = get$.Optional, objectArg_3.Field("comments", uncurry2(arg_7)))));
109
+ }, s, json);
110
+ }
111
+ }
112
+
113
+ export function Data_fromString(s) {
114
+ let options;
115
+ return fromString(uncurry2((options = ConverterOptions_$ctor(), (s_1) => ((json) => Data_decoder(options, s_1, json)))), s);
116
+ }
117
+
118
+ export function Data_toString(m) {
119
+ return toString(2, Data_encoder(ConverterOptions_$ctor(), m));
120
+ }
121
+
122
+ /**
123
+ * exports in json-ld format
124
+ */
125
+ export function Data_toStringLD(d) {
126
+ let returnVal;
127
+ return toString(2, Data_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), d));
128
+ }
129
+
130
+ export function Source_genID(s) {
131
+ const matchValue = s.ID;
132
+ if (matchValue == null) {
133
+ const matchValue_1 = s.Name;
134
+ if (matchValue_1 == null) {
135
+ return "#EmptySource";
136
+ }
137
+ else {
138
+ return "#Source_" + replace(matchValue_1, " ", "_");
139
+ }
140
+ }
141
+ else {
142
+ return URIModule_toString(matchValue);
143
+ }
144
+ }
145
+
146
+ export function Source_encoder(options, oa) {
147
+ return object_10(choose((tupledArg) => {
148
+ const v = tupledArg[1];
149
+ if (equals(v, nil)) {
150
+ return void 0;
151
+ }
152
+ else {
153
+ return [tupledArg[0], v];
154
+ }
155
+ }, toList(delay(() => {
156
+ let value, s_1;
157
+ return append(ConverterOptions__get_SetID(options) ? singleton(["@id", (value = Source_genID(oa), (typeof value === "string") ? ((s_1 = value, s_1)) : nil)]) : singleton(tryInclude("@id", (value_2) => {
158
+ let s_2;
159
+ const value_3 = value_2;
160
+ return (typeof value_3 === "string") ? ((s_2 = value_3, s_2)) : nil;
161
+ }, oa["ID"])), delay(() => {
162
+ let value_5, s_3;
163
+ return append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", (value_5 = "Source", (typeof value_5 === "string") ? ((s_3 = value_5, s_3)) : nil)]) : empty(), delay(() => append(singleton(tryInclude("name", (value_7) => {
164
+ let s_4;
165
+ const value_8 = value_7;
166
+ return (typeof value_8 === "string") ? ((s_4 = value_8, s_4)) : nil;
167
+ }, oa["Name"])), delay(() => singleton(tryInclude("characteristics", (oa_1) => MaterialAttributeValue_encoder(options, oa_1), oa["Characteristics"]))))));
168
+ }));
169
+ }))));
170
+ }
171
+
172
+ export function Source_decoder(options, s, json) {
173
+ if (hasUnknownFields(ofArray(["@id", "name", "characteristics", "@type"]), json)) {
174
+ return new FSharpResult$2(1, [["Unknown fields in Source", new ErrorReason(0, [s, nil])]]);
175
+ }
176
+ else {
177
+ return object_11((get$) => {
178
+ let objectArg, objectArg_1, arg_5, decoder, objectArg_2;
179
+ return new Source((objectArg = get$.Optional, objectArg.Field("@id", uri)), (objectArg_1 = get$.Optional, objectArg_1.Field("name", string)), (arg_5 = ((decoder = MaterialAttributeValue_decoder(options), (path_1) => ((value_1) => list_1(uncurry2(decoder), path_1, value_1)))), (objectArg_2 = get$.Optional, objectArg_2.Field("characteristics", uncurry2(arg_5)))));
180
+ }, s, json);
181
+ }
182
+ }
183
+
184
+ export function Source_fromString(s) {
185
+ let options;
186
+ return fromString(uncurry2((options = ConverterOptions_$ctor(), (s_1) => ((json) => Source_decoder(options, s_1, json)))), s);
187
+ }
188
+
189
+ export function Source_toString(m) {
190
+ return toString(2, Source_encoder(ConverterOptions_$ctor(), m));
191
+ }
192
+
193
+ /**
194
+ * exports in json-ld format
195
+ */
196
+ export function Source_toStringLD(s) {
197
+ let returnVal;
198
+ return toString(2, Source_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), s));
199
+ }
200
+
201
+ export function Sample_genID(s) {
202
+ const matchValue = s.ID;
203
+ if (matchValue == null) {
204
+ const matchValue_1 = s.Name;
205
+ if (matchValue_1 == null) {
206
+ return "#EmptySample";
207
+ }
208
+ else {
209
+ return "#Sample_" + replace(matchValue_1, " ", "_");
210
+ }
211
+ }
212
+ else {
213
+ return matchValue;
214
+ }
215
+ }
216
+
217
+ export function Sample_encoder(options, oa) {
218
+ return object_10(choose((tupledArg) => {
219
+ const v = tupledArg[1];
220
+ if (equals(v, nil)) {
221
+ return void 0;
222
+ }
223
+ else {
224
+ return [tupledArg[0], v];
225
+ }
226
+ }, toList(delay(() => {
227
+ let value, s_1;
228
+ return append(ConverterOptions__get_SetID(options) ? singleton(["@id", (value = Sample_genID(oa), (typeof value === "string") ? ((s_1 = value, s_1)) : nil)]) : singleton(tryInclude("@id", (value_2) => {
229
+ let s_2;
230
+ const value_3 = value_2;
231
+ return (typeof value_3 === "string") ? ((s_2 = value_3, s_2)) : nil;
232
+ }, oa["ID"])), delay(() => {
233
+ let value_5, s_3;
234
+ return append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", (value_5 = "Sample", (typeof value_5 === "string") ? ((s_3 = value_5, s_3)) : nil)]) : empty(), delay(() => append(singleton(tryInclude("name", (value_7) => {
235
+ let s_4;
236
+ const value_8 = value_7;
237
+ return (typeof value_8 === "string") ? ((s_4 = value_8, s_4)) : nil;
238
+ }, oa["Name"])), delay(() => append(singleton(tryInclude("characteristics", (oa_1) => MaterialAttributeValue_encoder(options, oa_1), oa["Characteristics"])), delay(() => append(singleton(tryInclude("factorValues", (oa_2) => FactorValue_encoder(options, oa_2), oa["FactorValues"])), delay(() => singleton(tryInclude("derivesFrom", (oa_3) => Source_encoder(options, oa_3), oa["DerivesFrom"]))))))))));
239
+ }));
240
+ }))));
241
+ }
242
+
243
+ export function Sample_decoder(options, s, json) {
244
+ if (hasUnknownFields(ofArray(["@id", "name", "characteristics", "factorValues", "derivesFrom", "@type"]), json)) {
245
+ return new FSharpResult$2(1, [["Unknown fields in Sample", new ErrorReason(0, [s, nil])]]);
246
+ }
247
+ else {
248
+ return object_11((get$) => {
249
+ let objectArg, objectArg_1, arg_5, decoder, objectArg_2, arg_7, decoder_1, objectArg_3, objectArg_4;
250
+ return new Sample((objectArg = get$.Optional, objectArg.Field("@id", uri)), (objectArg_1 = get$.Optional, objectArg_1.Field("name", string)), (arg_5 = ((decoder = MaterialAttributeValue_decoder(options), (path_1) => ((value_1) => list_1(uncurry2(decoder), path_1, value_1)))), (objectArg_2 = get$.Optional, objectArg_2.Field("characteristics", uncurry2(arg_5)))), (arg_7 = ((decoder_1 = FactorValue_decoder(options), (path_2) => ((value_2) => list_1(uncurry2(decoder_1), path_2, value_2)))), (objectArg_3 = get$.Optional, objectArg_3.Field("factorValues", uncurry2(arg_7)))), (objectArg_4 = get$.Optional, objectArg_4.Field("derivesFrom", (path_3, value_3) => list_1((s_2, json_2) => Source_decoder(options, s_2, json_2), path_3, value_3))));
251
+ }, s, json);
252
+ }
253
+ }
254
+
255
+ export function Sample_fromString(s) {
256
+ let options;
257
+ return fromString(uncurry2((options = ConverterOptions_$ctor(), (s_1) => ((json) => Sample_decoder(options, s_1, json)))), s);
258
+ }
259
+
260
+ export function Sample_toString(m) {
261
+ return toString(2, Sample_encoder(ConverterOptions_$ctor(), m));
262
+ }
263
+
264
+ /**
265
+ * exports in json-ld format
266
+ */
267
+ export function Sample_toStringLD(s) {
268
+ let returnVal;
269
+ return toString(2, Sample_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), s));
270
+ }
271
+
@@ -0,0 +1,46 @@
1
+ import { fromString as fromString_1, string } from "../../fable_modules/Thoth.Json.10.1.0/Decode.fs.js";
2
+ import { FSharpResult$2 } from "../../fable_modules/fable-library.4.1.4/Choice.js";
3
+ import { printf, toText } from "../../fable_modules/fable-library.4.1.4/String.js";
4
+ import { ErrorReason } from "../../fable_modules/Thoth.Json.10.1.0/Types.fs.js";
5
+ import { contains, exists } from "../../fable_modules/fable-library.4.1.4/Seq.js";
6
+ import { stringHash } from "../../fable_modules/fable-library.4.1.4/Util.js";
7
+
8
+ export function isURI(s) {
9
+ return true;
10
+ }
11
+
12
+ export function uri(s, json) {
13
+ const matchValue = string(s, json);
14
+ if (matchValue.tag === 1) {
15
+ return new FSharpResult$2(1, [matchValue.fields[0]]);
16
+ }
17
+ else if (isURI(matchValue.fields[0])) {
18
+ return new FSharpResult$2(0, [matchValue.fields[0]]);
19
+ }
20
+ else {
21
+ const s_3 = matchValue.fields[0];
22
+ return new FSharpResult$2(1, [[s_3, new ErrorReason(6, [toText(printf("Expected URI, got %s"))(s_3)])]]);
23
+ }
24
+ }
25
+
26
+ export function fromString(decoder, s) {
27
+ const matchValue = fromString_1(decoder, s);
28
+ if (matchValue.tag === 1) {
29
+ throw new Error(toText(printf("Error decoding string: %s"))(matchValue.fields[0]));
30
+ }
31
+ else {
32
+ return matchValue.fields[0];
33
+ }
34
+ }
35
+
36
+ export function getFieldNames(json) {
37
+ return Object.getOwnPropertyNames(json);
38
+ }
39
+
40
+ export function hasUnknownFields(knownFields, json) {
41
+ return exists((x) => !contains(x, knownFields, {
42
+ Equals: (x_1, y) => (x_1 === y),
43
+ GetHashCode: stringHash,
44
+ }), getFieldNames(json));
45
+ }
46
+