lutaml 0.11.9 → 0.11.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/docs.yml +87 -0
- data/.github/workflows/links.yml +113 -0
- data/.github/workflows/rake.yml +52 -0
- data/.github/workflows/release.yml +83 -0
- data/.gitignore +29 -0
- data/CLAUDE.md +27 -0
- data/Gemfile +2 -2
- data/docs/.github/workflows/docs.yml +66 -0
- data/docs/.github/workflows/links.yml +78 -0
- data/docs/CONTINUATION_PLAN.md +168 -0
- data/docs/Gemfile +13 -0
- data/docs/MIGRATION_GUIDE.md +202 -0
- data/docs/README.md +252 -0
- data/docs/REFACTOR_PLAN.md +214 -0
- data/docs/_config.yml +144 -0
- data/docs/_guides/cli-usage.adoc +43 -0
- data/docs/_guides/diagram-generation.adoc +316 -0
- data/docs/_guides/index.adoc +136 -0
- data/docs/_guides/parsing/express-parsing.adoc +42 -0
- data/docs/_guides/parsing/index.adoc +78 -0
- data/docs/_guides/parsing/qea-parsing.adoc +47 -0
- data/docs/_guides/parsing/xmi-parsing.adoc +40 -0
- data/docs/_guides/repository-management.adoc +44 -0
- data/docs/_guides/sysml-modeling.adoc +37 -0
- data/docs/_guides/uml-modeling.adoc +115 -0
- data/docs/_pages/concepts/diagram-generation.adoc +337 -0
- data/docs/_pages/concepts/lur-format.adoc +711 -0
- data/docs/_pages/concepts/qea-parsing.adoc +418 -0
- data/docs/_pages/concepts/uml-models.adoc +43 -0
- data/docs/_pages/core/architecture.adoc +329 -0
- data/docs/_pages/core/installation.adoc +321 -0
- data/docs/_pages/core/overview.adoc +197 -0
- data/docs/_pages/index.adoc +49 -0
- data/docs/_pages/uml-syntax.adoc +1011 -0
- data/docs/_references/api/parsers.adoc +61 -0
- data/docs/_references/api/presenters.adoc +43 -0
- data/docs/_references/api/repository.adoc +67 -0
- data/docs/_references/cli/commands.adoc +72 -0
- data/docs/_references/configuration/diagram-styles.adoc +716 -0
- data/docs/_references/configuration/index.adoc +53 -0
- data/docs/_references/configuration/package-metadata.adoc +416 -0
- data/docs/_references/formats/index.adoc +43 -0
- data/docs/_references/formats/lur-format.adoc +39 -0
- data/docs/_references/formats/lutaml-syntax.adoc +379 -0
- data/docs/_references/formats/qea-structure.adoc +1364 -0
- data/docs/_references/index.adoc +198 -0
- data/docs/_tutorials/documentation-site.adoc +47 -0
- data/docs/_tutorials/first-lur-package.adoc +45 -0
- data/docs/_tutorials/generating-diagrams.adoc +42 -0
- data/docs/_tutorials/getting-started.adoc +45 -0
- data/docs/_tutorials/index.adoc +100 -0
- data/docs/_tutorials/querying-models.adoc +44 -0
- data/docs/examples/build_package.rb +12 -0
- data/docs/examples/build_site.rb +12 -0
- data/docs/examples/city_model.rb +21 -0
- data/docs/examples/present_class.rb +10 -0
- data/docs/examples/query_model.rb +12 -0
- data/docs/examples/render_diagram.rb +11 -0
- data/docs/index.adoc +64 -0
- data/docs/lml-models-and-instances-syntax.adoc +931 -0
- data/docs/lml.adoc +210 -0
- data/docs/lychee.toml +50 -0
- data/lib/lutaml/version.rb +1 -1
- data/lib/lutaml.rb +6 -1
- data/lutaml.gemspec +8 -6
- metadata +75 -131
- data/exe/lutaml-lml +0 -6
- data/exe/lutaml-lml-lsp +0 -11
- data/lib/lutaml/lml/association_label_resolver.rb +0 -52
- data/lib/lutaml/lml/cli.rb +0 -506
- data/lib/lutaml/lml/data_processor/attribute_processing.rb +0 -133
- data/lib/lutaml/lml/data_processor/collection_processing.rb +0 -37
- data/lib/lutaml/lml/data_processor/instance_processing.rb +0 -77
- data/lib/lutaml/lml/data_processor/value_declaration_processing.rb +0 -70
- data/lib/lutaml/lml/data_processor/value_processing.rb +0 -103
- data/lib/lutaml/lml/data_processor/view_processing.rb +0 -26
- data/lib/lutaml/lml/data_processor.rb +0 -59
- data/lib/lutaml/lml/diagnostic.rb +0 -149
- data/lib/lutaml/lml/document_builder.rb +0 -481
- data/lib/lutaml/lml/entity_types.rb +0 -30
- data/lib/lutaml/lml/executor/adapter_helpers.rb +0 -45
- data/lib/lutaml/lml/executor/condition_evaluator.rb +0 -169
- data/lib/lutaml/lml/executor/csv_adapter.rb +0 -88
- data/lib/lutaml/lml/executor/format_adapter.rb +0 -54
- data/lib/lutaml/lml/executor/xml_adapter.rb +0 -102
- data/lib/lutaml/lml/executor.rb +0 -96
- data/lib/lutaml/lml/format/adapter/document.rb +0 -11
- data/lib/lutaml/lml/format/adapter/mapping.rb +0 -31
- data/lib/lutaml/lml/format/adapter/standard_adapter.rb +0 -162
- data/lib/lutaml/lml/format/adapter/transform.rb +0 -11
- data/lib/lutaml/lml/format.rb +0 -29
- data/lib/lutaml/lml/formatter/base.rb +0 -79
- data/lib/lutaml/lml/formatter/canonical.rb +0 -736
- data/lib/lutaml/lml/formatter/elk.rb +0 -45
- data/lib/lutaml/lml/formatter/svg_pdf/path_parser.rb +0 -134
- data/lib/lutaml/lml/formatter/svg_pdf.rb +0 -285
- data/lib/lutaml/lml/formatter.rb +0 -11
- data/lib/lutaml/lml/grammar/lml.artifact.json +0 -14993
- data/lib/lutaml/lml/grammar/lml.parg +0 -389
- data/lib/lutaml/lml/grammar.rb +0 -60
- data/lib/lutaml/lml/has_attributes.rb +0 -14
- data/lib/lutaml/lml/import_resolver.rb +0 -96
- data/lib/lutaml/lml/layout/elk_engine.rb +0 -15
- data/lib/lutaml/lml/layout/elk_graph_builder.rb +0 -129
- data/lib/lutaml/lml/layout/elk_svg_markers.rb +0 -45
- data/lib/lutaml/lml/layout/elk_svg_renderer.rb +0 -119
- data/lib/lutaml/lml/layout/engine.rb +0 -17
- data/lib/lutaml/lml/layout.rb +0 -12
- data/lib/lutaml/lml/literal_value.rb +0 -32
- data/lib/lutaml/lml/lsp/conversions.rb +0 -78
- data/lib/lutaml/lml/lsp/keywords.rb +0 -43
- data/lib/lutaml/lml/lsp/server.rb +0 -378
- data/lib/lutaml/lml/lsp/store.rb +0 -68
- data/lib/lutaml/lml/lsp/transport.rb +0 -53
- data/lib/lutaml/lml/lsp.rb +0 -16
- data/lib/lutaml/lml/model_compiler/enums.rb +0 -172
- data/lib/lutaml/lml/model_compiler/hydration.rb +0 -123
- data/lib/lutaml/lml/model_compiler/serialization_mappings.rb +0 -188
- data/lib/lutaml/lml/model_compiler/string_formats.rb +0 -42
- data/lib/lutaml/lml/model_compiler/validation.rb +0 -65
- data/lib/lutaml/lml/model_compiler.rb +0 -323
- data/lib/lutaml/lml/models/action.rb +0 -10
- data/lib/lutaml/lml/models/association.rb +0 -29
- data/lib/lutaml/lml/models/cardinality.rb +0 -10
- data/lib/lutaml/lml/models/collection.rb +0 -11
- data/lib/lutaml/lml/models/constraint.rb +0 -23
- data/lib/lutaml/lml/models/data_type.rb +0 -41
- data/lib/lutaml/lml/models/derived_field.rb +0 -14
- data/lib/lutaml/lml/models/diagram.rb +0 -20
- data/lib/lutaml/lml/models/document.rb +0 -84
- data/lib/lutaml/lml/models/enum.rb +0 -38
- data/lib/lutaml/lml/models/fidelity.rb +0 -10
- data/lib/lutaml/lml/models/group.rb +0 -11
- data/lib/lutaml/lml/models/instance.rb +0 -26
- data/lib/lutaml/lml/models/instance_collection.rb +0 -16
- data/lib/lutaml/lml/models/instances_export.rb +0 -10
- data/lib/lutaml/lml/models/instances_import.rb +0 -11
- data/lib/lutaml/lml/models/mapping.rb +0 -15
- data/lib/lutaml/lml/models/mapping_rule.rb +0 -16
- data/lib/lutaml/lml/models/member_field.rb +0 -14
- data/lib/lutaml/lml/models/namespace.rb +0 -16
- data/lib/lutaml/lml/models/operation.rb +0 -26
- data/lib/lutaml/lml/models/operation_parameter.rb +0 -12
- data/lib/lutaml/lml/models/package.rb +0 -26
- data/lib/lutaml/lml/models/primitive_type.rb +0 -33
- data/lib/lutaml/lml/models/reference.rb +0 -23
- data/lib/lutaml/lml/models/serialization_mapping.rb +0 -19
- data/lib/lutaml/lml/models/string_format.rb +0 -16
- data/lib/lutaml/lml/models/top_element_attribute.rb +0 -116
- data/lib/lutaml/lml/models/uml_class.rb +0 -85
- data/lib/lutaml/lml/models/value.rb +0 -15
- data/lib/lutaml/lml/models/view_filter.rb +0 -11
- data/lib/lutaml/lml/models/view_import.rb +0 -11
- data/lib/lutaml/lml/parser.rb +0 -19
- data/lib/lutaml/lml/pipeline.rb +0 -73
- data/lib/lutaml/lml/positioned.rb +0 -13
- data/lib/lutaml/lml/preprocessor.rb +0 -130
- data/lib/lutaml/lml/quoting.rb +0 -60
- data/lib/lutaml/lml/source.rb +0 -49
- data/lib/lutaml/lml/source_position.rb +0 -20
- data/lib/lutaml/lml/symbol_index.rb +0 -200
- data/lib/lutaml/lml/transform.rb +0 -119
- data/lib/lutaml/lml/types/text_type.rb +0 -28
- data/lib/lutaml/lml/types.rb +0 -10
- data/lib/lutaml/lml/validator.rb +0 -458
- data/lib/lutaml/lml/version.rb +0 -10
- data/lib/lutaml/lml/view_resolution.rb +0 -32
- data/lib/lutaml/lml/view_resolver.rb +0 -48
- data/lib/lutaml/lml/yaml_parser.rb +0 -17
- data/lib/lutaml/lml.rb +0 -130
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
# Documentation Refactoring Plan
|
|
2
|
+
|
|
3
|
+
## Goal
|
|
4
|
+
Refactor LutaML documentation into a Jekyll-based 4-collection structure following industry best practices.
|
|
5
|
+
|
|
6
|
+
## Current State Analysis
|
|
7
|
+
|
|
8
|
+
### User Documentation (Keep & Restructure)
|
|
9
|
+
1. **README.adoc** (2015 lines) - Comprehensive guide, needs to be split
|
|
10
|
+
2. **diagram-generation.adoc** - Guide for EA diagram generation
|
|
11
|
+
3. **diagram-configuration.adoc** - Configuration reference
|
|
12
|
+
4. **lutaml-uml.adoc** - UML language guide
|
|
13
|
+
5. **lutaml-express.adoc** - EXPRESS parsing
|
|
14
|
+
6. **lutaml-xmi.adoc** - XMI parsing
|
|
15
|
+
7. **lutaml_syntax.adoc** - Syntax reference
|
|
16
|
+
8. **ea_qea_structure.adoc** - QEA format specification
|
|
17
|
+
9. **package_metadata.adoc** - Metadata configuration
|
|
18
|
+
|
|
19
|
+
### Internal Documentation (Archive)
|
|
20
|
+
- CLI_THOR_ARCHITECTURE.md
|
|
21
|
+
- COMPREHENSIVE_VALIDATION_PLAN.md
|
|
22
|
+
- CONTINUATION_PROMPT.txt
|
|
23
|
+
- DIAGRAM_SUPPORT_IMPLEMENTATION.md
|
|
24
|
+
- IMPLEMENTATION_PLAN.md
|
|
25
|
+
- NOTE_OBJECT_ARCHITECTURE.md
|
|
26
|
+
- QEA_PARSER_IMPLEMENTATION_STATUS.md
|
|
27
|
+
- SPA_CONTINUATION_PLAN.md
|
|
28
|
+
- svg_comparison_results.md
|
|
29
|
+
- TWO_PHASE_VALIDATION_IMPLEMENTATION.md
|
|
30
|
+
- VALIDATION_ARCHITECTURE_REDESIGN.md
|
|
31
|
+
- architecture/SPA_ARCHITECTURE.md
|
|
32
|
+
- features/SPA_BROWSER.md
|
|
33
|
+
|
|
34
|
+
## Target Structure
|
|
35
|
+
|
|
36
|
+
### Collection 1: Core Topics (_pages/)
|
|
37
|
+
**Purpose**: Fundamental concepts and essential information
|
|
38
|
+
|
|
39
|
+
- `index.adoc` - Core Topics Overview
|
|
40
|
+
- `overview.adoc` - What is LutaML
|
|
41
|
+
- `installation.adoc` - Installation guide
|
|
42
|
+
- `architecture.adoc` - System architecture
|
|
43
|
+
- `concepts/` - Core concepts directory
|
|
44
|
+
- `qea-parsing.adoc` - QEA direct parsing
|
|
45
|
+
- `lur-format.adoc` - LUR package format
|
|
46
|
+
- `uml-models.adoc` - UML model structure
|
|
47
|
+
- `diagram-generation.adoc` - Diagram generation overview
|
|
48
|
+
|
|
49
|
+
### Collection 2: Tutorials (_tutorials/)
|
|
50
|
+
**Purpose**: Step-by-step learning paths
|
|
51
|
+
|
|
52
|
+
- `index.adoc` - Tutorials Overview
|
|
53
|
+
- `getting-started.adoc` - Quick start tutorial
|
|
54
|
+
- `first-lur-package.adoc` - Building your first LUR
|
|
55
|
+
- `generating-diagrams.adoc` - Creating diagrams
|
|
56
|
+
- `documentation-site.adoc` - Building a docs site
|
|
57
|
+
- `querying-models.adoc` - Searching and querying
|
|
58
|
+
|
|
59
|
+
### Collection 3: Guides (_guides/)
|
|
60
|
+
**Purpose**: Task-oriented how-to documentation
|
|
61
|
+
|
|
62
|
+
- `index.adoc` - Guides Overview
|
|
63
|
+
- `cli-usage.adoc` - CLI usage guide
|
|
64
|
+
- `diagram-configuration.adoc` - Configuring diagrams
|
|
65
|
+
- `package-metadata.adoc` - Package metadata setup
|
|
66
|
+
- `repository-management.adoc` - Managing repositories
|
|
67
|
+
- `parsing/` - Parsing guides
|
|
68
|
+
- `qea-parsing.adoc` - QEA parsing guide
|
|
69
|
+
- `xmi-parsing.adoc` - XMI parsing guide
|
|
70
|
+
- `express-parsing.adoc` - EXPRESS parsing guide
|
|
71
|
+
|
|
72
|
+
### Collection 4: References (_references/)
|
|
73
|
+
**Purpose**: Detailed technical specifications
|
|
74
|
+
|
|
75
|
+
- `index.adoc` - References Overview
|
|
76
|
+
- `cli/` - CLI reference
|
|
77
|
+
- `commands.adoc` - Complete command reference
|
|
78
|
+
- `build.adoc` - Build command
|
|
79
|
+
- `search.adoc` - Search command
|
|
80
|
+
- `export.adoc` - Export command
|
|
81
|
+
- `api/` - API reference
|
|
82
|
+
- `repository.adoc` - Repository API
|
|
83
|
+
- `parsers.adoc` - Parser APIs
|
|
84
|
+
- `presenters.adoc` - Presenter APIs
|
|
85
|
+
- `formats/` - Format specifications
|
|
86
|
+
- `qea-structure.adoc` - QEA file format
|
|
87
|
+
- `lur-format.adoc` - LUR package format
|
|
88
|
+
- `lutaml-syntax.adoc` - LutaML syntax
|
|
89
|
+
- `configuration/` - Configuration schemas
|
|
90
|
+
- `diagram-styles.adoc` - Diagram styling config
|
|
91
|
+
- `package-metadata.adoc` - Package metadata config
|
|
92
|
+
|
|
93
|
+
## Implementation Steps
|
|
94
|
+
|
|
95
|
+
### Phase 1: Setup (Priority 1)
|
|
96
|
+
- [x] Create refactoring plan
|
|
97
|
+
- [ ] Create directory structure
|
|
98
|
+
- [ ] Setup Jekyll _config.yml
|
|
99
|
+
- [ ] Create main index.adoc
|
|
100
|
+
- [ ] Create collection overview pages
|
|
101
|
+
|
|
102
|
+
### Phase 2: Content Migration (Priority 1)
|
|
103
|
+
- [ ] Migrate core topics to _pages/
|
|
104
|
+
- [ ] Create tutorials from README examples
|
|
105
|
+
- [ ] Convert guides
|
|
106
|
+
- [ ] Move references
|
|
107
|
+
|
|
108
|
+
### Phase 3: CI/CD (Priority 2)
|
|
109
|
+
- [ ] Add GitHub Actions workflow
|
|
110
|
+
- [ ] Setup link checking
|
|
111
|
+
- [ ] Create lychee.toml
|
|
112
|
+
|
|
113
|
+
### Phase 4: Cleanup (Priority 2)
|
|
114
|
+
- [ ] Archive internal docs to old-docs/
|
|
115
|
+
- [ ] Update cross-references
|
|
116
|
+
- [ ] Fix all internal links
|
|
117
|
+
|
|
118
|
+
### Phase 5: Testing (Priority 3)
|
|
119
|
+
- [ ] Test Jekyll build
|
|
120
|
+
- [ ] Verify all links
|
|
121
|
+
- [ ] Check mobile responsiveness
|
|
122
|
+
|
|
123
|
+
## Content Mapping
|
|
124
|
+
|
|
125
|
+
### From README.adoc
|
|
126
|
+
|
|
127
|
+
**To _pages/:**
|
|
128
|
+
- Overview section → overview.adoc
|
|
129
|
+
- Installation → installation.adoc
|
|
130
|
+
- Architecture intro → architecture.adoc
|
|
131
|
+
|
|
132
|
+
**To _tutorials/:**
|
|
133
|
+
- Quick start → getting-started.adoc
|
|
134
|
+
- Basic usage examples → first-lur-package.adoc
|
|
135
|
+
|
|
136
|
+
**To _guides/:**
|
|
137
|
+
- CLI command usage → cli-usage.adoc
|
|
138
|
+
- Interactive features → guides/
|
|
139
|
+
|
|
140
|
+
**To _references/:**
|
|
141
|
+
- CLI commands reference → references/cli/commands.adoc
|
|
142
|
+
- API reference → references/api/
|
|
143
|
+
|
|
144
|
+
### Diagram Documentation
|
|
145
|
+
|
|
146
|
+
**diagram-generation.adoc → Split:**
|
|
147
|
+
- Overview/intro → _pages/concepts/diagram-generation.adoc
|
|
148
|
+
- Configuration basics → _tutorials/generating-diagrams.adoc
|
|
149
|
+
- Advanced configuration → _guides/diagram-configuration.adoc
|
|
150
|
+
|
|
151
|
+
**diagram-configuration.adoc:**
|
|
152
|
+
- All content → _references/configuration/diagram-styles.adoc
|
|
153
|
+
|
|
154
|
+
### Format Documentation
|
|
155
|
+
|
|
156
|
+
**ea_qea_structure.adoc:**
|
|
157
|
+
- All content → _references/formats/qea-structure.adoc
|
|
158
|
+
|
|
159
|
+
**lutaml_syntax.adoc:**
|
|
160
|
+
- All content → _references/formats/lutaml-syntax.adoc
|
|
161
|
+
|
|
162
|
+
**package_metadata.adoc:**
|
|
163
|
+
- Concept/overview → _pages/concepts/ (brief)
|
|
164
|
+
- Setup guide → _guides/package-metadata.adoc
|
|
165
|
+
- Full reference → _references/configuration/package-metadata.adoc
|
|
166
|
+
|
|
167
|
+
## Front Matter Template
|
|
168
|
+
|
|
169
|
+
Every page needs YAML front matter:
|
|
170
|
+
|
|
171
|
+
```yaml
|
|
172
|
+
---
|
|
173
|
+
title: Page Title
|
|
174
|
+
parent: Parent Page Title (if nested)
|
|
175
|
+
nav_order: 1
|
|
176
|
+
---
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
## Principles
|
|
180
|
+
|
|
181
|
+
1. **Onion Structure**: Information revealed incrementally
|
|
182
|
+
2. **3-Click Rule**: Any topic reachable within 3 clicks
|
|
183
|
+
3. **Content First**: Focus on user needs, not structure
|
|
184
|
+
4. **MECE**: Mutually Exclusive, Collectively Exhaustive
|
|
185
|
+
5. **No Orphans**: Every page linked from somewhere
|
|
186
|
+
|
|
187
|
+
## Navigation Order
|
|
188
|
+
|
|
189
|
+
Set `nav_order` to create logical flow:
|
|
190
|
+
- Core concepts: 1-10
|
|
191
|
+
- Getting started: 11-20
|
|
192
|
+
- Tutorials: 21-30
|
|
193
|
+
- Guides: 31-40
|
|
194
|
+
- References: 41-50
|
|
195
|
+
|
|
196
|
+
## Cross-References
|
|
197
|
+
|
|
198
|
+
Use relative links:
|
|
199
|
+
```adoc
|
|
200
|
+
See link:../guides/cli-usage.adoc[CLI Usage Guide]
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
## Testing Checklist
|
|
204
|
+
|
|
205
|
+
- [ ] All pages have front matter
|
|
206
|
+
- [ ] All links work
|
|
207
|
+
- [ ] Navigation is logical
|
|
208
|
+
- [ ] Mobile responsive
|
|
209
|
+
- [ ] Search works
|
|
210
|
+
- [ ] Dark/light theme works
|
|
211
|
+
- [ ] No 404s
|
|
212
|
+
- [ ] Images load
|
|
213
|
+
- [ ] Code blocks render
|
|
214
|
+
- [ ] Tables format correctly
|
data/docs/_config.yml
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# Site settings
|
|
2
|
+
title: LutaML Ruby
|
|
3
|
+
description: >-
|
|
4
|
+
Universal Ruby library and CLI for accessing, parsing, and manipulating data models
|
|
5
|
+
across multiple modeling languages including UML, EXPRESS, and Enterprise Architect formats
|
|
6
|
+
baseurl: "/lutaml"
|
|
7
|
+
url: "https://www.lutaml.org"
|
|
8
|
+
|
|
9
|
+
# Theme
|
|
10
|
+
theme: just-the-docs
|
|
11
|
+
remote_theme: just-the-docs/just-the-docs@v0.10.1
|
|
12
|
+
|
|
13
|
+
# Color scheme
|
|
14
|
+
color_scheme: light
|
|
15
|
+
|
|
16
|
+
# Search
|
|
17
|
+
search_enabled: true
|
|
18
|
+
search:
|
|
19
|
+
heading_level: 2
|
|
20
|
+
previews: 3
|
|
21
|
+
preview_words_before: 5
|
|
22
|
+
preview_words_after: 10
|
|
23
|
+
tokenizer_separator: /[\s/]+/
|
|
24
|
+
rel_url: true
|
|
25
|
+
button: false
|
|
26
|
+
|
|
27
|
+
# Heading anchors
|
|
28
|
+
heading_anchors: true
|
|
29
|
+
|
|
30
|
+
# Aux links for the upper right navigation
|
|
31
|
+
aux_links:
|
|
32
|
+
"GitHub":
|
|
33
|
+
- "https://github.com/lutaml/lutaml"
|
|
34
|
+
"RubyGems":
|
|
35
|
+
- "https://rubygems.org/gems/lutaml"
|
|
36
|
+
|
|
37
|
+
# Makes Aux links open in a new tab
|
|
38
|
+
aux_links_new_tab: true
|
|
39
|
+
|
|
40
|
+
# Back to top link
|
|
41
|
+
back_to_top: true
|
|
42
|
+
back_to_top_text: "Back to top"
|
|
43
|
+
|
|
44
|
+
# Footer content
|
|
45
|
+
footer_content: >-
|
|
46
|
+
Copyright © 2025 Ribose. Distributed by a
|
|
47
|
+
<a href="https://opensource.org/licenses/MIT">MIT license</a>.
|
|
48
|
+
|
|
49
|
+
# Footer last edit timestamp
|
|
50
|
+
last_edit_timestamp: true
|
|
51
|
+
last_edit_time_format: "%b %e %Y at %I:%M %p"
|
|
52
|
+
|
|
53
|
+
# Navigation structure
|
|
54
|
+
nav_sort: order
|
|
55
|
+
|
|
56
|
+
# Collections for organizing content
|
|
57
|
+
collections:
|
|
58
|
+
pages:
|
|
59
|
+
permalink: "/:path/"
|
|
60
|
+
output: true
|
|
61
|
+
tutorials:
|
|
62
|
+
permalink: "/:collection/:path/"
|
|
63
|
+
output: true
|
|
64
|
+
guides:
|
|
65
|
+
permalink: "/:collection/:path/"
|
|
66
|
+
output: true
|
|
67
|
+
references:
|
|
68
|
+
permalink: "/:collection/:path/"
|
|
69
|
+
output: true
|
|
70
|
+
|
|
71
|
+
# Just the Docs collection configuration
|
|
72
|
+
just_the_docs:
|
|
73
|
+
collections:
|
|
74
|
+
pages:
|
|
75
|
+
name: Core Topics
|
|
76
|
+
nav_fold: false
|
|
77
|
+
tutorials:
|
|
78
|
+
name: Tutorials
|
|
79
|
+
nav_fold: true
|
|
80
|
+
guides:
|
|
81
|
+
name: Guides
|
|
82
|
+
nav_fold: true
|
|
83
|
+
references:
|
|
84
|
+
name: Reference
|
|
85
|
+
nav_fold: true
|
|
86
|
+
|
|
87
|
+
# Plugins
|
|
88
|
+
plugins:
|
|
89
|
+
- jekyll-asciidoc
|
|
90
|
+
- jekyll-seo-tag
|
|
91
|
+
- jekyll-sitemap
|
|
92
|
+
|
|
93
|
+
# AsciiDoc configuration
|
|
94
|
+
asciidoc: {}
|
|
95
|
+
asciidoctor:
|
|
96
|
+
attributes:
|
|
97
|
+
- source-highlighter=rouge
|
|
98
|
+
- rouge-style=github
|
|
99
|
+
- icons=font
|
|
100
|
+
- sectanchors=true
|
|
101
|
+
- idprefix=
|
|
102
|
+
- idseparator=-
|
|
103
|
+
- experimental=true
|
|
104
|
+
- xrefstyle=short
|
|
105
|
+
|
|
106
|
+
# Include AsciiDoc files
|
|
107
|
+
include:
|
|
108
|
+
- "*.adoc"
|
|
109
|
+
|
|
110
|
+
# Exclude from processing
|
|
111
|
+
exclude:
|
|
112
|
+
- Gemfile
|
|
113
|
+
- Gemfile.lock
|
|
114
|
+
- _site
|
|
115
|
+
- node_modules
|
|
116
|
+
- vendor/bundle/
|
|
117
|
+
- vendor/cache/
|
|
118
|
+
- vendor/gems/
|
|
119
|
+
- vendor/ruby/
|
|
120
|
+
- Rakefile
|
|
121
|
+
- "*.md"
|
|
122
|
+
- architecture/
|
|
123
|
+
- features/
|
|
124
|
+
|
|
125
|
+
# Enable code copy button
|
|
126
|
+
enable_copy_code_button: true
|
|
127
|
+
|
|
128
|
+
# Callouts
|
|
129
|
+
callouts_level: quiet
|
|
130
|
+
callouts:
|
|
131
|
+
highlight:
|
|
132
|
+
color: yellow
|
|
133
|
+
important:
|
|
134
|
+
title: Important
|
|
135
|
+
color: blue
|
|
136
|
+
new:
|
|
137
|
+
title: New
|
|
138
|
+
color: green
|
|
139
|
+
note:
|
|
140
|
+
title: Note
|
|
141
|
+
color: purple
|
|
142
|
+
warning:
|
|
143
|
+
title: Warning
|
|
144
|
+
color: red
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
permalink: /guides/cli-usage/
|
|
3
|
+
title: Running LutaML Workflows
|
|
4
|
+
parent: Guides
|
|
5
|
+
---
|
|
6
|
+
= Running LutaML Workflows
|
|
7
|
+
|
|
8
|
+
Run the supported Ruby workflows inside the bundle that declares `gem "lutaml"`.
|
|
9
|
+
This keeps the umbrella, parser, and repository versions together.
|
|
10
|
+
Check your resolved component versions with `bundle info lutaml-lml` and
|
|
11
|
+
`bundle info lutaml-uml` when comparing your installation with these examples.
|
|
12
|
+
|
|
13
|
+
== Start with a script
|
|
14
|
+
|
|
15
|
+
Copy the script from link:{site-baseurl}/tutorials/getting-started/[Getting Started]
|
|
16
|
+
into `city_model.rb`, then run `bundle exec ruby city_model.rb`.
|
|
17
|
+
It prints `Building`, confirming that model creation and indexed lookup work.
|
|
18
|
+
Do not replace this with an old `lutaml uml` invocation: the current packaged
|
|
19
|
+
executable has a missing CLI dependency, as explained in
|
|
20
|
+
link:{site-baseurl}/references/cli/commands/[Command-Line Compatibility].
|
|
21
|
+
|
|
22
|
+
== Run a complete workflow
|
|
23
|
+
|
|
24
|
+
. Create a typed model, or obtain a UML document from a format-specific importer.
|
|
25
|
+
. Construct a repository with `Repository.from_document(document)`.
|
|
26
|
+
. Query the repository or export it with `export_to_package`.
|
|
27
|
+
. Load a saved package with `Repository.from_package` on subsequent runs.
|
|
28
|
+
. Use `StaticSite.generate` when you need a browsable HTML representation.
|
|
29
|
+
|
|
30
|
+
Each step has a runnable example in the link:{site-baseurl}/tutorials/[Tutorials].
|
|
31
|
+
Choose a new output path when running examples so that you keep existing models
|
|
32
|
+
and generated files available for comparison.
|
|
33
|
+
|
|
34
|
+
== Diagnose failures
|
|
35
|
+
|
|
36
|
+
* A `LoadError` for `lutaml/cli` indicates the executable compatibility issue;
|
|
37
|
+
it does not mean the model file has a syntax error.
|
|
38
|
+
* `Repository.from_file` rejecting `.qea` or `.xmi` means parsing belongs to
|
|
39
|
+
an external provider. See link:{site-baseurl}/references/api/parsers/[Parser APIs].
|
|
40
|
+
* A missing Graphviz `dot` executable affects diagram rendering, not UML lookup
|
|
41
|
+
or LUR package generation. Check `dot -V` before running that tutorial.
|
|
42
|
+
* A failed lookup may use the wrong qualified path. Start with `ModelRoot` and
|
|
43
|
+
inspect `list_packages` before choosing the class path.
|
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Diagram Generation Guide
|
|
3
|
+
parent: Guides
|
|
4
|
+
nav_order: 10
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
= EA-Style Diagram Generation
|
|
8
|
+
|
|
9
|
+
LutaML can generate pixel-perfect SVG diagrams from Enterprise Architect (EA) models, matching EA's visual style exactly including colors, fonts, and layout.
|
|
10
|
+
|
|
11
|
+
== Features
|
|
12
|
+
|
|
13
|
+
* **EA-style colors**: DataType (pink #FFCCFF), FeatureType (yellow #FFFFCC), GML types (green #CCFFCC)
|
|
14
|
+
* **Configurable styling**: Full YAML-based configuration system
|
|
15
|
+
* **Multiple connector types**: Generalization, association, aggregation, composition, dependency
|
|
16
|
+
* **Stereotype rendering**: Displays stereotypes in EA format («stereotype»)
|
|
17
|
+
* **Lazy-loading in SPA mode**: Diagrams loaded on-demand for performance
|
|
18
|
+
* **CLI extraction**: Extract diagrams individually or in batch
|
|
19
|
+
* **Priority-based styling**: EA data > user config > built-in defaults
|
|
20
|
+
|
|
21
|
+
== Quick Start
|
|
22
|
+
|
|
23
|
+
=== Generate Diagram from QEA File
|
|
24
|
+
|
|
25
|
+
[source,ruby]
|
|
26
|
+
----
|
|
27
|
+
require 'lutaml'
|
|
28
|
+
|
|
29
|
+
# Load QEA file
|
|
30
|
+
document = Lutaml::Qea.parse("model.qea")
|
|
31
|
+
repo = Lutaml::UmlRepository::Repository.new(document: document)
|
|
32
|
+
|
|
33
|
+
# Get a diagram
|
|
34
|
+
diagram = repo.packages_index.flat_map(&:diagrams).first
|
|
35
|
+
|
|
36
|
+
# Generate SVG
|
|
37
|
+
presenter = Lutaml::UmlRepository::Presenters::DiagramPresenter.new(diagram, repo)
|
|
38
|
+
svg = presenter.svg_output
|
|
39
|
+
|
|
40
|
+
# Save to file
|
|
41
|
+
File.write("diagram.svg", svg)
|
|
42
|
+
----
|
|
43
|
+
|
|
44
|
+
=== CLI Usage
|
|
45
|
+
|
|
46
|
+
[source,bash]
|
|
47
|
+
----
|
|
48
|
+
# Extract single diagram
|
|
49
|
+
lutaml diagram extract model.qea -d EAID_12345 -o diagram.svg
|
|
50
|
+
|
|
51
|
+
# Extract all diagrams to directory
|
|
52
|
+
lutaml diagram extract model.qea -o diagrams/
|
|
53
|
+
|
|
54
|
+
# List all diagrams
|
|
55
|
+
lutaml diagram list model.qea
|
|
56
|
+
|
|
57
|
+
# Generate static site with diagrams
|
|
58
|
+
lutaml generate-site model.qea -o output/
|
|
59
|
+
----
|
|
60
|
+
|
|
61
|
+
== Configuration
|
|
62
|
+
|
|
63
|
+
Diagram styling is fully configurable via YAML. Create a `diagram_styles.yml` file:
|
|
64
|
+
|
|
65
|
+
[source,yaml]
|
|
66
|
+
----
|
|
67
|
+
stereotypes:
|
|
68
|
+
DataType:
|
|
69
|
+
colors:
|
|
70
|
+
fill: "#FFCCFF" # Pink for datatypes
|
|
71
|
+
stroke: "#000000"
|
|
72
|
+
fonts:
|
|
73
|
+
class_name:
|
|
74
|
+
weight: 700
|
|
75
|
+
style: "italic"
|
|
76
|
+
|
|
77
|
+
FeatureType:
|
|
78
|
+
colors:
|
|
79
|
+
fill: "#FFFFCC" # Yellow for feature types
|
|
80
|
+
stroke: "#000000"
|
|
81
|
+
|
|
82
|
+
defaults:
|
|
83
|
+
colors:
|
|
84
|
+
default_fill: "#E0E0E0"
|
|
85
|
+
default_stroke: "#000000"
|
|
86
|
+
fonts:
|
|
87
|
+
default:
|
|
88
|
+
family: "Carlito, Arial, sans-serif"
|
|
89
|
+
size: 9
|
|
90
|
+
weight: 400
|
|
91
|
+
----
|
|
92
|
+
|
|
93
|
+
=== Configuration Priority
|
|
94
|
+
|
|
95
|
+
The style resolver merges styles from multiple sources with this priority:
|
|
96
|
+
|
|
97
|
+
1. **EA Data** (highest) - Colors and styles from `.qea` file
|
|
98
|
+
2. **User Configuration** - Your custom `diagram_styles.yml`
|
|
99
|
+
3. **Built-in Defaults** (lowest) - Sensible EA-style defaults
|
|
100
|
+
|
|
101
|
+
This ensures EA's original styling is preserved while allowing customization.
|
|
102
|
+
|
|
103
|
+
=== Configuration Options
|
|
104
|
+
|
|
105
|
+
==== Stereotypes
|
|
106
|
+
|
|
107
|
+
Define styles for specific stereotypes:
|
|
108
|
+
|
|
109
|
+
[source,yaml]
|
|
110
|
+
----
|
|
111
|
+
stereotypes:
|
|
112
|
+
Interface:
|
|
113
|
+
colors:
|
|
114
|
+
fill: "#FFFFEE"
|
|
115
|
+
fonts:
|
|
116
|
+
class_name:
|
|
117
|
+
style: "italic"
|
|
118
|
+
----
|
|
119
|
+
|
|
120
|
+
==== Packages
|
|
121
|
+
|
|
122
|
+
Define styles for package hierarchies (supports wildcards):
|
|
123
|
+
|
|
124
|
+
[source,yaml]
|
|
125
|
+
----
|
|
126
|
+
packages:
|
|
127
|
+
"CityGML::*":
|
|
128
|
+
colors:
|
|
129
|
+
fill: "#FFFFCC"
|
|
130
|
+
----
|
|
131
|
+
|
|
132
|
+
==== Classes
|
|
133
|
+
|
|
134
|
+
Define styles for specific classes:
|
|
135
|
+
|
|
136
|
+
[source,yaml]
|
|
137
|
+
----
|
|
138
|
+
classes:
|
|
139
|
+
Building:
|
|
140
|
+
colors:
|
|
141
|
+
fill: "#CCFFFF"
|
|
142
|
+
----
|
|
143
|
+
|
|
144
|
+
==== Connectors
|
|
145
|
+
|
|
146
|
+
Customize connector appearance:
|
|
147
|
+
|
|
148
|
+
[source,yaml]
|
|
149
|
+
----
|
|
150
|
+
connectors:
|
|
151
|
+
association:
|
|
152
|
+
arrow:
|
|
153
|
+
type: "open_arrow"
|
|
154
|
+
size: 8
|
|
155
|
+
line:
|
|
156
|
+
stroke_width: 1
|
|
157
|
+
stroke: "#000000"
|
|
158
|
+
labels:
|
|
159
|
+
show_role_names: true
|
|
160
|
+
show_cardinality: true
|
|
161
|
+
----
|
|
162
|
+
|
|
163
|
+
== API Usage
|
|
164
|
+
|
|
165
|
+
=== DiagramPresenter
|
|
166
|
+
|
|
167
|
+
The main class for generating diagrams:
|
|
168
|
+
|
|
169
|
+
[source,ruby]
|
|
170
|
+
----
|
|
171
|
+
presenter = Lutaml::UmlRepository::Presenters::DiagramPresenter.new(
|
|
172
|
+
diagram,
|
|
173
|
+
repository,
|
|
174
|
+
config_path: "custom_styles.yml" # Optional
|
|
175
|
+
)
|
|
176
|
+
|
|
177
|
+
# Generate SVG
|
|
178
|
+
svg = presenter.svg_output(
|
|
179
|
+
padding: 20, # Padding around diagram
|
|
180
|
+
background_color: "#ffffff", # Background color
|
|
181
|
+
grid_visible: false, # Show grid
|
|
182
|
+
interactive: false # Enable click handlers
|
|
183
|
+
)
|
|
184
|
+
----
|
|
185
|
+
|
|
186
|
+
=== Accessing Diagram Data
|
|
187
|
+
|
|
188
|
+
[source,ruby]
|
|
189
|
+
----
|
|
190
|
+
# Get all diagrams
|
|
191
|
+
diagrams = repo.packages_index.flat_map(&:diagrams).compact
|
|
192
|
+
|
|
193
|
+
# Find specific diagram
|
|
194
|
+
diagram = diagrams.find { |d| d.xmi_id.include?("EAID_12345") }
|
|
195
|
+
|
|
196
|
+
# Get diagram info
|
|
197
|
+
puts "Name: #{diagram.name}"
|
|
198
|
+
puts "Type: #{diagram.diagram_type}"
|
|
199
|
+
puts "Elements: #{diagram.diagram_objects.count}"
|
|
200
|
+
puts "Links: #{diagram.diagram_links.count}"
|
|
201
|
+
----
|
|
202
|
+
|
|
203
|
+
== Architecture
|
|
204
|
+
|
|
205
|
+
=== Component Overview
|
|
206
|
+
|
|
207
|
+
[source]
|
|
208
|
+
----
|
|
209
|
+
DiagramPresenter
|
|
210
|
+
│
|
|
211
|
+
├─> LayoutEngine (coordinate conversion)
|
|
212
|
+
├─> StyleResolver (style merging)
|
|
213
|
+
├─> SvgRenderer (SVG generation)
|
|
214
|
+
│ │
|
|
215
|
+
│ ├─> ElementRenderers (class, package, etc.)
|
|
216
|
+
│ └─> PathBuilder (connector routing)
|
|
217
|
+
│
|
|
218
|
+
└─> Configuration (YAML config loading)
|
|
219
|
+
----
|
|
220
|
+
|
|
221
|
+
=== Key Components
|
|
222
|
+
|
|
223
|
+
* **DiagramPresenter**: Coordinates the entire rendering pipeline
|
|
224
|
+
* **LayoutEngine**: Converts EA coordinates (left/top/right/bottom) to SVG (x/y/width/height)
|
|
225
|
+
* **StyleResolver**: Merges EA data + user config + defaults with priority system
|
|
226
|
+
* **SvgRenderer**: Generates complete SVG with layers (background, connectors, elements)
|
|
227
|
+
* **PathBuilder**: Parses EA geometry strings and builds SVG paths
|
|
228
|
+
* **ElementRenderers**: Render specific element types (classes, packages, etc.)
|
|
229
|
+
|
|
230
|
+
== Coordinate System
|
|
231
|
+
|
|
232
|
+
EA uses a different coordinate system than SVG:
|
|
233
|
+
|
|
234
|
+
* **EA**: Uses left/top/right/bottom for element bounds
|
|
235
|
+
* **SVG**: Uses x/y/width/height
|
|
236
|
+
|
|
237
|
+
The LayoutEngine automatically converts between these:
|
|
238
|
+
|
|
239
|
+
[source,ruby]
|
|
240
|
+
----
|
|
241
|
+
# EA coordinates
|
|
242
|
+
diagram_object.left # Left edge
|
|
243
|
+
diagram_object.top # Top edge
|
|
244
|
+
diagram_object.right # Right edge
|
|
245
|
+
diagram_object.bottom # Bottom edge
|
|
246
|
+
|
|
247
|
+
# Converted to SVG
|
|
248
|
+
{
|
|
249
|
+
x: left,
|
|
250
|
+
y: top,
|
|
251
|
+
width: right - left,
|
|
252
|
+
height: bottom - top
|
|
253
|
+
}
|
|
254
|
+
----
|
|
255
|
+
|
|
256
|
+
== Troubleshooting
|
|
257
|
+
|
|
258
|
+
=== Diagrams Not Appearing
|
|
259
|
+
|
|
260
|
+
1. Check that diagrams exist in the QEA file:
|
|
261
|
+
+
|
|
262
|
+
[source,bash]
|
|
263
|
+
----
|
|
264
|
+
lutaml diagram list model.qea
|
|
265
|
+
----
|
|
266
|
+
|
|
267
|
+
2. Verify diagram has visual elements:
|
|
268
|
+
+
|
|
269
|
+
[source,ruby]
|
|
270
|
+
----
|
|
271
|
+
puts "Objects: #{diagram.diagram_objects.count}"
|
|
272
|
+
puts "Links: #{diagram.diagram_links.count}"
|
|
273
|
+
----
|
|
274
|
+
|
|
275
|
+
=== Colors Not Matching EA
|
|
276
|
+
|
|
277
|
+
1. Check if EA data exists in diagram_object.style
|
|
278
|
+
2. Verify configuration file is being loaded
|
|
279
|
+
3. Check stereotype names match exactly (case-sensitive)
|
|
280
|
+
|
|
281
|
+
=== Elements Positioned Incorrectly
|
|
282
|
+
|
|
283
|
+
EA coordinates may have negative values. The LayoutEngine should normalize these, but you can verify:
|
|
284
|
+
|
|
285
|
+
[source,ruby]
|
|
286
|
+
----
|
|
287
|
+
diagram.diagram_objects.each do |obj|
|
|
288
|
+
puts "#{obj.object_xmi_id}: (#{obj.left}, #{obj.top})"
|
|
289
|
+
end
|
|
290
|
+
----
|
|
291
|
+
|
|
292
|
+
== Performance
|
|
293
|
+
|
|
294
|
+
Diagram generation is optimized for both single and batch operations:
|
|
295
|
+
|
|
296
|
+
* **Single diagram**: <1 second
|
|
297
|
+
* **Batch (100 diagrams)**: ~2 minutes
|
|
298
|
+
* **Memory usage**: Modest, processes one diagram at a time
|
|
299
|
+
|
|
300
|
+
For large batches, diagrams are generated and saved incrementally to avoid memory issues.
|
|
301
|
+
|
|
302
|
+
== Future Enhancements
|
|
303
|
+
|
|
304
|
+
Planned features for future releases:
|
|
305
|
+
|
|
306
|
+
* **PNG/PDF export**: Generate raster and PDF formats
|
|
307
|
+
* **Interactive diagrams**: Click handlers and tooltips
|
|
308
|
+
* **Diagram comparison**: Visual diff between versions
|
|
309
|
+
* **Custom themes**: Pre-built color schemes
|
|
310
|
+
* **Legend generation**: Auto-generate color legends
|
|
311
|
+
|
|
312
|
+
== See Also
|
|
313
|
+
|
|
314
|
+
* link:{site-baseurl}/references/configuration/diagram-styles/[Complete Configuration Reference]
|
|
315
|
+
* link:https://github.com/lutaml/lutaml/blob/main/README.md[LutaML README]
|
|
316
|
+
* link:{site-baseurl}/references/configuration/diagram-styles/#defaults[Default Styles]
|