Module: Ea::Bridge::QeaToUml

Defined in:
lib/ea/bridge/qea_to_uml.rb

Overview

Transforms an Ea::Qea::Database into a Lutaml::Uml::Document.

This is the bridge between ea's internal EA-native representation (the SQLite-derived row models) and the tool-agnostic UML metamodel from lutaml-uml.

The heavy lifting is done by the existing factory classes under Ea::Qea::Factory::*. This module is the clean public entry point — consumers should call Ea::Bridge::QeaToUml.transform(db) rather than reaching into the factory internals.

Class Method Summary collapse

Class Method Details

.factory(database, options) ⇒ Object



34
35
36
# File 'lib/ea/bridge/qea_to_uml.rb', line 34

def factory(database, options)
  Ea::Qea::Factory::EaToUmlFactory.new(database, options)
end

.require_lutaml_uml!Object



26
27
28
29
30
31
32
# File 'lib/ea/bridge/qea_to_uml.rb', line 26

def require_lutaml_uml!
  require "lutaml/uml"
rescue LoadError => e
  raise Ea::Error,
        "Ea::Bridge requires the `lutaml-uml` gem. " \
        "Install it via `gem install lutaml-uml`. (#{e.message})"
end

.transform(database, options = {}) ⇒ Lutaml::Uml::Document

Parameters:

  • database (Ea::Qea::Database)

    loaded QEA database

  • options (Hash) (defaults to: {})

    transformation options

Returns:

  • (Lutaml::Uml::Document)


21
22
23
24
# File 'lib/ea/bridge/qea_to_uml.rb', line 21

def transform(database, options = {})
  require_lutaml_uml!
  factory(database, options).create_document
end