@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,126 @@
1
+ import { Record, toString } from "../../../fable_modules/fable-library.4.1.4/Types.js";
2
+ import { bind, defaultArg, map } from "../../../fable_modules/fable-library.4.1.4/Option.js";
3
+ import { MaterialAttribute__SetCategory_Z4C0FE73C, MaterialAttribute_create_Z6C54B221, MaterialAttribute__MapCategory_Z69DD836A, MaterialAttribute__get_TryNameText, MaterialAttribute_$reflection, MaterialAttribute__get_NameText } from "./MaterialAttribute.js";
4
+ import { record_type, option_type, string_type } from "../../../fable_modules/fable-library.4.1.4/Reflection.js";
5
+ import { Value_$reflection } from "./Value.js";
6
+ import { OntologyAnnotation_$reflection } from "./OntologyAnnotation.js";
7
+ import { int32ToString } from "../../../fable_modules/fable-library.4.1.4/Util.js";
8
+ import { printf, toText } from "../../../fable_modules/fable-library.4.1.4/String.js";
9
+
10
+ export class MaterialAttributeValue extends Record {
11
+ constructor(ID, Category, Value, Unit) {
12
+ super();
13
+ this.ID = ID;
14
+ this.Category = Category;
15
+ this.Value = Value;
16
+ this.Unit = Unit;
17
+ }
18
+ Print() {
19
+ const this$ = this;
20
+ return toString(this$);
21
+ }
22
+ PrintCompact() {
23
+ let value_2, category_2, category_1, value_1;
24
+ const this$ = this;
25
+ const category = map(MaterialAttribute__get_NameText, this$.Category);
26
+ const unit = map((oa) => oa.NameText, this$.Unit);
27
+ const value = map((v) => {
28
+ const s = v.PrintCompact();
29
+ if (unit == null) {
30
+ return s;
31
+ }
32
+ else {
33
+ return (s + " ") + unit;
34
+ }
35
+ }, this$.Value);
36
+ return (category == null) ? ((value == null) ? "" : ((value_2 = value, value_2))) : ((value == null) ? ((category_2 = category, (category_2 + ":") + "No Value")) : ((category_1 = category, (value_1 = value, (category_1 + ":") + value_1))));
37
+ }
38
+ }
39
+
40
+ export function MaterialAttributeValue_$reflection() {
41
+ return record_type("ARCtrl.ISA.MaterialAttributeValue", [], MaterialAttributeValue, () => [["ID", option_type(string_type)], ["Category", option_type(MaterialAttribute_$reflection())], ["Value", option_type(Value_$reflection())], ["Unit", option_type(OntologyAnnotation_$reflection())]]);
42
+ }
43
+
44
+ export function MaterialAttributeValue_make(id, category, value, unit) {
45
+ return new MaterialAttributeValue(id, category, value, unit);
46
+ }
47
+
48
+ export function MaterialAttributeValue_create_7F714043(Id, Category, Value, Unit) {
49
+ return MaterialAttributeValue_make(Id, Category, Value, Unit);
50
+ }
51
+
52
+ export function MaterialAttributeValue_get_empty() {
53
+ return MaterialAttributeValue_create_7F714043();
54
+ }
55
+
56
+ /**
57
+ * Returns the name of the category as string
58
+ */
59
+ export function MaterialAttributeValue__get_NameText(this$) {
60
+ return defaultArg(map(MaterialAttribute__get_NameText, this$.Category), "");
61
+ }
62
+
63
+ /**
64
+ * Returns the name of the category as string
65
+ */
66
+ export function MaterialAttributeValue__get_TryNameText(this$) {
67
+ return bind(MaterialAttribute__get_TryNameText, this$.Category);
68
+ }
69
+
70
+ export function MaterialAttributeValue__get_ValueText(this$) {
71
+ return defaultArg(map((oa) => {
72
+ switch (oa.tag) {
73
+ case 2:
74
+ return oa.fields[0].toString();
75
+ case 1:
76
+ return int32ToString(oa.fields[0]);
77
+ case 3:
78
+ return oa.fields[0];
79
+ default:
80
+ return oa.fields[0].NameText;
81
+ }
82
+ }, this$.Value), "");
83
+ }
84
+
85
+ export function MaterialAttributeValue__get_ValueWithUnitText(this$) {
86
+ const unit = map((oa) => oa.NameText, this$.Unit);
87
+ const v = MaterialAttributeValue__get_ValueText(this$);
88
+ if (unit == null) {
89
+ return v;
90
+ }
91
+ else {
92
+ const u = unit;
93
+ return toText(printf("%s %s"))(v)(u);
94
+ }
95
+ }
96
+
97
+ export function MaterialAttributeValue__MapCategory_Z69DD836A(this$, f) {
98
+ return new MaterialAttributeValue(this$.ID, map((p) => MaterialAttribute__MapCategory_Z69DD836A(p, f), this$.Category), this$.Value, this$.Unit);
99
+ }
100
+
101
+ export function MaterialAttributeValue__SetCategory_Z4C0FE73C(this$, c) {
102
+ let matchValue;
103
+ return new MaterialAttributeValue(this$.ID, (matchValue = this$.Category, (matchValue == null) ? MaterialAttribute_create_Z6C54B221(void 0, c) : MaterialAttribute__SetCategory_Z4C0FE73C(matchValue, c)), this$.Value, this$.Unit);
104
+ }
105
+
106
+ /**
107
+ * Returns the name of the characteristic value as string if it exists
108
+ */
109
+ export function MaterialAttributeValue_tryGetNameText_43A5B238(mv) {
110
+ return MaterialAttributeValue__get_TryNameText(mv);
111
+ }
112
+
113
+ /**
114
+ * Returns the name of the characteristic value as string
115
+ */
116
+ export function MaterialAttributeValue_getNameAsString_43A5B238(mv) {
117
+ return MaterialAttributeValue__get_TryNameText(mv);
118
+ }
119
+
120
+ /**
121
+ * Returns true if the given name matches the name of the characteristic value
122
+ */
123
+ export function MaterialAttributeValue_nameEqualsString(name, mv) {
124
+ return MaterialAttributeValue__get_NameText(mv) === name;
125
+ }
126
+
@@ -0,0 +1,41 @@
1
+ import { Union } from "../../../fable_modules/fable-library.4.1.4/Types.js";
2
+ import { union_type } from "../../../fable_modules/fable-library.4.1.4/Reflection.js";
3
+
4
+ export class MaterialType extends Union {
5
+ constructor(tag, fields) {
6
+ super();
7
+ this.tag = tag;
8
+ this.fields = fields;
9
+ }
10
+ cases() {
11
+ return ["ExtractName", "LabeledExtractName"];
12
+ }
13
+ }
14
+
15
+ export function MaterialType_$reflection() {
16
+ return union_type("ARCtrl.ISA.MaterialType", [], MaterialType, () => [[], []]);
17
+ }
18
+
19
+ export function MaterialType_create_Z721C83C5(t) {
20
+ switch (t) {
21
+ case "Extract Name":
22
+ return new MaterialType(0, []);
23
+ case "Labeled Extract Name":
24
+ return new MaterialType(1, []);
25
+ default:
26
+ throw new Error("No other value than \"Extract Name\" or \"Labeled Extract Name\" allowed for materialtype");
27
+ }
28
+ }
29
+
30
+ /**
31
+ * Returns the type of the MaterialType
32
+ */
33
+ export function MaterialType__get_AsString(this$) {
34
+ if (this$.tag === 1) {
35
+ return "Labeled Extract";
36
+ }
37
+ else {
38
+ return "Extract";
39
+ }
40
+ }
41
+
@@ -0,0 +1,219 @@
1
+ import { value as value_4, map, defaultArg, bind, unwrap } from "../../../fable_modules/fable-library.4.1.4/Option.js";
2
+ import { Pattern_TermAnnotationShortPattern, ActivePatterns_$007CRegex$007C_$007C, tryParseTermAnnotation } from "../Regex.js";
3
+ import { equals, stringHash, int32ToString } from "../../../fable_modules/fable-library.4.1.4/Util.js";
4
+ import { AnnotationValue_$reflection, AnnotationValue_toString_Z6FAD7738, AnnotationValue_fromString_Z721C83C5 } from "./AnnotationValue.js";
5
+ import { filter, map as map_1, singleton, append, exists, tryFind } from "../../../fable_modules/fable-library.4.1.4/List.js";
6
+ import { record_type, array_type, option_type, string_type, getRecordFields, makeRecord } from "../../../fable_modules/fable-library.4.1.4/Reflection.js";
7
+ import { map as map_2, map2 } from "../../../fable_modules/fable-library.4.1.4/Array.js";
8
+ import { Update_updateOnlyByExistingAppend, Update_updateOnlyByExisting, Update_updateAppend } from "../Helper.js";
9
+ import { Option_mapDefault } from "../Helper.js";
10
+ import { Record, toString } from "../../../fable_modules/fable-library.4.1.4/Types.js";
11
+ import { Comment$_$reflection } from "./Comment.js";
12
+
13
+ export class OntologyAnnotation extends Record {
14
+ constructor(ID, Name, TermSourceREF, TermAccessionNumber, Comments) {
15
+ super();
16
+ this.ID = ID;
17
+ this.Name = Name;
18
+ this.TermSourceREF = TermSourceREF;
19
+ this.TermAccessionNumber = TermAccessionNumber;
20
+ this.Comments = Comments;
21
+ }
22
+ static make(id, name, termSourceREF, termAccessionNumber, comments) {
23
+ return new OntologyAnnotation(id, name, termSourceREF, termAccessionNumber, comments);
24
+ }
25
+ static create(Id, Name, TermSourceREF, TermAccessionNumber, Comments) {
26
+ return OntologyAnnotation.make(Id, Name, TermSourceREF, TermAccessionNumber, Comments);
27
+ }
28
+ static get empty() {
29
+ return OntologyAnnotation.create();
30
+ }
31
+ get TANInfo() {
32
+ const this$ = this;
33
+ return unwrap(bind(tryParseTermAnnotation, this$.TermAccessionNumber));
34
+ }
35
+ get NameText() {
36
+ const this$ = this;
37
+ return defaultArg(map((av) => {
38
+ switch (av.tag) {
39
+ case 1:
40
+ return av.fields[0].toString();
41
+ case 2:
42
+ return int32ToString(av.fields[0]);
43
+ default:
44
+ return av.fields[0];
45
+ }
46
+ }, this$.Name), "");
47
+ }
48
+ get TryNameText() {
49
+ const this$ = this;
50
+ return unwrap(map((av) => {
51
+ switch (av.tag) {
52
+ case 1:
53
+ return av.fields[0].toString();
54
+ case 2:
55
+ return int32ToString(av.fields[0]);
56
+ default:
57
+ return av.fields[0];
58
+ }
59
+ }, this$.Name));
60
+ }
61
+ get TermSourceREFString() {
62
+ const this$ = this;
63
+ return defaultArg(this$.TermSourceREF, "");
64
+ }
65
+ get TermAccessionString() {
66
+ const this$ = this;
67
+ return defaultArg(this$.TermAccessionNumber, "");
68
+ }
69
+ static createUriAnnotation(termSourceRef, localTAN) {
70
+ return `${"http://purl.obolibrary.org/obo/"}${termSourceRef}_${localTAN}`;
71
+ }
72
+ static fromString(termName, tsr, tan, comments) {
73
+ const arg_1 = map(AnnotationValue_fromString_Z721C83C5, termName);
74
+ return OntologyAnnotation.make(void 0, arg_1, tsr, tan, comments);
75
+ }
76
+ static fromTermAnnotation(termAnnotation) {
77
+ const r = value_4(tryParseTermAnnotation(termAnnotation));
78
+ const accession = (r.IDSpace + ":") + r.LocalID;
79
+ return OntologyAnnotation.fromString("", r.IDSpace, accession);
80
+ }
81
+ get TermAccessionShort() {
82
+ const this$ = this;
83
+ const matchValue = this$.TANInfo;
84
+ if (matchValue != null) {
85
+ const id = matchValue;
86
+ return `${id.IDSpace}:${id.LocalID}`;
87
+ }
88
+ else {
89
+ return "";
90
+ }
91
+ }
92
+ get TermAccessionOntobeeUrl() {
93
+ const this$ = this;
94
+ const matchValue = this$.TANInfo;
95
+ if (matchValue != null) {
96
+ const id = matchValue;
97
+ return OntologyAnnotation.createUriAnnotation(id.IDSpace, id.LocalID);
98
+ }
99
+ else {
100
+ return "";
101
+ }
102
+ }
103
+ get TermAccessionAndOntobeeUrlIfShort() {
104
+ const this$ = this;
105
+ const matchValue = this$.TermAccessionNumber;
106
+ if (matchValue != null) {
107
+ const tan = matchValue;
108
+ return (ActivePatterns_$007CRegex$007C_$007C(Pattern_TermAnnotationShortPattern, tan) != null) ? this$.TermAccessionOntobeeUrl : tan;
109
+ }
110
+ else {
111
+ return "";
112
+ }
113
+ }
114
+ static toString(oa, asOntobeePurlUrlIfShort) {
115
+ let url;
116
+ const asOntobeePurlUrlIfShort_1 = defaultArg(asOntobeePurlUrlIfShort, false);
117
+ const TermName = defaultArg(map(AnnotationValue_toString_Z6FAD7738, oa.Name), "");
118
+ const TermSourceREF = defaultArg(oa.TermSourceREF, "");
119
+ return {
120
+ TermAccessionNumber: asOntobeePurlUrlIfShort_1 ? ((url = oa.TermAccessionAndOntobeeUrlIfShort, (url === "") ? defaultArg(oa.TermAccessionNumber, "") : url)) : defaultArg(oa.TermAccessionNumber, ""),
121
+ TermName: TermName,
122
+ TermSourceREF: TermSourceREF,
123
+ };
124
+ }
125
+ Equals(other) {
126
+ const this$ = this;
127
+ if (other instanceof OntologyAnnotation) {
128
+ return this$["System.IEquatable`1.Equals2B595"](other);
129
+ }
130
+ else if (typeof other === "string") {
131
+ const s = other;
132
+ return ((this$.NameText === s) ? true : (this$.TermAccessionShort === s)) ? true : (this$.TermAccessionOntobeeUrl === s);
133
+ }
134
+ else {
135
+ return false;
136
+ }
137
+ }
138
+ GetHashCode() {
139
+ const this$ = this;
140
+ return stringHash(this$.NameText + this$.TermAccessionShort) | 0;
141
+ }
142
+ static tryGetNameText(oa) {
143
+ return oa.TryNameText;
144
+ }
145
+ static getNameText(oa) {
146
+ return oa.NameText;
147
+ }
148
+ static nameEqualsString(name, oa) {
149
+ return oa.NameText === name;
150
+ }
151
+ static tryGetByName(name, annotations) {
152
+ return tryFind((d) => equals(d.Name, name), annotations);
153
+ }
154
+ static existsByName(name, annotations) {
155
+ return exists((d) => equals(d.Name, name), annotations);
156
+ }
157
+ static add(onotolgyAnnotations, onotolgyAnnotation) {
158
+ return append(onotolgyAnnotations, singleton(onotolgyAnnotation));
159
+ }
160
+ static updateBy(predicate, updateOption, design, annotations) {
161
+ return exists(predicate, annotations) ? map_1((d) => {
162
+ if (predicate(d)) {
163
+ const this$ = updateOption;
164
+ const recordType_1 = d;
165
+ const recordType_2 = design;
166
+ switch (this$.tag) {
167
+ case 2:
168
+ return makeRecord(OntologyAnnotation_$reflection(), map2(Update_updateAppend, getRecordFields(recordType_1), getRecordFields(recordType_2)));
169
+ case 1:
170
+ return makeRecord(OntologyAnnotation_$reflection(), map2(Update_updateOnlyByExisting, getRecordFields(recordType_1), getRecordFields(recordType_2)));
171
+ case 3:
172
+ return makeRecord(OntologyAnnotation_$reflection(), map2(Update_updateOnlyByExistingAppend, getRecordFields(recordType_1), getRecordFields(recordType_2)));
173
+ default:
174
+ return recordType_2;
175
+ }
176
+ }
177
+ else {
178
+ return d;
179
+ }
180
+ }, annotations) : annotations;
181
+ }
182
+ static updateByName(updateOption, design, annotations) {
183
+ return OntologyAnnotation.updateBy((f) => equals(f.Name, design.Name), updateOption, design, annotations);
184
+ }
185
+ static removeByName(name, annotations) {
186
+ return filter((d) => !equals(d.Name, name), annotations);
187
+ }
188
+ static getComments(annotation) {
189
+ return annotation.Comments;
190
+ }
191
+ static mapComments(f, annotation) {
192
+ return new OntologyAnnotation(annotation.ID, annotation.Name, annotation.TermSourceREF, annotation.TermAccessionNumber, Option_mapDefault([], f, annotation.Comments));
193
+ }
194
+ static setComments(annotation, comments) {
195
+ return new OntologyAnnotation(annotation.ID, annotation.Name, annotation.TermSourceREF, annotation.TermAccessionNumber, comments);
196
+ }
197
+ Copy() {
198
+ const this$ = this;
199
+ const arg_4 = map((array) => map_2((c) => c.Copy(), array), this$.Comments);
200
+ return OntologyAnnotation.make(this$.ID, this$.Name, this$.TermSourceREF, this$.TermAccessionNumber, arg_4);
201
+ }
202
+ Print() {
203
+ const this$ = this;
204
+ return toString(this$);
205
+ }
206
+ PrintCompact() {
207
+ const this$ = this;
208
+ return "OA " + this$.NameText;
209
+ }
210
+ "System.IEquatable`1.Equals2B595"(other) {
211
+ const this$ = this;
212
+ return ((this$.TermAccessionNumber != null) && (other.TermAccessionNumber != null)) ? ((other.TermAccessionShort === this$.TermAccessionShort) ? true : (other.TermAccessionOntobeeUrl === this$.TermAccessionOntobeeUrl)) : (((this$.Name != null) && (other.Name != null)) ? (other.NameText === this$.NameText) : ((((this$.TermAccessionNumber == null) && (other.TermAccessionNumber == null)) && (this$.Name == null)) && (other.Name == null)));
213
+ }
214
+ }
215
+
216
+ export function OntologyAnnotation_$reflection() {
217
+ return record_type("ARCtrl.ISA.OntologyAnnotation", [], OntologyAnnotation, () => [["ID", option_type(string_type)], ["Name", option_type(AnnotationValue_$reflection())], ["TermSourceREF", option_type(string_type)], ["TermAccessionNumber", option_type(string_type)], ["Comments", option_type(array_type(Comment$_$reflection()))]]);
218
+ }
219
+
@@ -0,0 +1,85 @@
1
+ import { filter, map, singleton, append, exists, tryFind } from "../../../fable_modules/fable-library.4.1.4/List.js";
2
+ import { equals } from "../../../fable_modules/fable-library.4.1.4/Util.js";
3
+ import { record_type, array_type, option_type, string_type, getRecordFields, makeRecord } from "../../../fable_modules/fable-library.4.1.4/Reflection.js";
4
+ import { map as map_2, map2 } from "../../../fable_modules/fable-library.4.1.4/Array.js";
5
+ import { Update_updateOnlyByExistingAppend, Update_updateOnlyByExisting, Update_updateAppend } from "../Helper.js";
6
+ import { Option_mapDefault } from "../Helper.js";
7
+ import { map as map_1 } from "../../../fable_modules/fable-library.4.1.4/Option.js";
8
+ import { Record } from "../../../fable_modules/fable-library.4.1.4/Types.js";
9
+ import { Comment$_$reflection } from "./Comment.js";
10
+
11
+ export class OntologySourceReference extends Record {
12
+ constructor(Description, File, Name, Version, Comments) {
13
+ super();
14
+ this.Description = Description;
15
+ this.File = File;
16
+ this.Name = Name;
17
+ this.Version = Version;
18
+ this.Comments = Comments;
19
+ }
20
+ static make(description, file, name, version, comments) {
21
+ return new OntologySourceReference(description, file, name, version, comments);
22
+ }
23
+ static create(Description, File, Name, Version, Comments) {
24
+ return OntologySourceReference.make(Description, File, Name, Version, Comments);
25
+ }
26
+ static get empty() {
27
+ return OntologySourceReference.create();
28
+ }
29
+ static tryGetByName(name, ontologies) {
30
+ return tryFind((t) => equals(t.Name, name), ontologies);
31
+ }
32
+ static existsByName(name, ontologies) {
33
+ return exists((t) => equals(t.Name, name), ontologies);
34
+ }
35
+ static add(ontologySourceReference, ontologies) {
36
+ return append(ontologies, singleton(ontologySourceReference));
37
+ }
38
+ static updateBy(predicate, updateOption, ontologySourceReference, ontologies) {
39
+ return exists(predicate, ontologies) ? map((t) => {
40
+ if (predicate(t)) {
41
+ const this$ = updateOption;
42
+ const recordType_1 = t;
43
+ const recordType_2 = ontologySourceReference;
44
+ switch (this$.tag) {
45
+ case 2:
46
+ return makeRecord(OntologySourceReference_$reflection(), map2(Update_updateAppend, getRecordFields(recordType_1), getRecordFields(recordType_2)));
47
+ case 1:
48
+ return makeRecord(OntologySourceReference_$reflection(), map2(Update_updateOnlyByExisting, getRecordFields(recordType_1), getRecordFields(recordType_2)));
49
+ case 3:
50
+ return makeRecord(OntologySourceReference_$reflection(), map2(Update_updateOnlyByExistingAppend, getRecordFields(recordType_1), getRecordFields(recordType_2)));
51
+ default:
52
+ return recordType_2;
53
+ }
54
+ }
55
+ else {
56
+ return t;
57
+ }
58
+ }, ontologies) : ontologies;
59
+ }
60
+ static updateByName(updateOption, ontologySourceReference, ontologies) {
61
+ return OntologySourceReference.updateBy((t) => equals(t.Name, ontologySourceReference.Name), updateOption, ontologySourceReference, ontologies);
62
+ }
63
+ static removeByName(name, ontologies) {
64
+ return filter((t) => !equals(t.Name, name), ontologies);
65
+ }
66
+ static getComments(ontology) {
67
+ return ontology.Comments;
68
+ }
69
+ static mapComments(f, ontology) {
70
+ return new OntologySourceReference(ontology.Description, ontology.File, ontology.Name, ontology.Version, Option_mapDefault([], f, ontology.Comments));
71
+ }
72
+ static setComments(ontology, comments) {
73
+ return new OntologySourceReference(ontology.Description, ontology.File, ontology.Name, ontology.Version, comments);
74
+ }
75
+ Copy() {
76
+ const this$ = this;
77
+ const arg_4 = map_1((array) => map_2((c) => c.Copy(), array), this$.Comments);
78
+ return OntologySourceReference.make(this$.Description, this$.File, this$.Name, this$.Version, arg_4);
79
+ }
80
+ }
81
+
82
+ export function OntologySourceReference_$reflection() {
83
+ return record_type("ARCtrl.ISA.OntologySourceReference", [], OntologySourceReference, () => [["Description", option_type(string_type)], ["File", option_type(string_type)], ["Name", option_type(string_type)], ["Version", option_type(string_type)], ["Comments", option_type(array_type(Comment$_$reflection()))]]);
84
+ }
85
+
@@ -0,0 +1,137 @@
1
+ import { append as append_1, tryPick, map2, map, tryFind } from "../../../fable_modules/fable-library.4.1.4/Array.js";
2
+ import { equals } from "../../../fable_modules/fable-library.4.1.4/Util.js";
3
+ import { singleton, append } from "../../../fable_modules/fable-library.4.1.4/List.js";
4
+ import { record_type, array_type, option_type, string_type, getRecordFields, makeRecord } from "../../../fable_modules/fable-library.4.1.4/Reflection.js";
5
+ import { Update_updateOnlyByExistingAppend, Update_updateOnlyByExisting, Update_updateAppend } from "../Helper.js";
6
+ import { Option_fromValueWithDefault, Option_mapDefault } from "../Helper.js";
7
+ import { endsWith } from "../../../fable_modules/fable-library.4.1.4/String.js";
8
+ import { map as map_1, defaultArg, value as value_2 } from "../../../fable_modules/fable-library.4.1.4/Option.js";
9
+ import { Comment$_$reflection, Comment$ } from "./Comment.js";
10
+ import { Record } from "../../../fable_modules/fable-library.4.1.4/Types.js";
11
+ import { OntologyAnnotation_$reflection } from "./OntologyAnnotation.js";
12
+
13
+ export class Person extends Record {
14
+ constructor(ID, ORCID, LastName, FirstName, MidInitials, EMail, Phone, Fax, Address, Affiliation, Roles, Comments) {
15
+ super();
16
+ this.ID = ID;
17
+ this.ORCID = ORCID;
18
+ this.LastName = LastName;
19
+ this.FirstName = FirstName;
20
+ this.MidInitials = MidInitials;
21
+ this.EMail = EMail;
22
+ this.Phone = Phone;
23
+ this.Fax = Fax;
24
+ this.Address = Address;
25
+ this.Affiliation = Affiliation;
26
+ this.Roles = Roles;
27
+ this.Comments = Comments;
28
+ }
29
+ static make(id, orcid, lastName, firstName, midInitials, email, phone, fax, address, affiliation, roles, comments) {
30
+ return new Person(id, orcid, lastName, firstName, midInitials, email, phone, fax, address, affiliation, roles, comments);
31
+ }
32
+ static create(Id, ORCID, LastName, FirstName, MidInitials, Email, Phone, Fax, Address, Affiliation, Roles, Comments) {
33
+ return Person.make(Id, ORCID, LastName, FirstName, MidInitials, Email, Phone, Fax, Address, Affiliation, Roles, Comments);
34
+ }
35
+ static get empty() {
36
+ return Person.create();
37
+ }
38
+ static tryGetByFullName(firstName, midInitials, lastName, persons) {
39
+ return tryFind((p) => ((midInitials === "") ? (equals(p.FirstName, firstName) && equals(p.LastName, lastName)) : ((equals(p.FirstName, firstName) && equals(p.MidInitials, midInitials)) && equals(p.LastName, lastName))), persons);
40
+ }
41
+ static existsByFullName(firstName, midInitials, lastName, persons) {
42
+ return persons.some((p) => ((midInitials === "") ? (equals(p.FirstName, firstName) && equals(p.LastName, lastName)) : ((equals(p.FirstName, firstName) && equals(p.MidInitials, midInitials)) && equals(p.LastName, lastName))));
43
+ }
44
+ static add(persons, person) {
45
+ return append(persons, singleton(person));
46
+ }
47
+ static updateBy(predicate, updateOption, person, persons) {
48
+ return persons.some(predicate) ? map((p) => {
49
+ if (predicate(p)) {
50
+ const this$ = updateOption;
51
+ const recordType_1 = p;
52
+ const recordType_2 = person;
53
+ switch (this$.tag) {
54
+ case 2:
55
+ return makeRecord(Person_$reflection(), map2(Update_updateAppend, getRecordFields(recordType_1), getRecordFields(recordType_2)));
56
+ case 1:
57
+ return makeRecord(Person_$reflection(), map2(Update_updateOnlyByExisting, getRecordFields(recordType_1), getRecordFields(recordType_2)));
58
+ case 3:
59
+ return makeRecord(Person_$reflection(), map2(Update_updateOnlyByExistingAppend, getRecordFields(recordType_1), getRecordFields(recordType_2)));
60
+ default:
61
+ return recordType_2;
62
+ }
63
+ }
64
+ else {
65
+ return p;
66
+ }
67
+ }, persons) : persons;
68
+ }
69
+ static updateByFullName(updateOption, person, persons) {
70
+ return Person.updateBy((p) => {
71
+ if (equals(p.FirstName, person.FirstName) && equals(p.MidInitials, person.MidInitials)) {
72
+ return equals(p.LastName, person.LastName);
73
+ }
74
+ else {
75
+ return false;
76
+ }
77
+ }, updateOption, person, persons);
78
+ }
79
+ static removeByFullName(firstName, midInitials, lastName, persons) {
80
+ return persons.filter((p) => ((midInitials === "") ? !(equals(p.FirstName, firstName) && equals(p.LastName, lastName)) : !((equals(p.FirstName, firstName) && equals(p.MidInitials, midInitials)) && equals(p.LastName, lastName))));
81
+ }
82
+ static getRoles(person) {
83
+ return person.Roles;
84
+ }
85
+ static mapRoles(f, person) {
86
+ return new Person(person.ID, person.ORCID, person.LastName, person.FirstName, person.MidInitials, person.EMail, person.Phone, person.Fax, person.Address, person.Affiliation, Option_mapDefault([], f, person.Roles), person.Comments);
87
+ }
88
+ static setRoles(person, roles) {
89
+ return new Person(person.ID, person.ORCID, person.LastName, person.FirstName, person.MidInitials, person.EMail, person.Phone, person.Fax, person.Address, person.Affiliation, roles, person.Comments);
90
+ }
91
+ static getComments(person) {
92
+ return person.Comments;
93
+ }
94
+ static mapComments(f, person) {
95
+ return new Person(person.ID, person.ORCID, person.LastName, person.FirstName, person.MidInitials, person.EMail, person.Phone, person.Fax, person.Address, person.Affiliation, person.Roles, Option_mapDefault([], f, person.Comments));
96
+ }
97
+ static setComments(person, comments) {
98
+ return new Person(person.ID, person.ORCID, person.LastName, person.FirstName, person.MidInitials, person.EMail, person.Phone, person.Fax, person.Address, person.Affiliation, person.Roles, comments);
99
+ }
100
+ static get orcidKey() {
101
+ return "ORCID";
102
+ }
103
+ static setOrcidFromComments(person) {
104
+ const isOrcidComment = (c) => {
105
+ if (c.Name != null) {
106
+ return endsWith(value_2(c.Name).toLocaleUpperCase(), Person.orcidKey);
107
+ }
108
+ else {
109
+ return false;
110
+ }
111
+ };
112
+ const patternInput = defaultArg(map_1((comments) => [tryPick((c_1) => {
113
+ if (isOrcidComment(c_1)) {
114
+ return c_1.Value;
115
+ }
116
+ else {
117
+ return void 0;
118
+ }
119
+ }, comments), Option_fromValueWithDefault([], comments.filter((arg) => !isOrcidComment(arg)))], person.Comments), [void 0, person.Comments]);
120
+ return new Person(person.ID, patternInput[0], person.LastName, person.FirstName, person.MidInitials, person.EMail, person.Phone, person.Fax, person.Address, person.Affiliation, person.Roles, patternInput[1]);
121
+ }
122
+ static setCommentFromORCID(person) {
123
+ let matchValue, matchValue_1, orcid_1, comments, orcid;
124
+ return new Person(person.ID, person.ORCID, person.LastName, person.FirstName, person.MidInitials, person.EMail, person.Phone, person.Fax, person.Address, person.Affiliation, person.Roles, (matchValue = person.ORCID, (matchValue_1 = person.Comments, (matchValue == null) ? matchValue_1 : ((matchValue_1 == null) ? ((orcid_1 = matchValue, [Comment$.create(void 0, Person.orcidKey, orcid_1)])) : ((comments = matchValue_1, (orcid = matchValue, append_1(comments, [Comment$.create(void 0, Person.orcidKey, orcid)]))))))));
125
+ }
126
+ Copy() {
127
+ const this$ = this;
128
+ const nextComments = map_1((array) => map((c) => c.Copy(), array), this$.Comments);
129
+ const arg_10 = map_1((array_1) => map((c_1) => c_1.Copy(), array_1), this$.Roles);
130
+ return Person.make(this$.ID, this$.ORCID, this$.LastName, this$.FirstName, this$.MidInitials, this$.EMail, this$.Phone, this$.Fax, this$.Address, this$.Affiliation, arg_10, nextComments);
131
+ }
132
+ }
133
+
134
+ export function Person_$reflection() {
135
+ return record_type("ARCtrl.ISA.Person", [], Person, () => [["ID", option_type(string_type)], ["ORCID", option_type(string_type)], ["LastName", option_type(string_type)], ["FirstName", option_type(string_type)], ["MidInitials", option_type(string_type)], ["EMail", option_type(string_type)], ["Phone", option_type(string_type)], ["Fax", option_type(string_type)], ["Address", option_type(string_type)], ["Affiliation", option_type(string_type)], ["Roles", option_type(array_type(OntologyAnnotation_$reflection()))], ["Comments", option_type(array_type(Comment$_$reflection()))]]);
136
+ }
137
+