Class: Ea::Qea::Models::EaXref
- Defined in:
- lib/ea/qea/models/ea_xref.rb
Overview
Represents a cross-reference from the t_xref table in EA database Stores cross-references for stereotypes, properties, and relationships between UML elements
Constant Summary collapse
- COLUMN_MAP =
{ "XrefID" => :xref_id, "Type" => :xref_type, }.freeze
Class Method Summary collapse
Instance Method Summary collapse
-
#attribute_property? ⇒ Boolean
Check if this xref is for attribute properties.
-
#connector_property? ⇒ Boolean
Check if this xref is for connector properties.
-
#custom_property? ⇒ Boolean
Check if this xref is for custom properties.
-
#diagram_property? ⇒ Boolean
Check if this xref is for diagram properties.
-
#element_property? ⇒ Boolean
Check if this xref is for element properties.
-
#parsed_description ⇒ Hash
Parse the Description field into structured data.
-
#stereotype? ⇒ Boolean
Check if this xref is for stereotypes.
Methods inherited from BaseModel
from_db_row, #primary_key, #sort_position
Class Method Details
.column_map ⇒ Object
31 32 33 |
# File 'lib/ea/qea/models/ea_xref.rb', line 31 def self.column_map COLUMN_MAP end |
.primary_key_column ⇒ Object
17 18 19 |
# File 'lib/ea/qea/models/ea_xref.rb', line 17 def self.primary_key_column :xref_id end |
.table_name ⇒ Object
21 22 23 |
# File 'lib/ea/qea/models/ea_xref.rb', line 21 def self.table_name "t_xref" end |
Instance Method Details
#attribute_property? ⇒ Boolean
Check if this xref is for attribute properties
80 81 82 |
# File 'lib/ea/qea/models/ea_xref.rb', line 80 def attribute_property? xref_type == "attribute property" end |
#connector_property? ⇒ Boolean
Check if this xref is for connector properties
68 69 70 |
# File 'lib/ea/qea/models/ea_xref.rb', line 68 def connector_property? xref_type&.include?("connector") && xref_type.include?("property") end |
#custom_property? ⇒ Boolean
Check if this xref is for custom properties
56 57 58 |
# File 'lib/ea/qea/models/ea_xref.rb', line 56 def custom_property? !description&.include?("@STEREO") && !description&.include?("@TAG") end |
#diagram_property? ⇒ Boolean
Check if this xref is for diagram properties
74 75 76 |
# File 'lib/ea/qea/models/ea_xref.rb', line 74 def diagram_property? xref_type == "diagram properties" end |
#element_property? ⇒ Boolean
Check if this xref is for element properties
62 63 64 |
# File 'lib/ea/qea/models/ea_xref.rb', line 62 def element_property? xref_type == "element property" end |
#parsed_description ⇒ Hash
Parse the Description field into structured data
42 43 44 45 46 |
# File 'lib/ea/qea/models/ea_xref.rb', line 42 def parsed_description return @parsed_description if defined?(@parsed_description) @parsed_description = parse_description_field(description) end |
#stereotype? ⇒ Boolean
Check if this xref is for stereotypes
50 51 52 |
# File 'lib/ea/qea/models/ea_xref.rb', line 50 def stereotype? name == "Stereotypes" || description&.include?("@STEREO") end |