lutaml 0.11.4 → 0.11.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 801bd028c5c0adbb4f66c7025f6c3a958d57d7f8d9beff937d803f3735792dde
4
- data.tar.gz: 0ec4e7d17155aa3194c850aa31cb3f11d4494aeb92414b403c65e7cc27d96b5e
3
+ metadata.gz: 0f34bf66cbe8f9fa2f898f3c5afcdf099ed1603883445cb07a42887e0d8c7e35
4
+ data.tar.gz: 7f32c3792d828d9c5303c30395e80f0a45e0d7da13b2e095b8aeed93052ab1b0
5
5
  SHA512:
6
- metadata.gz: 8d9af90a66fc40bd2415b7ab1120e2d231b89e7db35845e966e9e3138d1ec4e80d79e56b66d37ff9457dbb29ca363f312a5228b455f5746454f7ea82f121f845
7
- data.tar.gz: f080df35bfdfa37691d74acec208d5863a9aa1fd423f5d750d5cf640fdc89daecb5c9ec6be07cb98f313ae12dadb4eeee106235b1c7a5c714d2bd843ef8ccb83
6
+ metadata.gz: 923866c877f40ab1937d57c075c7c8a212998a128cd6438ab25688041990a37f8bf06ff532c8615e08360ef71570de746127142fb239c0cc697d57a09cdb7b1a
7
+ data.tar.gz: 77586b69cc36d6ecb67c2ee83a04671bf4fdc0e467594b92aaede202da308c9a8f4fadc5b28ccb6caa4d95a8d0e764bfed5fda91d19423cfe9b8163825ba8650
data/README.adoc CHANGED
@@ -51,56 +51,19 @@ bundle exec jekyll serve
51
51
 
52
52
  === Parsing
53
53
 
54
- The `Lutaml::Parser.parse` method provides a single point of entry for parsing
55
- data model files, including:
56
-
57
- * EXPRESS files with `.exp` extension
58
- * YAML Compressed EXPRESS CACHE files
59
- * QEA files with `.qea` extension (Enterprise Architect databases)
60
- * XMI files with `.xmi` extension
61
- * XML files with `.xml` extension
62
- * LutaML files with `.lutaml` extension
63
-
64
- Depending on the input file type, `Lutaml::Parser.parse` returns:
65
-
66
- * `Expressir::Express::Model::Repository` for EXPRESS files
67
- * `Expressir::Express::Cache` for EXPRESS CACHE files
68
- * `Lutaml::Uml::Document` for QEA files (returned as single-element array)
69
- * `Lutaml::Uml::Document` for XMI files
70
- * `Lutaml::Uml::Document` for XML files
71
- * `Lutaml::Uml::Document` for LutaML files
72
-
73
- Examples to use the `Lutaml::Parser.parse`:
54
+ Parse LutaML Model Language (`.lml`/`.lutaml`) files with
55
+ link:https://github.com/lutaml/lutaml-lml[lutaml-lml]:
74
56
 
75
57
  [source,ruby]
76
58
  ----
77
59
  require "lutaml"
78
60
 
79
- # example.exp is an EXPRESS schema file
80
- model = Lutaml::Parser.parse([File.new("example.exp")])
81
- # => returns Expressir::Express::Model::Repository model
82
-
83
- # example.exp.yaml is an EXPRESS cache file created with Expressir
84
- model = Lutaml::Parser.parse([File.new("example.exp.yaml")], ::Lutaml::Parser::EXPRESS_CACHE_PARSE_TYPE)
85
- # => returns Expressir::Express::Cache model
86
-
87
- # example.xmi is an XMI file
88
- model = Lutaml::Parser.parse([File.new("example.xmi")])
89
- # => returns Lutaml::Uml::Document model
90
-
91
- # example.xml is an XML file
92
- model = Lutaml::Parser.parse([File.new("example.xml")])
93
- # => returns Lutaml::Uml::Document model
94
-
95
- # example.lutaml is an LutaML file
96
- model = Lutaml::Parser.parse([File.new("example.lutaml")])
97
- # => returns Lutaml::Uml::Document model
98
-
99
- # example.yaml is an LutaML YAML file
100
- model = Lutaml::Parser.parse([File.new("example.yaml")])
101
- # => returns Lutaml::Uml::Document model
61
+ doc = Lutaml::Lml.parse_document(File.new("model.lutaml"))
62
+ doc.classes.first.attributes.map(&:name)
102
63
  ----
103
64
 
65
+ EXPRESS schemas parse through `Lutaml::Express::Parsers::Exp.parse(io)`;
66
+ see README.md for the full family table and the repository layer.
104
67
 
105
68
  == Working with UML
106
69
 
@@ -104,12 +104,10 @@ The following results will be produced:
104
104
  [source,lutaml]
105
105
  ----
106
106
  diagram Address {
107
- title ''
108
- caption ''
109
107
  association {
110
108
  owner_type aggregation
111
- owner
112
- member_type direct
109
+ owner Address
110
+ member_type association
113
111
  member AddressComponent
114
112
  }
115
113
  }
@@ -152,7 +152,7 @@ If this syntax is used inside a `class`/`enum`/`association` block, it will be c
152
152
  This is a
153
153
  multi-line
154
154
  document comment.
155
- *|
155
+ |*
156
156
 
157
157
  class A
