arctrl 3.0.0a3__py3-none-any.whl

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 (456) hide show
  1. arctrl/__init__.py +18 -0
  2. arctrl/py/CWL/__init__.py +0 -0
  3. arctrl/py/CWL/cwltypes.py +150 -0
  4. arctrl/py/CWL/decode.py +973 -0
  5. arctrl/py/CWL/encode.py +1 -0
  6. arctrl/py/CWL/inputs.py +88 -0
  7. arctrl/py/CWL/outputs.py +85 -0
  8. arctrl/py/CWL/requirements.py +77 -0
  9. arctrl/py/CWL/tool_description.py +103 -0
  10. arctrl/py/CWL/workflow_description.py +104 -0
  11. arctrl/py/CWL/workflow_steps.py +113 -0
  12. arctrl/py/Contract/__init__.py +0 -0
  13. arctrl/py/Contract/arc.py +60 -0
  14. arctrl/py/Contract/arc_assay.py +125 -0
  15. arctrl/py/Contract/arc_investigation.py +88 -0
  16. arctrl/py/Contract/arc_run.py +125 -0
  17. arctrl/py/Contract/arc_study.py +126 -0
  18. arctrl/py/Contract/arc_workflow.py +125 -0
  19. arctrl/py/Contract/contract.py +153 -0
  20. arctrl/py/Contract/datamap.py +372 -0
  21. arctrl/py/Contract/git.py +118 -0
  22. arctrl/py/Contract/validation_packages_config.py +107 -0
  23. arctrl/py/ContractIO/__init__.py +0 -0
  24. arctrl/py/ContractIO/contract_io.py +344 -0
  25. arctrl/py/ContractIO/file_system_helper.py +264 -0
  26. arctrl/py/Core/Helper/__init__.py +0 -0
  27. arctrl/py/Core/Helper/collections_.py +438 -0
  28. arctrl/py/Core/Helper/date_time.py +26 -0
  29. arctrl/py/Core/Helper/hash_codes.py +60 -0
  30. arctrl/py/Core/Helper/identifier.py +248 -0
  31. arctrl/py/Core/Helper/orcid.py +42 -0
  32. arctrl/py/Core/Helper/printer.py +13 -0
  33. arctrl/py/Core/Helper/regex.py +554 -0
  34. arctrl/py/Core/Helper/sem_ver.py +71 -0
  35. arctrl/py/Core/Helper/url.py +148 -0
  36. arctrl/py/Core/Process/__init__.py +0 -0
  37. arctrl/py/Core/Process/column_index.py +280 -0
  38. arctrl/py/Core/Process/component.py +200 -0
  39. arctrl/py/Core/Process/factor.py +151 -0
  40. arctrl/py/Core/Process/factor_value.py +182 -0
  41. arctrl/py/Core/Process/material.py +74 -0
  42. arctrl/py/Core/Process/material_attribute.py +95 -0
  43. arctrl/py/Core/Process/material_attribute_value.py +184 -0
  44. arctrl/py/Core/Process/material_type.py +45 -0
  45. arctrl/py/Core/Process/process.py +477 -0
  46. arctrl/py/Core/Process/process_input.py +265 -0
  47. arctrl/py/Core/Process/process_output.py +235 -0
  48. arctrl/py/Core/Process/process_parameter_value.py +200 -0
  49. arctrl/py/Core/Process/process_sequence.py +435 -0
  50. arctrl/py/Core/Process/protocol.py +175 -0
  51. arctrl/py/Core/Process/protocol_parameter.py +98 -0
  52. arctrl/py/Core/Process/sample.py +82 -0
  53. arctrl/py/Core/Process/source.py +62 -0
  54. arctrl/py/Core/Table/__init__.py +0 -0
  55. arctrl/py/Core/Table/arc_table.py +1264 -0
  56. arctrl/py/Core/Table/arc_table_aux.py +575 -0
  57. arctrl/py/Core/Table/arc_tables.py +591 -0
  58. arctrl/py/Core/Table/composite_cell.py +319 -0
  59. arctrl/py/Core/Table/composite_column.py +73 -0
  60. arctrl/py/Core/Table/composite_header.py +739 -0
  61. arctrl/py/Core/__init__.py +0 -0
  62. arctrl/py/Core/arc_types.py +5064 -0
  63. arctrl/py/Core/comment.py +128 -0
  64. arctrl/py/Core/comment_list.py +127 -0
  65. arctrl/py/Core/conversion.py +1313 -0
  66. arctrl/py/Core/data.py +245 -0
  67. arctrl/py/Core/data_context.py +157 -0
  68. arctrl/py/Core/data_file.py +112 -0
  69. arctrl/py/Core/data_map.py +225 -0
  70. arctrl/py/Core/identifier_setters.py +31 -0
  71. arctrl/py/Core/iproperty_value.py +36 -0
  72. arctrl/py/Core/ontology_annotation.py +299 -0
  73. arctrl/py/Core/ontology_source_reference.py +114 -0
  74. arctrl/py/Core/person.py +259 -0
  75. arctrl/py/Core/publication.py +161 -0
  76. arctrl/py/Core/template.py +231 -0
  77. arctrl/py/Core/templates.py +148 -0
  78. arctrl/py/Core/uri.py +11 -0
  79. arctrl/py/Core/value.py +188 -0
  80. arctrl/py/FileSystem/__init__.py +0 -0
  81. arctrl/py/FileSystem/commit.py +21 -0
  82. arctrl/py/FileSystem/default_gitattributes.py +5 -0
  83. arctrl/py/FileSystem/default_gitignore.py +5 -0
  84. arctrl/py/FileSystem/file_system.py +58 -0
  85. arctrl/py/FileSystem/file_system_tree.py +426 -0
  86. arctrl/py/FileSystem/path.py +64 -0
  87. arctrl/py/Json/DataMap/__init__.py +0 -0
  88. arctrl/py/Json/DataMap/data_context.py +101 -0
  89. arctrl/py/Json/DataMap/data_map.py +53 -0
  90. arctrl/py/Json/Process/__init__.py +0 -0
  91. arctrl/py/Json/Process/assay_materials.py +46 -0
  92. arctrl/py/Json/Process/component.py +79 -0
  93. arctrl/py/Json/Process/factor.py +107 -0
  94. arctrl/py/Json/Process/factor_value.py +101 -0
  95. arctrl/py/Json/Process/material.py +226 -0
  96. arctrl/py/Json/Process/material_attribute.py +79 -0
  97. arctrl/py/Json/Process/material_attribute_value.py +101 -0
  98. arctrl/py/Json/Process/material_type.py +53 -0
  99. arctrl/py/Json/Process/process.py +296 -0
  100. arctrl/py/Json/Process/process_input.py +83 -0
  101. arctrl/py/Json/Process/process_output.py +67 -0
  102. arctrl/py/Json/Process/process_parameter_value.py +81 -0
  103. arctrl/py/Json/Process/protocol.py +354 -0
  104. arctrl/py/Json/Process/protocol_parameter.py +79 -0
  105. arctrl/py/Json/Process/sample.py +277 -0
  106. arctrl/py/Json/Process/source.py +214 -0
  107. arctrl/py/Json/Process/study_materials.py +52 -0
  108. arctrl/py/Json/Process/value.py +56 -0
  109. arctrl/py/Json/ROCrate/__init__.py +0 -0
  110. arctrl/py/Json/ROCrate/ldcontext.py +133 -0
  111. arctrl/py/Json/ROCrate/ldgraph.py +111 -0
  112. arctrl/py/Json/ROCrate/ldnode.py +290 -0
  113. arctrl/py/Json/ROCrate/ldref.py +44 -0
  114. arctrl/py/Json/ROCrate/ldvalue.py +102 -0
  115. arctrl/py/Json/Table/__init__.py +0 -0
  116. arctrl/py/Json/Table/arc_table.py +393 -0
  117. arctrl/py/Json/Table/cell_table.py +83 -0
  118. arctrl/py/Json/Table/composite_cell.py +136 -0
  119. arctrl/py/Json/Table/composite_header.py +67 -0
  120. arctrl/py/Json/Table/iotype.py +24 -0
  121. arctrl/py/Json/Table/oatable.py +82 -0
  122. arctrl/py/Json/Table/templates.py +281 -0
  123. arctrl/py/Json/__init__.py +0 -0
  124. arctrl/py/Json/assay.py +600 -0
  125. arctrl/py/Json/comment.py +206 -0
  126. arctrl/py/Json/context/rocrate/__init__.py +0 -0
  127. arctrl/py/Json/context/rocrate/isa_assay_context.py +101 -0
  128. arctrl/py/Json/context/rocrate/isa_comment_context.py +60 -0
  129. arctrl/py/Json/context/rocrate/isa_component_context.py +77 -0
  130. arctrl/py/Json/context/rocrate/isa_data_context.py +74 -0
  131. arctrl/py/Json/context/rocrate/isa_factor_context.py +74 -0
  132. arctrl/py/Json/context/rocrate/isa_factor_value_context.py +84 -0
  133. arctrl/py/Json/context/rocrate/isa_investigation_context.py +110 -0
  134. arctrl/py/Json/context/rocrate/isa_material_attribute_context.py +64 -0
  135. arctrl/py/Json/context/rocrate/isa_material_attribute_value_context.py +80 -0
  136. arctrl/py/Json/context/rocrate/isa_material_context.py +71 -0
  137. arctrl/py/Json/context/rocrate/isa_ontology_annotation_context.py +68 -0
  138. arctrl/py/Json/context/rocrate/isa_ontology_source_reference_context.py +75 -0
  139. arctrl/py/Json/context/rocrate/isa_organization_context.py +55 -0
  140. arctrl/py/Json/context/rocrate/isa_person_context.py +131 -0
  141. arctrl/py/Json/context/rocrate/isa_process_context.py +94 -0
  142. arctrl/py/Json/context/rocrate/isa_process_parameter_value_context.py +80 -0
  143. arctrl/py/Json/context/rocrate/isa_protocol_context.py +97 -0
  144. arctrl/py/Json/context/rocrate/isa_protocol_parameter_context.py +64 -0
  145. arctrl/py/Json/context/rocrate/isa_publication_context.py +78 -0
  146. arctrl/py/Json/context/rocrate/isa_sample_context.py +65 -0
  147. arctrl/py/Json/context/rocrate/isa_source_context.py +66 -0
  148. arctrl/py/Json/context/rocrate/isa_study_context.py +125 -0
  149. arctrl/py/Json/context/rocrate/property_value_context.py +73 -0
  150. arctrl/py/Json/context/rocrate/rocrate_context.py +81 -0
  151. arctrl/py/Json/converter_options.py +23 -0
  152. arctrl/py/Json/data.py +356 -0
  153. arctrl/py/Json/data_file.py +63 -0
  154. arctrl/py/Json/decode.py +155 -0
  155. arctrl/py/Json/encode.py +92 -0
  156. arctrl/py/Json/idtable.py +44 -0
  157. arctrl/py/Json/investigation.py +695 -0
  158. arctrl/py/Json/ontology_annotation.py +404 -0
  159. arctrl/py/Json/ontology_source_reference.py +255 -0
  160. arctrl/py/Json/person.py +658 -0
  161. arctrl/py/Json/property_value.py +359 -0
  162. arctrl/py/Json/publication.py +279 -0
  163. arctrl/py/Json/string_table.py +76 -0
  164. arctrl/py/Json/study.py +793 -0
  165. arctrl/py/JsonIO/DataMap/__init__.py +0 -0
  166. arctrl/py/JsonIO/DataMap/data_map.py +53 -0
  167. arctrl/py/JsonIO/Process/__init__.py +0 -0
  168. arctrl/py/JsonIO/Process/component.py +60 -0
  169. arctrl/py/JsonIO/Process/factor.py +36 -0
  170. arctrl/py/JsonIO/Process/factor_value.py +38 -0
  171. arctrl/py/JsonIO/Process/material.py +60 -0
  172. arctrl/py/JsonIO/Process/material_attribute.py +38 -0
  173. arctrl/py/JsonIO/Process/material_attribute_value.py +60 -0
  174. arctrl/py/JsonIO/Process/material_type.py +36 -0
  175. arctrl/py/JsonIO/Process/process.py +60 -0
  176. arctrl/py/JsonIO/Process/process_input.py +38 -0
  177. arctrl/py/JsonIO/Process/process_output.py +60 -0
  178. arctrl/py/JsonIO/Process/process_parameter_value.py +60 -0
  179. arctrl/py/JsonIO/Process/process_sequence.py +71 -0
  180. arctrl/py/JsonIO/Process/protocol.py +60 -0
  181. arctrl/py/JsonIO/Process/protocol_parameter.py +36 -0
  182. arctrl/py/JsonIO/Process/sample.py +60 -0
  183. arctrl/py/JsonIO/Process/source.py +60 -0
  184. arctrl/py/JsonIO/Process/study_materials.py +52 -0
  185. arctrl/py/JsonIO/Process/value.py +32 -0
  186. arctrl/py/JsonIO/Table/__init__.py +0 -0
  187. arctrl/py/JsonIO/Table/arc_table.py +121 -0
  188. arctrl/py/JsonIO/Table/composite_cell.py +36 -0
  189. arctrl/py/JsonIO/Table/composite_header.py +36 -0
  190. arctrl/py/JsonIO/Table/compression.py +85 -0
  191. arctrl/py/JsonIO/Table/iotype.py +36 -0
  192. arctrl/py/JsonIO/Table/templates.py +113 -0
  193. arctrl/py/JsonIO/__init__.py +0 -0
  194. arctrl/py/JsonIO/assay.py +113 -0
  195. arctrl/py/JsonIO/comment.py +80 -0
  196. arctrl/py/JsonIO/data.py +60 -0
  197. arctrl/py/JsonIO/data_file.py +58 -0
  198. arctrl/py/JsonIO/decode.py +9 -0
  199. arctrl/py/JsonIO/encode.py +1 -0
  200. arctrl/py/JsonIO/investigation.py +113 -0
  201. arctrl/py/JsonIO/ldobject.py +106 -0
  202. arctrl/py/JsonIO/ontology_annotation.py +80 -0
  203. arctrl/py/JsonIO/ontology_source_reference.py +80 -0
  204. arctrl/py/JsonIO/person.py +82 -0
  205. arctrl/py/JsonIO/publication.py +82 -0
  206. arctrl/py/JsonIO/study.py +114 -0
  207. arctrl/py/ROCrate/Generic/__init__.py +0 -0
  208. arctrl/py/ROCrate/Generic/comment.py +131 -0
  209. arctrl/py/ROCrate/Generic/dataset.py +817 -0
  210. arctrl/py/ROCrate/Generic/defined_term.py +131 -0
  211. arctrl/py/ROCrate/Generic/file.py +237 -0
  212. arctrl/py/ROCrate/Generic/lab_process.py +324 -0
  213. arctrl/py/ROCrate/Generic/lab_protocol.py +338 -0
  214. arctrl/py/ROCrate/Generic/organization.py +83 -0
  215. arctrl/py/ROCrate/Generic/person.py +484 -0
  216. arctrl/py/ROCrate/Generic/postal_address.py +195 -0
  217. arctrl/py/ROCrate/Generic/property_value.py +696 -0
  218. arctrl/py/ROCrate/Generic/sample.py +202 -0
  219. arctrl/py/ROCrate/Generic/scholarly_article.py +229 -0
  220. arctrl/py/ROCrate/ISAProfile/__init__.py +0 -0
  221. arctrl/py/ROCrate/ISAProfile/assay.py +70 -0
  222. arctrl/py/ROCrate/ISAProfile/data.py +65 -0
  223. arctrl/py/ROCrate/ISAProfile/dataset.py +24 -0
  224. arctrl/py/ROCrate/ISAProfile/investigation.py +73 -0
  225. arctrl/py/ROCrate/ISAProfile/lab_process.py +162 -0
  226. arctrl/py/ROCrate/ISAProfile/lab_protocol.py +37 -0
  227. arctrl/py/ROCrate/ISAProfile/person.py +72 -0
  228. arctrl/py/ROCrate/ISAProfile/property_value.py +98 -0
  229. arctrl/py/ROCrate/ISAProfile/sample.py +64 -0
  230. arctrl/py/ROCrate/ISAProfile/scholarly_article.py +98 -0
  231. arctrl/py/ROCrate/ISAProfile/study.py +74 -0
  232. arctrl/py/ROCrate/__init__.py +0 -0
  233. arctrl/py/ROCrate/arc_rocrate_metadata.py +39 -0
  234. arctrl/py/ROCrate/dyn_obj_extensions.py +1 -0
  235. arctrl/py/ROCrate/helper.py +8 -0
  236. arctrl/py/ROCrate/ldcontext.py +362 -0
  237. arctrl/py/ROCrate/ldobject.py +1247 -0
  238. arctrl/py/ROCrate/rocrate_context.py +51 -0
  239. arctrl/py/Spreadsheet/AnnotationTable/__init__.py +0 -0
  240. arctrl/py/Spreadsheet/AnnotationTable/arc_table.py +193 -0
  241. arctrl/py/Spreadsheet/AnnotationTable/composite_cell.py +78 -0
  242. arctrl/py/Spreadsheet/AnnotationTable/composite_column.py +210 -0
  243. arctrl/py/Spreadsheet/AnnotationTable/composite_header.py +623 -0
  244. arctrl/py/Spreadsheet/DataMapTable/__init__.py +0 -0
  245. arctrl/py/Spreadsheet/DataMapTable/data_map_column.py +114 -0
  246. arctrl/py/Spreadsheet/DataMapTable/data_map_header.py +618 -0
  247. arctrl/py/Spreadsheet/DataMapTable/data_map_table.py +119 -0
  248. arctrl/py/Spreadsheet/Metadata/__init__.py +0 -0
  249. arctrl/py/Spreadsheet/Metadata/assays.py +125 -0
  250. arctrl/py/Spreadsheet/Metadata/comment.py +77 -0
  251. arctrl/py/Spreadsheet/Metadata/contacts.py +134 -0
  252. arctrl/py/Spreadsheet/Metadata/conversions.py +190 -0
  253. arctrl/py/Spreadsheet/Metadata/design_descriptors.py +34 -0
  254. arctrl/py/Spreadsheet/Metadata/factors.py +107 -0
  255. arctrl/py/Spreadsheet/Metadata/ontology_annotation.py +88 -0
  256. arctrl/py/Spreadsheet/Metadata/ontology_source_reference.py +96 -0
  257. arctrl/py/Spreadsheet/Metadata/protocols.py +146 -0
  258. arctrl/py/Spreadsheet/Metadata/publication.py +122 -0
  259. arctrl/py/Spreadsheet/Metadata/run.py +122 -0
  260. arctrl/py/Spreadsheet/Metadata/sparse_table.py +508 -0
  261. arctrl/py/Spreadsheet/Metadata/study.py +312 -0
  262. arctrl/py/Spreadsheet/Metadata/workflow.py +151 -0
  263. arctrl/py/Spreadsheet/__init__.py +0 -0
  264. arctrl/py/Spreadsheet/arc_assay.py +233 -0
  265. arctrl/py/Spreadsheet/arc_investigation.py +418 -0
  266. arctrl/py/Spreadsheet/arc_run.py +190 -0
  267. arctrl/py/Spreadsheet/arc_study.py +144 -0
  268. arctrl/py/Spreadsheet/arc_workflow.py +176 -0
  269. arctrl/py/Spreadsheet/assembly_info.py +1 -0
  270. arctrl/py/Spreadsheet/collection_aux.py +167 -0
  271. arctrl/py/Spreadsheet/data_map.py +44 -0
  272. arctrl/py/Spreadsheet/template.py +460 -0
  273. arctrl/py/ValidationPackages/__init__.py +0 -0
  274. arctrl/py/ValidationPackages/validation_package.py +82 -0
  275. arctrl/py/ValidationPackages/validation_packages_config.py +132 -0
  276. arctrl/py/WebRequest/__init__.py +0 -0
  277. arctrl/py/WebRequest/web_request.py +9 -0
  278. arctrl/py/WebRequest/web_request_py.py +135 -0
  279. arctrl/py/Yaml/__init__.py +0 -0
  280. arctrl/py/Yaml/decode.py +1 -0
  281. arctrl/py/Yaml/encode.py +10 -0
  282. arctrl/py/Yaml/validation_package.py +77 -0
  283. arctrl/py/Yaml/validation_packages_config.py +86 -0
  284. arctrl/py/__init__.py +0 -0
  285. arctrl/py/arc.py +1400 -0
  286. arctrl/py/column_index.py +280 -0
  287. arctrl/py/conversion.py +2184 -0
  288. arctrl/py/cross_async.py +76 -0
  289. arctrl/py/fable_modules/dynamic_obj/__init__.py +0 -0
  290. arctrl/py/fable_modules/dynamic_obj/dyn_obj.py +136 -0
  291. arctrl/py/fable_modules/dynamic_obj/dynamic_obj.py +415 -0
  292. arctrl/py/fable_modules/dynamic_obj/fable_js.py +1 -0
  293. arctrl/py/fable_modules/dynamic_obj/fable_py.py +288 -0
  294. arctrl/py/fable_modules/dynamic_obj/hash_codes.py +82 -0
  295. arctrl/py/fable_modules/dynamic_obj/property_helper.py +25 -0
  296. arctrl/py/fable_modules/dynamic_obj/reflection_utils.py +87 -0
  297. arctrl/py/fable_modules/fable_library/__init__.py +0 -0
  298. arctrl/py/fable_modules/fable_library/array_.py +1528 -0
  299. arctrl/py/fable_modules/fable_library/async_.py +377 -0
  300. arctrl/py/fable_modules/fable_library/async_builder.py +379 -0
  301. arctrl/py/fable_modules/fable_library/big_int.py +330 -0
  302. arctrl/py/fable_modules/fable_library/bit_converter.py +131 -0
  303. arctrl/py/fable_modules/fable_library/boolean.py +26 -0
  304. arctrl/py/fable_modules/fable_library/char.py +237 -0
  305. arctrl/py/fable_modules/fable_library/choice.py +212 -0
  306. arctrl/py/fable_modules/fable_library/date.py +779 -0
  307. arctrl/py/fable_modules/fable_library/date_offset.py +79 -0
  308. arctrl/py/fable_modules/fable_library/decimal_.py +190 -0
  309. arctrl/py/fable_modules/fable_library/diagnostics.py +54 -0
  310. arctrl/py/fable_modules/fable_library/double.py +87 -0
  311. arctrl/py/fable_modules/fable_library/encoding.py +41 -0
  312. arctrl/py/fable_modules/fable_library/event.py +206 -0
  313. arctrl/py/fable_modules/fable_library/file.py +107 -0
  314. arctrl/py/fable_modules/fable_library/fsharp_collections.py +52 -0
  315. arctrl/py/fable_modules/fable_library/fsharp_core.py +123 -0
  316. arctrl/py/fable_modules/fable_library/global_.py +63 -0
  317. arctrl/py/fable_modules/fable_library/guid.py +41 -0
  318. arctrl/py/fable_modules/fable_library/int32.py +73 -0
  319. arctrl/py/fable_modules/fable_library/list.py +1788 -0
  320. arctrl/py/fable_modules/fable_library/long.py +240 -0
  321. arctrl/py/fable_modules/fable_library/mailbox_processor.py +179 -0
  322. arctrl/py/fable_modules/fable_library/map.py +1854 -0
  323. arctrl/py/fable_modules/fable_library/map_util.py +148 -0
  324. arctrl/py/fable_modules/fable_library/mutable_map.py +397 -0
  325. arctrl/py/fable_modules/fable_library/mutable_set.py +279 -0
  326. arctrl/py/fable_modules/fable_library/native.py +45 -0
  327. arctrl/py/fable_modules/fable_library/numeric.py +46 -0
  328. arctrl/py/fable_modules/fable_library/observable.py +222 -0
  329. arctrl/py/fable_modules/fable_library/option.py +128 -0
  330. arctrl/py/fable_modules/fable_library/path.py +62 -0
  331. arctrl/py/fable_modules/fable_library/range.py +117 -0
  332. arctrl/py/fable_modules/fable_library/reflection.py +463 -0
  333. arctrl/py/fable_modules/fable_library/reg_exp.py +137 -0
  334. arctrl/py/fable_modules/fable_library/resize_array.py +31 -0
  335. arctrl/py/fable_modules/fable_library/result.py +212 -0
  336. arctrl/py/fable_modules/fable_library/seq.py +1979 -0
  337. arctrl/py/fable_modules/fable_library/seq2.py +221 -0
  338. arctrl/py/fable_modules/fable_library/set.py +2414 -0
  339. arctrl/py/fable_modules/fable_library/singleton_local_time_zone.py +36 -0
  340. arctrl/py/fable_modules/fable_library/string_.py +573 -0
  341. arctrl/py/fable_modules/fable_library/system_collections_generic.py +462 -0
  342. arctrl/py/fable_modules/fable_library/system_text.py +237 -0
  343. arctrl/py/fable_modules/fable_library/task.py +116 -0
  344. arctrl/py/fable_modules/fable_library/task_builder.py +122 -0
  345. arctrl/py/fable_modules/fable_library/thread.py +5 -0
  346. arctrl/py/fable_modules/fable_library/time_span.py +283 -0
  347. arctrl/py/fable_modules/fable_library/timer.py +24 -0
  348. arctrl/py/fable_modules/fable_library/types.py +401 -0
  349. arctrl/py/fable_modules/fable_library/uri.py +109 -0
  350. arctrl/py/fable_modules/fable_library/util.py +2735 -0
  351. arctrl/py/fable_modules/fable_openpyxl/__init__.py +0 -0
  352. arctrl/py/fable_modules/fable_openpyxl/openpyxl.py +362 -0
  353. arctrl/py/fable_modules/fable_python/cognite-sdk/__init__.py +0 -0
  354. arctrl/py/fable_modules/fable_python/cognite-sdk/cognite_sdk.py +22 -0
  355. arctrl/py/fable_modules/fable_python/flask/__init__.py +0 -0
  356. arctrl/py/fable_modules/fable_python/flask/flask.py +34 -0
  357. arctrl/py/fable_modules/fable_python/jupyter/__init__.py +0 -0
  358. arctrl/py/fable_modules/fable_python/jupyter/ipy_widgets.py +47 -0
  359. arctrl/py/fable_modules/fable_python/jupyter/ipython.py +13 -0
  360. arctrl/py/fable_modules/fable_python/stdlib/__init__.py +0 -0
  361. arctrl/py/fable_modules/fable_python/stdlib/ast.py +1 -0
  362. arctrl/py/fable_modules/fable_python/stdlib/asyncio/__init__.py +0 -0
  363. arctrl/py/fable_modules/fable_python/stdlib/asyncio/events.py +17 -0
  364. arctrl/py/fable_modules/fable_python/stdlib/asyncio/futures.py +52 -0
  365. arctrl/py/fable_modules/fable_python/stdlib/asyncio/tasks.py +38 -0
  366. arctrl/py/fable_modules/fable_python/stdlib/base64_.py +1 -0
  367. arctrl/py/fable_modules/fable_python/stdlib/builtins_.py +38 -0
  368. arctrl/py/fable_modules/fable_python/stdlib/html.py +1 -0
  369. arctrl/py/fable_modules/fable_python/stdlib/json.py +1 -0
  370. arctrl/py/fable_modules/fable_python/stdlib/math_.py +1 -0
  371. arctrl/py/fable_modules/fable_python/stdlib/os_.py +1 -0
  372. arctrl/py/fable_modules/fable_python/stdlib/queue_.py +1 -0
  373. arctrl/py/fable_modules/fable_python/stdlib/string_.py +1 -0
  374. arctrl/py/fable_modules/fable_python/stdlib/sys_.py +30 -0
  375. arctrl/py/fable_modules/fable_python/stdlib/time_.py +1 -0
  376. arctrl/py/fable_modules/fable_python/stdlib/tk_inter.py +1 -0
  377. arctrl/py/fable_modules/fs_spreadsheet/Cells/__init__.py +0 -0
  378. arctrl/py/fable_modules/fs_spreadsheet/Cells/fs_cell.py +338 -0
  379. arctrl/py/fable_modules/fs_spreadsheet/Cells/fs_cells_collection.py +469 -0
  380. arctrl/py/fable_modules/fs_spreadsheet/DSL/__init__.py +0 -0
  381. arctrl/py/fable_modules/fs_spreadsheet/DSL/cell_builder.py +214 -0
  382. arctrl/py/fable_modules/fs_spreadsheet/DSL/column_builder.py +139 -0
  383. arctrl/py/fable_modules/fs_spreadsheet/DSL/dsl.py +50 -0
  384. arctrl/py/fable_modules/fs_spreadsheet/DSL/expression.py +65 -0
  385. arctrl/py/fable_modules/fs_spreadsheet/DSL/operators.py +9 -0
  386. arctrl/py/fable_modules/fs_spreadsheet/DSL/row_builder.py +139 -0
  387. arctrl/py/fable_modules/fs_spreadsheet/DSL/sheet_builder.py +118 -0
  388. arctrl/py/fable_modules/fs_spreadsheet/DSL/table_builder.py +122 -0
  389. arctrl/py/fable_modules/fs_spreadsheet/DSL/transform.py +464 -0
  390. arctrl/py/fable_modules/fs_spreadsheet/DSL/types.py +314 -0
  391. arctrl/py/fable_modules/fs_spreadsheet/DSL/workbook_builder.py +106 -0
  392. arctrl/py/fable_modules/fs_spreadsheet/Json/__init__.py +0 -0
  393. arctrl/py/fable_modules/fs_spreadsheet/Json/cell.py +103 -0
  394. arctrl/py/fable_modules/fs_spreadsheet/Json/column.py +70 -0
  395. arctrl/py/fable_modules/fs_spreadsheet/Json/row.py +70 -0
  396. arctrl/py/fable_modules/fs_spreadsheet/Json/table.py +57 -0
  397. arctrl/py/fable_modules/fs_spreadsheet/Json/value.py +93 -0
  398. arctrl/py/fable_modules/fs_spreadsheet/Json/workbook.py +71 -0
  399. arctrl/py/fable_modules/fs_spreadsheet/Json/worksheet.py +217 -0
  400. arctrl/py/fable_modules/fs_spreadsheet/Ranges/__init__.py +0 -0
  401. arctrl/py/fable_modules/fs_spreadsheet/Ranges/fs_range.py +47 -0
  402. arctrl/py/fable_modules/fs_spreadsheet/Ranges/fs_range_address.py +186 -0
  403. arctrl/py/fable_modules/fs_spreadsheet/Ranges/fs_range_base.py +90 -0
  404. arctrl/py/fable_modules/fs_spreadsheet/Ranges/fs_range_column.py +78 -0
  405. arctrl/py/fable_modules/fs_spreadsheet/Ranges/fs_range_row.py +48 -0
  406. arctrl/py/fable_modules/fs_spreadsheet/Tables/__init__.py +0 -0
  407. arctrl/py/fable_modules/fs_spreadsheet/Tables/fs_table.py +393 -0
  408. arctrl/py/fable_modules/fs_spreadsheet/Tables/fs_table_field.py +127 -0
  409. arctrl/py/fable_modules/fs_spreadsheet/Tables/fs_table_row.py +23 -0
  410. arctrl/py/fable_modules/fs_spreadsheet/__init__.py +0 -0
  411. arctrl/py/fable_modules/fs_spreadsheet/fs_address.py +218 -0
  412. arctrl/py/fable_modules/fs_spreadsheet/fs_column.py +172 -0
  413. arctrl/py/fable_modules/fs_spreadsheet/fs_row.py +183 -0
  414. arctrl/py/fable_modules/fs_spreadsheet/fs_workbook.py +180 -0
  415. arctrl/py/fable_modules/fs_spreadsheet/fs_worksheet.py +600 -0
  416. arctrl/py/fable_modules/fs_spreadsheet/sheet_builder.py +330 -0
  417. arctrl/py/fable_modules/fs_spreadsheet_py/__init__.py +0 -0
  418. arctrl/py/fable_modules/fs_spreadsheet_py/cell.py +63 -0
  419. arctrl/py/fable_modules/fs_spreadsheet_py/cell_type.py +50 -0
  420. arctrl/py/fable_modules/fs_spreadsheet_py/fs_extension.py +60 -0
  421. arctrl/py/fable_modules/fs_spreadsheet_py/json.py +47 -0
  422. arctrl/py/fable_modules/fs_spreadsheet_py/table.py +53 -0
  423. arctrl/py/fable_modules/fs_spreadsheet_py/workbook.py +40 -0
  424. arctrl/py/fable_modules/fs_spreadsheet_py/worksheet.py +54 -0
  425. arctrl/py/fable_modules/fs_spreadsheet_py/xlsx.py +37 -0
  426. arctrl/py/fable_modules/thoth_json_core/__init__.py +0 -0
  427. arctrl/py/fable_modules/thoth_json_core/decode.py +1588 -0
  428. arctrl/py/fable_modules/thoth_json_core/encode.py +261 -0
  429. arctrl/py/fable_modules/thoth_json_core/types.py +181 -0
  430. arctrl/py/fable_modules/thoth_json_python/__init__.py +0 -0
  431. arctrl/py/fable_modules/thoth_json_python/decode.py +112 -0
  432. arctrl/py/fable_modules/thoth_json_python/encode.py +72 -0
  433. arctrl/py/fable_modules/thoth_json_python/python.py +1 -0
  434. arctrl/py/fable_modules/yamlicious/Interop/__init__.py +0 -0
  435. arctrl/py/fable_modules/yamlicious/Interop/js_interop.py +1 -0
  436. arctrl/py/fable_modules/yamlicious/Interop/py_interop.py +7 -0
  437. arctrl/py/fable_modules/yamlicious/__init__.py +0 -0
  438. arctrl/py/fable_modules/yamlicious/decode.py +1784 -0
  439. arctrl/py/fable_modules/yamlicious/encode.py +84 -0
  440. arctrl/py/fable_modules/yamlicious/library.py +10 -0
  441. arctrl/py/fable_modules/yamlicious/persil.py +57 -0
  442. arctrl/py/fable_modules/yamlicious/preprocessing.py +99 -0
  443. arctrl/py/fable_modules/yamlicious/reader.py +665 -0
  444. arctrl/py/fable_modules/yamlicious/regex.py +21 -0
  445. arctrl/py/fable_modules/yamlicious/regex_active_patterns.py +256 -0
  446. arctrl/py/fable_modules/yamlicious/writer.py +175 -0
  447. arctrl/py/fable_modules/yamlicious/yamlicious_types.py +128 -0
  448. arctrl/py/json.py +213 -0
  449. arctrl/py/rocrate_io.py +72 -0
  450. arctrl/py/template_web.py +23 -0
  451. arctrl/py/xlsx.py +148 -0
  452. arctrl/rocrate.py +21 -0
  453. arctrl-3.0.0a3.dist-info/LICENSE +21 -0
  454. arctrl-3.0.0a3.dist-info/METADATA +119 -0
  455. arctrl-3.0.0a3.dist-info/RECORD +456 -0
  456. arctrl-3.0.0a3.dist-info/WHEEL +4 -0
