Class: Lutaml::Qea::Models::EaStereotype

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

Overview

Represents a stereotype definition from t_stereotypes table

Stereotypes are UML profile extensions that classify elements. This table stores stereotype DEFINITIONS (not instances). Individual elements reference these stereotypes by name.

Examples:

stereotype = EaStereotype.new
stereotype.stereotype #=> "CodeList"
stereotype.applies_to #=> "Class"
stereotype.description #=> "A list of codes"

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

from_db_row, #primary_key

Class Method Details

.primary_key_columnObject

No primary key - this is a lookup/reference table



35
36
37
# File 'lib/lutaml/qea/models/ea_stereotype.rb', line 35

def self.primary_key_column
  nil
end

.table_nameObject



30
31
32
# File 'lib/lutaml/qea/models/ea_stereotype.rb', line 30

def self.table_name
  "t_stereotypes"
end

Instance Method Details

#element_typeString

Get friendly name for applies_to

Returns:

  • (String)


47
48
49
# File 'lib/lutaml/qea/models/ea_stereotype.rb', line 47

def element_type
  appliesto
end

#metafile_enabled?Boolean

Check if stereotype is enabled for metafile

Returns:

  • (Boolean)


41
42
43
# File 'lib/lutaml/qea/models/ea_stereotype.rb', line 41

def metafile_enabled?
  mfenabled == 1
end