ea 0.1.0 → 0.1.4
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.
- checksums.yaml +4 -4
- data/CLAUDE.md +125 -0
- data/Rakefile +12 -4
- data/TODO.next/00-publish-blocking-bugs.md +74 -0
- data/TODO.next/01-standalone-ea-gem-identity.md +76 -0
- data/TODO.next/02-optional-lutaml-uml-dependency.md +47 -0
- data/TODO.next/03-slim-lutaml-uml.md +79 -0
- data/TODO.next/04-loader-registry-for-uml-repository.md +49 -0
- data/TODO.next/05-extract-shared-transformer-methods.md +14 -0
- data/TODO.next/06-deduplicate-stereotype-loading.md +17 -0
- data/TODO.next/07-transformer-registry-in-factory.md +20 -0
- data/TODO.next/08-connector-type-registry.md +27 -0
- data/TODO.next/09-element-renderer-registry.md +29 -0
- data/TODO.next/10-connector-renderer-lsp.md +18 -0
- data/TODO.next/11-consolidate-style-knowledge.md +33 -0
- data/TODO.next/12-data-driven-from-db-row.md +24 -0
- data/TODO.next/13-extract-duplicated-methods.md +17 -0
- data/TODO.next/14-remove-dead-code.md +10 -0
- data/TODO.next/15-narrow-exception-handling.md +39 -0
- data/TODO.next/16-repository-indexes.md +28 -0
- data/TODO.next/17-fix-spec-quality-and-coverage.md +32 -0
- data/TODO.next/18-xmi-tool-specific-parser-architecture.md +172 -0
- data/TODO.next/19-fix-ea-gemspec-dependency-declarations.md +56 -0
- data/TODO.next/20-ci-requires-unreleased-lutaml-uml.md +63 -0
- data/TODO.next/21-qeatoxmi-via-xmi-gem.md +340 -0
- data/TODO.next/22-strip-respond-to-from-qeatoxmi-specs.md +32 -0
- data/TODO.next/23-cleanup-idallocator.md +41 -0
- data/TODO.next/24-tighten-parity-specs.md +42 -0
- data/TODO.next/25-sparx-eaid-format-for-synthesized-ids.md +62 -0
- data/TODO.next/26-fix-uppervalue-lowervalue-count-gap.md +51 -0
- data/TODO.next/27-extract-cardinality-module.md +68 -0
- data/TODO.next/28-extract-xml-sanitizer.md +51 -0
- data/TODO.next/29-ocp-registry-for-classifier-builders.md +58 -0
- data/TODO.next/30-struct-return-for-association-end.md +37 -0
- data/TODO.next/31-idallocator-specs.md +27 -0
- data/TODO.next/32-phase2-gap-sentinel-specs.md +53 -0
- data/TODO.next/33-normalize-lower-cleanup.md +30 -0
- data/TODO.next/34-document-member-end-order-rt-prefix.md +29 -0
- data/TODO.next/35-walk-runstate-for-instance-slots.md +76 -0
- data/TODO.next/36-wire-interface-realization.md +50 -0
- data/TODO.next/37-visibility-returns-real-booleans.md +36 -0
- data/config/diagram_styles.yml +200 -0
- data/config/model_transformations.yml +266 -0
- data/config/qea_schema.yml +1024 -0
- data/docs/ea_to_uml_type_mapping.md +89 -0
- data/docs/xmi_qea_conversion_capabilities.md +99 -0
- data/examples/lur/20251010_current_plateau_v5.1.lur +0 -0
- data/examples/lur/basic.lur +0 -0
- data/examples/lur/test-output.lur +0 -0
- data/examples/lur/test.lur +0 -0
- data/examples/lur_basic_usage.rb +221 -0
- data/examples/lur_cli_workflow.rb +263 -0
- data/examples/lur_statistics.rb +326 -0
- data/examples/qea/20251010_current_plateau_v5.1.qea +0 -0
- data/examples/qea/ArcGISWorkspace_template.qea +0 -0
- data/examples/qea/README_qea_parser.adoc +230 -0
- data/examples/qea/UmlModel_template.qea +0 -0
- data/examples/qea/basic.qea +0 -0
- data/examples/qea/simple.qea +0 -0
- data/examples/qea/simple_example.qea +0 -0
- data/examples/qea/test.qea +0 -0
- data/examples/qea_standalone_query.rb +73 -0
- data/examples/qea_to_repository.rb +51 -0
- data/examples/smoke_test_real_qea.rb +81 -0
- data/exe/ea +7 -0
- data/lib/ea/cli/app.rb +72 -0
- data/lib/ea/cli/command/base.rb +80 -0
- data/lib/ea/cli/command/convert.rb +62 -0
- data/lib/ea/cli/command/diagrams.rb +81 -0
- data/lib/ea/cli/command/list.rb +61 -0
- data/lib/ea/cli/command/parse.rb +29 -0
- data/lib/ea/cli/command/stats.rb +20 -0
- data/lib/ea/cli/command/validate.rb +41 -0
- data/lib/ea/cli/command.rb +15 -0
- data/lib/ea/cli/error.rb +34 -0
- data/lib/ea/cli/output/formatter.rb +34 -0
- data/lib/ea/cli/output/json_formatter.rb +20 -0
- data/lib/ea/cli/output/table_formatter.rb +42 -0
- data/lib/ea/cli/output/yaml_formatter.rb +20 -0
- data/lib/ea/cli/output.rb +56 -0
- data/lib/ea/cli.rb +17 -0
- data/lib/ea/diagram/configuration.rb +379 -0
- data/lib/ea/diagram/element_renderers/base_renderer.rb +77 -0
- data/lib/ea/diagram/element_renderers/class_renderer.rb +323 -0
- data/lib/ea/diagram/element_renderers/connector_renderer.rb +41 -0
- data/lib/ea/diagram/element_renderers/package_renderer.rb +61 -0
- data/lib/ea/diagram/element_renderers.rb +43 -0
- data/lib/ea/diagram/extractor.rb +560 -0
- data/lib/ea/diagram/layout_engine.rb +170 -0
- data/lib/ea/diagram/path_builder.rb +202 -0
- data/lib/ea/diagram/style_parser.rb +42 -0
- data/lib/ea/diagram/style_resolver.rb +276 -0
- data/lib/ea/diagram/svg_renderer.rb +274 -0
- data/lib/ea/diagram/util.rb +73 -0
- data/lib/ea/diagram.rb +47 -0
- data/lib/ea/qea/benchmark.rb +210 -0
- data/lib/ea/qea/database.rb +308 -0
- data/lib/ea/qea/factory/association_builder.rb +203 -0
- data/lib/ea/qea/factory/association_transformer.rb +91 -0
- data/lib/ea/qea/factory/attribute_tag_transformer.rb +57 -0
- data/lib/ea/qea/factory/attribute_transformer.rb +93 -0
- data/lib/ea/qea/factory/base_transformer.rb +177 -0
- data/lib/ea/qea/factory/class_transformer.rb +116 -0
- data/lib/ea/qea/factory/constraint_transformer.rb +75 -0
- data/lib/ea/qea/factory/data_type_transformer.rb +77 -0
- data/lib/ea/qea/factory/diagram_transformer.rb +157 -0
- data/lib/ea/qea/factory/document_builder.rb +283 -0
- data/lib/ea/qea/factory/ea_to_uml_factory.rb +229 -0
- data/lib/ea/qea/factory/enum_transformer.rb +74 -0
- data/lib/ea/qea/factory/generalization_builder.rb +227 -0
- data/lib/ea/qea/factory/generalization_transformer.rb +98 -0
- data/lib/ea/qea/factory/instance_transformer.rb +68 -0
- data/lib/ea/qea/factory/object_property_transformer.rb +58 -0
- data/lib/ea/qea/factory/operation_transformer.rb +66 -0
- data/lib/ea/qea/factory/package_transformer.rb +145 -0
- data/lib/ea/qea/factory/reference_resolver.rb +99 -0
- data/lib/ea/qea/factory/stereotype_loader.rb +39 -0
- data/lib/ea/qea/factory/tagged_value_transformer.rb +38 -0
- data/lib/ea/qea/factory/transformer_registry.rb +80 -0
- data/lib/ea/qea/factory.rb +37 -0
- data/lib/ea/qea/file_detector.rb +178 -0
- data/lib/ea/qea/infrastructure/database_connection.rb +100 -0
- data/lib/ea/qea/infrastructure/schema_reader.rb +136 -0
- data/lib/ea/qea/infrastructure/table_reader.rb +224 -0
- data/lib/ea/qea/infrastructure.rb +12 -0
- data/lib/ea/qea/models/base_model.rb +59 -0
- data/lib/ea/qea/models/ea_attribute.rb +109 -0
- data/lib/ea/qea/models/ea_attribute_tag.rb +100 -0
- data/lib/ea/qea/models/ea_complexity_type.rb +79 -0
- data/lib/ea/qea/models/ea_connector.rb +160 -0
- data/lib/ea/qea/models/ea_connector_type.rb +60 -0
- data/lib/ea/qea/models/ea_constraint_type.rb +63 -0
- data/lib/ea/qea/models/ea_datatype.rb +104 -0
- data/lib/ea/qea/models/ea_diagram.rb +115 -0
- data/lib/ea/qea/models/ea_diagram_link.rb +78 -0
- data/lib/ea/qea/models/ea_diagram_object.rb +73 -0
- data/lib/ea/qea/models/ea_diagram_type.rb +56 -0
- data/lib/ea/qea/models/ea_document.rb +63 -0
- data/lib/ea/qea/models/ea_object.rb +223 -0
- data/lib/ea/qea/models/ea_object_constraint.rb +53 -0
- data/lib/ea/qea/models/ea_object_property.rb +87 -0
- data/lib/ea/qea/models/ea_object_type.rb +73 -0
- data/lib/ea/qea/models/ea_operation.rb +127 -0
- data/lib/ea/qea/models/ea_operation_param.rb +76 -0
- data/lib/ea/qea/models/ea_package.rb +78 -0
- data/lib/ea/qea/models/ea_script.rb +62 -0
- data/lib/ea/qea/models/ea_status_type.rb +66 -0
- data/lib/ea/qea/models/ea_stereotype.rb +57 -0
- data/lib/ea/qea/models/ea_tagged_value.rb +99 -0
- data/lib/ea/qea/models/ea_xref.rb +165 -0
- data/lib/ea/qea/models.rb +35 -0
- data/lib/ea/qea/repositories/base_repository.rb +225 -0
- data/lib/ea/qea/repositories/object_repository.rb +219 -0
- data/lib/ea/qea/repositories.rb +10 -0
- data/lib/ea/qea/services/configuration.rb +211 -0
- data/lib/ea/qea/services/database_loader.rb +191 -0
- data/lib/ea/qea/services.rb +10 -0
- data/lib/ea/qea/validation/association_validator.rb +73 -0
- data/lib/ea/qea/validation/attribute_validator.rb +91 -0
- data/lib/ea/qea/validation/base_validator.rb +331 -0
- data/lib/ea/qea/validation/class_validator.rb +121 -0
- data/lib/ea/qea/validation/database/circular_reference_validator.rb +109 -0
- data/lib/ea/qea/validation/database/orphan_validator.rb +153 -0
- data/lib/ea/qea/validation/database/referential_integrity_validator.rb +128 -0
- data/lib/ea/qea/validation/database.rb +16 -0
- data/lib/ea/qea/validation/diagram_validator.rb +112 -0
- data/lib/ea/qea/validation/formatters/json_formatter.rb +137 -0
- data/lib/ea/qea/validation/formatters/text_formatter.rb +235 -0
- data/lib/ea/qea/validation/formatters.rb +12 -0
- data/lib/ea/qea/validation/operation_validator.rb +71 -0
- data/lib/ea/qea/validation/package_validator.rb +111 -0
- data/lib/ea/qea/validation/validation_engine.rb +387 -0
- data/lib/ea/qea/validation/validation_message.rb +144 -0
- data/lib/ea/qea/validation/validation_result.rb +210 -0
- data/lib/ea/qea/validation/validator_registry.rb +134 -0
- data/lib/ea/qea/validation.rb +28 -0
- data/lib/ea/qea/verification/comparison_result.rb +264 -0
- data/lib/ea/qea/verification/document_normalizer.rb +169 -0
- data/lib/ea/qea/verification/document_verifier.rb +322 -0
- data/lib/ea/qea/verification/element_comparator.rb +277 -0
- data/lib/ea/qea/verification/structure_matcher.rb +287 -0
- data/lib/ea/qea/verification.rb +14 -0
- data/lib/ea/qea.rb +185 -0
- data/lib/ea/transformations/configuration.rb +333 -0
- data/lib/ea/transformations/format_registry.rb +366 -0
- data/lib/ea/transformations/parsers/base_parser.rb +482 -0
- data/lib/ea/transformations/parsers/qea_parser.rb +401 -0
- data/lib/ea/transformations/parsers/xmi_parser.rb +243 -0
- data/lib/ea/transformations/transformation_engine.rb +390 -0
- data/lib/ea/transformations.rb +85 -0
- data/lib/ea/transformers/qea_to_xmi/association_end.rb +19 -0
- data/lib/ea/transformers/qea_to_xmi/cardinality.rb +96 -0
- data/lib/ea/transformers/qea_to_xmi/context.rb +106 -0
- data/lib/ea/transformers/qea_to_xmi/guid_format.rb +56 -0
- data/lib/ea/transformers/qea_to_xmi/id_allocator.rb +92 -0
- data/lib/ea/transformers/qea_to_xmi/run_state.rb +107 -0
- data/lib/ea/transformers/qea_to_xmi/transformer.rb +607 -0
- data/lib/ea/transformers/qea_to_xmi/visibility.rb +73 -0
- data/lib/ea/transformers/qea_to_xmi.rb +29 -0
- data/lib/ea/transformers/uml_to_xmi/id_generator.rb +54 -0
- data/lib/ea/transformers/uml_to_xmi/transformer.rb +152 -0
- data/lib/ea/transformers/uml_to_xmi/writer.rb +96 -0
- data/lib/ea/transformers/uml_to_xmi.rb +16 -0
- data/lib/ea/transformers.rb +34 -0
- data/lib/ea/version.rb +1 -1
- data/lib/ea/xmi/liquid_drops/association_drop.rb +56 -0
- data/lib/ea/xmi/liquid_drops/attribute_drop.rb +72 -0
- data/lib/ea/xmi/liquid_drops/cardinality_drop.rb +35 -0
- data/lib/ea/xmi/liquid_drops/connector_drop.rb +54 -0
- data/lib/ea/xmi/liquid_drops/constraint_drop.rb +29 -0
- data/lib/ea/xmi/liquid_drops/data_type_drop.rb +63 -0
- data/lib/ea/xmi/liquid_drops/dependency_drop.rb +36 -0
- data/lib/ea/xmi/liquid_drops/diagram_drop.rb +34 -0
- data/lib/ea/xmi/liquid_drops/enum_drop.rb +49 -0
- data/lib/ea/xmi/liquid_drops/enum_owned_literal_drop.rb +25 -0
- data/lib/ea/xmi/liquid_drops/generalization_attribute_drop.rb +87 -0
- data/lib/ea/xmi/liquid_drops/generalization_drop.rb +127 -0
- data/lib/ea/xmi/liquid_drops/klass_drop.rb +191 -0
- data/lib/ea/xmi/liquid_drops/operation_drop.rb +29 -0
- data/lib/ea/xmi/liquid_drops/package_drop.rb +108 -0
- data/lib/ea/xmi/liquid_drops/root_drop.rb +34 -0
- data/lib/ea/xmi/liquid_drops/source_target_drop.rb +43 -0
- data/lib/ea/xmi/lookup_service.rb +89 -0
- data/lib/ea/xmi/parser.rb +919 -0
- data/lib/ea/xmi.rb +35 -0
- data/lib/ea.rb +10 -1
- metadata +382 -9
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Ea
|
|
4
|
+
module Qea
|
|
5
|
+
module Models
|
|
6
|
+
# Represents a complexity type definition from t_complexitytypes table
|
|
7
|
+
#
|
|
8
|
+
# This table provides reference data for complexity levels that can be
|
|
9
|
+
# assigned to UML elements. Each complexity has a numeric weight for
|
|
10
|
+
# sorting/comparison.
|
|
11
|
+
#
|
|
12
|
+
# @example
|
|
13
|
+
# complexity_type = EaComplexityType.new
|
|
14
|
+
# complexity_type.complexity #=> "High"
|
|
15
|
+
# complexity_type.numeric_weight #=> 4
|
|
16
|
+
class EaComplexityType < BaseModel
|
|
17
|
+
attribute :complexity, Lutaml::Model::Type::String
|
|
18
|
+
attribute :numericweight, Lutaml::Model::Type::Integer
|
|
19
|
+
|
|
20
|
+
def self.table_name
|
|
21
|
+
"t_complexitytypes"
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# Primary key is Complexity (text)
|
|
25
|
+
def self.primary_key_column
|
|
26
|
+
"Complexity"
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# Friendly name for complexity
|
|
30
|
+
# @return [String]
|
|
31
|
+
def name
|
|
32
|
+
complexity
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Alias for readability
|
|
36
|
+
alias numeric_weight numericweight
|
|
37
|
+
|
|
38
|
+
# Get numeric weight for sorting
|
|
39
|
+
# @return [Integer]
|
|
40
|
+
def weight
|
|
41
|
+
numericweight || 0
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Check if this is low complexity
|
|
45
|
+
# @return [Boolean]
|
|
46
|
+
def low?
|
|
47
|
+
complexity&.match?(/^(V\.)?Low$/i)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Check if this is medium complexity
|
|
51
|
+
# @return [Boolean]
|
|
52
|
+
def medium?
|
|
53
|
+
complexity == "Medium"
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Check if this is high complexity
|
|
57
|
+
# @return [Boolean]
|
|
58
|
+
def high?
|
|
59
|
+
complexity&.match?(/^(V\.)?High$/i)
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Check if this is extreme complexity
|
|
63
|
+
# @return [Boolean]
|
|
64
|
+
def extreme?
|
|
65
|
+
complexity == "Extreme"
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Compare complexity levels by numeric weight
|
|
69
|
+
# @param other [EaComplexityType]
|
|
70
|
+
# @return [Integer] -1, 0, or 1
|
|
71
|
+
def <=>(other)
|
|
72
|
+
return 0 unless other.is_a?(EaComplexityType)
|
|
73
|
+
|
|
74
|
+
weight <=> other.weight
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
end
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Ea
|
|
4
|
+
module Qea
|
|
5
|
+
module Models
|
|
6
|
+
# Represents a connector from the t_connector table in EA database
|
|
7
|
+
# This represents relationships between objects (associations,
|
|
8
|
+
# generalizations, dependencies, etc.)
|
|
9
|
+
class EaConnector < BaseModel
|
|
10
|
+
attribute :connector_id, Lutaml::Model::Type::Integer
|
|
11
|
+
attribute :name, Lutaml::Model::Type::String
|
|
12
|
+
attribute :direction, Lutaml::Model::Type::String
|
|
13
|
+
attribute :notes, Lutaml::Model::Type::String
|
|
14
|
+
attribute :connector_type, Lutaml::Model::Type::String
|
|
15
|
+
attribute :subtype, Lutaml::Model::Type::String
|
|
16
|
+
attribute :sourcecard, Lutaml::Model::Type::String
|
|
17
|
+
attribute :sourceaccess, Lutaml::Model::Type::String
|
|
18
|
+
attribute :sourceelement, Lutaml::Model::Type::String
|
|
19
|
+
attribute :destcard, Lutaml::Model::Type::String
|
|
20
|
+
attribute :destaccess, Lutaml::Model::Type::String
|
|
21
|
+
attribute :destelement, Lutaml::Model::Type::String
|
|
22
|
+
attribute :sourcerole, Lutaml::Model::Type::String
|
|
23
|
+
attribute :sourceroletype, Lutaml::Model::Type::String
|
|
24
|
+
attribute :sourcerolenote, Lutaml::Model::Type::String
|
|
25
|
+
attribute :sourcecontainment, Lutaml::Model::Type::String
|
|
26
|
+
attribute :sourceisaggregate, Lutaml::Model::Type::Integer
|
|
27
|
+
attribute :sourceisordered, Lutaml::Model::Type::Integer
|
|
28
|
+
attribute :sourcequalifier, Lutaml::Model::Type::String
|
|
29
|
+
attribute :destrole, Lutaml::Model::Type::String
|
|
30
|
+
attribute :destroletype, Lutaml::Model::Type::String
|
|
31
|
+
attribute :destrolenote, Lutaml::Model::Type::String
|
|
32
|
+
attribute :destcontainment, Lutaml::Model::Type::String
|
|
33
|
+
attribute :destisaggregate, Lutaml::Model::Type::Integer
|
|
34
|
+
attribute :destisordered, Lutaml::Model::Type::Integer
|
|
35
|
+
attribute :destqualifier, Lutaml::Model::Type::String
|
|
36
|
+
attribute :start_object_id, Lutaml::Model::Type::Integer
|
|
37
|
+
attribute :end_object_id, Lutaml::Model::Type::Integer
|
|
38
|
+
attribute :top_start_label, Lutaml::Model::Type::String
|
|
39
|
+
attribute :top_mid_label, Lutaml::Model::Type::String
|
|
40
|
+
attribute :top_end_label, Lutaml::Model::Type::String
|
|
41
|
+
attribute :btm_start_label, Lutaml::Model::Type::String
|
|
42
|
+
attribute :btm_mid_label, Lutaml::Model::Type::String
|
|
43
|
+
attribute :btm_end_label, Lutaml::Model::Type::String
|
|
44
|
+
attribute :start_edge, Lutaml::Model::Type::Integer
|
|
45
|
+
attribute :end_edge, Lutaml::Model::Type::Integer
|
|
46
|
+
attribute :ptstartx, Lutaml::Model::Type::Integer
|
|
47
|
+
attribute :ptstarty, Lutaml::Model::Type::Integer
|
|
48
|
+
attribute :ptendx, Lutaml::Model::Type::Integer
|
|
49
|
+
attribute :ptendy, Lutaml::Model::Type::Integer
|
|
50
|
+
attribute :seqno, Lutaml::Model::Type::Integer
|
|
51
|
+
attribute :headstyle, Lutaml::Model::Type::Integer
|
|
52
|
+
attribute :linestyle, Lutaml::Model::Type::Integer
|
|
53
|
+
attribute :routestyle, Lutaml::Model::Type::Integer
|
|
54
|
+
attribute :isbold, Lutaml::Model::Type::Integer
|
|
55
|
+
attribute :linecolor, Lutaml::Model::Type::Integer
|
|
56
|
+
attribute :stereotype, Lutaml::Model::Type::String
|
|
57
|
+
attribute :virtualinheritance, Lutaml::Model::Type::String
|
|
58
|
+
attribute :linkaccess, Lutaml::Model::Type::String
|
|
59
|
+
attribute :pdata1, Lutaml::Model::Type::String
|
|
60
|
+
attribute :pdata2, Lutaml::Model::Type::String
|
|
61
|
+
attribute :pdata3, Lutaml::Model::Type::String
|
|
62
|
+
attribute :pdata4, Lutaml::Model::Type::String
|
|
63
|
+
attribute :pdata5, Lutaml::Model::Type::String
|
|
64
|
+
attribute :diagramid, Lutaml::Model::Type::Integer
|
|
65
|
+
attribute :ea_guid, Lutaml::Model::Type::String
|
|
66
|
+
attribute :sourceconstraint, Lutaml::Model::Type::String
|
|
67
|
+
attribute :destconstraint, Lutaml::Model::Type::String
|
|
68
|
+
attribute :sourceisnavigable, Lutaml::Model::Type::Integer
|
|
69
|
+
attribute :destisnavigable, Lutaml::Model::Type::Integer
|
|
70
|
+
attribute :isroot, Lutaml::Model::Type::Integer
|
|
71
|
+
attribute :isleaf, Lutaml::Model::Type::Integer
|
|
72
|
+
attribute :isspec, Lutaml::Model::Type::Integer
|
|
73
|
+
attribute :sourcechangeable, Lutaml::Model::Type::String
|
|
74
|
+
attribute :destchangeable, Lutaml::Model::Type::String
|
|
75
|
+
attribute :sourcets, Lutaml::Model::Type::String
|
|
76
|
+
attribute :destts, Lutaml::Model::Type::String
|
|
77
|
+
attribute :stateflags, Lutaml::Model::Type::String
|
|
78
|
+
attribute :actionflags, Lutaml::Model::Type::String
|
|
79
|
+
attribute :issignal, Lutaml::Model::Type::Integer
|
|
80
|
+
attribute :isstimulus, Lutaml::Model::Type::Integer
|
|
81
|
+
attribute :dispatchaction, Lutaml::Model::Type::String
|
|
82
|
+
attribute :target2, Lutaml::Model::Type::Integer
|
|
83
|
+
attribute :styleex, Lutaml::Model::Type::String
|
|
84
|
+
attribute :sourcestereotype, Lutaml::Model::Type::String
|
|
85
|
+
attribute :deststereotype, Lutaml::Model::Type::String
|
|
86
|
+
attribute :sourcestyle, Lutaml::Model::Type::String
|
|
87
|
+
attribute :deststyle, Lutaml::Model::Type::String
|
|
88
|
+
attribute :eventflags, Lutaml::Model::Type::String
|
|
89
|
+
|
|
90
|
+
def self.primary_key_column
|
|
91
|
+
:connector_id
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
def self.table_name
|
|
95
|
+
"t_connector"
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Check if connector is an association
|
|
99
|
+
# @return [Boolean]
|
|
100
|
+
def association?
|
|
101
|
+
connector_type == "Association"
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Check if connector is a generalization
|
|
105
|
+
# @return [Boolean]
|
|
106
|
+
def generalization?
|
|
107
|
+
connector_type == "Generalization"
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Check if connector is a dependency
|
|
111
|
+
# @return [Boolean]
|
|
112
|
+
def dependency?
|
|
113
|
+
connector_type == "Dependency"
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Check if connector is an aggregation
|
|
117
|
+
# @return [Boolean]
|
|
118
|
+
def aggregation?
|
|
119
|
+
connector_type == "Aggregation"
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# Check if connector is a realization
|
|
123
|
+
# @return [Boolean]
|
|
124
|
+
def realization?
|
|
125
|
+
connector_type == "Realization"
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Check if source is aggregate
|
|
129
|
+
# @return [Boolean]
|
|
130
|
+
def source_aggregate?
|
|
131
|
+
sourceisaggregate == 1
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Check if destination is aggregate
|
|
135
|
+
# @return [Boolean]
|
|
136
|
+
def dest_aggregate?
|
|
137
|
+
destisaggregate == 1
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Check if source is navigable
|
|
141
|
+
# @return [Boolean]
|
|
142
|
+
def source_navigable?
|
|
143
|
+
sourceisnavigable == 1
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Check if destination is navigable
|
|
147
|
+
# @return [Boolean]
|
|
148
|
+
def dest_navigable?
|
|
149
|
+
destisnavigable == 1
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Check if line is bold
|
|
153
|
+
# @return [Boolean]
|
|
154
|
+
def bold?
|
|
155
|
+
isbold == 1
|
|
156
|
+
end
|
|
157
|
+
end
|
|
158
|
+
end
|
|
159
|
+
end
|
|
160
|
+
end
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Ea
|
|
4
|
+
module Qea
|
|
5
|
+
module Models
|
|
6
|
+
# Represents a connector type definition from t_connectortypes table
|
|
7
|
+
#
|
|
8
|
+
# This table provides reference data for connector/association types.
|
|
9
|
+
# These define the available relationship types in UML models.
|
|
10
|
+
#
|
|
11
|
+
# @example
|
|
12
|
+
# connector_type = EaConnectorType.new
|
|
13
|
+
# connector_type.connector_type #=> "Association"
|
|
14
|
+
# connector_type.description #=> "Association"
|
|
15
|
+
class EaConnectorType < BaseModel
|
|
16
|
+
attribute :connector_type, Lutaml::Model::Type::String
|
|
17
|
+
attribute :description, Lutaml::Model::Type::String
|
|
18
|
+
|
|
19
|
+
def self.table_name
|
|
20
|
+
"t_connectortypes"
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# Primary key is Connector_Type (text)
|
|
24
|
+
def self.primary_key_column
|
|
25
|
+
"Connector_Type"
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Friendly name for connector type
|
|
29
|
+
# @return [String]
|
|
30
|
+
def name
|
|
31
|
+
connector_type
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Check if this is an association type
|
|
35
|
+
# @return [Boolean]
|
|
36
|
+
def association?
|
|
37
|
+
connector_type == "Association"
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Check if this is a generalization type
|
|
41
|
+
# @return [Boolean]
|
|
42
|
+
def generalization?
|
|
43
|
+
connector_type == "Generalization"
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Check if this is an aggregation type
|
|
47
|
+
# @return [Boolean]
|
|
48
|
+
def aggregation?
|
|
49
|
+
connector_type == "Aggregation"
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Check if this is a dependency type
|
|
53
|
+
# @return [Boolean]
|
|
54
|
+
def dependency?
|
|
55
|
+
connector_type == "Dependency"
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Ea
|
|
4
|
+
module Qea
|
|
5
|
+
module Models
|
|
6
|
+
# Represents a constraint type definition from t_constrainttypes table
|
|
7
|
+
#
|
|
8
|
+
# This table provides reference data for constraint types used in OCL
|
|
9
|
+
# constraints. These are NOT instances of constraints, but the type
|
|
10
|
+
# definitions themselves (Invariant, Pre-condition, Post-condition,
|
|
11
|
+
# Process).
|
|
12
|
+
#
|
|
13
|
+
# @example
|
|
14
|
+
# constraint_type = EaConstraintType.new
|
|
15
|
+
# constraint_type.constraint #=> "Invariant"
|
|
16
|
+
# constraint_type.description #=> "A state the object must always..."
|
|
17
|
+
class EaConstraintType < BaseModel
|
|
18
|
+
attribute :constraint, Lutaml::Model::Type::String
|
|
19
|
+
attribute :description, Lutaml::Model::Type::String
|
|
20
|
+
attribute :notes, Lutaml::Model::Type::String
|
|
21
|
+
|
|
22
|
+
def self.table_name
|
|
23
|
+
"t_constrainttypes"
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Primary key is Constraint (text)
|
|
27
|
+
def self.primary_key_column
|
|
28
|
+
"Constraint"
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Friendly name for constraint type
|
|
32
|
+
# @return [String]
|
|
33
|
+
def name
|
|
34
|
+
constraint
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Check if this is an invariant type
|
|
38
|
+
# @return [Boolean]
|
|
39
|
+
def invariant?
|
|
40
|
+
constraint == "Invariant"
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Check if this is a pre-condition type
|
|
44
|
+
# @return [Boolean]
|
|
45
|
+
def precondition?
|
|
46
|
+
constraint == "Pre-condition"
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Check if this is a post-condition type
|
|
50
|
+
# @return [Boolean]
|
|
51
|
+
def postcondition?
|
|
52
|
+
constraint == "Post-condition"
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Check if this is a process type
|
|
56
|
+
# @return [Boolean]
|
|
57
|
+
def process?
|
|
58
|
+
constraint == "Process"
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Ea
|
|
4
|
+
module Qea
|
|
5
|
+
module Models
|
|
6
|
+
# Represents a data type definition from t_datatypes table
|
|
7
|
+
#
|
|
8
|
+
# This table stores database-specific type definitions and mappings.
|
|
9
|
+
# It maps database vendor types (e.g., "VARCHAR2" in Oracle) to
|
|
10
|
+
# generic types (e.g., "varchar"). This is metadata for database
|
|
11
|
+
# schema generation, not UML DataType instances.
|
|
12
|
+
#
|
|
13
|
+
# @example
|
|
14
|
+
# datatype = EaDatatype.new
|
|
15
|
+
# datatype.type #=> "DDL"
|
|
16
|
+
# datatype.product_name #=> "Oracle"
|
|
17
|
+
# datatype.data_type #=> "VARCHAR2"
|
|
18
|
+
# datatype.generic_type #=> "varchar"
|
|
19
|
+
class EaDatatype < BaseModel
|
|
20
|
+
attribute :type, Lutaml::Model::Type::String
|
|
21
|
+
attribute :productname, Lutaml::Model::Type::String
|
|
22
|
+
attribute :datatype, Lutaml::Model::Type::String
|
|
23
|
+
attribute :size, Lutaml::Model::Type::Integer
|
|
24
|
+
attribute :maxlen, Lutaml::Model::Type::Integer
|
|
25
|
+
attribute :maxprec, Lutaml::Model::Type::Integer
|
|
26
|
+
attribute :maxscale, Lutaml::Model::Type::Integer
|
|
27
|
+
attribute :defaultlen, Lutaml::Model::Type::Integer
|
|
28
|
+
attribute :defaultprec, Lutaml::Model::Type::Integer
|
|
29
|
+
attribute :defaultscale, Lutaml::Model::Type::Integer
|
|
30
|
+
attribute :user, Lutaml::Model::Type::Integer
|
|
31
|
+
attribute :pdata1, Lutaml::Model::Type::String
|
|
32
|
+
attribute :pdata2, Lutaml::Model::Type::String
|
|
33
|
+
attribute :pdata3, Lutaml::Model::Type::String
|
|
34
|
+
attribute :pdata4, Lutaml::Model::Type::String
|
|
35
|
+
attribute :haslength, Lutaml::Model::Type::String
|
|
36
|
+
attribute :generictype, Lutaml::Model::Type::String
|
|
37
|
+
attribute :datatypeid, Lutaml::Model::Type::Integer
|
|
38
|
+
|
|
39
|
+
def self.table_name
|
|
40
|
+
"t_datatypes"
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def self.primary_key_column
|
|
44
|
+
:datatypeid
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Check if this is a DDL type
|
|
48
|
+
# @return [Boolean]
|
|
49
|
+
def ddl_type?
|
|
50
|
+
type == "DDL"
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Check if this is a Code type
|
|
54
|
+
# @return [Boolean]
|
|
55
|
+
def code_type?
|
|
56
|
+
type == "Code"
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Check if this is a user-defined type
|
|
60
|
+
# @return [Boolean]
|
|
61
|
+
def user_defined?
|
|
62
|
+
user == 1
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Check if type has length parameter
|
|
66
|
+
# @return [Boolean]
|
|
67
|
+
def has_length?
|
|
68
|
+
size == 1 || !haslength.nil?
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Check if type has precision parameter
|
|
72
|
+
# @return [Boolean]
|
|
73
|
+
def has_precision?
|
|
74
|
+
size == 2
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Get full type signature with size/precision
|
|
78
|
+
# @return [String]
|
|
79
|
+
def type_signature
|
|
80
|
+
case size
|
|
81
|
+
when 1
|
|
82
|
+
"#{datatype}(#{defaultlen})"
|
|
83
|
+
when 2
|
|
84
|
+
"#{datatype}(#{defaultprec},#{defaultscale})"
|
|
85
|
+
else
|
|
86
|
+
datatype
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Aliases for readability
|
|
91
|
+
alias product_name productname
|
|
92
|
+
alias data_type datatype
|
|
93
|
+
alias max_len maxlen
|
|
94
|
+
alias max_prec maxprec
|
|
95
|
+
alias max_scale maxscale
|
|
96
|
+
alias default_len defaultlen
|
|
97
|
+
alias default_prec defaultprec
|
|
98
|
+
alias default_scale defaultscale
|
|
99
|
+
alias generic_type generictype
|
|
100
|
+
alias datatype_id datatypeid
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
end
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Ea
|
|
4
|
+
module Qea
|
|
5
|
+
module Models
|
|
6
|
+
# Represents a diagram from the t_diagram table in EA database
|
|
7
|
+
# This represents visual diagrams in the model
|
|
8
|
+
class EaDiagram < BaseModel
|
|
9
|
+
attribute :diagram_id, Lutaml::Model::Type::Integer
|
|
10
|
+
attribute :package_id, Lutaml::Model::Type::Integer
|
|
11
|
+
attribute :parentid, Lutaml::Model::Type::Integer
|
|
12
|
+
attribute :diagram_type, Lutaml::Model::Type::String
|
|
13
|
+
attribute :name, Lutaml::Model::Type::String
|
|
14
|
+
attribute :version, Lutaml::Model::Type::String
|
|
15
|
+
attribute :author, Lutaml::Model::Type::String
|
|
16
|
+
attribute :showdetails, Lutaml::Model::Type::Integer
|
|
17
|
+
attribute :notes, Lutaml::Model::Type::String
|
|
18
|
+
attribute :stereotype, Lutaml::Model::Type::String
|
|
19
|
+
attribute :attPub, Lutaml::Model::Type::Integer
|
|
20
|
+
attribute :attPri, Lutaml::Model::Type::Integer
|
|
21
|
+
attribute :attPro, Lutaml::Model::Type::Integer
|
|
22
|
+
attribute :orientation, Lutaml::Model::Type::String
|
|
23
|
+
attribute :cx, Lutaml::Model::Type::Integer
|
|
24
|
+
attribute :cy, Lutaml::Model::Type::Integer
|
|
25
|
+
attribute :scale, Lutaml::Model::Type::Integer
|
|
26
|
+
attribute :createddate, Lutaml::Model::Type::String
|
|
27
|
+
attribute :modifieddate, Lutaml::Model::Type::String
|
|
28
|
+
attribute :htmlpath, Lutaml::Model::Type::String
|
|
29
|
+
attribute :showforeign, Lutaml::Model::Type::Integer
|
|
30
|
+
attribute :showborder, Lutaml::Model::Type::Integer
|
|
31
|
+
attribute :showpackagecontents, Lutaml::Model::Type::Integer
|
|
32
|
+
attribute :pdata, Lutaml::Model::Type::String
|
|
33
|
+
attribute :locked, Lutaml::Model::Type::Integer
|
|
34
|
+
attribute :ea_guid, Lutaml::Model::Type::String
|
|
35
|
+
attribute :tpos, Lutaml::Model::Type::Integer
|
|
36
|
+
attribute :swimlanes, Lutaml::Model::Type::String
|
|
37
|
+
attribute :styleex, Lutaml::Model::Type::String
|
|
38
|
+
|
|
39
|
+
def self.primary_key_column
|
|
40
|
+
:diagram_id
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def self.table_name
|
|
44
|
+
"t_diagram"
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Check if diagram shows details
|
|
48
|
+
# @return [Boolean]
|
|
49
|
+
def show_details?
|
|
50
|
+
showdetails == 1
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Check if diagram shows foreign elements
|
|
54
|
+
# @return [Boolean]
|
|
55
|
+
def show_foreign?
|
|
56
|
+
showforeign == 1
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Check if diagram shows border
|
|
60
|
+
# @return [Boolean]
|
|
61
|
+
def show_border?
|
|
62
|
+
showborder == 1
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Check if diagram shows package contents
|
|
66
|
+
# @return [Boolean]
|
|
67
|
+
def show_package_contents?
|
|
68
|
+
showpackagecontents == 1
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Check if diagram is locked
|
|
72
|
+
# @return [Boolean]
|
|
73
|
+
def locked?
|
|
74
|
+
locked == 1
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Check if orientation is portrait
|
|
78
|
+
# @return [Boolean]
|
|
79
|
+
def portrait?
|
|
80
|
+
orientation == "P"
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Check if orientation is landscape
|
|
84
|
+
# @return [Boolean]
|
|
85
|
+
def landscape?
|
|
86
|
+
orientation == "L"
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Check if diagram is a class diagram
|
|
90
|
+
# @return [Boolean]
|
|
91
|
+
def class_diagram?
|
|
92
|
+
diagram_type == "Logical"
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Check if diagram is a use case diagram
|
|
96
|
+
# @return [Boolean]
|
|
97
|
+
def use_case_diagram?
|
|
98
|
+
diagram_type == "Use Case"
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Check if diagram is a sequence diagram
|
|
102
|
+
# @return [Boolean]
|
|
103
|
+
def sequence_diagram?
|
|
104
|
+
diagram_type == "Sequence"
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Check if diagram is an activity diagram
|
|
108
|
+
# @return [Boolean]
|
|
109
|
+
def activity_diagram?
|
|
110
|
+
diagram_type == "Activity"
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
end
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Ea
|
|
4
|
+
module Qea
|
|
5
|
+
module Models
|
|
6
|
+
# Represents a diagram link from the t_diagramlinks table
|
|
7
|
+
#
|
|
8
|
+
# This model represents the visual rendering of connectors (associations,
|
|
9
|
+
# generalizations, etc.) on specific diagrams, including their routing
|
|
10
|
+
# geometry and styling.
|
|
11
|
+
class EaDiagramLink < BaseModel
|
|
12
|
+
attribute :diagramid, Lutaml::Model::Type::Integer
|
|
13
|
+
attribute :connectorid, Lutaml::Model::Type::Integer
|
|
14
|
+
attribute :geometry, Lutaml::Model::Type::String
|
|
15
|
+
attribute :style, Lutaml::Model::Type::String
|
|
16
|
+
attribute :hidden, Lutaml::Model::Type::Integer
|
|
17
|
+
attribute :path, Lutaml::Model::Type::String
|
|
18
|
+
attribute :instance_id, Lutaml::Model::Type::Integer
|
|
19
|
+
|
|
20
|
+
def self.primary_key_column
|
|
21
|
+
:instance_id
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def self.table_name
|
|
25
|
+
"t_diagramlinks"
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Check if the link is hidden on the diagram
|
|
29
|
+
# @return [Boolean]
|
|
30
|
+
def hidden?
|
|
31
|
+
hidden == 1
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Parse the Style string into a hash
|
|
35
|
+
# @return [Hash] Parsed style attributes
|
|
36
|
+
def parsed_style
|
|
37
|
+
return {} unless style
|
|
38
|
+
|
|
39
|
+
style.split(";").each_with_object({}) do |pair, hash|
|
|
40
|
+
key, value = pair.split("=", 2)
|
|
41
|
+
hash[key] = value if key && value
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Parse the Geometry string to extract routing points
|
|
46
|
+
# @return [Hash] Parsed geometry data
|
|
47
|
+
def parsed_geometry # rubocop:disable Metrics/MethodLength
|
|
48
|
+
return {} unless geometry
|
|
49
|
+
|
|
50
|
+
parts = geometry.split(",")
|
|
51
|
+
result = {}
|
|
52
|
+
|
|
53
|
+
# First 4 values are typically coordinates
|
|
54
|
+
if parts.length >= 4
|
|
55
|
+
result[:coords] = parts[0..3].map(&:strip).map(&:to_i)
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Remaining parts contain additional metadata
|
|
59
|
+
if parts.length > 4
|
|
60
|
+
result[:metadata] = parts[4..].join(",")
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
result
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Extract source and destination object IDs from style
|
|
67
|
+
# @return [Hash] Hash with :source_oid, :dest_oid
|
|
68
|
+
def object_ids
|
|
69
|
+
parsed = parsed_style
|
|
70
|
+
{
|
|
71
|
+
source_oid: parsed["SOID"],
|
|
72
|
+
dest_oid: parsed["EOID"],
|
|
73
|
+
}
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|