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)



28
29
30
# File 'lib/lutaml/qea/models/ea_diagram_type.rb', line 28

def self.primary_key_column
  "Diagram_Type"
end

.table_nameObject



23
24
25
# File 'lib/lutaml/qea/models/ea_diagram_type.rb', line 23

def self.table_name
  "t_diagramtypes"
end

Instance Method Details

#activity_diagram?Boolean

Check if this is an activity diagram

Returns:

  • (Boolean)


46
47
48
# File 'lib/lutaml/qea/models/ea_diagram_type.rb', line 46

def activity_diagram?
  diagram_type == "Activity"
end

#class_diagram?Boolean

Check if this is a class diagram

Returns:

  • (Boolean)


40
41
42
# File 'lib/lutaml/qea/models/ea_diagram_type.rb', line 40

def class_diagram?
  diagram_type == "Logical"
end

#type_nameString

Friendly type name

Returns:

  • (String)


34
35
36
# File 'lib/lutaml/qea/models/ea_diagram_type.rb', line 34

def type_name
  diagram_type
end

#use_case_diagram?Boolean

Check if this is a use case diagram

Returns:

  • (Boolean)


52
53
54
# File 'lib/lutaml/qea/models/ea_diagram_type.rb', line 52

def use_case_diagram?
  diagram_type == "UseCase"
end