@nfdi4plants/arctrl 1.0.0-alpha10

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 (296) hide show
  1. package/ARC.js +262 -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 +848 -0
  15. package/ISA/ISA/ArcTypes/ArcTableAux.js +1105 -0
  16. package/ISA/ISA/ArcTypes/ArcTables.js +479 -0
  17. package/ISA/ISA/ArcTypes/ArcTypes.js +2281 -0
  18. package/ISA/ISA/ArcTypes/CompositeCell.js +180 -0
  19. package/ISA/ISA/ArcTypes/CompositeColumn.js +48 -0
  20. package/ISA/ISA/ArcTypes/CompositeHeader.js +668 -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 +338 -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/Template.Json.js +85 -0
  102. package/Templates/Template.Spreadsheet.js +315 -0
  103. package/Templates/Template.Web.js +27 -0
  104. package/Templates/Template.js +179 -0
  105. package/Templates/Templates.js +82 -0
  106. package/WebRequest/WebRequest.js +38 -0
  107. package/fable_modules/Fable.Fetch.2.6.0/Fable.Fetch.fableproj +21 -0
  108. package/fable_modules/Fable.Fetch.2.6.0/Fetch.fs +469 -0
  109. package/fable_modules/Fable.Fetch.2.6.0/Fetch.fs.js +111 -0
  110. package/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs +57 -0
  111. package/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs.js +104 -0
  112. package/fable_modules/Fable.Promise.3.2.0/Fable.Promise.fableproj +20 -0
  113. package/fable_modules/Fable.Promise.3.2.0/Promise.fs +766 -0
  114. package/fable_modules/Fable.Promise.3.2.0/Promise.fs.js +217 -0
  115. package/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs +31 -0
  116. package/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.js +19 -0
  117. package/fable_modules/Fable.SimpleHttp.3.5.0/Fable.SimpleHttp.fableproj +23 -0
  118. package/fable_modules/Fable.SimpleHttp.3.5.0/Http.fs +357 -0
  119. package/fable_modules/Fable.SimpleHttp.3.5.0/Http.fs.js +429 -0
  120. package/fable_modules/Fable.SimpleHttp.3.5.0/Types.fs +52 -0
  121. package/fable_modules/Fable.SimpleHttp.3.5.0/Types.fs.js +112 -0
  122. package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCell.fs +387 -0
  123. package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCell.fs.js +240 -0
  124. package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCellsCollection.fs +725 -0
  125. package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCellsCollection.fs.js +522 -0
  126. package/fable_modules/FsSpreadsheet.4.1.0/DSL/CellBuilder.fs +195 -0
  127. package/fable_modules/FsSpreadsheet.4.1.0/DSL/CellBuilder.fs.js +208 -0
  128. package/fable_modules/FsSpreadsheet.4.1.0/DSL/ColumnBuilder.fs +209 -0
  129. package/fable_modules/FsSpreadsheet.4.1.0/DSL/ColumnBuilder.fs.js +137 -0
  130. package/fable_modules/FsSpreadsheet.4.1.0/DSL/DSL.fs +61 -0
  131. package/fable_modules/FsSpreadsheet.4.1.0/DSL/DSL.fs.js +62 -0
  132. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Expression.fs +24 -0
  133. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Expression.fs.js +56 -0
  134. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Operators.fs +102 -0
  135. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Operators.fs.js +6 -0
  136. package/fable_modules/FsSpreadsheet.4.1.0/DSL/RowBuilder.fs +200 -0
  137. package/fable_modules/FsSpreadsheet.4.1.0/DSL/RowBuilder.fs.js +137 -0
  138. package/fable_modules/FsSpreadsheet.4.1.0/DSL/SheetBuilder.fs +139 -0
  139. package/fable_modules/FsSpreadsheet.4.1.0/DSL/SheetBuilder.fs.js +116 -0
  140. package/fable_modules/FsSpreadsheet.4.1.0/DSL/TableBuilder.fs +120 -0
  141. package/fable_modules/FsSpreadsheet.4.1.0/DSL/TableBuilder.fs.js +120 -0
  142. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Transform.fs +229 -0
  143. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Transform.fs.js +421 -0
  144. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Types.fs +151 -0
  145. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Types.fs.js +277 -0
  146. package/fable_modules/FsSpreadsheet.4.1.0/DSL/WorkbookBuilder.fs +114 -0
  147. package/fable_modules/FsSpreadsheet.4.1.0/DSL/WorkbookBuilder.fs.js +104 -0
  148. package/fable_modules/FsSpreadsheet.4.1.0/FsAddress.fs +177 -0
  149. package/fable_modules/FsSpreadsheet.4.1.0/FsAddress.fs.js +249 -0
  150. package/fable_modules/FsSpreadsheet.4.1.0/FsColumn.fs +200 -0
  151. package/fable_modules/FsSpreadsheet.4.1.0/FsColumn.fs.js +125 -0
  152. package/fable_modules/FsSpreadsheet.4.1.0/FsRow.fs +202 -0
  153. package/fable_modules/FsSpreadsheet.4.1.0/FsRow.fs.js +135 -0
  154. package/fable_modules/FsSpreadsheet.4.1.0/FsSpreadsheet.fableproj +58 -0
  155. package/fable_modules/FsSpreadsheet.4.1.0/FsWorkbook.fs +183 -0
  156. package/fable_modules/FsSpreadsheet.4.1.0/FsWorkbook.fs.js +138 -0
  157. package/fable_modules/FsSpreadsheet.4.1.0/FsWorksheet.fs +628 -0
  158. package/fable_modules/FsSpreadsheet.4.1.0/FsWorksheet.fs.js +398 -0
  159. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRange.fs +19 -0
  160. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRange.fs.js +41 -0
  161. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeAddress.fs +222 -0
  162. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeAddress.fs.js +235 -0
  163. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeBase.fs +93 -0
  164. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeBase.fs.js +91 -0
  165. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeColumn.fs +65 -0
  166. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeColumn.fs.js +74 -0
  167. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeRow.fs +22 -0
  168. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeRow.fs.js +40 -0
  169. package/fable_modules/FsSpreadsheet.4.1.0/SheetBuilder.fs +249 -0
  170. package/fable_modules/FsSpreadsheet.4.1.0/SheetBuilder.fs.js +325 -0
  171. package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTable.fs +455 -0
  172. package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTable.fs.js +310 -0
  173. package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableField.fs +140 -0
  174. package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableField.fs.js +173 -0
  175. package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableRow.fs +6 -0
  176. package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableRow.fs.js +17 -0
  177. package/fable_modules/FsSpreadsheet.4.1.0/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
  178. package/fable_modules/FsSpreadsheet.4.1.0/obj/Debug/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +19 -0
  179. package/fable_modules/FsSpreadsheet.4.1.0/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
  180. package/fable_modules/FsSpreadsheet.4.1.0/obj/Release/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +19 -0
  181. package/fable_modules/Thoth.Json.10.1.0/Decode.fs +1366 -0
  182. package/fable_modules/Thoth.Json.10.1.0/Decode.fs.js +1798 -0
  183. package/fable_modules/Thoth.Json.10.1.0/Encode.fs +621 -0
  184. package/fable_modules/Thoth.Json.10.1.0/Encode.fs.js +472 -0
  185. package/fable_modules/Thoth.Json.10.1.0/Extra.fs +31 -0
  186. package/fable_modules/Thoth.Json.10.1.0/Extra.fs.js +8 -0
  187. package/fable_modules/Thoth.Json.10.1.0/Thoth.Json.fableproj +30 -0
  188. package/fable_modules/Thoth.Json.10.1.0/Types.fs +59 -0
  189. package/fable_modules/Thoth.Json.10.1.0/Types.fs.js +98 -0
  190. package/fable_modules/Thoth.Json.10.1.0/obj/Release/netstandard2.0/Thoth.Json.AssemblyInfo.fs +19 -0
  191. package/fable_modules/Thoth.Json.10.1.0/package.json +5 -0
  192. package/fable_modules/fable-library.4.1.4/Array.d.ts +120 -0
  193. package/fable_modules/fable-library.4.1.4/Array.js +1204 -0
  194. package/fable_modules/fable-library.4.1.4/Async.d.ts +32 -0
  195. package/fable_modules/fable-library.4.1.4/Async.js +158 -0
  196. package/fable_modules/fable-library.4.1.4/AsyncBuilder.d.ts +59 -0
  197. package/fable_modules/fable-library.4.1.4/AsyncBuilder.js +183 -0
  198. package/fable_modules/fable-library.4.1.4/BigInt.d.ts +115 -0
  199. package/fable_modules/fable-library.4.1.4/BigInt.js +282 -0
  200. package/fable_modules/fable-library.4.1.4/BitConverter.d.ts +27 -0
  201. package/fable_modules/fable-library.4.1.4/BitConverter.js +138 -0
  202. package/fable_modules/fable-library.4.1.4/Boolean.d.ts +3 -0
  203. package/fable_modules/fable-library.4.1.4/Boolean.js +21 -0
  204. package/fable_modules/fable-library.4.1.4/Char.d.ts +65 -0
  205. package/fable_modules/fable-library.4.1.4/Char.js +169 -0
  206. package/fable_modules/fable-library.4.1.4/Choice.d.ts +138 -0
  207. package/fable_modules/fable-library.4.1.4/Choice.js +227 -0
  208. package/fable_modules/fable-library.4.1.4/Date.d.ts +70 -0
  209. package/fable_modules/fable-library.4.1.4/Date.js +451 -0
  210. package/fable_modules/fable-library.4.1.4/DateOffset.d.ts +63 -0
  211. package/fable_modules/fable-library.4.1.4/DateOffset.js +268 -0
  212. package/fable_modules/fable-library.4.1.4/DateOnly.d.ts +18 -0
  213. package/fable_modules/fable-library.4.1.4/DateOnly.js +124 -0
  214. package/fable_modules/fable-library.4.1.4/Decimal.d.ts +45 -0
  215. package/fable_modules/fable-library.4.1.4/Decimal.js +212 -0
  216. package/fable_modules/fable-library.4.1.4/Double.d.ts +11 -0
  217. package/fable_modules/fable-library.4.1.4/Double.js +46 -0
  218. package/fable_modules/fable-library.4.1.4/Encoding.d.ts +12 -0
  219. package/fable_modules/fable-library.4.1.4/Encoding.js +173 -0
  220. package/fable_modules/fable-library.4.1.4/Event.d.ts +31 -0
  221. package/fable_modules/fable-library.4.1.4/Event.js +93 -0
  222. package/fable_modules/fable-library.4.1.4/FSharp.Collections.d.ts +7 -0
  223. package/fable_modules/fable-library.4.1.4/FSharp.Collections.js +27 -0
  224. package/fable_modules/fable-library.4.1.4/FSharp.Core.d.ts +17 -0
  225. package/fable_modules/fable-library.4.1.4/FSharp.Core.js +69 -0
  226. package/fable_modules/fable-library.4.1.4/Global.d.ts +24 -0
  227. package/fable_modules/fable-library.4.1.4/Global.js +8 -0
  228. package/fable_modules/fable-library.4.1.4/Guid.d.ts +10 -0
  229. package/fable_modules/fable-library.4.1.4/Guid.js +142 -0
  230. package/fable_modules/fable-library.4.1.4/Int32.d.ts +28 -0
  231. package/fable_modules/fable-library.4.1.4/Int32.js +135 -0
  232. package/fable_modules/fable-library.4.1.4/List.d.ts +143 -0
  233. package/fable_modules/fable-library.4.1.4/List.js +1273 -0
  234. package/fable_modules/fable-library.4.1.4/Long.d.ts +3 -0
  235. package/fable_modules/fable-library.4.1.4/Long.js +46 -0
  236. package/fable_modules/fable-library.4.1.4/MailboxProcessor.d.ts +25 -0
  237. package/fable_modules/fable-library.4.1.4/MailboxProcessor.js +93 -0
  238. package/fable_modules/fable-library.4.1.4/Map.d.ts +178 -0
  239. package/fable_modules/fable-library.4.1.4/Map.js +1396 -0
  240. package/fable_modules/fable-library.4.1.4/MapUtil.d.ts +10 -0
  241. package/fable_modules/fable-library.4.1.4/MapUtil.js +112 -0
  242. package/fable_modules/fable-library.4.1.4/MutableMap.d.ts +52 -0
  243. package/fable_modules/fable-library.4.1.4/MutableMap.js +326 -0
  244. package/fable_modules/fable-library.4.1.4/MutableSet.d.ts +39 -0
  245. package/fable_modules/fable-library.4.1.4/MutableSet.js +232 -0
  246. package/fable_modules/fable-library.4.1.4/Native.d.ts +2 -0
  247. package/fable_modules/fable-library.4.1.4/Native.js +8 -0
  248. package/fable_modules/fable-library.4.1.4/Numeric.d.ts +19 -0
  249. package/fable_modules/fable-library.4.1.4/Numeric.js +71 -0
  250. package/fable_modules/fable-library.4.1.4/Observable.d.ts +32 -0
  251. package/fable_modules/fable-library.4.1.4/Observable.js +113 -0
  252. package/fable_modules/fable-library.4.1.4/Option.d.ts +28 -0
  253. package/fable_modules/fable-library.4.1.4/Option.js +96 -0
  254. package/fable_modules/fable-library.4.1.4/README.md +3 -0
  255. package/fable_modules/fable-library.4.1.4/Random.d.ts +37 -0
  256. package/fable_modules/fable-library.4.1.4/Random.js +170 -0
  257. package/fable_modules/fable-library.4.1.4/Range.d.ts +12 -0
  258. package/fable_modules/fable-library.4.1.4/Range.js +45 -0
  259. package/fable_modules/fable-library.4.1.4/Reflection.d.ts +119 -0
  260. package/fable_modules/fable-library.4.1.4/Reflection.js +461 -0
  261. package/fable_modules/fable-library.4.1.4/RegExp.d.ts +10 -0
  262. package/fable_modules/fable-library.4.1.4/RegExp.js +132 -0
  263. package/fable_modules/fable-library.4.1.4/Seq.d.ts +165 -0
  264. package/fable_modules/fable-library.4.1.4/Seq.js +1379 -0
  265. package/fable_modules/fable-library.4.1.4/Seq2.d.ts +18 -0
  266. package/fable_modules/fable-library.4.1.4/Seq2.js +111 -0
  267. package/fable_modules/fable-library.4.1.4/Set.d.ts +190 -0
  268. package/fable_modules/fable-library.4.1.4/Set.js +1789 -0
  269. package/fable_modules/fable-library.4.1.4/String.d.ts +49 -0
  270. package/fable_modules/fable-library.4.1.4/String.js +540 -0
  271. package/fable_modules/fable-library.4.1.4/System.Collections.Generic.d.ts +71 -0
  272. package/fable_modules/fable-library.4.1.4/System.Collections.Generic.js +307 -0
  273. package/fable_modules/fable-library.4.1.4/System.Text.d.ts +30 -0
  274. package/fable_modules/fable-library.4.1.4/System.Text.js +110 -0
  275. package/fable_modules/fable-library.4.1.4/SystemException.d.ts +5 -0
  276. package/fable_modules/fable-library.4.1.4/SystemException.js +5 -0
  277. package/fable_modules/fable-library.4.1.4/TimeOnly.d.ts +15 -0
  278. package/fable_modules/fable-library.4.1.4/TimeOnly.js +122 -0
  279. package/fable_modules/fable-library.4.1.4/TimeSpan.d.ts +34 -0
  280. package/fable_modules/fable-library.4.1.4/TimeSpan.js +177 -0
  281. package/fable_modules/fable-library.4.1.4/Timer.d.ts +19 -0
  282. package/fable_modules/fable-library.4.1.4/Timer.js +67 -0
  283. package/fable_modules/fable-library.4.1.4/Types.d.ts +58 -0
  284. package/fable_modules/fable-library.4.1.4/Types.js +208 -0
  285. package/fable_modules/fable-library.4.1.4/Unicode.13.0.0.d.ts +2 -0
  286. package/fable_modules/fable-library.4.1.4/Unicode.13.0.0.js +4 -0
  287. package/fable_modules/fable-library.4.1.4/Uri.d.ts +29 -0
  288. package/fable_modules/fable-library.4.1.4/Uri.js +142 -0
  289. package/fable_modules/fable-library.4.1.4/Util.d.ts +187 -0
  290. package/fable_modules/fable-library.4.1.4/Util.js +662 -0
  291. package/fable_modules/fable-library.4.1.4/lib/big.d.ts +338 -0
  292. package/fable_modules/fable-library.4.1.4/lib/big.js +826 -0
  293. package/fable_modules/fable-library.4.1.4/package.json +23 -0
  294. package/fable_modules/project_cracked.json +1 -0
  295. package/index.js +13 -0
  296. package/package.json +24 -0