158
158
  enum B {
@@ -162,7 +162,7 @@ enum B {
162
162
  This is a
163
163
  multi-line
164
164
  class comment.
165
- *|
165
+ |*
166
166
  bar
167
167
  }
168
168
  ----
@@ -279,15 +279,22 @@ following:
279
279
 
280
280
  The name of the element and its visibility are optional.
281
281
 
282
+ [NOTE]
283
+ --
284
+ Visibility on package contents (classes, enums, packages) is not yet
285
+ implemented; only attribute visibility (`+`, `-`, `#`, `~`) is parsed
286
+ today. Element-level visibility is a candidate for adoption into the
287
+ LML specification (RS 3001) pending an audit of UML round-trip
288
+ requirements.
289
+ --
290
+
282
291
  [example]
283
- .Declaring a package named "Ceramic" with a public visibility modifier
292
+ .Declaring a package named "CeramicInformationModel"
284
293
  ====
285
294
  [source]
286
295
  ----
287
296
  package CeramicInformationModel {
288
297
  class Ceramic {}
289
- - class PrivateCeramic {}
290
- # class ProtectedCeramic {}
291
298
  }
292
299
  ----
293
300
  ====
@@ -584,7 +591,7 @@ Explicit syntax (`attribute` keyword included):
584
591
  [source]
585
592
  ----
586
593
  class A {
587
- attribute my_attribute
594
+ attribute my_attribute, String
588
595
  }
589
596
 
590
597
  enum A {
@@ -670,6 +677,14 @@ class Figure {
670
677
 
671
678
  === Methods
672
679
 
680
+ [NOTE]
681
+ --
682
+ Methods are not yet implemented by the LML parser. This section
683
+ documents the planned surface; adoption into the LML specification
684
+ (RS 3001) is pending an audit of downstream UML round-trip
685
+ requirements (Enterprise Architect, XMI).
686
+ --
687
+
673
688
  ==== General
674
689
 
675
690
  A method is a function that is defined inside a class and can be called to
@@ -881,8 +896,14 @@ association {
881
896
  ====
882
897
  [source]
883
898
  ----
899
+ class Ceramic {}
900
+ class Glaze {}
901
+
884
902
  association {
885
- Ceramic -> Glaze
903
+ owner_type association
904
+ owner Ceramic
905
+ member_type association
906
+ member Glaze
886
907
  }
887
908
  ----
888
909
  ====
@@ -893,37 +914,32 @@ Syntax:
893
914
 
894
915
  [source]
895
916
  ----
896
- association name {
897
- owned_type association|composition|aggregation|generalization|uses
917
+ association [name] {
918
+ owner_type association|composition|aggregation|generalization|uses
919
+ owner class_name[#attribute_name]
898
920
  member_type association|composition|aggregation|generalization|uses
899
- owned association_name[#attribute_name] [{property_string}][cardinality]
900
- member association_name[#attribute_name] [{property_string}][cardinality]
921
+ member class_name[#attribute_name]
901
922
  }
902
923
  ----
903
924
 
904
925
  where:
905
926
 
906
- * `owned_type` - optional, use to define a bidirectional association (`association`|`composition`|`aggregation`|`generalization`|`uses`)
927
+ * `owner_type` - optional, use to define a bidirectional association (`association`|`composition`|`aggregation`|`generalization`|`uses`)
907
928
  * `member_type` - association type (`association`|`composition`|`aggregation`|`generalization`|`uses`)
908
- * `owned|member` - end of association, use `\#attribute_name` to set a role name
909
- * `property_string` - property string for attributes associations
910
- * `cardinality` - examples: `1..*`, `*`
929
+ * `owner`/`member` - end of association, use `#attribute_name` to set a role name
911
930
 
912
931
  Example:
913
932
 
914
933
  [source]
915
934
  ----
916
- class Association {
917
- +association:
918
- }
919
- class Type {
920
- +endType:
921
- }
935
+ class Address {}
936
+ class AddressComponent {}
922
937
 
923
- association AssociatingTypeAndAssociation {
924
- type uses
925
- from Association#+association {subsets relationship}[*]
926
- to Type#+/endType {readOnly, subsets relatedElement} [1..*]
938
+ association AddressesAssociation {
939
+ owner_type aggregation
940
+ owner Address
941
+ member_type association
942
+ member AddressComponent
927
943
  }
928
944
  ----
929
945
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Lutaml
4
- VERSION = "0.11.4"
4
+ VERSION = "0.11.5"
5
5
  end
data/lutaml.gemspec CHANGED
@@ -34,7 +34,7 @@ Gem::Specification.new do |spec|
34
34
  # (fiddle was removed from Ruby 4.0 default gems, breaking reline on Windows)
35
35
  spec.add_dependency "fiddle"
36
36
  spec.add_dependency "lutaml-lml"
37
- spec.add_dependency "lutaml-model", "~> 0.8.0"
37
+ spec.add_dependency "lutaml-model", "~> 0.8.114"
38
38
  spec.add_dependency "lutaml-uml", "~> 1.0"
39
39
  spec.metadata["rubygems_mfa_required"] = "true"
40
40
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lutaml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.4
4
+ version: 0.11.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-09-29 00:00:00.000000000 Z
11
+ date: 2026-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: expressir
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.8.0
61
+ version: 0.8.114
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 0.8.0
68
+ version: 0.8.114
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: lutaml-uml
71
71
  requirement: !ruby/object:Gem::Requirement