Class: Lutaml::Qea::Models::EaDiagramType

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/lutaml/qea/models/ea_diagram_type.rb

Overview

Represents a diagram type definition from t_diagramtypes table

This table provides reference data for diagram types available in EA. These define the types of UML diagrams that can be created.

Examples:

diagram_type = EaDiagramType.new
diagram_type.diagram_type #=> "Logical"
diagram_type.name #=> "Logical View"
diagram_type.package_id #=> 1

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

from_db_row, #primary_key

Class Method Details

.primary_key_columnObject

Primary key is Diagram_Type (text)



26
27
28
# File 'lib/lutaml/qea/models/ea_diagram_type.rb', line 26

def self.primary_key_column
  "Diagram_Type"
end

.table_nameObject



21
22
23
# File 'lib/lutaml/qea/models/ea_diagram_type.rb', line 21

def self.table_name
  "t_diagramtypes"
end

Instance Method Details

#activity_diagram?Boolean

Check if this is an activity diagram

Returns:

  • (Boolean)


44
45
46
# File 'lib/lutaml/qea/models/ea_diagram_type.rb', line 44

def activity_diagram?
  diagram_type == "Activity"
end

#class_diagram?Boolean

Check if this is a class diagram

Returns:

  • (Boolean)


38
39
40
# File 'lib/lutaml/qea/models/ea_diagram_type.rb', line 38

def class_diagram?
  diagram_type == "Logical"
end

#type_nameString

Friendly type name

Returns:

  • (String)


32
33
34
# File 'lib/lutaml/qea/models/ea_diagram_type.rb', line 32

def type_name
  diagram_type
end

#use_case_diagram?Boolean

Check if this is a use case diagram

Returns:

  • (Boolean)


50
51
52
# File 'lib/lutaml/qea/models/ea_diagram_type.rb', line 50

def use_case_diagram?
  diagram_type == "UseCase"
end