arctrl 3.0.0__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.
- arctrl/__init__.py +23 -0
- arctrl/cwl.py +12 -0
- arctrl/py/CWL/__init__.py +0 -0
- arctrl/py/CWL/cwlprocessing_unit.py +221 -0
- arctrl/py/CWL/cwltypes.py +364 -0
- arctrl/py/CWL/decode.py +3532 -0
- arctrl/py/CWL/encode.py +1905 -0
- arctrl/py/CWL/expression_tool_description.py +192 -0
- arctrl/py/CWL/hash_helpers.py +60 -0
- arctrl/py/CWL/inputs.py +122 -0
- arctrl/py/CWL/operation_description.py +169 -0
- arctrl/py/CWL/outputs.py +171 -0
- arctrl/py/CWL/parameter_reference.py +74 -0
- arctrl/py/CWL/requirements.py +350 -0
- arctrl/py/CWL/tool_description.py +192 -0
- arctrl/py/CWL/workflow_description.py +181 -0
- arctrl/py/CWL/workflow_steps.py +354 -0
- arctrl/py/Contract/__init__.py +0 -0
- arctrl/py/Contract/arc.py +89 -0
- arctrl/py/Contract/arc_assay.py +125 -0
- arctrl/py/Contract/arc_investigation.py +88 -0
- arctrl/py/Contract/arc_run.py +291 -0
- arctrl/py/Contract/arc_study.py +126 -0
- arctrl/py/Contract/arc_workflow.py +213 -0
- arctrl/py/Contract/contract.py +153 -0
- arctrl/py/Contract/datamap.py +396 -0
- arctrl/py/Contract/git.py +116 -0
- arctrl/py/Contract/license.py +58 -0
- arctrl/py/Contract/validation_packages_config.py +107 -0
- arctrl/py/ContractIO/__init__.py +0 -0
- arctrl/py/ContractIO/contract_io.py +350 -0
- arctrl/py/ContractIO/file_system_helper.py +264 -0
- arctrl/py/Conversion/__init__.py +0 -0
- arctrl/py/Conversion/assay.py +151 -0
- arctrl/py/Conversion/basic.py +559 -0
- arctrl/py/Conversion/column_index.py +91 -0
- arctrl/py/Conversion/datamap.py +36 -0
- arctrl/py/Conversion/date_time.py +32 -0
- arctrl/py/Conversion/investigation.py +171 -0
- arctrl/py/Conversion/person.py +148 -0
- arctrl/py/Conversion/process.py +828 -0
- arctrl/py/Conversion/run.py +367 -0
- arctrl/py/Conversion/scholarly_article.py +163 -0
- arctrl/py/Conversion/study.py +99 -0
- arctrl/py/Conversion/table.py +229 -0
- arctrl/py/Conversion/workflow.py +680 -0
- arctrl/py/Core/Helper/__init__.py +0 -0
- arctrl/py/Core/Helper/collections_.py +512 -0
- arctrl/py/Core/Helper/date_time.py +26 -0
- arctrl/py/Core/Helper/hash_codes.py +60 -0
- arctrl/py/Core/Helper/identifier.py +290 -0
- arctrl/py/Core/Helper/orcid.py +42 -0
- arctrl/py/Core/Helper/printer.py +13 -0
- arctrl/py/Core/Helper/regex.py +554 -0
- arctrl/py/Core/Helper/sem_ver.py +71 -0
- arctrl/py/Core/Helper/url.py +148 -0
- arctrl/py/Core/Process/__init__.py +0 -0
- arctrl/py/Core/Process/column_index.py +280 -0
- arctrl/py/Core/Process/component.py +200 -0
- arctrl/py/Core/Process/factor.py +151 -0
- arctrl/py/Core/Process/factor_value.py +182 -0
- arctrl/py/Core/Process/material.py +74 -0
- arctrl/py/Core/Process/material_attribute.py +95 -0
- arctrl/py/Core/Process/material_attribute_value.py +184 -0
- arctrl/py/Core/Process/material_type.py +45 -0
- arctrl/py/Core/Process/process.py +477 -0
- arctrl/py/Core/Process/process_input.py +265 -0
- arctrl/py/Core/Process/process_output.py +235 -0
- arctrl/py/Core/Process/process_parameter_value.py +200 -0
- arctrl/py/Core/Process/process_sequence.py +435 -0
- arctrl/py/Core/Process/protocol.py +175 -0
- arctrl/py/Core/Process/protocol_parameter.py +98 -0
- arctrl/py/Core/Process/sample.py +82 -0
- arctrl/py/Core/Process/source.py +62 -0
- arctrl/py/Core/Table/__init__.py +0 -0
- arctrl/py/Core/Table/arc_table.py +1206 -0
- arctrl/py/Core/Table/arc_table_aux.py +1308 -0
- arctrl/py/Core/Table/arc_tables.py +574 -0
- arctrl/py/Core/Table/composite_cell.py +319 -0
- arctrl/py/Core/Table/composite_column.py +73 -0
- arctrl/py/Core/Table/composite_header.py +739 -0
- arctrl/py/Core/__init__.py +0 -0
- arctrl/py/Core/arc_types.py +5312 -0
- arctrl/py/Core/comment.py +128 -0
- arctrl/py/Core/comment_list.py +127 -0
- arctrl/py/Core/conversion.py +1375 -0
- arctrl/py/Core/data.py +247 -0
- arctrl/py/Core/data_context.py +157 -0
- arctrl/py/Core/data_file.py +112 -0
- arctrl/py/Core/datamap.py +217 -0
- arctrl/py/Core/identifier_setters.py +43 -0
- arctrl/py/Core/iproperty_value.py +36 -0
- arctrl/py/Core/ontology_annotation.py +298 -0
- arctrl/py/Core/ontology_source_reference.py +114 -0
- arctrl/py/Core/person.py +259 -0
- arctrl/py/Core/publication.py +161 -0
- arctrl/py/Core/template.py +231 -0
- arctrl/py/Core/templates.py +148 -0
- arctrl/py/Core/uri.py +11 -0
- arctrl/py/Core/value.py +188 -0
- arctrl/py/FileSystem/__init__.py +0 -0
- arctrl/py/FileSystem/commit.py +21 -0
- arctrl/py/FileSystem/default_gitattributes.py +1 -0
- arctrl/py/FileSystem/default_gitignore.py +1 -0
- arctrl/py/FileSystem/default_license.py +1 -0
- arctrl/py/FileSystem/file_system.py +58 -0
- arctrl/py/FileSystem/file_system_tree.py +483 -0
- arctrl/py/FileSystem/path.py +266 -0
- arctrl/py/Json/Datamap/__init__.py +0 -0
- arctrl/py/Json/Datamap/data_context.py +101 -0
- arctrl/py/Json/Datamap/datamap.py +53 -0
- arctrl/py/Json/Process/__init__.py +0 -0
- arctrl/py/Json/Process/assay_materials.py +46 -0
- arctrl/py/Json/Process/component.py +125 -0
- arctrl/py/Json/Process/factor.py +107 -0
- arctrl/py/Json/Process/factor_value.py +101 -0
- arctrl/py/Json/Process/material.py +226 -0
- arctrl/py/Json/Process/material_attribute.py +79 -0
- arctrl/py/Json/Process/material_attribute_value.py +101 -0
- arctrl/py/Json/Process/material_type.py +53 -0
- arctrl/py/Json/Process/process.py +296 -0
- arctrl/py/Json/Process/process_input.py +83 -0
- arctrl/py/Json/Process/process_output.py +67 -0
- arctrl/py/Json/Process/process_parameter_value.py +81 -0
- arctrl/py/Json/Process/protocol.py +354 -0
- arctrl/py/Json/Process/protocol_parameter.py +91 -0
- arctrl/py/Json/Process/sample.py +277 -0
- arctrl/py/Json/Process/source.py +214 -0
- arctrl/py/Json/Process/study_materials.py +52 -0
- arctrl/py/Json/Process/value.py +56 -0
- arctrl/py/Json/ROCrate/__init__.py +0 -0
- arctrl/py/Json/ROCrate/ldcontext.py +143 -0
- arctrl/py/Json/ROCrate/ldgraph.py +117 -0
- arctrl/py/Json/ROCrate/ldnode.py +304 -0
- arctrl/py/Json/ROCrate/ldref.py +44 -0
- arctrl/py/Json/ROCrate/ldvalue.py +102 -0
- arctrl/py/Json/Table/__init__.py +0 -0
- arctrl/py/Json/Table/arc_table.py +375 -0
- arctrl/py/Json/Table/cell_table.py +83 -0
- arctrl/py/Json/Table/composite_cell.py +136 -0
- arctrl/py/Json/Table/composite_header.py +67 -0
- arctrl/py/Json/Table/iotype.py +24 -0
- arctrl/py/Json/Table/oatable.py +82 -0
- arctrl/py/Json/Table/templates.py +281 -0
- arctrl/py/Json/__init__.py +0 -0
- arctrl/py/Json/assay.py +600 -0
- arctrl/py/Json/comment.py +206 -0
- arctrl/py/Json/context/rocrate/__init__.py +0 -0
- arctrl/py/Json/context/rocrate/isa_assay_context.py +101 -0
- arctrl/py/Json/context/rocrate/isa_comment_context.py +60 -0
- arctrl/py/Json/context/rocrate/isa_component_context.py +77 -0
- arctrl/py/Json/context/rocrate/isa_data_context.py +74 -0
- arctrl/py/Json/context/rocrate/isa_factor_context.py +74 -0
- arctrl/py/Json/context/rocrate/isa_factor_value_context.py +84 -0
- arctrl/py/Json/context/rocrate/isa_investigation_context.py +110 -0
- arctrl/py/Json/context/rocrate/isa_material_attribute_context.py +64 -0
- arctrl/py/Json/context/rocrate/isa_material_attribute_value_context.py +80 -0
- arctrl/py/Json/context/rocrate/isa_material_context.py +71 -0
- arctrl/py/Json/context/rocrate/isa_ontology_annotation_context.py +68 -0
- arctrl/py/Json/context/rocrate/isa_ontology_source_reference_context.py +75 -0
- arctrl/py/Json/context/rocrate/isa_organization_context.py +55 -0
- arctrl/py/Json/context/rocrate/isa_person_context.py +131 -0
- arctrl/py/Json/context/rocrate/isa_process_context.py +94 -0
- arctrl/py/Json/context/rocrate/isa_process_parameter_value_context.py +80 -0
- arctrl/py/Json/context/rocrate/isa_protocol_context.py +97 -0
- arctrl/py/Json/context/rocrate/isa_protocol_parameter_context.py +64 -0
- arctrl/py/Json/context/rocrate/isa_publication_context.py +78 -0
- arctrl/py/Json/context/rocrate/isa_sample_context.py +65 -0
- arctrl/py/Json/context/rocrate/isa_source_context.py +66 -0
- arctrl/py/Json/context/rocrate/isa_study_context.py +125 -0
- arctrl/py/Json/context/rocrate/property_value_context.py +73 -0
- arctrl/py/Json/context/rocrate/rocrate_context.py +81 -0
- arctrl/py/Json/converter_options.py +23 -0
- arctrl/py/Json/data.py +356 -0
- arctrl/py/Json/data_file.py +63 -0
- arctrl/py/Json/decode.py +271 -0
- arctrl/py/Json/encode.py +140 -0
- arctrl/py/Json/idtable.py +44 -0
- arctrl/py/Json/investigation.py +695 -0
- arctrl/py/Json/ontology_annotation.py +404 -0
- arctrl/py/Json/ontology_source_reference.py +255 -0
- arctrl/py/Json/person.py +658 -0
- arctrl/py/Json/property_value.py +359 -0
- arctrl/py/Json/publication.py +279 -0
- arctrl/py/Json/run.py +275 -0
- arctrl/py/Json/string_table.py +87 -0
- arctrl/py/Json/study.py +793 -0
- arctrl/py/Json/workflow.py +307 -0
- arctrl/py/JsonIO/Process/__init__.py +0 -0
- arctrl/py/JsonIO/Process/component.py +60 -0
- arctrl/py/JsonIO/Process/factor.py +36 -0
- arctrl/py/JsonIO/Process/factor_value.py +38 -0
- arctrl/py/JsonIO/Process/material.py +60 -0
- arctrl/py/JsonIO/Process/material_attribute.py +38 -0
- arctrl/py/JsonIO/Process/material_attribute_value.py +60 -0
- arctrl/py/JsonIO/Process/material_type.py +36 -0
- arctrl/py/JsonIO/Process/process.py +60 -0
- arctrl/py/JsonIO/Process/process_input.py +38 -0
- arctrl/py/JsonIO/Process/process_output.py +60 -0
- arctrl/py/JsonIO/Process/process_parameter_value.py +60 -0
- arctrl/py/JsonIO/Process/process_sequence.py +71 -0
- arctrl/py/JsonIO/Process/protocol.py +60 -0
- arctrl/py/JsonIO/Process/protocol_parameter.py +36 -0
- arctrl/py/JsonIO/Process/sample.py +60 -0
- arctrl/py/JsonIO/Process/source.py +60 -0
- arctrl/py/JsonIO/Process/study_materials.py +52 -0
- arctrl/py/JsonIO/Process/value.py +32 -0
- arctrl/py/JsonIO/Table/__init__.py +0 -0
- arctrl/py/JsonIO/Table/arc_table.py +103 -0
- arctrl/py/JsonIO/Table/composite_cell.py +36 -0
- arctrl/py/JsonIO/Table/composite_header.py +36 -0
- arctrl/py/JsonIO/Table/compression.py +67 -0
- arctrl/py/JsonIO/Table/iotype.py +36 -0
- arctrl/py/JsonIO/Table/templates.py +113 -0
- arctrl/py/JsonIO/__init__.py +0 -0
- arctrl/py/JsonIO/assay.py +113 -0
- arctrl/py/JsonIO/comment.py +80 -0
- arctrl/py/JsonIO/data.py +60 -0
- arctrl/py/JsonIO/data_file.py +58 -0
- arctrl/py/JsonIO/datamap.py +36 -0
- arctrl/py/JsonIO/decode.py +9 -0
- arctrl/py/JsonIO/encode.py +1 -0
- arctrl/py/JsonIO/investigation.py +91 -0
- arctrl/py/JsonIO/ldobject.py +106 -0
- arctrl/py/JsonIO/ontology_annotation.py +80 -0
- arctrl/py/JsonIO/ontology_source_reference.py +80 -0
- arctrl/py/JsonIO/person.py +82 -0
- arctrl/py/JsonIO/publication.py +82 -0
- arctrl/py/JsonIO/run.py +68 -0
- arctrl/py/JsonIO/study.py +114 -0
- arctrl/py/JsonIO/workflow.py +68 -0
- arctrl/py/ROCrate/ISAProfile/__init__.py +0 -0
- arctrl/py/ROCrate/ISAProfile/assay.py +70 -0
- arctrl/py/ROCrate/ISAProfile/data.py +65 -0
- arctrl/py/ROCrate/ISAProfile/dataset.py +24 -0
- arctrl/py/ROCrate/ISAProfile/investigation.py +73 -0
- arctrl/py/ROCrate/ISAProfile/lab_process.py +162 -0
- arctrl/py/ROCrate/ISAProfile/lab_protocol.py +37 -0
- arctrl/py/ROCrate/ISAProfile/person.py +72 -0
- arctrl/py/ROCrate/ISAProfile/property_value.py +98 -0
- arctrl/py/ROCrate/ISAProfile/sample.py +64 -0
- arctrl/py/ROCrate/ISAProfile/scholarly_article.py +98 -0
- arctrl/py/ROCrate/ISAProfile/study.py +74 -0
- arctrl/py/ROCrate/LDTypes/__init__.py +0 -0
- arctrl/py/ROCrate/LDTypes/comment.py +131 -0
- arctrl/py/ROCrate/LDTypes/computational_workflow.py +455 -0
- arctrl/py/ROCrate/LDTypes/computer_language.py +269 -0
- arctrl/py/ROCrate/LDTypes/create_action.py +303 -0
- arctrl/py/ROCrate/LDTypes/creative_work.py +566 -0
- arctrl/py/ROCrate/LDTypes/dataset.py +943 -0
- arctrl/py/ROCrate/LDTypes/defined_term.py +131 -0
- arctrl/py/ROCrate/LDTypes/file.py +281 -0
- arctrl/py/ROCrate/LDTypes/formal_parameter.py +431 -0
- arctrl/py/ROCrate/LDTypes/lab_process.py +352 -0
- arctrl/py/ROCrate/LDTypes/lab_protocol.py +395 -0
- arctrl/py/ROCrate/LDTypes/organization.py +83 -0
- arctrl/py/ROCrate/LDTypes/person.py +484 -0
- arctrl/py/ROCrate/LDTypes/postal_address.py +195 -0
- arctrl/py/ROCrate/LDTypes/property_value.py +952 -0
- arctrl/py/ROCrate/LDTypes/sample.py +202 -0
- arctrl/py/ROCrate/LDTypes/scholarly_article.py +229 -0
- arctrl/py/ROCrate/LDTypes/software_source_code.py +310 -0
- arctrl/py/ROCrate/LDTypes/workflow_invocation.py +48 -0
- arctrl/py/ROCrate/LDTypes/workflow_protocol.py +52 -0
- arctrl/py/ROCrate/__init__.py +0 -0
- arctrl/py/ROCrate/arc_rocrate_metadata.py +39 -0
- arctrl/py/ROCrate/dyn_obj_extensions.py +1 -0
- arctrl/py/ROCrate/helper.py +8 -0
- arctrl/py/ROCrate/ldcontext.py +406 -0
- arctrl/py/ROCrate/ldobject.py +1247 -0
- arctrl/py/ROCrate/rocrate_context.py +51 -0
- arctrl/py/Spreadsheet/AnnotationTable/__init__.py +0 -0
- arctrl/py/Spreadsheet/AnnotationTable/arc_table.py +203 -0
- arctrl/py/Spreadsheet/AnnotationTable/composite_cell.py +78 -0
- arctrl/py/Spreadsheet/AnnotationTable/composite_column.py +305 -0
- arctrl/py/Spreadsheet/AnnotationTable/composite_header.py +623 -0
- arctrl/py/Spreadsheet/DatamapTable/__init__.py +0 -0
- arctrl/py/Spreadsheet/DatamapTable/datamap_column.py +114 -0
- arctrl/py/Spreadsheet/DatamapTable/datamap_header.py +621 -0
- arctrl/py/Spreadsheet/DatamapTable/datamap_table.py +118 -0
- arctrl/py/Spreadsheet/Metadata/__init__.py +0 -0
- arctrl/py/Spreadsheet/Metadata/assays.py +125 -0
- arctrl/py/Spreadsheet/Metadata/comment.py +77 -0
- arctrl/py/Spreadsheet/Metadata/contacts.py +134 -0
- arctrl/py/Spreadsheet/Metadata/conversions.py +190 -0
- arctrl/py/Spreadsheet/Metadata/design_descriptors.py +34 -0
- arctrl/py/Spreadsheet/Metadata/factors.py +107 -0
- arctrl/py/Spreadsheet/Metadata/ontology_annotation.py +88 -0
- arctrl/py/Spreadsheet/Metadata/ontology_source_reference.py +96 -0
- arctrl/py/Spreadsheet/Metadata/protocols.py +146 -0
- arctrl/py/Spreadsheet/Metadata/publication.py +122 -0
- arctrl/py/Spreadsheet/Metadata/run.py +122 -0
- arctrl/py/Spreadsheet/Metadata/sparse_table.py +499 -0
- arctrl/py/Spreadsheet/Metadata/study.py +312 -0
- arctrl/py/Spreadsheet/Metadata/workflow.py +159 -0
- arctrl/py/Spreadsheet/__init__.py +0 -0
- arctrl/py/Spreadsheet/arc_assay.py +233 -0
- arctrl/py/Spreadsheet/arc_investigation.py +435 -0
- arctrl/py/Spreadsheet/arc_run.py +190 -0
- arctrl/py/Spreadsheet/arc_study.py +144 -0
- arctrl/py/Spreadsheet/arc_workflow.py +177 -0
- arctrl/py/Spreadsheet/assembly_info.py +1 -0
- arctrl/py/Spreadsheet/collection_aux.py +167 -0
- arctrl/py/Spreadsheet/datamap.py +43 -0
- arctrl/py/Spreadsheet/template.py +460 -0
- arctrl/py/ValidationPackages/__init__.py +0 -0
- arctrl/py/ValidationPackages/validation_package.py +82 -0
- arctrl/py/ValidationPackages/validation_packages_config.py +132 -0
- arctrl/py/WebRequest/__init__.py +0 -0
- arctrl/py/WebRequest/web_request.py +9 -0
- arctrl/py/WebRequest/web_request_py.py +135 -0
- arctrl/py/WorkflowGraph/__init__.py +0 -0
- arctrl/py/WorkflowGraph/adapters.py +141 -0
- arctrl/py/WorkflowGraph/build_options.py +45 -0
- arctrl/py/WorkflowGraph/builder.py +720 -0
- arctrl/py/WorkflowGraph/graph_types.py +260 -0
- arctrl/py/WorkflowGraph/query_helpers.py +76 -0
- arctrl/py/WorkflowGraph/reference_parsing.py +59 -0
- arctrl/py/WorkflowGraph/visualization_siren.py +574 -0
- arctrl/py/WorkflowGraph/workflow_graph.py +119 -0
- arctrl/py/Yaml/__init__.py +0 -0
- arctrl/py/Yaml/decode.py +1 -0
- arctrl/py/Yaml/encode.py +10 -0
- arctrl/py/Yaml/validation_package.py +77 -0
- arctrl/py/Yaml/validation_packages_config.py +86 -0
- arctrl/py/__init__.py +0 -0
- arctrl/py/arc.py +1891 -0
- arctrl/py/column_index.py +280 -0
- arctrl/py/conversion.py +142 -0
- arctrl/py/cross_async.py +76 -0
- arctrl/py/cwlrun_resolver.py +228 -0
- arctrl/py/fable_modules/dynamic_obj/__init__.py +0 -0
- arctrl/py/fable_modules/dynamic_obj/dyn_obj.py +136 -0
- arctrl/py/fable_modules/dynamic_obj/dynamic_obj.py +415 -0
- arctrl/py/fable_modules/dynamic_obj/fable_js.py +1 -0
- arctrl/py/fable_modules/dynamic_obj/fable_py.py +288 -0
- arctrl/py/fable_modules/dynamic_obj/hash_codes.py +82 -0
- arctrl/py/fable_modules/dynamic_obj/property_helper.py +25 -0
- arctrl/py/fable_modules/dynamic_obj/reflection_utils.py +87 -0
- arctrl/py/fable_modules/fable_library/__init__.py +0 -0
- arctrl/py/fable_modules/fable_library/array_.py +1528 -0
- arctrl/py/fable_modules/fable_library/async_.py +377 -0
- arctrl/py/fable_modules/fable_library/async_builder.py +379 -0
- arctrl/py/fable_modules/fable_library/big_int.py +330 -0
- arctrl/py/fable_modules/fable_library/bit_converter.py +131 -0
- arctrl/py/fable_modules/fable_library/boolean.py +26 -0
- arctrl/py/fable_modules/fable_library/char.py +237 -0
- arctrl/py/fable_modules/fable_library/choice.py +212 -0
- arctrl/py/fable_modules/fable_library/date.py +779 -0
- arctrl/py/fable_modules/fable_library/date_offset.py +79 -0
- arctrl/py/fable_modules/fable_library/decimal_.py +190 -0
- arctrl/py/fable_modules/fable_library/diagnostics.py +54 -0
- arctrl/py/fable_modules/fable_library/double.py +87 -0
- arctrl/py/fable_modules/fable_library/encoding.py +41 -0
- arctrl/py/fable_modules/fable_library/event.py +206 -0
- arctrl/py/fable_modules/fable_library/file.py +107 -0
- arctrl/py/fable_modules/fable_library/fsharp_collections.py +52 -0
- arctrl/py/fable_modules/fable_library/fsharp_core.py +123 -0
- arctrl/py/fable_modules/fable_library/global_.py +63 -0
- arctrl/py/fable_modules/fable_library/guid.py +41 -0
- arctrl/py/fable_modules/fable_library/int32.py +73 -0
- arctrl/py/fable_modules/fable_library/list.py +1788 -0
- arctrl/py/fable_modules/fable_library/long.py +240 -0
- arctrl/py/fable_modules/fable_library/mailbox_processor.py +179 -0
- arctrl/py/fable_modules/fable_library/map.py +1854 -0
- arctrl/py/fable_modules/fable_library/map_util.py +148 -0
- arctrl/py/fable_modules/fable_library/mutable_map.py +397 -0
- arctrl/py/fable_modules/fable_library/mutable_set.py +279 -0
- arctrl/py/fable_modules/fable_library/native.py +45 -0
- arctrl/py/fable_modules/fable_library/numeric.py +46 -0
- arctrl/py/fable_modules/fable_library/observable.py +222 -0
- arctrl/py/fable_modules/fable_library/option.py +128 -0
- arctrl/py/fable_modules/fable_library/path.py +62 -0
- arctrl/py/fable_modules/fable_library/range.py +117 -0
- arctrl/py/fable_modules/fable_library/reflection.py +463 -0
- arctrl/py/fable_modules/fable_library/reg_exp.py +137 -0
- arctrl/py/fable_modules/fable_library/resize_array.py +31 -0
- arctrl/py/fable_modules/fable_library/result.py +212 -0
- arctrl/py/fable_modules/fable_library/seq.py +1979 -0
- arctrl/py/fable_modules/fable_library/seq2.py +221 -0
- arctrl/py/fable_modules/fable_library/set.py +2414 -0
- arctrl/py/fable_modules/fable_library/singleton_local_time_zone.py +36 -0
- arctrl/py/fable_modules/fable_library/string_.py +573 -0
- arctrl/py/fable_modules/fable_library/system_collections_generic.py +462 -0
- arctrl/py/fable_modules/fable_library/system_text.py +237 -0
- arctrl/py/fable_modules/fable_library/task.py +116 -0
- arctrl/py/fable_modules/fable_library/task_builder.py +122 -0
- arctrl/py/fable_modules/fable_library/thread.py +5 -0
- arctrl/py/fable_modules/fable_library/time_span.py +283 -0
- arctrl/py/fable_modules/fable_library/timer.py +24 -0
- arctrl/py/fable_modules/fable_library/types.py +401 -0
- arctrl/py/fable_modules/fable_library/uri.py +109 -0
- arctrl/py/fable_modules/fable_library/util.py +2735 -0
- arctrl/py/fable_modules/fable_openpyxl/__init__.py +0 -0
- arctrl/py/fable_modules/fable_openpyxl/openpyxl.py +362 -0
- arctrl/py/fable_modules/fable_python/cognite-sdk/__init__.py +0 -0
- arctrl/py/fable_modules/fable_python/cognite-sdk/cognite_sdk.py +22 -0
- arctrl/py/fable_modules/fable_python/flask/__init__.py +0 -0
- arctrl/py/fable_modules/fable_python/flask/flask.py +34 -0
- arctrl/py/fable_modules/fable_python/jupyter/__init__.py +0 -0
- arctrl/py/fable_modules/fable_python/jupyter/ipy_widgets.py +47 -0
- arctrl/py/fable_modules/fable_python/jupyter/ipython.py +13 -0
- arctrl/py/fable_modules/fable_python/stdlib/__init__.py +0 -0
- arctrl/py/fable_modules/fable_python/stdlib/ast.py +1 -0
- arctrl/py/fable_modules/fable_python/stdlib/asyncio/__init__.py +0 -0
- arctrl/py/fable_modules/fable_python/stdlib/asyncio/events.py +17 -0
- arctrl/py/fable_modules/fable_python/stdlib/asyncio/futures.py +52 -0
- arctrl/py/fable_modules/fable_python/stdlib/asyncio/tasks.py +38 -0
- arctrl/py/fable_modules/fable_python/stdlib/base64_.py +1 -0
- arctrl/py/fable_modules/fable_python/stdlib/builtins_.py +38 -0
- arctrl/py/fable_modules/fable_python/stdlib/html.py +1 -0
- arctrl/py/fable_modules/fable_python/stdlib/json.py +1 -0
- arctrl/py/fable_modules/fable_python/stdlib/math_.py +1 -0
- arctrl/py/fable_modules/fable_python/stdlib/os_.py +1 -0
- arctrl/py/fable_modules/fable_python/stdlib/queue_.py +1 -0
- arctrl/py/fable_modules/fable_python/stdlib/string_.py +1 -0
- arctrl/py/fable_modules/fable_python/stdlib/sys_.py +30 -0
- arctrl/py/fable_modules/fable_python/stdlib/time_.py +1 -0
- arctrl/py/fable_modules/fable_python/stdlib/tk_inter.py +1 -0
- arctrl/py/fable_modules/fs_spreadsheet/Cells/__init__.py +0 -0
- arctrl/py/fable_modules/fs_spreadsheet/Cells/fs_cell.py +340 -0
- arctrl/py/fable_modules/fs_spreadsheet/Cells/fs_cells_collection.py +466 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/__init__.py +0 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/cell_builder.py +214 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/column_builder.py +139 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/dsl.py +50 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/expression.py +65 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/operators.py +9 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/row_builder.py +139 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/sheet_builder.py +118 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/table_builder.py +122 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/transform.py +463 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/types.py +314 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/workbook_builder.py +106 -0
- arctrl/py/fable_modules/fs_spreadsheet/Json/__init__.py +0 -0
- arctrl/py/fable_modules/fs_spreadsheet/Json/cell.py +103 -0
- arctrl/py/fable_modules/fs_spreadsheet/Json/column.py +70 -0
- arctrl/py/fable_modules/fs_spreadsheet/Json/row.py +70 -0
- arctrl/py/fable_modules/fs_spreadsheet/Json/table.py +54 -0
- arctrl/py/fable_modules/fs_spreadsheet/Json/value.py +93 -0
- arctrl/py/fable_modules/fs_spreadsheet/Json/workbook.py +71 -0
- arctrl/py/fable_modules/fs_spreadsheet/Json/worksheet.py +216 -0
- arctrl/py/fable_modules/fs_spreadsheet/Ranges/__init__.py +0 -0
- arctrl/py/fable_modules/fs_spreadsheet/Ranges/fs_range.py +43 -0
- arctrl/py/fable_modules/fs_spreadsheet/Ranges/fs_range_address.py +190 -0
- arctrl/py/fable_modules/fs_spreadsheet/Ranges/fs_range_base.py +92 -0
- arctrl/py/fable_modules/fs_spreadsheet/Ranges/fs_range_column.py +77 -0
- arctrl/py/fable_modules/fs_spreadsheet/Ranges/fs_range_row.py +48 -0
- arctrl/py/fable_modules/fs_spreadsheet/Tables/__init__.py +0 -0
- arctrl/py/fable_modules/fs_spreadsheet/Tables/fs_table.py +461 -0
- arctrl/py/fable_modules/fs_spreadsheet/Tables/fs_table_field.py +117 -0
- arctrl/py/fable_modules/fs_spreadsheet/Tables/fs_table_row.py +23 -0
- arctrl/py/fable_modules/fs_spreadsheet/__init__.py +0 -0
- arctrl/py/fable_modules/fs_spreadsheet/fs_address.py +236 -0
- arctrl/py/fable_modules/fs_spreadsheet/fs_column.py +172 -0
- arctrl/py/fable_modules/fs_spreadsheet/fs_row.py +183 -0
- arctrl/py/fable_modules/fs_spreadsheet/fs_workbook.py +192 -0
- arctrl/py/fable_modules/fs_spreadsheet/fs_worksheet.py +610 -0
- arctrl/py/fable_modules/fs_spreadsheet/hash_codes.py +60 -0
- arctrl/py/fable_modules/fs_spreadsheet/sheet_builder.py +329 -0
- arctrl/py/fable_modules/fs_spreadsheet_py/__init__.py +0 -0
- arctrl/py/fable_modules/fs_spreadsheet_py/cell.py +60 -0
- arctrl/py/fable_modules/fs_spreadsheet_py/cell_type.py +50 -0
- arctrl/py/fable_modules/fs_spreadsheet_py/fs_extension.py +60 -0
- arctrl/py/fable_modules/fs_spreadsheet_py/json.py +47 -0
- arctrl/py/fable_modules/fs_spreadsheet_py/table.py +54 -0
- arctrl/py/fable_modules/fs_spreadsheet_py/workbook.py +41 -0
- arctrl/py/fable_modules/fs_spreadsheet_py/worksheet.py +52 -0
- arctrl/py/fable_modules/fs_spreadsheet_py/xlsx.py +37 -0
- arctrl/py/fable_modules/siren/__init__.py +0 -0
- arctrl/py/fable_modules/siren/config.py +1038 -0
- arctrl/py/fable_modules/siren/formatting.py +1121 -0
- arctrl/py/fable_modules/siren/siren.py +1941 -0
- arctrl/py/fable_modules/siren/siren_types.py +1229 -0
- arctrl/py/fable_modules/siren/theme_variables.py +517 -0
- arctrl/py/fable_modules/siren/util.py +37 -0
- arctrl/py/fable_modules/siren/yaml.py +101 -0
- arctrl/py/fable_modules/thoth_json_core/__init__.py +0 -0
- arctrl/py/fable_modules/thoth_json_core/decode.py +1614 -0
- arctrl/py/fable_modules/thoth_json_core/encode.py +305 -0
- arctrl/py/fable_modules/thoth_json_core/types.py +181 -0
- arctrl/py/fable_modules/thoth_json_python/__init__.py +0 -0
- arctrl/py/fable_modules/thoth_json_python/decode.py +112 -0
- arctrl/py/fable_modules/thoth_json_python/encode.py +72 -0
- arctrl/py/fable_modules/thoth_json_python/python.py +1 -0
- arctrl/py/fable_modules/yamlicious/Interop/__init__.py +0 -0
- arctrl/py/fable_modules/yamlicious/Interop/js_interop.py +1 -0
- arctrl/py/fable_modules/yamlicious/Interop/py_interop.py +7 -0
- arctrl/py/fable_modules/yamlicious/__init__.py +0 -0
- arctrl/py/fable_modules/yamlicious/decode.py +1784 -0
- arctrl/py/fable_modules/yamlicious/encode.py +84 -0
- arctrl/py/fable_modules/yamlicious/flow_to_block.py +994 -0
- arctrl/py/fable_modules/yamlicious/library.py +10 -0
- arctrl/py/fable_modules/yamlicious/persil.py +57 -0
- arctrl/py/fable_modules/yamlicious/preprocessing.py +99 -0
- arctrl/py/fable_modules/yamlicious/reader.py +739 -0
- arctrl/py/fable_modules/yamlicious/regex.py +29 -0
- arctrl/py/fable_modules/yamlicious/regex_active_patterns.py +265 -0
- arctrl/py/fable_modules/yamlicious/writer.py +175 -0
- arctrl/py/fable_modules/yamlicious/yamlicious_types.py +128 -0
- arctrl/py/json.py +389 -0
- arctrl/py/license.py +169 -0
- arctrl/py/rocrate_io.py +242 -0
- arctrl/py/template_web.py +23 -0
- arctrl/py/xlsx.py +212 -0
- arctrl/py/yaml.py +79 -0
- arctrl/rocrate.py +21 -0
- arctrl-3.0.0.dist-info/METADATA +157 -0
- arctrl-3.0.0.dist-info/RECORD +511 -0
- arctrl-3.0.0.dist-info/WHEEL +4 -0
- arctrl-3.0.0.dist-info/licenses/LICENSE +21 -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 _expr2070() -> 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 = _expr2070
|
|
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 _expr2071() -> 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 = _expr2071
|
|
146
|
+
|
|
147
|
+
def LDRef__ctor_Z721C83C5(id: str) -> LDRef:
|
|
148
|
+
return LDRef(id)
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
def _expr2076() -> 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 _arrow2072(__unit: None=None) -> LDNode:
|
|
208
|
+
return out_arg
|
|
209
|
+
|
|
210
|
+
def _arrow2073(v: LDNode) -> None:
|
|
211
|
+
nonlocal out_arg
|
|
212
|
+
out_arg = v
|
|
213
|
+
|
|
214
|
+
match_value = (try_get_value(this.mappings, id, FSharpRef(_arrow2072, _arrow2073)), 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 _arrow2074(roc: __G | None=None) -> None:
|
|
246
|
+
roc.SetContext(context)
|
|
247
|
+
|
|
248
|
+
return _arrow2074
|
|
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 _arrow2075(roc: __F | None=None) -> LDContext | None:
|
|
264
|
+
return roc.TryGetContext()
|
|
265
|
+
|
|
266
|
+
return _arrow2075
|
|
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 = _expr2076
|
|
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 _expr2133() -> 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 _arrow2078(_arg: Any=None) -> Callable[[LDContext | None], bool]:
|
|
452
|
+
def _arrow2077(_arg_1: LDContext | None=None) -> bool:
|
|
453
|
+
return True
|
|
454
|
+
|
|
455
|
+
return _arrow2077
|
|
456
|
+
|
|
457
|
+
filter_1: Callable[[Any, LDContext | None], bool] = default_arg(map(curry2, filter), _arrow2078)
|
|
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 _arrow2081(__unit: None=None) -> IEnumerable_1[Any]:
|
|
486
|
+
def _arrow2079(__unit: None=None) -> bool:
|
|
487
|
+
return en.System_Collections_IEnumerator_MoveNext()
|
|
488
|
+
|
|
489
|
+
def _arrow2080(__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(_arrow2079, delay(_arrow2080))
|
|
493
|
+
|
|
494
|
+
return list(to_list(delay(_arrow2081)))
|
|
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 _arrow2082(__unit: None=None) -> bool:
|
|
514
|
+
r: LDRef = value_3(match_value)
|
|
515
|
+
return graph is not None
|
|
516
|
+
|
|
517
|
+
if _arrow2082():
|
|
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 _arrow2083(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(_arrow2083, 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 _arrow2084(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(_arrow2084, 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 _arrow2085(__unit: None=None) -> bool:
|
|
670
|
+
v_2: Any = value_3(v)
|
|
671
|
+
return False
|
|
672
|
+
|
|
673
|
+
def _arrow2086(__unit: None=None) -> bool:
|
|
674
|
+
e: IEnumerable[Any] = value_3(v)
|
|
675
|
+
return get_enumerator(e).System_Collections_IEnumerator_MoveNext()
|
|
676
|
+
|
|
677
|
+
return (_arrow2085() if equals(value_3(v), None) else (_arrow2086() 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 _arrow2087(roc: __C | None=None) -> None:
|
|
686
|
+
roc.SetContext(context)
|
|
687
|
+
|
|
688
|
+
return _arrow2087
|
|
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 _arrow2088(roc: __B | None=None) -> LDContext | None:
|
|
704
|
+
return roc.TryGetContext()
|
|
705
|
+
|
|
706
|
+
return _arrow2088
|
|
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 _arrow2089(x: Any=None) -> Any:
|
|
717
|
+
return x
|
|
718
|
+
|
|
719
|
+
flatten_to_singleton = _arrow2089
|
|
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 _arrow2090(x_1: Array[Any]) -> Array[Any]:
|
|
737
|
+
return x_1
|
|
738
|
+
|
|
739
|
+
flatten_to_ra = _arrow2090
|
|
740
|
+
|
|
741
|
+
else:
|
|
742
|
+
graph_1: LDGraph = flatten_to
|
|
743
|
+
def _arrow2091(a: Array[Any]) -> Array[Any]:
|
|
744
|
+
return ResizeArray_map(flatten_to_singleton, a)
|
|
745
|
+
|
|
746
|
+
flatten_to_ra = _arrow2091
|
|
747
|
+
|
|
748
|
+
flatten_to_any: Callable[[Any], Any]
|
|
749
|
+
if flatten_to is None:
|
|
750
|
+
def _arrow2092(x_2: Any=None) -> Any:
|
|
751
|
+
return x_2
|
|
752
|
+
|
|
753
|
+
flatten_to_any = _arrow2092
|
|
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 _arrow2096(__unit: None=None, o_1: Any=o_1) -> IEnumerable_1[Any]:
|
|
767
|
+
def _arrow2093(__unit: None=None) -> IEnumerator[Any]:
|
|
768
|
+
return get_enumerator(e)
|
|
769
|
+
|
|
770
|
+
def _arrow2094(enumerator: IEnumerator[Any]) -> bool:
|
|
771
|
+
return enumerator.System_Collections_IEnumerator_MoveNext()
|
|
772
|
+
|
|
773
|
+
def _arrow2095(enumerator_1: IEnumerator[Any]) -> Any:
|
|
774
|
+
return enumerator_1.System_Collections_IEnumerator_get_Current()
|
|
775
|
+
|
|
776
|
+
return map_1(f_2, enumerate_from_functions(_arrow2093, _arrow2094, _arrow2095))
|
|
777
|
+
|
|
778
|
+
return list(to_list(delay(_arrow2096)))
|
|
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 _arrow2106(__unit: None=None, pn: Any=pn) -> IEnumerable_1[Any]:
|
|
825
|
+
def _arrow2097(v_1: Any=None) -> Any:
|
|
826
|
+
return v_1
|
|
827
|
+
|
|
828
|
+
def _arrow2098(__unit: None=None) -> IEnumerator[Any]:
|
|
829
|
+
return get_enumerator(e2)
|
|
830
|
+
|
|
831
|
+
def _arrow2099(enumerator_2: IEnumerator[Any]) -> bool:
|
|
832
|
+
return enumerator_2.System_Collections_IEnumerator_MoveNext()
|
|
833
|
+
|
|
834
|
+
def _arrow2100(enumerator_3: IEnumerator[Any]) -> Any:
|
|
835
|
+
return enumerator_3.System_Collections_IEnumerator_get_Current()
|
|
836
|
+
|
|
837
|
+
def _arrow2105(__unit: None=None) -> IEnumerable_1[Any]:
|
|
838
|
+
def _arrow2101(v_2: Any=None) -> Any:
|
|
839
|
+
return v_2
|
|
840
|
+
|
|
841
|
+
def _arrow2102(__unit: None=None) -> IEnumerator[Any]:
|
|
842
|
+
return get_enumerator(e1)
|
|
843
|
+
|
|
844
|
+
def _arrow2103(enumerator_4: IEnumerator[Any]) -> bool:
|
|
845
|
+
return enumerator_4.System_Collections_IEnumerator_MoveNext()
|
|
846
|
+
|
|
847
|
+
def _arrow2104(enumerator_5: IEnumerator[Any]) -> Any:
|
|
848
|
+
return enumerator_5.System_Collections_IEnumerator_get_Current()
|
|
849
|
+
|
|
850
|
+
return map_1(_arrow2101, enumerate_from_functions(_arrow2102, _arrow2103, _arrow2104))
|
|
851
|
+
|
|
852
|
+
return append(map_1(_arrow2097, enumerate_from_functions(_arrow2098, _arrow2099, _arrow2100)), delay(_arrow2105))
|
|
853
|
+
|
|
854
|
+
class ObjectExpr2107:
|
|
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(_arrow2106)), ObjectExpr2107())))
|
|
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 _arrow2112(__unit: None=None, pn: Any=pn) -> IEnumerable_1[Any]:
|
|
872
|
+
def _arrow2108(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 _arrow2109(__unit: None=None) -> IEnumerator[Any]:
|
|
883
|
+
return get_enumerator(these_vals)
|
|
884
|
+
|
|
885
|
+
def _arrow2110(enumerator_6: IEnumerator[Any]) -> bool:
|
|
886
|
+
return enumerator_6.System_Collections_IEnumerator_MoveNext()
|
|
887
|
+
|
|
888
|
+
def _arrow2111(enumerator_7: IEnumerator[Any]) -> Any:
|
|
889
|
+
return enumerator_7.System_Collections_IEnumerator_get_Current()
|
|
890
|
+
|
|
891
|
+
return collect(_arrow2108, enumerate_from_functions(_arrow2109, _arrow2110, _arrow2111))
|
|
892
|
+
|
|
893
|
+
l_1: Array[Any] = list(to_list(delay(_arrow2112)))
|
|
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 _arrow2119(__unit: None=None, pn: Any=pn) -> IEnumerable_1[Any]:
|
|
905
|
+
def _arrow2115(other_val_2: Any=None) -> IEnumerable_1[Any]:
|
|
906
|
+
def _expr2113():
|
|
907
|
+
nonlocal is_contained_1
|
|
908
|
+
is_contained_1 = True
|
|
909
|
+
return empty()
|
|
910
|
+
|
|
911
|
+
def _arrow2114(__unit: None=None) -> IEnumerable_1[Any]:
|
|
912
|
+
return singleton_2(other_val_2)
|
|
913
|
+
|
|
914
|
+
return append(_expr2113() if equals(to_equalitor(this_val), to_equalitor(other_val_2)) else empty(), delay(_arrow2114))
|
|
915
|
+
|
|
916
|
+
def _arrow2116(__unit: None=None) -> IEnumerator[Any]:
|
|
917
|
+
return get_enumerator(other_vals)
|
|
918
|
+
|
|
919
|
+
def _arrow2117(enumerator_8: IEnumerator[Any]) -> bool:
|
|
920
|
+
return enumerator_8.System_Collections_IEnumerator_MoveNext()
|
|
921
|
+
|
|
922
|
+
def _arrow2118(enumerator_9: IEnumerator[Any]) -> Any:
|
|
923
|
+
return enumerator_9.System_Collections_IEnumerator_get_Current()
|
|
924
|
+
|
|
925
|
+
return collect(_arrow2115, enumerate_from_functions(_arrow2116, _arrow2117, _arrow2118))
|
|
926
|
+
|
|
927
|
+
l_2: Array[Any] = list(to_list(delay(_arrow2119)))
|
|
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 _arrow2121(__unit: None=None) -> IEnumerable_1[str]:
|
|
958
|
+
def _arrow2120(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(_arrow2120, this.SchemaType)
|
|
963
|
+
|
|
964
|
+
new_types: Array[str] = list(to_list(delay(_arrow2121)))
|
|
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 _arrow2124(__unit: None=None, o: Any=o) -> IEnumerable_1[Any]:
|
|
1005
|
+
def _arrow2122(__unit: None=None) -> bool:
|
|
1006
|
+
return en.System_Collections_IEnumerator_MoveNext()
|
|
1007
|
+
|
|
1008
|
+
def _arrow2123(__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(_arrow2122, delay(_arrow2123))
|
|
1012
|
+
|
|
1013
|
+
l: Array[Any] = list(to_list(delay(_arrow2124)))
|
|
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 _arrow2127(__unit: None=None, o: Any=o) -> IEnumerable_1[Any]:
|
|
1076
|
+
def _arrow2125(__unit: None=None) -> bool:
|
|
1077
|
+
return en.System_Collections_IEnumerator_MoveNext()
|
|
1078
|
+
|
|
1079
|
+
def _arrow2126(__unit: None=None) -> IEnumerable_1[Any]:
|
|
1080
|
+
return singleton_2(flatten_value(en.System_Collections_IEnumerator_get_Current()))
|
|
1081
|
+
|
|
1082
|
+
return enumerate_while(_arrow2125, delay(_arrow2126))
|
|
1083
|
+
|
|
1084
|
+
return list(to_list(delay(_arrow2127)))
|
|
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 _arrow2130(__unit: None=None, o: Any=o) -> IEnumerable_1[Any]:
|
|
1116
|
+
def _arrow2128(__unit: None=None) -> bool:
|
|
1117
|
+
return en.System_Collections_IEnumerator_MoveNext()
|
|
1118
|
+
|
|
1119
|
+
def _arrow2129(__unit: None=None) -> IEnumerable_1[Any]:
|
|
1120
|
+
return singleton_2(unflatten_value(en.System_Collections_IEnumerator_get_Current()))
|
|
1121
|
+
|
|
1122
|
+
return enumerate_while(_arrow2128, delay(_arrow2129))
|
|
1123
|
+
|
|
1124
|
+
return list(to_list(delay(_arrow2130)))
|
|
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 _arrow2131(roc: __A | None=None) -> bool:
|
|
1138
|
+
return roc.RemoveContext()
|
|
1139
|
+
|
|
1140
|
+
return _arrow2131
|
|
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 _arrow2132(__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, _arrow2132())
|
|
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 = _expr2133
|
|
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
|
+
|