@@ -0,0 +1,291 @@
1
+ import { replace } from "../../fable_modules/fable-library.4.1.4/String.js";
2
+ import { ProtocolParameter_getNameText_Z3A4310A5 } from "../ISA/JsonTypes/ProtocolParameter.js";
3
+ import { Value_getText_72E9EF0F } from "../ISA/JsonTypes/Value.js";
4
+ import { list as list_2, toString, nil, object as object_22 } from "../../fable_modules/Thoth.Json.10.1.0/Encode.fs.js";
5
+ import { map, 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 { Protocol_decoder, Protocol_encoder, ProtocolParameter_decoder, ProtocolParameter_encoder } from "./Protocol.js";
11
+ import { Value_decoder, Value_encoder } from "./Factor.js";
12
+ import { OntologyAnnotation_decoder, OntologyAnnotation_encoder } from "./Ontology.js";
13
+ import { list as list_1, string, object as object_23 } from "../../fable_modules/Thoth.Json.10.1.0/Decode.fs.js";
14
+ import { ProcessParameterValue } from "../ISA/JsonTypes/ProcessParameterValue.js";
15
+ import { uri, fromJsonString } from "./Decode.js";
16
+ import { ProcessInput } from "../ISA/JsonTypes/ProcessInput.js";
17
+ import { Data_decoder, Sample_decoder, Source_decoder, Source_encoder, Data_encoder, Sample_encoder } from "./Data.js";
18
+ import { Material_decoder, Material_encoder } from "./Material.js";
19
+ import { FSharpResult$2 } from "../../fable_modules/fable-library.4.1.4/Choice.js";
20
+ import { ProcessOutput } from "../ISA/JsonTypes/ProcessOutput.js";
21
+ import { URIModule_toString } from "../ISA/JsonTypes/URI.js";
22
+ import { decoder as decoder_4, encoder } from "./Comment.js";
23
+ import { Process } from "../ISA/JsonTypes/Process.js";
24
+
25
+ export function ProcessParameterValue_genID(p) {
26
+ const matchValue = p.Value;
27
+ const matchValue_1 = p.Category;
28
+ let matchResult, c, v;
29
+ if (matchValue != null) {
30
+ if (matchValue_1 != null) {
31
+ matchResult = 0;
32
+ c = matchValue_1;
33
+ v = matchValue;
34
+ }
35
+ else {
36
+ matchResult = 1;
37
+ }
38
+ }
39
+ else {
40
+ matchResult = 1;
41
+ }
42
+ switch (matchResult) {
43
+ case 0:
44
+ return (("#Param_" + replace(ProtocolParameter_getNameText_Z3A4310A5(c), " ", "_")) + "_") + replace(Value_getText_72E9EF0F(v), " ", "_");
45
+ default:
46
+ return "#EmptyParameterValue";
47
+ }
48
+ }
49
+
50
+ export function ProcessParameterValue_encoder(options, oa) {
51
+ return object_22(choose((tupledArg) => {
52
+ const v = tupledArg[1];
53
+ if (equals(v, nil)) {
54
+ return void 0;
55
+ }
56
+ else {
57
+ return [tupledArg[0], v];
58
+ }
59
+ }, toList(delay(() => {
60
+ let value, s;
61
+ return append(ConverterOptions__get_SetID(options) ? singleton(["@id", (value = ProcessParameterValue_genID(oa), (typeof value === "string") ? ((s = value, s)) : nil)]) : empty(), delay(() => {
62
+ let value_2, s_1;
63
+ return append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", (value_2 = "ProcessParameterValue", (typeof value_2 === "string") ? ((s_1 = value_2, s_1)) : nil)]) : empty(), delay(() => append(singleton(tryInclude("category", (oa_1) => ProtocolParameter_encoder(options, oa_1), oa["Category"])), delay(() => append(singleton(tryInclude("value", (value_4) => Value_encoder(options, value_4), oa["Value"])), delay(() => singleton(tryInclude("unit", (oa_2) => OntologyAnnotation_encoder(options, oa_2), oa["Unit"]))))))));
64
+ }));
65
+ }))));
66
+ }
67
+
68
+ export function ProcessParameterValue_decoder(options) {
69
+ return (path) => ((v) => object_23((get$) => {
70
+ let arg_1, objectArg, objectArg_1, arg_5, objectArg_2;
71
+ return new ProcessParameterValue((arg_1 = ProtocolParameter_decoder(options), (objectArg = get$.Optional, objectArg.Field("category", uncurry2(arg_1)))), (objectArg_1 = get$.Optional, objectArg_1.Field("value", (s, json) => Value_decoder(options, s, json))), (arg_5 = OntologyAnnotation_decoder(options), (objectArg_2 = get$.Optional, objectArg_2.Field("unit", uncurry2(arg_5)))));
72
+ }, path, v));
73
+ }
74
+
75
+ export function ProcessParameterValue_fromJsonString(s) {
76
+ return fromJsonString(uncurry2(ProcessParameterValue_decoder(ConverterOptions_$ctor())), s);
77
+ }
78
+
79
+ export function ProcessParameterValue_toJsonString(p) {
80
+ return toString(2, ProcessParameterValue_encoder(ConverterOptions_$ctor(), p));
81
+ }
82
+
83
+ /**
84
+ * exports in json-ld format
85
+ */
86
+ export function ProcessParameterValue_toStringLD(p) {
87
+ let returnVal;
88
+ return toString(2, ProcessParameterValue_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), p));
89
+ }
90
+
91
+ export function ProcessInput_encoder(options, value) {
92
+ if (value instanceof ProcessInput) {
93
+ if (value.tag === 1) {
94
+ return Sample_encoder(options, value.fields[0]);
95
+ }
96
+ else if (value.tag === 2) {
97
+ return Data_encoder(options, value.fields[0]);
98
+ }
99
+ else if (value.tag === 3) {
100
+ return Material_encoder(options, value.fields[0]);
101
+ }
102
+ else {
103
+ return Source_encoder(options, value.fields[0]);
104
+ }
105
+ }
106
+ else {
107
+ return nil;
108
+ }
109
+ }
110
+
111
+ export function ProcessInput_decoder(options, s, json) {
112
+ const matchValue = Source_decoder(options, s, json);
113
+ if (matchValue.tag === 1) {
114
+ const matchValue_1 = Sample_decoder(options, s, json);
115
+ if (matchValue_1.tag === 1) {
116
+ const matchValue_2 = Data_decoder(options, s, json);
117
+ if (matchValue_2.tag === 1) {
118
+ const matchValue_3 = Material_decoder(options, s, json);
119
+ if (matchValue_3.tag === 1) {
120
+ return new FSharpResult$2(1, [matchValue_3.fields[0]]);
121
+ }
122
+ else {
123
+ return new FSharpResult$2(0, [new ProcessInput(3, [matchValue_3.fields[0]])]);
124
+ }
125
+ }
126
+ else {
127
+ return new FSharpResult$2(0, [new ProcessInput(2, [matchValue_2.fields[0]])]);
128
+ }
129
+ }
130
+ else {
131
+ return new FSharpResult$2(0, [new ProcessInput(1, [matchValue_1.fields[0]])]);
132
+ }
133
+ }
134
+ else {
135
+ return new FSharpResult$2(0, [new ProcessInput(0, [matchValue.fields[0]])]);
136
+ }
137
+ }
138
+
139
+ export function ProcessInput_fromJsonString(s) {
140
+ let options;
141
+ return fromJsonString(uncurry2((options = ConverterOptions_$ctor(), (s_1) => ((json) => ProcessInput_decoder(options, s_1, json)))), s);
142
+ }
143
+
144
+ export function ProcessInput_toJsonString(m) {
145
+ return toString(2, ProcessInput_encoder(ConverterOptions_$ctor(), m));
146
+ }
147
+
148
+ export function ProcessInput_toStringLD(m) {
149
+ let returnVal;
150
+ return toString(2, ProcessInput_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), m));
151
+ }
152
+
153
+ export function ProcessOutput_encoder(options, value) {
154
+ if (value instanceof ProcessOutput) {
155
+ if (value.tag === 1) {
156
+ return Data_encoder(options, value.fields[0]);
157
+ }
158
+ else if (value.tag === 2) {
159
+ return Material_encoder(options, value.fields[0]);
160
+ }
161
+ else {
162
+ return Sample_encoder(options, value.fields[0]);
163
+ }
164
+ }
165
+ else {
166
+ return nil;
167
+ }
168
+ }
169
+
170
+ export function ProcessOutput_decoder(options, s, json) {
171
+ const matchValue = Sample_decoder(options, s, json);
172
+ if (matchValue.tag === 1) {
173
+ const matchValue_1 = Data_decoder(options, s, json);
174
+ if (matchValue_1.tag === 1) {
175
+ const matchValue_2 = Material_decoder(options, s, json);
176
+ if (matchValue_2.tag === 1) {
177
+ return new FSharpResult$2(1, [matchValue_2.fields[0]]);
178
+ }
179
+ else {
180
+ return new FSharpResult$2(0, [new ProcessOutput(2, [matchValue_2.fields[0]])]);
181
+ }
182
+ }
183
+ else {
184
+ return new FSharpResult$2(0, [new ProcessOutput(1, [matchValue_1.fields[0]])]);
185
+ }
186
+ }
187
+ else {
188
+ return new FSharpResult$2(0, [new ProcessOutput(0, [matchValue.fields[0]])]);
189
+ }
190
+ }
191
+
192
+ export function ProcessOutput_fromJsonString(s) {
193
+ let options;
194
+ return fromJsonString(uncurry2((options = ConverterOptions_$ctor(), (s_1) => ((json) => ProcessOutput_decoder(options, s_1, json)))), s);
195
+ }
196
+
197
+ export function ProcessOutput_toJsonString(m) {
198
+ return toString(2, ProcessOutput_encoder(ConverterOptions_$ctor(), m));
199
+ }
200
+
201
+ export function Process_genID(p) {
202
+ const matchValue = p.ID;
203
+ if (matchValue == null) {
204
+ const matchValue_1 = p.Name;
205
+ if (matchValue_1 == null) {
206
+ return "#EmptyProcess";
207
+ }
208
+ else {
209
+ return "#Process_" + replace(matchValue_1, " ", "_");
210
+ }
211
+ }
212
+ else {
213
+ return URIModule_toString(matchValue);
214
+ }
215
+ }
216
+
217
+ export function Process_encoder(options, oa) {
218
+ return object_22(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;
228
+ return append(ConverterOptions__get_SetID(options) ? singleton(["@id", (value = Process_genID(oa), (typeof value === "string") ? ((s = value, s)) : nil)]) : singleton(tryInclude("@id", (value_2) => {
229
+ let s_1;
230
+ const value_3 = value_2;
231
+ return (typeof value_3 === "string") ? ((s_1 = value_3, s_1)) : nil;
232
+ }, oa["ID"])), delay(() => {
233
+ let value_5, s_2;
234
+ return append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", (value_5 = "Process", (typeof value_5 === "string") ? ((s_2 = value_5, s_2)) : nil)]) : empty(), delay(() => append(singleton(tryInclude("name", (value_7) => {
235
+ let s_3;
236
+ const value_8 = value_7;
237
+ return (typeof value_8 === "string") ? ((s_3 = value_8, s_3)) : nil;
238
+ }, oa["Name"])), delay(() => append(singleton(tryInclude("executesProtocol", (oa_1) => Protocol_encoder(options, oa_1), oa["ExecutesProtocol"])), delay(() => append(singleton(tryInclude("parameterValues", (oa_2) => ProcessParameterValue_encoder(options, oa_2), oa["ParameterValues"])), delay(() => append(singleton(tryInclude("performer", (value_10) => {
239
+ let s_4;
240
+ const value_11 = value_10;
241
+ return (typeof value_11 === "string") ? ((s_4 = value_11, s_4)) : nil;
242
+ }, oa["Performer"])), delay(() => append(singleton(tryInclude("date", (value_13) => {
243
+ let s_5;
244
+ const value_14 = value_13;
245
+ return (typeof value_14 === "string") ? ((s_5 = value_14, s_5)) : nil;
246
+ }, oa["Date"])), delay(() => append(singleton(tryInclude("previousProcess", (oa_3) => Process_encoder(options, oa_3), oa["PreviousProcess"])), delay(() => append(singleton(tryInclude("nextProcess", (oa_4) => Process_encoder(options, oa_4), oa["NextProcess"])), delay(() => append(singleton(tryInclude("inputs", (value_16) => ProcessInput_encoder(options, value_16), oa["Inputs"])), delay(() => append(singleton(tryInclude("outputs", (value_17) => ProcessOutput_encoder(options, value_17), oa["Outputs"])), delay(() => singleton(tryInclude("comments", (comment) => encoder(options, comment), oa["Comments"]))))))))))))))))))))));
247
+ }));
248
+ }))));
249
+ }
250
+
251
+ export function Process_decoder(options) {
252
+ return (path_7) => ((v) => object_23((get$) => {
253
+ let objectArg, objectArg_1, arg_5, objectArg_2, arg_7, decoder, objectArg_3, objectArg_4, objectArg_5, arg_13, objectArg_6, arg_15, objectArg_7, objectArg_8, objectArg_9, arg_21, decoder_3, objectArg_10;
254
+ return new Process((objectArg = get$.Optional, objectArg.Field("@id", uri)), (objectArg_1 = get$.Optional, objectArg_1.Field("name", string)), (arg_5 = Protocol_decoder(options), (objectArg_2 = get$.Optional, objectArg_2.Field("executesProtocol", uncurry2(arg_5)))), (arg_7 = ((decoder = ProcessParameterValue_decoder(options), (path_1) => ((value_1) => list_1(uncurry2(decoder), path_1, value_1)))), (objectArg_3 = get$.Optional, objectArg_3.Field("parameterValues", uncurry2(arg_7)))), (objectArg_4 = get$.Optional, objectArg_4.Field("performer", string)), (objectArg_5 = get$.Optional, objectArg_5.Field("date", string)), (arg_13 = Process_decoder(options), (objectArg_6 = get$.Optional, objectArg_6.Field("previousProcess", uncurry2(arg_13)))), (arg_15 = Process_decoder(options), (objectArg_7 = get$.Optional, objectArg_7.Field("nextProcess", uncurry2(arg_15)))), (objectArg_8 = get$.Optional, objectArg_8.Field("inputs", (path_4, value_4) => list_1((s_1, json_1) => ProcessInput_decoder(options, s_1, json_1), path_4, value_4))), (objectArg_9 = get$.Optional, objectArg_9.Field("outputs", (path_5, value_5) => list_1((s_2, json_2) => ProcessOutput_decoder(options, s_2, json_2), path_5, value_5))), (arg_21 = ((decoder_3 = decoder_4(options), (path_6) => ((value_6) => list_1(uncurry2(decoder_3), path_6, value_6)))), (objectArg_10 = get$.Optional, objectArg_10.Field("comments", uncurry2(arg_21)))));
255
+ }, path_7, v));
256
+ }
257
+
258
+ export function Process_fromJsonString(s) {
259
+ return fromJsonString(uncurry2(Process_decoder(ConverterOptions_$ctor())), s);
260
+ }
261
+
262
+ export function Process_toJsonString(p) {
263
+ return toString(2, Process_encoder(ConverterOptions_$ctor(), p));
264
+ }
265
+
266
+ /**
267
+ * exports in json-ld format
268
+ */
269
+ export function Process_toStringLD(p) {
270
+ let returnVal;
271
+ return toString(2, Process_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), p));
272
+ }
273
+
274
+ export function ProcessSequence_fromJsonString(s) {
275
+ let decoder;
276
+ return fromJsonString(uncurry2((decoder = Process_decoder(ConverterOptions_$ctor()), (path) => ((value) => list_1(uncurry2(decoder), path, value)))), s);
277
+ }
278
+
279
+ export function ProcessSequence_toJsonString(p) {
280
+ let options;
281
+ return toString(2, list_2(map((options = ConverterOptions_$ctor(), (oa) => Process_encoder(options, oa)), p)));
282
+ }
283
+
284
+ /**
285
+ * exports in json-ld format
286
+ */
287
+ export function ProcessSequence_toStringLD(p) {
288
+ let options, returnVal;
289
+ return toString(2, list_2(map((options = ((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal))), (oa) => Process_encoder(options, oa)), p)));
290
+ }
291
+
@@ -0,0 +1,242 @@
1
+ import { value as value_19 } from "../../fable_modules/fable-library.4.1.4/Option.js";
2
+ import { URIModule_toString } from "../ISA/JsonTypes/URI.js";
3
+ import { toString, nil, object as object_18 } from "../../fable_modules/Thoth.Json.10.1.0/Encode.fs.js";
4
+ import { choose } from "../../fable_modules/fable-library.4.1.4/List.js";
5
+ import { uncurry2, equals } from "../../fable_modules/fable-library.4.1.4/Util.js";
6
+ import { empty, singleton, append, delay, toList } from "../../fable_modules/fable-library.4.1.4/Seq.js";
7
+ import { ConverterOptions__set_IncludeType_Z1FBCCD16, ConverterOptions__set_SetID_Z1FBCCD16, ConverterOptions_$ctor, ConverterOptions__get_IncludeType, ConverterOptions__get_SetID } from "./ConverterOptions.js";
8
+ import { tryInclude } from "./GEncode.js";
9
+ import { OntologyAnnotation_decoder, OntologyAnnotation_encoder } from "./Ontology.js";
10
+ import { list as list_1, string, object as object_19 } from "../../fable_modules/Thoth.Json.10.1.0/Decode.fs.js";
11
+ import { fromJsonString, uri } from "./Decode.js";
12
+ import { ProtocolParameter } from "../ISA/JsonTypes/ProtocolParameter.js";
13
+ import { replace } from "../../fable_modules/fable-library.4.1.4/String.js";
14
+ import { Result_Map } from "../../fable_modules/fable-library.4.1.4/Choice.js";
15
+ import { Component, Component_decomposeName_Z721C83C5 } from "../ISA/JsonTypes/Component.js";
16
+ import { decoder as decoder_3, encoder } from "./Comment.js";
17
+ import { Protocol } from "../ISA/JsonTypes/Protocol.js";
18
+
19
+ export function ProtocolParameter_genID(pp) {
20
+ const matchValue = pp.ID;
21
+ if (matchValue == null) {
22
+ const matchValue_1 = pp.ParameterName;
23
+ let matchResult, n_1;
24
+ if (matchValue_1 != null) {
25
+ if (!(matchValue_1.ID == null)) {
26
+ matchResult = 0;
27
+ n_1 = matchValue_1;
28
+ }
29
+ else {
30
+ matchResult = 1;
31
+ }
32
+ }
33
+ else {
34
+ matchResult = 1;
35
+ }
36
+ switch (matchResult) {
37
+ case 0:
38
+ return "#Param_" + value_19(n_1.ID);
39
+ default:
40
+ return "#EmptyProtocolParameter";
41
+ }
42
+ }
43
+ else {
44
+ return URIModule_toString(matchValue);
45
+ }
46
+ }
47
+
48
+ export function ProtocolParameter_encoder(options, oa) {
49
+ return object_18(choose((tupledArg) => {
50
+ const v = tupledArg[1];
51
+ if (equals(v, nil)) {
52
+ return void 0;
53
+ }
54
+ else {
55
+ return [tupledArg[0], v];
56
+ }
57
+ }, toList(delay(() => {
58
+ let value, s;
59
+ return append(ConverterOptions__get_SetID(options) ? singleton(["@id", (value = ProtocolParameter_genID(oa), (typeof value === "string") ? ((s = value, s)) : nil)]) : singleton(tryInclude("@id", (value_2) => {
60
+ let s_1;
61
+ const value_3 = value_2;
62
+ return (typeof value_3 === "string") ? ((s_1 = value_3, s_1)) : nil;
63
+ }, oa["ID"])), delay(() => {
64
+ let value_5, s_2;
65
+ return append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", (value_5 = "ProtocolParameter", (typeof value_5 === "string") ? ((s_2 = value_5, s_2)) : nil)]) : empty(), delay(() => singleton(tryInclude("parameterName", (oa_1) => OntologyAnnotation_encoder(options, oa_1), oa["ParameterName"]))));
66
+ }));
67
+ }))));
68
+ }
69
+
70
+ export function ProtocolParameter_decoder(options) {
71
+ return (path) => ((v) => object_19((get$) => {
72
+ let objectArg, arg_3, objectArg_1;
73
+ return new ProtocolParameter((objectArg = get$.Optional, objectArg.Field("@id", uri)), (arg_3 = OntologyAnnotation_decoder(options), (objectArg_1 = get$.Optional, objectArg_1.Field("parameterName", uncurry2(arg_3)))));
74
+ }, path, v));
75
+ }
76
+
77
+ export function ProtocolParameter_fromJsonString(s) {
78
+ return fromJsonString(uncurry2(ProtocolParameter_decoder(ConverterOptions_$ctor())), s);
79
+ }
80
+
81
+ export function ProtocolParameter_toString(p) {
82
+ return toString(2, ProtocolParameter_encoder(ConverterOptions_$ctor(), p));
83
+ }
84
+
85
+ /**
86
+ * exports in json-ld format
87
+ */
88
+ export function ProtocolParameter_toStringLD(p) {
89
+ let returnVal;
90
+ return toString(2, ProtocolParameter_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), p));
91
+ }
92
+
93
+ export function Component_genID(c) {
94
+ const matchValue = c.ComponentName;
95
+ if (matchValue == null) {
96
+ return "#EmptyComponent";
97
+ }
98
+ else {
99
+ return "#Component_" + replace(matchValue, " ", "_");
100
+ }
101
+ }
102
+
103
+ export function Component_encoder(options, oa) {
104
+ return object_18(choose((tupledArg) => {
105
+ const v = tupledArg[1];
106
+ if (equals(v, nil)) {
107
+ return void 0;
108
+ }
109
+ else {
110
+ return [tupledArg[0], v];
111
+ }
112
+ }, toList(delay(() => {
113
+ let value, s;
114
+ return append(ConverterOptions__get_SetID(options) ? singleton(["@id", (value = Component_genID(oa), (typeof value === "string") ? ((s = value, s)) : nil)]) : empty(), delay(() => {
115
+ let value_2, s_1;
116
+ return append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", (value_2 = "Component", (typeof value_2 === "string") ? ((s_1 = value_2, s_1)) : nil)]) : empty(), delay(() => append(singleton(tryInclude("componentName", (value_4) => {
117
+ let s_2;
118
+ const value_5 = value_4;
119
+ return (typeof value_5 === "string") ? ((s_2 = value_5, s_2)) : nil;
120
+ }, oa["ComponentName"])), delay(() => singleton(tryInclude("componentType", (oa_1) => OntologyAnnotation_encoder(options, oa_1), oa["ComponentType"]))))));
121
+ }));
122
+ }))));
123
+ }
124
+
125
+ export function Component_decoder(options, s, json) {
126
+ return Result_Map((c) => {
127
+ let patternInput;
128
+ const matchValue = c.ComponentName;
129
+ if (matchValue == null) {
130
+ patternInput = [void 0, void 0];
131
+ }
132
+ else {
133
+ const tupledArg = Component_decomposeName_Z721C83C5(matchValue);
134
+ patternInput = [tupledArg[0], tupledArg[1]];
135
+ }
136
+ return new Component(c.ComponentName, patternInput[0], patternInput[1], c.ComponentType);
137
+ }, object_19((get$) => {
138
+ let objectArg, arg_3, objectArg_1;
139
+ return new Component((objectArg = get$.Optional, objectArg.Field("componentName", uri)), void 0, void 0, (arg_3 = OntologyAnnotation_decoder(options), (objectArg_1 = get$.Optional, objectArg_1.Field("componentType", uncurry2(arg_3)))));
140
+ }, s, json));
141
+ }
142
+
143
+ export function Component_fromJsonString(s) {
144
+ let options;
145
+ return fromJsonString(uncurry2((options = ConverterOptions_$ctor(), (s_1) => ((json) => Component_decoder(options, s_1, json)))), s);
146
+ }
147
+
148
+ export function Component_toJsonString(p) {
149
+ return toString(2, Component_encoder(ConverterOptions_$ctor(), p));
150
+ }
151
+
152
+ /**
153
+ * exports in json-ld format
154
+ */
155
+ export function Component_toStringLD(p) {
156
+ let returnVal;
157
+ return toString(2, Component_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), p));
158
+ }
159
+
160
+ export function Protocol_genID(p) {
161
+ const matchValue = p.ID;
162
+ if (matchValue == null) {
163
+ const matchValue_1 = p.Uri;
164
+ if (matchValue_1 == null) {
165
+ const matchValue_2 = p.Name;
166
+ if (matchValue_2 == null) {
167
+ return "#EmptyProtocol";
168
+ }
169
+ else {
170
+ return "#Protocol_" + replace(matchValue_2, " ", "_");
171
+ }
172
+ }
173
+ else {
174
+ return matchValue_1;
175
+ }
176
+ }
177
+ else {
178
+ return URIModule_toString(matchValue);
179
+ }
180
+ }
181
+
182
+ export function Protocol_encoder(options, oa) {
183
+ return object_18(choose((tupledArg) => {
184
+ const v = tupledArg[1];
185
+ if (equals(v, nil)) {
186
+ return void 0;
187
+ }
188
+ else {
189
+ return [tupledArg[0], v];
190
+ }
191
+ }, toList(delay(() => {
192
+ let value, s;
193
+ return append(ConverterOptions__get_SetID(options) ? singleton(["@id", (value = Protocol_genID(oa), (typeof value === "string") ? ((s = value, s)) : nil)]) : singleton(tryInclude("@id", (value_2) => {
194
+ let s_1;
195
+ const value_3 = value_2;
196
+ return (typeof value_3 === "string") ? ((s_1 = value_3, s_1)) : nil;
197
+ }, oa["ID"])), delay(() => {
198
+ let value_5, s_2;
199
+ return append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", (value_5 = "Protocol", (typeof value_5 === "string") ? ((s_2 = value_5, s_2)) : nil)]) : empty(), delay(() => append(singleton(tryInclude("name", (value_7) => {
200
+ let s_3;
201
+ const value_8 = value_7;
202
+ return (typeof value_8 === "string") ? ((s_3 = value_8, s_3)) : nil;
203
+ }, oa["Name"])), delay(() => append(singleton(tryInclude("protocolType", (oa_1) => OntologyAnnotation_encoder(options, oa_1), oa["ProtocolType"])), delay(() => append(singleton(tryInclude("description", (value_10) => {
204
+ let s_4;
205
+ const value_11 = value_10;
206
+ return (typeof value_11 === "string") ? ((s_4 = value_11, s_4)) : nil;
207
+ }, oa["Description"])), delay(() => append(singleton(tryInclude("uri", (value_13) => {
208
+ let s_5;
209
+ const value_14 = value_13;
210
+ return (typeof value_14 === "string") ? ((s_5 = value_14, s_5)) : nil;
211
+ }, oa["Uri"])), delay(() => append(singleton(tryInclude("version", (value_16) => {
212
+ let s_6;
213
+ const value_17 = value_16;
214
+ return (typeof value_17 === "string") ? ((s_6 = value_17, s_6)) : nil;
215
+ }, oa["Version"])), delay(() => append(singleton(tryInclude("parameters", (oa_2) => ProtocolParameter_encoder(options, oa_2), oa["Parameters"])), delay(() => append(singleton(tryInclude("components", (oa_3) => Component_encoder(options, oa_3), oa["Components"])), delay(() => singleton(tryInclude("comments", (comment) => encoder(options, comment), oa["Comments"]))))))))))))))))));
216
+ }));
217
+ }))));
218
+ }
219
+
220
+ export function Protocol_decoder(options) {
221
+ return (path_6) => ((v) => object_19((get$) => {
222
+ let objectArg, objectArg_1, arg_5, objectArg_2, objectArg_3, objectArg_4, objectArg_5, arg_13, decoder, objectArg_6, objectArg_7, arg_17, decoder_2, objectArg_8;
223
+ return new Protocol((objectArg = get$.Optional, objectArg.Field("@id", uri)), (objectArg_1 = get$.Optional, objectArg_1.Field("name", string)), (arg_5 = OntologyAnnotation_decoder(options), (objectArg_2 = get$.Optional, objectArg_2.Field("protocolType", uncurry2(arg_5)))), (objectArg_3 = get$.Optional, objectArg_3.Field("description", string)), (objectArg_4 = get$.Optional, objectArg_4.Field("uri", uri)), (objectArg_5 = get$.Optional, objectArg_5.Field("version", string)), (arg_13 = ((decoder = ProtocolParameter_decoder(options), (path_3) => ((value_3) => list_1(uncurry2(decoder), path_3, value_3)))), (objectArg_6 = get$.Optional, objectArg_6.Field("parameters", uncurry2(arg_13)))), (objectArg_7 = get$.Optional, objectArg_7.Field("components", (path_4, value_4) => list_1((s_2, json_2) => Component_decoder(options, s_2, json_2), path_4, value_4))), (arg_17 = ((decoder_2 = decoder_3(options), (path_5) => ((value_5) => list_1(uncurry2(decoder_2), path_5, value_5)))), (objectArg_8 = get$.Optional, objectArg_8.Field("comments", uncurry2(arg_17)))));
224
+ }, path_6, v));
225
+ }
226
+
227
+ export function Protocol_fromJsonString(s) {
228
+ return fromJsonString(uncurry2(Protocol_decoder(ConverterOptions_$ctor())), s);
229
+ }
230
+
231
+ export function Protocol_toJsonString(p) {
232
+ return toString(2, Protocol_encoder(ConverterOptions_$ctor(), p));
233
+ }
234
+
235
+ /**
236
+ * exports in json-ld format
237
+ */
238
+ export function Protocol_toStringLD(p) {
239
+ let returnVal;
240
+ return toString(2, Protocol_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), p));
241
+ }
242
+
@@ -0,0 +1,92 @@
1
+ import { replace } from "../../fable_modules/fable-library.4.1.4/String.js";
2
+ import { toString, nil, object as object_12 } from "../../fable_modules/Thoth.Json.10.1.0/Encode.fs.js";
3
+ import { choose } from "../../fable_modules/fable-library.4.1.4/List.js";
4
+ import { uncurry2, equals } from "../../fable_modules/fable-library.4.1.4/Util.js";
5
+ import { empty, singleton, append, delay, toList } from "../../fable_modules/fable-library.4.1.4/Seq.js";
6
+ import { ConverterOptions__set_IncludeType_Z1FBCCD16, ConverterOptions__set_SetID_Z1FBCCD16, ConverterOptions_$ctor, ConverterOptions__get_IncludeType, ConverterOptions__get_SetID } from "./ConverterOptions.js";
7
+ import { tryInclude } from "./GEncode.js";
8
+ import { OntologyAnnotation_decoder, OntologyAnnotation_encoder } from "./Ontology.js";
9
+ import { decoder as decoder_2, encoder as encoder_1 } from "./Comment.js";
10
+ import { array, string, object as object_13 } from "../../fable_modules/Thoth.Json.10.1.0/Decode.fs.js";
11
+ import { fromJsonString as fromJsonString_1, uri } from "./Decode.js";
12
+ import { Publication } from "../ISA/JsonTypes/Publication.js";
13
+
14
+ export function genID(p) {
15
+ const matchValue = p.DOI;
16
+ if (matchValue == null) {
17
+ const matchValue_1 = p.PubMedID;
18
+ if (matchValue_1 == null) {
19
+ const matchValue_2 = p.Title;
20
+ if (matchValue_2 == null) {
21
+ return "#EmptyPublication";
22
+ }
23
+ else {
24
+ return "#Pub_" + replace(matchValue_2, " ", "_");
25
+ }
26
+ }
27
+ else {
28
+ return matchValue_1;
29
+ }
30
+ }
31
+ else {
32
+ return matchValue;
33
+ }
34
+ }
35
+
36
+ export function encoder(options, oa) {
37
+ return object_12(choose((tupledArg) => {
38
+ const v = tupledArg[1];
39
+ if (equals(v, nil)) {
40
+ return void 0;
41
+ }
42
+ else {
43
+ return [tupledArg[0], v];
44
+ }
45
+ }, toList(delay(() => {
46
+ let value, s;
47
+ return append(ConverterOptions__get_SetID(options) ? singleton(["@id", (value = genID(oa), (typeof value === "string") ? ((s = value, s)) : nil)]) : empty(), delay(() => {
48
+ let value_2, s_1;
49
+ return append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", (value_2 = "Publication", (typeof value_2 === "string") ? ((s_1 = value_2, s_1)) : nil)]) : empty(), delay(() => append(singleton(tryInclude("pubMedID", (value_4) => {
50
+ let s_2;
51
+ const value_5 = value_4;
52
+ return (typeof value_5 === "string") ? ((s_2 = value_5, s_2)) : nil;
53
+ }, oa["PubMedID"])), delay(() => append(singleton(tryInclude("doi", (value_7) => {
54
+ let s_3;
55
+ const value_8 = value_7;
56
+ return (typeof value_8 === "string") ? ((s_3 = value_8, s_3)) : nil;
57
+ }, oa["DOI"])), delay(() => append(singleton(tryInclude("authorList", (value_10) => {
58
+ let s_4;
59
+ const value_11 = value_10;
60
+ return (typeof value_11 === "string") ? ((s_4 = value_11, s_4)) : nil;
61
+ }, oa["Authors"])), delay(() => append(singleton(tryInclude("title", (value_13) => {
62
+ let s_5;
63
+ const value_14 = value_13;
64
+ return (typeof value_14 === "string") ? ((s_5 = value_14, s_5)) : nil;
65
+ }, oa["Title"])), delay(() => append(singleton(tryInclude("status", (oa_1) => OntologyAnnotation_encoder(options, oa_1), oa["Status"])), delay(() => singleton(tryInclude("comments", (comment) => encoder_1(options, comment), oa["Comments"]))))))))))))));
66
+ }));
67
+ }))));
68
+ }
69
+
70
+ export function decoder(options) {
71
+ return (path_4) => ((v) => object_13((get$) => {
72
+ let objectArg, objectArg_1, objectArg_2, objectArg_3, arg_9, objectArg_4, arg_11, decoder_1, objectArg_5;
73
+ return new Publication((objectArg = get$.Optional, objectArg.Field("pubMedID", uri)), (objectArg_1 = get$.Optional, objectArg_1.Field("doi", string)), (objectArg_2 = get$.Optional, objectArg_2.Field("authorList", string)), (objectArg_3 = get$.Optional, objectArg_3.Field("title", string)), (arg_9 = OntologyAnnotation_decoder(options), (objectArg_4 = get$.Optional, objectArg_4.Field("status", uncurry2(arg_9)))), (arg_11 = ((decoder_1 = decoder_2(options), (path_3) => ((value_3) => array(uncurry2(decoder_1), path_3, value_3)))), (objectArg_5 = get$.Optional, objectArg_5.Field("comments", uncurry2(arg_11)))));
74
+ }, path_4, v));
75
+ }
76
+
77
+ export function fromJsonString(s) {
78
+ return fromJsonString_1(uncurry2(decoder(ConverterOptions_$ctor())), s);
79
+ }
80
+
81
+ export function toJsonString(p) {
82
+ return toString(2, encoder(ConverterOptions_$ctor(), p));
83
+ }
84
+
85
+ /**
86
+ * exports in json-ld format
87
+ */
88
+ export function toStringLD(p) {
89
+ let returnVal;
90
+ return toString(2, encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), p));
91
+ }
92
+