Standalone Ruby gem for parsing Sparx Enterprise Architect data files
(QEA SQLite database and Sparx XMI). Pure parse, optional bridge to
lutaml-uml for cross-vendor UML output and SPA generation.
Installation
gem install ea
For SPA generation (optional):
gem install ea lutaml-uml
Or in your Gemfile:
source "https://rubygems.org"
gem "ea", "~> 0.2"
gem "lutaml-uml", "~> 0.5" # optional: SPA + SVG diagram rendering
Quick start
Parse a QEA file (pure — no lutaml-uml needed)
Generate a SPA from QEA (requires lutaml-uml)
ea spa model.qea --output browser.html
Produces a single-file Vue IIFE HTML (~300KB for a typical model) with package hierarchy, class details, and diagram navigation.
Generate Sparx XMI from QEA (pure — no lutaml-uml)
ea convert model.qea --to xmi --output model.xmi
Extract a diagram as SVG (requires lutaml-uml)
ea diagrams extract model.qea "Diagram Name" --output diagram.svg
Architecture
The ea gem has two layers:
Pure layer (no lutaml-uml dependency)
|
Returns |
|
Converts |
|
Low-level QEA loader → |
|
Low-level XMI loader → |
Bridge layer (optional — lazy-requires lutaml-uml)
|
Returns |
|
|
|
|
Data flow
QEA file ──→ Ea::Qea::Database ──┐
├──→ Ea::Bridge ──→ Lutaml::Uml::Document
XMI file ──→ Xmi::Sparx::Root ──┘ │
├──→ SPA (HTML)
├──→ SVG diagram
└──→ cross-vendor output
QEA file ──→ Ea::Qea::Database ──→ Ea::Transformers::QeaToXmi ──→ Sparx XMI
(pure, no lutaml-uml)
CLI commands
|
Generate single-page app from QEA/XMI/LUR |
|
List model elements (auto-detects QEA or XMI) |
|
List diagrams in a QEA/XMI file |
|
Render a diagram to SVG |
|
Validate EA model |
|
Show collection counts |
|
Parse to internal model representation |
|
Convert QEA → Sparx XMI |
|
Show gem version |
Limitations
-
Sparx only: QEA format and Sparx-flavored XMI only. Does not parse MagicDraw or Papyrus XMI.
-
XMI parser: Parses
<xmi:Extension>blocks for Sparx-specific diagram metadata. Generic OMG XMI is handled by thexmigem.
Development
git clone https://github.com/lutaml/ea
cd ea
bundle install
bundle exec rspec # run specs (2036 examples)
bundle exec ea help # see CLI commands
License
MIT — see LICENSE file.