@@ -0,0 +1,1247 @@
1
+ from __future__ import annotations
2
+ from abc import abstractmethod
3
+ from collections.abc import Callable
4
+ from typing import (Any, Protocol, TypeVar)
5
+ from ..fable_modules.dynamic_obj.dynamic_obj import (DynamicObj, DynamicObj_reflection)
6
+ from ..fable_modules.dynamic_obj.hash_codes import merge_hashes
7
+ from ..fable_modules.dynamic_obj.property_helper import PropertyHelper
8
+ from ..fable_modules.fable_library.map_util import (get_item_from_dict, try_get_value, add_to_dict)
9
+ from ..fable_modules.fable_library.option import (default_arg, value as value_3, some, map)
10
+ from ..fable_modules.fable_library.reflection import (TypeInfo, class_type)
11
+ from ..fable_modules.fable_library.seq import (iterate, filter as filter_2, choose, exists, to_list, delay, enumerate_while, singleton as singleton_2, empty, try_find, map as map_1, enumerate_from_functions, append, collect)
12
+ from ..fable_modules.fable_library.seq2 import List_distinctBy
13
+ from ..fable_modules.fable_library.string_ import starts_with_exact
14
+ from ..fable_modules.fable_library.types import (Array, FSharpRef)
15
+ from ..fable_modules.fable_library.util import (is_iterable, IEnumerable, equals, identity_hash, string_hash, IEnumerable_1, get_enumerator, IEnumerator, curry2, ignore, structural_hash, is_array_like)
16
+ from ..Core.Helper.collections_ import ResizeArray_map
17
+ from .ldcontext import LDContext
18
+
19
+ __G = TypeVar("__G")
20
+
21
+ __F = TypeVar("__F")
22
+
23
+ __D = TypeVar("__D")
24
+
25
+ __C = TypeVar("__C")
26
+
27
+ __B = TypeVar("__B")
28
+
29
+ __A = TypeVar("__A")
30
+
31
+ def ActivePattern__007CNonStringEnumerable_007C__007C(o: Any=None) -> IEnumerable[Any] | None:
32
+ if str(type(o)) == "<class \'str\'>":
33
+ return None
34
+
35
+ elif is_iterable(o):
36
+ return o
37
+
38
+ else:
39
+ return None
40
+
41
+
42
+
43
+ def DynamicObj_DynamicObj__DynamicObj_HasProperty_Z721C83C5(this: DynamicObj, property_name: str) -> bool:
44
+ return this.TryGetPropertyValue(property_name) is not None
45
+
46
+
47
+ class ILDObject(Protocol):
48
+ @property
49
+ @abstractmethod
50
+ def AdditionalType(self) -> Array[str]:
51
+ ...
52
+
53
+ @AdditionalType.setter
54
+ @abstractmethod
55
+ def AdditionalType(self, __arg0: Array[str]) -> None:
56
+ ...
57
+
58
+ @property
59
+ @abstractmethod
60
+ def Id(self) -> str:
61
+ ...
62
+
63
+ @property
64
+ @abstractmethod
65
+ def SchemaType(self) -> Array[str]:
66
+ ...
67
+
68
+ @SchemaType.setter
69
+ @abstractmethod
70
+ def SchemaType(self, __arg0: Array[str]) -> None:
71
+ ...
72
+
73
+
74
+ def _expr1442() -> TypeInfo:
75
+ return class_type("ARCtrl.ROCrate.LDValue", None, LDValue)
76
+
77
+
78
+ class LDValue:
79
+ def __init__(self, value: Any=None, value_type: str | None=None) -> None:
80
+ self.value_type_004054: str = default_arg(value_type, "string")
81
+ self.value_004055: Any = value
82
+
83
+ @property
84
+ def Value(self, __unit: None=None) -> Any:
85
+ this: LDValue = self
86
+ return this.value_004055
87
+
88
+ @Value.setter
89
+ def Value(self, v: Any=None) -> None:
90
+ this: LDValue = self
91
+ this.value_004055 = v
92
+
93
+ @property
94
+ def ValueType(self, __unit: None=None) -> str:
95
+ this: LDValue = self
96
+ return this.value_type_004054
97
+
98
+ @ValueType.setter
99
+ def ValueType(self, v: str) -> None:
100
+ this: LDValue = self
101
+ this.value_type_004054 = v
102
+
103
+ def __eq__(self, other: Any=None) -> bool:
104
+ this: LDValue = self
105
+ return equals(this.Value, other.Value) if isinstance(other, LDValue) else False
106
+
107
+ def __hash__(self, __unit: None=None) -> int:
108
+ this: LDValue = self
109
+ return merge_hashes(123, identity_hash(this.Value))
110
+
111
+
112
+ LDValue_reflection = _expr1442
113
+
114
+ def LDValue__ctor_77809003(value: Any=None, value_type: str | None=None) -> LDValue:
115
+ return LDValue(value, value_type)
116
+
117
+
118
+ def _expr1443() -> TypeInfo:
119
+ return class_type("ARCtrl.ROCrate.LDRef", None, LDRef)
120
+
121
+
122
+ class LDRef:
123
+ def __init__(self, id: str) -> None:
124
+ self.id_004075: str = id
125
+
126
+ @property
127
+ def Id(self, __unit: None=None) -> str:
128
+ this: LDRef = self
129
+ return this.id_004075
130
+
131
+ @Id.setter
132
+ def Id(self, v: str) -> None:
133
+ this: LDRef = self
134
+ this.id_004075 = v
135
+
136
+ def __eq__(self, other: Any=None) -> bool:
137
+ this: LDRef = self
138
+ return (this.Id == other.Id) if isinstance(other, LDRef) else False
139
+
140
+ def __hash__(self, __unit: None=None) -> int:
141
+ this: LDRef = self
142
+ return merge_hashes(123, string_hash(this.Id))
143
+
144
+
145
+ LDRef_reflection = _expr1443
146
+
147
+ def LDRef__ctor_Z721C83C5(id: str) -> LDRef:
148
+ return LDRef(id)
149
+
150
+
151
+ def _expr1448() -> TypeInfo:
152
+ return class_type("ARCtrl.ROCrate.LDGraph", None, LDGraph, DynamicObj_reflection())
153
+
154
+
155
+ class LDGraph(DynamicObj):
156
+ def __init__(self, id: str | None=None, nodes: Array[LDNode] | None=None, context: LDContext | None=None) -> None:
157
+ super().__init__()
158
+ this: FSharpRef[LDGraph] = FSharpRef(None)
159
+ this.contents = self
160
+ self.id_004094: str | None = id
161
+ self.mappings: Any = dict([])
162
+ self.init_004090: int = 1
163
+ if context is None:
164
+ pass
165
+
166
+ else:
167
+ ctx: LDContext = context
168
+ this.contents.SetContext(ctx)
169
+
170
+ if nodes is None:
171
+ pass
172
+
173
+ else:
174
+ def action(node: LDNode) -> None:
175
+ add_to_dict(self.mappings, node.Id, node)
176
+
177
+ iterate(action, nodes)
178
+
179
+
180
+ @property
181
+ def Id(self, __unit: None=None) -> str | None:
182
+ this: LDGraph = self
183
+ return this.id_004094
184
+
185
+ @Id.setter
186
+ def Id(self, v: str | None=None) -> None:
187
+ this: LDGraph = self
188
+ this.id_004094 = v
189
+
190
+ @property
191
+ def Nodes(self, __unit: None=None) -> Array[LDNode]:
192
+ this: LDGraph = self
193
+ return list(this.mappings.values())
194
+
195
+ def ContainsNode(self, id: str) -> bool:
196
+ this: LDGraph = self
197
+ return this.mappings.has(id)
198
+
199
+ def GetNode(self, id: str) -> LDNode:
200
+ this: LDGraph = self
201
+ return get_item_from_dict(this.mappings, id)
202
+
203
+ def TryGetNode(self, id: str) -> LDNode | None:
204
+ this: LDGraph = self
205
+ match_value: tuple[bool, LDNode]
206
+ out_arg: LDNode = None
207
+ def _arrow1444(__unit: None=None) -> LDNode:
208
+ return out_arg
209
+
210
+ def _arrow1445(v: LDNode) -> None:
211
+ nonlocal out_arg
212
+ out_arg = v
213
+
214
+ match_value = (try_get_value(this.mappings, id, FSharpRef(_arrow1444, _arrow1445)), out_arg)
215
+ return match_value[1] if match_value[0] else None
216
+
217
+ def AddNode(self, node: LDNode) -> None:
218
+ this: LDGraph = self
219
+ id: str = node.Id
220
+ match_value: LDNode | None = this.TryGetNode(id)
221
+ if match_value is None:
222
+ add_to_dict(this.mappings, id, node)
223
+
224
+ else:
225
+ existing_node: LDNode = match_value
226
+ node.MergeAppendInto_InPlace(existing_node, this)
227
+
228
+
229
+ def Compact_InPlace(self, context: LDContext | None=None) -> None:
230
+ this: LDGraph = self
231
+ context_1: LDContext | None
232
+ specific_context: LDContext | None = this.TryGetContext()
233
+ context_1 = LDContext.try_combine_optional(context, specific_context)
234
+ def action(node: LDNode) -> None:
235
+ node.Compact_InPlace(context_1)
236
+
237
+ iterate(action, this.Nodes)
238
+
239
+ def SetContext(self, context: LDContext) -> None:
240
+ this: LDGraph = self
241
+ this.SetProperty("@context", context)
242
+
243
+ @staticmethod
244
+ def set_context(context: LDContext) -> Callable[[__G], None]:
245
+ def _arrow1446(roc: __G | None=None) -> None:
246
+ roc.SetContext(context)
247
+
248
+ return _arrow1446
249
+
250
+ def TryGetContext(self, __unit: None=None) -> LDContext | None:
251
+ this: LDGraph = self
252
+ match_value: Any | None = this.TryGetPropertyValue("@context")
253
+ if match_value is not None:
254
+ o: Any = value_3(match_value)
255
+ return o if isinstance(o, LDContext) else None
256
+
257
+ else:
258
+ return None
259
+
260
+
261
+ @staticmethod
262
+ def try_get_context(__unit: None=None) -> Callable[[__F], LDContext | None]:
263
+ def _arrow1447(roc: __F | None=None) -> LDContext | None:
264
+ return roc.TryGetContext()
265
+
266
+ return _arrow1447
267
+
268
+ def RemoveContext(self, __unit: None=None) -> bool:
269
+ this: LDGraph = self
270
+ return this.RemoveProperty("@context")
271
+
272
+ def GetDynamicPropertyHelpers(self, __unit: None=None) -> IEnumerable_1[PropertyHelper]:
273
+ this: LDGraph = self
274
+ def predicate(ph: PropertyHelper) -> bool:
275
+ return not (True if starts_with_exact(ph.Name, "init@") else (ph.Name == "mappings"))
276
+
277
+ return filter_2(predicate, this.GetPropertyHelpers(False))
278
+
279
+ def GetDynamicPropertyNames(self, context: LDContext | None=None) -> IEnumerable_1[str]:
280
+ this: LDGraph = self
281
+ context_1: LDContext | None
282
+ specific_context: LDContext | None = this.TryGetContext()
283
+ context_1 = LDContext.try_combine_optional(context, specific_context)
284
+ def chooser(ph: PropertyHelper) -> str | None:
285
+ name: str
286
+ if context_1 is None:
287
+ name = ph.Name
288
+
289
+ else:
290
+ ctx: LDContext = context_1
291
+ match_value: str | None = ctx.TryResolveTerm(ph.Name)
292
+ name = ph.Name if (match_value is None) else match_value
293
+
294
+ if name == "@context":
295
+ return None
296
+
297
+ else:
298
+ return name
299
+
300
+
301
+ return choose(chooser, this.GetDynamicPropertyHelpers())
302
+
303
+
304
+ LDGraph_reflection = _expr1448
305
+
306
+ def LDGraph__ctor_5FC797DE(id: str | None=None, nodes: Array[LDNode] | None=None, context: LDContext | None=None) -> LDGraph:
307
+ return LDGraph(id, nodes, context)
308
+
309
+
310
+ def _expr1505() -> TypeInfo:
311
+ return class_type("ARCtrl.ROCrate.LDNode", None, LDNode, DynamicObj_reflection())
312
+
313
+
314
+ class LDNode(DynamicObj):
315
+ def __init__(self, id: str, schema_type: Array[str], additional_type: Array[str] | None=None, context: LDContext | None=None) -> None:
316
+ super().__init__()
317
+ this: FSharpRef[LDNode] = FSharpRef(None)
318
+ self.id: str = id
319
+ this.contents = self
320
+ self.schema_type_0040178: Array[str] = schema_type
321
+ self.additional_type_0040179: Array[str] = default_arg(additional_type, [])
322
+ self.init_0040175_002D1: int = 1
323
+ if context is None:
324
+ pass
325
+
326
+ else:
327
+ ctx: LDContext = context
328
+ this.contents.SetContext(ctx)
329
+
330
+
331
+ @property
332
+ def Id(self, __unit: None=None) -> str:
333
+ this: LDNode = self
334
+ return this.id
335
+
336
+ @property
337
+ def SchemaType(self, __unit: None=None) -> Array[str]:
338
+ this: LDNode = self
339
+ return this.schema_type_0040178
340
+
341
+ @SchemaType.setter
342
+ def SchemaType(self, value: Array[str]) -> None:
343
+ this: LDNode = self
344
+ this.schema_type_0040178 = value
345
+
346
+ @property
347
+ def AdditionalType(self, __unit: None=None) -> Array[str]:
348
+ this: LDNode = self
349
+ return this.additional_type_0040179
350
+
351
+ @AdditionalType.setter
352
+ def AdditionalType(self, value: Array[str]) -> None:
353
+ this: LDNode = self
354
+ this.additional_type_0040179 = value
355
+
356
+ def HasType(self, schema_type: str, context: LDContext | None=None) -> bool:
357
+ this: LDNode = self
358
+ context_1: LDContext | None
359
+ specific_context: LDContext | None = this.TryGetContext()
360
+ context_1 = LDContext.try_combine_optional(context, specific_context)
361
+ def predicate(st: str) -> bool:
362
+ if st == schema_type:
363
+ return True
364
+
365
+ elif context_1 is None:
366
+ return False
367
+
368
+ else:
369
+ ctx: LDContext = context_1
370
+ match_value: str | None = ctx.TryResolveTerm(st)
371
+ match_value_1: str | None = ctx.TryResolveTerm(schema_type)
372
+ if match_value is None:
373
+ if match_value_1 is not None:
374
+ schema_type_2: str = match_value_1
375
+ return st == schema_type_2
376
+
377
+ else:
378
+ return False
379
+
380
+
381
+ elif match_value_1 is None:
382
+ st_2: str = match_value
383
+ return st_2 == schema_type
384
+
385
+ else:
386
+ schema_type_1: str = match_value_1
387
+ st_1: str = match_value
388
+ return st_1 == schema_type_1
389
+
390
+
391
+
392
+ return exists(predicate, this.SchemaType)
393
+
394
+ def TryGetProperty(self, property_name: str, context: LDContext | None=None) -> Any | None:
395
+ this: LDNode = self
396
+ match_value: Any | None = this.TryGetPropertyValue(property_name)
397
+ if match_value is None:
398
+ match_value_1: LDContext | None
399
+ specific_context: LDContext | None = this.TryGetContext()
400
+ match_value_1 = LDContext.try_combine_optional(context, specific_context)
401
+ if match_value_1 is None:
402
+ return None
403
+
404
+ else:
405
+ ctx: LDContext = match_value_1
406
+ match_value_2: str | None = ctx.TryResolveTerm(property_name)
407
+ if match_value_2 is None:
408
+ match_value_3: str | None = ctx.TryGetTerm(property_name)
409
+ if match_value_3 is None:
410
+ return None
411
+
412
+ else:
413
+ term_1: str = match_value_3
414
+ return this.TryGetPropertyValue(term_1)
415
+
416
+
417
+ else:
418
+ term: str = match_value_2
419
+ return this.TryGetPropertyValue(term)
420
+
421
+
422
+
423
+ else:
424
+ return some(value_3(match_value))
425
+
426
+
427
+ def TryGetPropertyAsSingleton(self, property_name: str, context: LDContext | None=None) -> Any | None:
428
+ this: LDNode = self
429
+ match_value: Any | None = this.TryGetProperty(property_name, context)
430
+ if match_value is not None:
431
+ if str(type(value_3(match_value))) == "<class \'str\'>":
432
+ s: str = value_3(match_value)
433
+ return some(s)
434
+
435
+ elif is_iterable(value_3(match_value)):
436
+ e: IEnumerable[Any] = value_3(match_value)
437
+ en: IEnumerator[Any] = get_enumerator(e)
438
+ return some(en.System_Collections_IEnumerator_get_Current()) if en.System_Collections_IEnumerator_MoveNext() else None
439
+
440
+ else:
441
+ o: Any = value_3(match_value)
442
+ return some(o)
443
+
444
+
445
+ else:
446
+ return None
447
+
448
+
449
+ def GetPropertyValues(self, property_name: str, filter: Callable[[Any, LDContext | None], bool] | None=None, context: LDContext | None=None) -> Array[Any]:
450
+ this: LDNode = self
451
+ def _arrow1450(_arg: Any=None) -> Callable[[LDContext | None], bool]:
452
+ def _arrow1449(_arg_1: LDContext | None=None) -> bool:
453
+ return True
454
+
455
+ return _arrow1449
456
+
457
+ filter_1: Callable[[Any, LDContext | None], bool] = default_arg(map(curry2, filter), _arrow1450)
458
+ match_value: Any | None = this.TryGetProperty(property_name, context)
459
+ (pattern_matching_result, s, e, o_1) = (None, None, None, None)
460
+ if match_value is not None:
461
+ if str(type(value_3(match_value))) == "<class \'str\'>":
462
+ pattern_matching_result = 0
463
+ s = value_3(match_value)
464
+
465
+ elif is_iterable(value_3(match_value)):
466
+ pattern_matching_result = 1
467
+ e = value_3(match_value)
468
+
469
+ elif filter_1(value_3(match_value))(context):
470
+ pattern_matching_result = 2
471
+ o_1 = value_3(match_value)
472
+
473
+ else:
474
+ pattern_matching_result = 3
475
+
476
+
477
+ else:
478
+ pattern_matching_result = 3
479
+
480
+ if pattern_matching_result == 0:
481
+ return [s] if filter_1(s)(context) else []
482
+
483
+ elif pattern_matching_result == 1:
484
+ en: IEnumerator[Any] = get_enumerator(e)
485
+ def _arrow1453(__unit: None=None) -> IEnumerable_1[Any]:
486
+ def _arrow1451(__unit: None=None) -> bool:
487
+ return en.System_Collections_IEnumerator_MoveNext()
488
+
489
+ def _arrow1452(__unit: None=None) -> IEnumerable_1[Any]:
490
+ return singleton_2(en.System_Collections_IEnumerator_get_Current()) if filter_1(en.System_Collections_IEnumerator_get_Current())(context) else empty()
491
+
492
+ return enumerate_while(_arrow1451, delay(_arrow1452))
493
+
494
+ return list(to_list(delay(_arrow1453)))
495
+
496
+ elif pattern_matching_result == 2:
497
+ return [o_1]
498
+
499
+ elif pattern_matching_result == 3:
500
+ return []
501
+
502
+
503
+ def TryGetPropertyAsSingleNode(self, property_name: str, graph: LDGraph | None=None, context: LDContext | None=None) -> LDNode | None:
504
+ this: LDNode = self
505
+ match_value: Any | None = this.TryGetPropertyAsSingleton(property_name, context)
506
+ (pattern_matching_result, n, r_1) = (None, None, None)
507
+ if match_value is not None:
508
+ if isinstance(value_3(match_value), LDNode):
509
+ pattern_matching_result = 0
510
+ n = value_3(match_value)
511
+
512
+ elif isinstance(value_3(match_value), LDRef):
513
+ def _arrow1454(__unit: None=None) -> bool:
514
+ r: LDRef = value_3(match_value)
515
+ return graph is not None
516
+
517
+ if _arrow1454():
518
+ pattern_matching_result = 1
519
+ r_1 = value_3(match_value)
520
+
521
+ else:
522
+ pattern_matching_result = 2
523
+
524
+
525
+ else:
526
+ pattern_matching_result = 2
527
+
528
+
529
+ else:
530
+ pattern_matching_result = 2
531
+
532
+ if pattern_matching_result == 0:
533
+ return n
534
+
535
+ elif pattern_matching_result == 1:
536
+ match_value_1: LDNode | None = value_3(graph).TryGetNode(r_1.Id)
537
+ return None if (match_value_1 is None) else match_value_1
538
+
539
+ elif pattern_matching_result == 2:
540
+ return None
541
+
542
+
543
+ def GetPropertyNodes(self, property_name: str, filter: Callable[[LDNode, LDContext | None], bool] | None=None, graph: LDGraph | None=None, context: LDContext | None=None) -> Array[LDNode]:
544
+ this: LDNode = self
545
+ context_1: LDContext | None
546
+ specific_context: LDContext | None = this.TryGetContext()
547
+ context_1 = LDContext.try_combine_optional(context, specific_context)
548
+ def chooser(o: Any=None) -> LDNode | None:
549
+ (pattern_matching_result,) = (None,)
550
+ if isinstance(o, LDRef):
551
+ if graph is not None:
552
+ pattern_matching_result = 0
553
+
554
+ else:
555
+ pattern_matching_result = 2
556
+
557
+
558
+ elif isinstance(o, LDNode):
559
+ pattern_matching_result = 1
560
+
561
+ else:
562
+ pattern_matching_result = 2
563
+
564
+ if pattern_matching_result == 0:
565
+ match_value: LDNode | None = value_3(graph).TryGetNode(o.Id)
566
+ if match_value is None:
567
+ return None
568
+
569
+ else:
570
+ n: LDNode = match_value
571
+ if filter is None:
572
+ return n
573
+
574
+ elif filter(n, context_1):
575
+ def _arrow1455(f: Callable[[LDNode, LDContext | None], bool], o: Any=o) -> Callable[[LDNode, LDContext | None], bool]:
576
+ return curry2(f)
577
+
578
+ f_1: Callable[[LDNode, LDContext | None], bool] = map(_arrow1455, filter)
579
+ return n
580
+
581
+ else:
582
+ return None
583
+
584
+
585
+
586
+ elif pattern_matching_result == 1:
587
+ n_1: LDNode = o
588
+ if filter is None:
589
+ return n_1
590
+
591
+ elif filter(n_1, context_1):
592
+ def _arrow1456(f: Callable[[LDNode, LDContext | None], bool], o: Any=o) -> Callable[[LDNode, LDContext | None], bool]:
593
+ return curry2(f)
594
+
595
+ f_3: Callable[[LDNode, LDContext | None], bool] = map(_arrow1456, filter)
596
+ return n_1
597
+
598
+ else:
599
+ return None
600
+
601
+
602
+ elif pattern_matching_result == 2:
603
+ return None
604
+
605
+
606
+ return list(choose(chooser, this.GetPropertyValues(property_name, None, context_1)))
607
+
608
+ def GetDynamicPropertyHelpers(self, __unit: None=None) -> IEnumerable_1[PropertyHelper]:
609
+ this: LDNode = self
610
+ def predicate(ph: PropertyHelper) -> bool:
611
+ return not (True if starts_with_exact(ph.Name, "init_") else (ph.Name == "id"))
612
+
613
+ return filter_2(predicate, this.GetPropertyHelpers(False))
614
+
615
+ def GetPropertyNames(self, context: LDContext | None=None) -> IEnumerable_1[str]:
616
+ this: LDNode = self
617
+ context_1: LDContext | None
618
+ specific_context: LDContext | None = this.TryGetContext()
619
+ context_1 = LDContext.try_combine_optional(context, specific_context)
620
+ def chooser(ph: PropertyHelper) -> str | None:
621
+ name: str
622
+ if context_1 is None:
623
+ name = ph.Name
624
+
625
+ else:
626
+ ctx: LDContext = context_1
627
+ match_value: str | None = ctx.TryResolveTerm(ph.Name)
628
+ name = ph.Name if (match_value is None) else match_value
629
+
630
+ if name == "@context":
631
+ return None
632
+
633
+ else:
634
+ return name
635
+
636
+
637
+ return choose(chooser, this.GetDynamicPropertyHelpers())
638
+
639
+ def SetProperty(self, property_name: str, value: Any=None, context: LDContext | None=None) -> Any:
640
+ this: LDNode = self
641
+ context_1: LDContext | None
642
+ specific_context: LDContext | None = this.TryGetContext()
643
+ context_1 = LDContext.try_combine_optional(context, specific_context)
644
+ def predicate(pn: str) -> bool:
645
+ if context_1 is None:
646
+ return pn == property_name
647
+
648
+ else:
649
+ c: LDContext = context_1
650
+ return c.PropertyNamesMatch(pn, property_name)
651
+
652
+
653
+ property_name_1: str = default_arg(try_find(predicate, this.GetPropertyNames()), property_name)
654
+ super().SetProperty(property_name_1,value)
655
+
656
+ def SetOptionalProperty(self, property_name: str, value: Any | None=None, context: LDContext | None=None) -> None:
657
+ this: LDNode = self
658
+ if value is None:
659
+ pass
660
+
661
+ else:
662
+ v: __D = value_3(value)
663
+ this.SetProperty(property_name, v, context)
664
+
665
+
666
+ def HasProperty(self, property_name: str, context: LDContext | None=None) -> bool:
667
+ this: LDNode = self
668
+ v: Any | None = this.TryGetProperty(property_name, context)
669
+ def _arrow1457(__unit: None=None) -> bool:
670
+ v_2: Any = value_3(v)
671
+ return False
672
+
673
+ def _arrow1458(__unit: None=None) -> bool:
674
+ e: IEnumerable[Any] = value_3(v)
675
+ return get_enumerator(e).System_Collections_IEnumerator_MoveNext()
676
+
677
+ return (_arrow1457() if equals(value_3(v), None) else (_arrow1458() if is_iterable(value_3(v)) else True)) if (v is not None) else False
678
+
679
+ def SetContext(self, context: LDContext) -> None:
680
+ this: LDNode = self
681
+ this.SetProperty("@context", context)
682
+
683
+ @staticmethod
684
+ def set_context(context: LDContext) -> Callable[[__C], None]:
685
+ def _arrow1459(roc: __C | None=None) -> None:
686
+ roc.SetContext(context)
687
+
688
+ return _arrow1459
689
+
690
+ def TryGetContext(self, __unit: None=None) -> LDContext | None:
691
+ this: LDNode = self
692
+ match_value: Any | None = this.TryGetPropertyValue("@context")
693
+ if match_value is not None:
694
+ o: Any = value_3(match_value)
695
+ return o if isinstance(o, LDContext) else None
696
+
697
+ else:
698
+ return None
699
+
700
+
701
+ @staticmethod
702
+ def try_get_context(__unit: None=None) -> Callable[[__B], LDContext | None]:
703
+ def _arrow1460(roc: __B | None=None) -> LDContext | None:
704
+ return roc.TryGetContext()
705
+
706
+ return _arrow1460
707
+
708
+ def RemoveContext(self, __unit: None=None) -> bool:
709
+ this: LDNode = self
710
+ return this.RemoveProperty("@context")
711
+
712
+ def MergeAppendInto_InPlace(self, other: LDNode, flatten_to: LDGraph | None=None) -> None:
713
+ this: LDNode = self
714
+ flatten_to_singleton: Callable[[Any], Any]
715
+ if flatten_to is None:
716
+ def _arrow1461(x: Any=None) -> Any:
717
+ return x
718
+
719
+ flatten_to_singleton = _arrow1461
720
+
721
+ else:
722
+ graph: LDGraph = flatten_to
723
+ def f(o: Any=None) -> Any:
724
+ if isinstance(o, LDNode):
725
+ ignore(o.Flatten(graph))
726
+ return LDRef(o.Id)
727
+
728
+ else:
729
+ return o
730
+
731
+
732
+ flatten_to_singleton = f
733
+
734
+ flatten_to_ra: Callable[[Array[Any]], Array[Any]]
735
+ if flatten_to is None:
736
+ def _arrow1462(x_1: Array[Any]) -> Array[Any]:
737
+ return x_1
738
+
739
+ flatten_to_ra = _arrow1462
740
+
741
+ else:
742
+ graph_1: LDGraph = flatten_to
743
+ def _arrow1463(a: Array[Any]) -> Array[Any]:
744
+ return ResizeArray_map(flatten_to_singleton, a)
745
+
746
+ flatten_to_ra = _arrow1463
747
+
748
+ flatten_to_any: Callable[[Any], Any]
749
+ if flatten_to is None:
750
+ def _arrow1464(x_2: Any=None) -> Any:
751
+ return x_2
752
+
753
+ flatten_to_any = _arrow1464
754
+
755
+ else:
756
+ graph_2: LDGraph = flatten_to
757
+ def f_2(o_1: Any=None) -> Any:
758
+ if isinstance(o_1, LDNode):
759
+ ignore(o_1.Flatten(graph_2))
760
+ return LDRef(o_1.Id)
761
+
762
+ else:
763
+ active_pattern_result: IEnumerable[Any] | None = ActivePattern__007CNonStringEnumerable_007C__007C(o_1)
764
+ if active_pattern_result is not None:
765
+ e: IEnumerable[Any] = active_pattern_result
766
+ def _arrow1468(__unit: None=None, o_1: Any=o_1) -> IEnumerable_1[Any]:
767
+ def _arrow1465(__unit: None=None) -> IEnumerator[Any]:
768
+ return get_enumerator(e)
769
+
770
+ def _arrow1466(enumerator: IEnumerator[Any]) -> bool:
771
+ return enumerator.System_Collections_IEnumerator_MoveNext()
772
+
773
+ def _arrow1467(enumerator_1: IEnumerator[Any]) -> Any:
774
+ return enumerator_1.System_Collections_IEnumerator_get_Current()
775
+
776
+ return map_1(f_2, enumerate_from_functions(_arrow1465, _arrow1466, _arrow1467))
777
+
778
+ return list(to_list(delay(_arrow1468)))
779
+
780
+ else:
781
+ return o_1
782
+
783
+
784
+
785
+ flatten_to_any = f_2
786
+
787
+ def to_equalitor(o_2: Any=None) -> Any:
788
+ if isinstance(o_2, LDNode):
789
+ return o_2.Id
790
+
791
+ elif isinstance(o_2, LDRef):
792
+ return o_2.Id
793
+
794
+ else:
795
+ return o_2
796
+
797
+
798
+ def action(pn: str) -> None:
799
+ match_value: Any | None = other.TryGetProperty(pn)
800
+ if match_value is None:
801
+ v_3: Any = flatten_to_any(value_3(this.TryGetProperty(pn)))
802
+ other.SetProperty(pn, v_3)
803
+
804
+ else:
805
+ other_val: Any = value_3(match_value)
806
+ this_val: Any = value_3(this.TryGetProperty(pn))
807
+ (pattern_matching_result, e1, e2) = (None, None, None)
808
+ active_pattern_result_1: IEnumerable[Any] | None = ActivePattern__007CNonStringEnumerable_007C__007C(this_val)
809
+ if active_pattern_result_1 is not None:
810
+ active_pattern_result_2: IEnumerable[Any] | None = ActivePattern__007CNonStringEnumerable_007C__007C(other_val)
811
+ if active_pattern_result_2 is not None:
812
+ pattern_matching_result = 0
813
+ e1 = active_pattern_result_1
814
+ e2 = active_pattern_result_2
815
+
816
+ else:
817
+ pattern_matching_result = 1
818
+
819
+
820
+ else:
821
+ pattern_matching_result = 1
822
+
823
+ if pattern_matching_result == 0:
824
+ def _arrow1478(__unit: None=None, pn: Any=pn) -> IEnumerable_1[Any]:
825
+ def _arrow1469(v_1: Any=None) -> Any:
826
+ return v_1
827
+
828
+ def _arrow1470(__unit: None=None) -> IEnumerator[Any]:
829
+ return get_enumerator(e2)
830
+
831
+ def _arrow1471(enumerator_2: IEnumerator[Any]) -> bool:
832
+ return enumerator_2.System_Collections_IEnumerator_MoveNext()
833
+
834
+ def _arrow1472(enumerator_3: IEnumerator[Any]) -> Any:
835
+ return enumerator_3.System_Collections_IEnumerator_get_Current()
836
+
837
+ def _arrow1477(__unit: None=None) -> IEnumerable_1[Any]:
838
+ def _arrow1473(v_2: Any=None) -> Any:
839
+ return v_2
840
+
841
+ def _arrow1474(__unit: None=None) -> IEnumerator[Any]:
842
+ return get_enumerator(e1)
843
+
844
+ def _arrow1475(enumerator_4: IEnumerator[Any]) -> bool:
845
+ return enumerator_4.System_Collections_IEnumerator_MoveNext()
846
+
847
+ def _arrow1476(enumerator_5: IEnumerator[Any]) -> Any:
848
+ return enumerator_5.System_Collections_IEnumerator_get_Current()
849
+
850
+ return map_1(_arrow1473, enumerate_from_functions(_arrow1474, _arrow1475, _arrow1476))
851
+
852
+ return append(map_1(_arrow1469, enumerate_from_functions(_arrow1470, _arrow1471, _arrow1472)), delay(_arrow1477))
853
+
854
+ class ObjectExpr1479:
855
+ @property
856
+ def Equals(self) -> Callable[[Any, Any], bool]:
857
+ return equals
858
+
859
+ @property
860
+ def GetHashCode(self) -> Callable[[Any], int]:
861
+ return structural_hash
862
+
863
+ l: Array[Any] = flatten_to_ra(list(List_distinctBy(to_equalitor, to_list(delay(_arrow1478)), ObjectExpr1479())))
864
+ other.SetProperty(pn, l)
865
+
866
+ elif pattern_matching_result == 1:
867
+ active_pattern_result_3: IEnumerable[Any] | None = ActivePattern__007CNonStringEnumerable_007C__007C(this_val)
868
+ if active_pattern_result_3 is not None:
869
+ these_vals: IEnumerable[Any] = active_pattern_result_3
870
+ is_contained: bool = False
871
+ def _arrow1484(__unit: None=None, pn: Any=pn) -> IEnumerable_1[Any]:
872
+ def _arrow1480(this_val_1: Any=None) -> IEnumerable_1[Any]:
873
+ nonlocal is_contained
874
+ if equals(to_equalitor(this_val_1), to_equalitor(other_val)):
875
+ is_contained = True
876
+ return singleton_2(flatten_to_singleton(this_val_1))
877
+
878
+ else:
879
+ return singleton_2(this_val_1)
880
+
881
+
882
+ def _arrow1481(__unit: None=None) -> IEnumerator[Any]:
883
+ return get_enumerator(these_vals)
884
+
885
+ def _arrow1482(enumerator_6: IEnumerator[Any]) -> bool:
886
+ return enumerator_6.System_Collections_IEnumerator_MoveNext()
887
+
888
+ def _arrow1483(enumerator_7: IEnumerator[Any]) -> Any:
889
+ return enumerator_7.System_Collections_IEnumerator_get_Current()
890
+
891
+ return collect(_arrow1480, enumerate_from_functions(_arrow1481, _arrow1482, _arrow1483))
892
+
893
+ l_1: Array[Any] = list(to_list(delay(_arrow1484)))
894
+ if not is_contained:
895
+ (l_1.append(other_val))
896
+ other.SetProperty(pn, l_1)
897
+
898
+
899
+ else:
900
+ active_pattern_result_4: IEnumerable[Any] | None = ActivePattern__007CNonStringEnumerable_007C__007C(other_val)
901
+ if active_pattern_result_4 is not None:
902
+ other_vals: IEnumerable[Any] = active_pattern_result_4
903
+ is_contained_1: bool = False
904
+ def _arrow1491(__unit: None=None, pn: Any=pn) -> IEnumerable_1[Any]:
905
+ def _arrow1487(other_val_2: Any=None) -> IEnumerable_1[Any]:
906
+ def _expr1485():
907
+ nonlocal is_contained_1
908
+ is_contained_1 = True
909
+ return empty()
910
+
911
+ def _arrow1486(__unit: None=None) -> IEnumerable_1[Any]:
912
+ return singleton_2(other_val_2)
913
+
914
+ return append(_expr1485() if equals(to_equalitor(this_val), to_equalitor(other_val_2)) else empty(), delay(_arrow1486))
915
+
916
+ def _arrow1488(__unit: None=None) -> IEnumerator[Any]:
917
+ return get_enumerator(other_vals)
918
+
919
+ def _arrow1489(enumerator_8: IEnumerator[Any]) -> bool:
920
+ return enumerator_8.System_Collections_IEnumerator_MoveNext()
921
+
922
+ def _arrow1490(enumerator_9: IEnumerator[Any]) -> Any:
923
+ return enumerator_9.System_Collections_IEnumerator_get_Current()
924
+
925
+ return collect(_arrow1487, enumerate_from_functions(_arrow1488, _arrow1489, _arrow1490))
926
+
927
+ l_2: Array[Any] = list(to_list(delay(_arrow1491)))
928
+ if not is_contained_1:
929
+ (l_2.append(flatten_to_singleton(this_val)))
930
+ other.SetProperty(pn, l_2)
931
+
932
+
933
+ elif equals(to_equalitor(this_val), to_equalitor(other_val)):
934
+ pass
935
+
936
+ else:
937
+ l_3: Array[Any] = [flatten_to_singleton(this_val), other_val]
938
+ other.SetProperty(pn, l_3)
939
+
940
+
941
+
942
+
943
+
944
+ iterate(action, this.GetPropertyNames())
945
+
946
+ def Compact_InPlace(self, context: LDContext | None=None, set_context: bool | None=None) -> None:
947
+ this: LDNode = self
948
+ set_context_1: bool = default_arg(set_context, False)
949
+ context_1: LDContext | None
950
+ specific_context: LDContext | None = this.TryGetContext()
951
+ context_1 = LDContext.try_combine_optional(context, specific_context)
952
+ if context_1 is not None:
953
+ context_2: LDContext = value_3(context_1)
954
+ if set_context_1:
955
+ this.SetContext(context_2)
956
+
957
+ def _arrow1493(__unit: None=None) -> IEnumerable_1[str]:
958
+ def _arrow1492(st: str) -> IEnumerable_1[str]:
959
+ match_value: str | None = context_2.TryGetTerm(st)
960
+ return singleton_2(st) if (match_value is None) else singleton_2(match_value)
961
+
962
+ return collect(_arrow1492, this.SchemaType)
963
+
964
+ new_types: Array[str] = list(to_list(delay(_arrow1493)))
965
+ this.SchemaType = new_types
966
+
967
+ def compact_value_in_place(o: Any=None) -> Any:
968
+ (pattern_matching_result, n, s, e, v, x) = (None, None, None, None, None, None)
969
+ if isinstance(o, LDNode):
970
+ pattern_matching_result = 0
971
+ n = o
972
+
973
+ elif str(type(o)) == "<class \'str\'>":
974
+ pattern_matching_result = 1
975
+ s = o
976
+
977
+ elif isinstance(o, LDValue):
978
+ if is_iterable(o):
979
+ pattern_matching_result = 2
980
+ e = o
981
+
982
+ else:
983
+ pattern_matching_result = 3
984
+ v = o
985
+
986
+
987
+ elif is_iterable(o):
988
+ pattern_matching_result = 2
989
+ e = o
990
+
991
+ else:
992
+ pattern_matching_result = 4
993
+ x = o
994
+
995
+ if pattern_matching_result == 0:
996
+ n.Compact_InPlace(context_1)
997
+ return n
998
+
999
+ elif pattern_matching_result == 1:
1000
+ return s
1001
+
1002
+ elif pattern_matching_result == 2:
1003
+ en: IEnumerator[Any] = get_enumerator(e)
1004
+ def _arrow1496(__unit: None=None, o: Any=o) -> IEnumerable_1[Any]:
1005
+ def _arrow1494(__unit: None=None) -> bool:
1006
+ return en.System_Collections_IEnumerator_MoveNext()
1007
+
1008
+ def _arrow1495(__unit: None=None) -> IEnumerable_1[Any]:
1009
+ return singleton_2(compact_value_in_place(en.System_Collections_IEnumerator_get_Current()))
1010
+
1011
+ return enumerate_while(_arrow1494, delay(_arrow1495))
1012
+
1013
+ l: Array[Any] = list(to_list(delay(_arrow1496)))
1014
+ if len(l) == 1:
1015
+ return l[0]
1016
+
1017
+ else:
1018
+ return l
1019
+
1020
+
1021
+ elif pattern_matching_result == 3:
1022
+ return v.Value
1023
+
1024
+ elif pattern_matching_result == 4:
1025
+ return x
1026
+
1027
+
1028
+ def action(ph: PropertyHelper) -> None:
1029
+ new_key: str | None
1030
+ if context_1 is None:
1031
+ new_key = None
1032
+
1033
+ else:
1034
+ ctx: LDContext = context_1
1035
+ match_value_1: str | None = ctx.TryGetTerm(ph.Name)
1036
+ new_key = None if (match_value_1 is None) else match_value_1
1037
+
1038
+ new_value: Any = compact_value_in_place(ph.GetValue(this))
1039
+ (pattern_matching_result_1, key_1) = (None, None)
1040
+ if new_key is not None:
1041
+ if new_key != ph.Name:
1042
+ pattern_matching_result_1 = 0
1043
+ key_1 = new_key
1044
+
1045
+ else:
1046
+ pattern_matching_result_1 = 1
1047
+
1048
+
1049
+ else:
1050
+ pattern_matching_result_1 = 1
1051
+
1052
+ if pattern_matching_result_1 == 0:
1053
+ ignore(this.RemoveProperty(ph.Name))
1054
+ this.SetProperty(key_1, new_value)
1055
+
1056
+ elif pattern_matching_result_1 == 1:
1057
+ ph.SetValue(this, new_value)
1058
+
1059
+
1060
+ iterate(action, this.GetDynamicPropertyHelpers())
1061
+
1062
+ def Flatten(self, graph: LDGraph | None=None) -> LDGraph:
1063
+ this: LDNode = self
1064
+ graph_1: LDGraph = LDGraph(None, None, this.TryGetContext()) if (graph is None) else graph
1065
+ def flatten_value(o: Any=None) -> Any:
1066
+ if isinstance(o, LDNode):
1067
+ ignore(o.Flatten(graph_1))
1068
+ return LDRef(o.Id)
1069
+
1070
+ elif str(type(o)) == "<class \'str\'>":
1071
+ return o
1072
+
1073
+ elif is_iterable(o):
1074
+ en: IEnumerator[Any] = get_enumerator(o)
1075
+ def _arrow1499(__unit: None=None, o: Any=o) -> IEnumerable_1[Any]:
1076
+ def _arrow1497(__unit: None=None) -> bool:
1077
+ return en.System_Collections_IEnumerator_MoveNext()
1078
+
1079
+ def _arrow1498(__unit: None=None) -> IEnumerable_1[Any]:
1080
+ return singleton_2(flatten_value(en.System_Collections_IEnumerator_get_Current()))
1081
+
1082
+ return enumerate_while(_arrow1497, delay(_arrow1498))
1083
+
1084
+ return list(to_list(delay(_arrow1499)))
1085
+
1086
+ else:
1087
+ return o
1088
+
1089
+
1090
+ def action(ph: PropertyHelper) -> None:
1091
+ ph.SetValue(this, flatten_value(ph.GetValue(this)))
1092
+
1093
+ iterate(action, this.GetDynamicPropertyHelpers())
1094
+ graph_1.AddNode(this)
1095
+ return graph_1
1096
+
1097
+ def Unflatten(self, graph: LDGraph) -> None:
1098
+ this: LDNode = self
1099
+ def unflatten_value(o: Any=None) -> Any:
1100
+ if isinstance(o, LDRef):
1101
+ match_value: LDNode | None = graph.TryGetNode(o.Id)
1102
+ if match_value is None:
1103
+ return o
1104
+
1105
+ else:
1106
+ return match_value
1107
+
1108
+
1109
+ elif isinstance(o, LDNode):
1110
+ o.Unflatten(graph)
1111
+ return o
1112
+
1113
+ elif is_iterable(o):
1114
+ en: IEnumerator[Any] = get_enumerator(o)
1115
+ def _arrow1502(__unit: None=None, o: Any=o) -> IEnumerable_1[Any]:
1116
+ def _arrow1500(__unit: None=None) -> bool:
1117
+ return en.System_Collections_IEnumerator_MoveNext()
1118
+
1119
+ def _arrow1501(__unit: None=None) -> IEnumerable_1[Any]:
1120
+ return singleton_2(unflatten_value(en.System_Collections_IEnumerator_get_Current()))
1121
+
1122
+ return enumerate_while(_arrow1500, delay(_arrow1501))
1123
+
1124
+ return list(to_list(delay(_arrow1502)))
1125
+
1126
+ else:
1127
+ return o
1128
+
1129
+
1130
+ def action(ph: PropertyHelper) -> None:
1131
+ ph.SetValue(this, unflatten_value(ph.GetValue(this)))
1132
+
1133
+ iterate(action, this.GetDynamicPropertyHelpers())
1134
+
1135
+ @staticmethod
1136
+ def remove_context(__unit: None=None) -> Callable[[__A], bool]:
1137
+ def _arrow1503(roc: __A | None=None) -> bool:
1138
+ return roc.RemoveContext()
1139
+
1140
+ return _arrow1503
1141
+
1142
+ @staticmethod
1143
+ def try_from_dynamic_obj(dyn_obj: DynamicObj) -> LDNode | None:
1144
+ original_id: str | None
1145
+ match_value: Any | None = dyn_obj.TryGetPropertyValue("@id")
1146
+ if match_value is not None:
1147
+ o: Any = value_3(match_value)
1148
+ original_id = o if (str(type(o)) == "<class \'str\'>") else None
1149
+
1150
+ else:
1151
+ original_id = None
1152
+
1153
+ original_type: Array[str] | None
1154
+ match_value_1: Any | None = dyn_obj.TryGetPropertyValue("@type")
1155
+ (pattern_matching_result, ra, singleton) = (None, None, None)
1156
+ if match_value_1 is not None:
1157
+ if is_array_like(value_3(match_value_1)):
1158
+ pattern_matching_result = 0
1159
+ ra = value_3(match_value_1)
1160
+
1161
+ elif str(type(value_3(match_value_1))) == "<class \'str\'>":
1162
+ pattern_matching_result = 1
1163
+ singleton = value_3(match_value_1)
1164
+
1165
+ else:
1166
+ pattern_matching_result = 2
1167
+
1168
+
1169
+ else:
1170
+ pattern_matching_result = 2
1171
+
1172
+ if pattern_matching_result == 0:
1173
+ original_type = ra
1174
+
1175
+ elif pattern_matching_result == 1:
1176
+ original_type = [singleton]
1177
+
1178
+ elif pattern_matching_result == 2:
1179
+ original_type = None
1180
+
1181
+ (pattern_matching_result_1, id, st) = (None, None, None)
1182
+ if original_id is not None:
1183
+ if original_type is not None:
1184
+ pattern_matching_result_1 = 0
1185
+ id = original_id
1186
+ st = original_type
1187
+
1188
+ else:
1189
+ pattern_matching_result_1 = 1
1190
+
1191
+
1192
+ else:
1193
+ pattern_matching_result_1 = 1
1194
+
1195
+ if pattern_matching_result_1 == 0:
1196
+ def _arrow1504(__unit: None=None) -> Array[str] | None:
1197
+ match_value_3: Any | None = dyn_obj.TryGetPropertyValue("additionalType")
1198
+ (pattern_matching_result_2, ra_1, singleton_1) = (None, None, None)
1199
+ if match_value_3 is not None:
1200
+ if is_array_like(value_3(match_value_3)):
1201
+ pattern_matching_result_2 = 0
1202
+ ra_1 = value_3(match_value_3)
1203
+
1204
+ elif str(type(value_3(match_value_3))) == "<class \'str\'>":
1205
+ pattern_matching_result_2 = 1
1206
+ singleton_1 = value_3(match_value_3)
1207
+
1208
+ else:
1209
+ pattern_matching_result_2 = 2
1210
+
1211
+
1212
+ else:
1213
+ pattern_matching_result_2 = 2
1214
+
1215
+ if pattern_matching_result_2 == 0:
1216
+ return ra_1
1217
+
1218
+ elif pattern_matching_result_2 == 1:
1219
+ return [singleton_1]
1220
+
1221
+ elif pattern_matching_result_2 == 2:
1222
+ return None
1223
+
1224
+
1225
+ roc: LDNode = LDNode(id, st, _arrow1504())
1226
+ dyn_obj.DeepCopyPropertiesTo(roc, None, False)
1227
+ def action(ph: PropertyHelper) -> None:
1228
+ if (True if (True if (ph.Name == "@id") else (ph.Name == "@type")) else (ph.Name == "additionalType")) if ph.IsDynamic else False:
1229
+ ph.RemoveValue(roc)
1230
+
1231
+
1232
+ iterate(action, roc.GetDynamicPropertyHelpers())
1233
+ return roc
1234
+
1235
+ elif pattern_matching_result_1 == 1:
1236
+ return None
1237
+
1238
+
1239
+
1240
+ LDNode_reflection = _expr1505
1241
+
1242
+ def LDNode__ctor_479BCDCF(id: str, schema_type: Array[str], additional_type: Array[str] | None=None, context: LDContext | None=None) -> LDNode:
1243
+ return LDNode(id, schema_type, additional_type, context)
1244
+
1245
+
1246
+ __all__ = ["ActivePattern__007CNonStringEnumerable_007C__007C", "DynamicObj_DynamicObj__DynamicObj_HasProperty_Z721C83C5", "LDValue_reflection", "LDRef_reflection", "LDGraph_reflection", "LDNode_reflection"]
1247
+