lutaml-uml 0.4.1 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dc9fee04e0d3f8bf1a741dcce56ebfac843c1207d5f9f4dc8b9f42869db728f6
4
- data.tar.gz: 58b0ed6fb1e66d0a34aed9fefcf6d4625f52234bf100c93ad06f62297ec3e2cb
3
+ metadata.gz: 5d7db5a90a481773906ffcd2985d36777ba62f2c79a1de83390c7890a4c9f7c4
4
+ data.tar.gz: 7d9229702c7b58d2a2d0c8f2261230eb941f7fd76a0f17c784d48da01a22c5c0
5
5
  SHA512:
6
- metadata.gz: df205676bcafcb09265a81491fbca4b78b2a1dfc59d18f080e20e4ddf633a3aed9601d09cd78b32fbd297c283027681b94276e5ceb68e1613dc8cb8dcd036243
7
- data.tar.gz: 9191a9ba6db3db78aa785a685e4c75c4cd69f84441cb3420dde4fbc02dec885ddcaf18c12f263aa5852439721609bb3e11930b7cbfcaf8c20b461b517a1bc84c
6
+ metadata.gz: ec111d11c2354621c95c3708296356906977f9c949f96a07c8e1ee71928733ff68089b5339bb2017f824fa76274fe2e043693ca48b7cbd1305c85756791097a0
7
+ data.tar.gz: 81de391a9fc9a1d546d82dcfde50b802a67e4bc28ffee88f08699faa6f54b3e7052107e2824c77dfd2b5cd40f3c78518757e7e1955c2715584225508f543389d
data/LUTAML.adoc CHANGED
@@ -21,7 +21,9 @@ where:
21
21
 
22
22
  == DataTypes
23
23
 
24
- Lutaml supports 3 types of data_types: `data_type`, `primitive` and `enum`. Example of data types declaration:
24
+ Lutaml supports 3 types of data_types: `data_type`, `primitive` and `enum`.
25
+
26
+ Example of data types declaration:
25
27
 
26
28
  [source,java]
27
29
  ----
@@ -67,8 +69,8 @@ association name {
67
69
 
68
70
  where:
69
71
 
70
- * `owned_type` - optional, use to define bidirectional association(association|composition|aggregation|generalization|uses)
71
- * `member_type` - association type(association|composition|aggregation|generalization|uses)
72
+ * `owned_type` - optional, use to define a bidirectional association (`association`|`composition`|`aggregation`|`generalization`|`uses`)
73
+ * `member_type` - association type (`association`|`composition`|`aggregation`|`generalization`|`uses`)
72
74
  * `owned|member` - end of association, use `\#attribute_name` to set a role name
73
75
  * `property_string` - property string for attibutes associations
74
76
  * `cardinality` - examples: '1..*', '*'
@@ -142,7 +144,12 @@ Full syntax:
142
144
 
143
145
  where:
144
146
 
145
- * `visibility` can be equal to `-` - private, `+` - public, `#` - protected, `~` - friendly
147
+ * `visibility` can be equal to
148
+ ** `-`: private
149
+ ** `+`: public
150
+ ** `#`: protected
151
+ ** `~`: friendly
152
+
146
153
  * `attribute` - attrbute keyword
147
154
  * `/` - symbolizes a derived attribute.
148
155
  * `multiplicity` - Multiplicity is in square brackets (e.g. [1..*]).
@@ -178,14 +185,17 @@ enum A {
178
185
  }
179
186
  ----
180
187
 
188
+ [[attribute-visibility]]
181
189
  === Attribute visibility
182
190
 
183
- Syntax for defining visibility: [+|-|#|~] [attribute] attribute_name. LutaML uses these modificators to define attribute(entry) visbility:
191
+ Syntax for defining visibility: `[+|-|#|~] [attribute] attribute_name`.
184
192
 
185
- + => public
186
- - => private
187
- # => protected
188
- ~ => package
193
+ LutaML uses these modificators to define attribute (entry) visbility:
194
+
195
+ `+`:: public
196
+ `-`:: private
197
+ `#`:: protected
198
+ `~`:: package
189
199
 
190
200
  example:
191
201
 
@@ -226,9 +236,20 @@ Syntax for defining methods:
226
236
  ----
227
237
 
228
238
  where:
229
- - `visibility` can be equal to `-` - private, `+` - public, `#` - protected, `~` - friendly
230
- - `parameter-list` - parameter list
231
- - `property-modifier` - can be equal to `redefines`, `query`, `ordered`(`unordered`), `unique`(`nonunique`)
239
+
240
+ * `visibility` can be equal to
241
+ ** `-`: private
242
+ ** `+`: public
243
+ ** `#`: protected
244
+ ** `~`: friendly
245
+
246
+ * `parameter-list`: parameter list
247
+
248
+ * `property-modifier`: can be equal to
249
+ ** `redefines`
250
+ ** `query`
251
+ ** `ordered` (defaults to `unordered`)
252
+ ** `unique`(defaults to `nonunique`)
232
253
 
233
254
  Syntax for a `parameter-list`:
234
255
 
@@ -238,7 +259,12 @@ Syntax for a `parameter-list`:
238
259
  ----
239
260
 
240
261
  where:
241
- - `direction` - can be equal to `in`, `out`, `inout` or `return`
262
+
263
+ * `direction` can be equal to
264
+ ** `in`
265
+ ** `out`
266
+ ** `inout`
267
+ ** `return`
242
268
 
243
269
  == import files
244
270
 
@@ -252,7 +278,8 @@ include path/to/file
252
278
  == Package syntax
253
279
 
254
280
  Namespaces
255
- Def.-A named element is an element that can have a name and a defined visibility (public, private, protected, package):
281
+
282
+ A named element is an element that can have a name and a defined visibility (public, private, protected, package):
256
283
 
257
284
  [source,java]
258
285
  ----
@@ -286,7 +313,8 @@ abstract class Pet {}
286
313
  == Comment objects diagram
287
314
 
288
315
  Use `\**`(one line comment) or `*| |*`(multiline comment) to create comment object for diagram entry.
289
- If this syntax used inside class/enum/association block it will be created for owner of this block.
316
+
317
+ If this syntax is used inside a `class`/`enum`/`association` block, it will be created for owner of this block.
290
318
 
291
319
  [source,java]
292
320
  ----
@@ -313,7 +341,7 @@ enum B {
313
341
 
314
342
  == Syntax comments
315
343
 
316
- Use `//` to create syntax comment, chars after // will be ignored during processing
344
+ Use `//` to create syntax comment, chars after `//` will be ignored during processing.
317
345
 
318
346
  [source,java]
319
347
  ----
@@ -328,7 +356,7 @@ enum B {
328
356
 
329
357
  == Value specification
330
358
 
331
- A value specification indicates one or several values in a model. Examples for value specifications include simple, mathematical expressions, such as 4+2, and expressions with values from the object model, Integer::MAX_INT-1
359
+ A value specification indicates one or several values in a model. Examples for value specifications include simple, mathematical expressions, such as `4+2`, and expressions with values from the object model, `Integer::MAX_INT-1`
332
360
 
333
361
  [source,java]
334
362
  ----
@@ -341,4 +369,4 @@ instance :{Class name, if any} {as ref name, optional} {
341
369
  {attribute name} = {attribute value}
342
370
  {attribute name}:{attribute class} = {attribute value}
343
371
  }
344
- ----
372
+ ----
@@ -9,8 +9,10 @@ module Lutaml
9
9
  :owner_end_attribute_name,
10
10
  :owner_end_cardinality,
11
11
  :owner_end_type,
12
+ :owner_end_xmi_id,
12
13
  :member_end,
13
14
  :member_end_attribute_name,
15
+ :member_end_xmi_id,
14
16
  :member_end_cardinality,
15
17
  :member_end_type,
16
18
  :static,
@@ -151,14 +151,14 @@ module Lutaml
151
151
  rule(:title_keyword) { kw_title >> spaces }
152
152
  rule(:title_text) do
153
153
  match['"\''].maybe >>
154
- match['a-zA-Z0-9_\- '].repeat(1).as(:title) >>
154
+ match['a-zA-Z0-9_\- ,.:;'].repeat(1).as(:title) >>
155
155
  match['"\''].maybe
156
156
  end
157
157
  rule(:title_definition) { title_keyword >> title_text }
158
158
  rule(:caption_keyword) { kw_caption >> spaces }
159
159
  rule(:caption_text) do
160
160
  match['"\''].maybe >>
161
- match['a-zA-Z0-9_\- '].repeat(1).as(:caption) >>
161
+ match['a-zA-Z0-9_\- ,.:;'].repeat(1).as(:caption) >>
162
162
  match['"\''].maybe
163
163
  end
164
164
  rule(:caption_definition) { caption_keyword >> caption_text }
@@ -9,6 +9,7 @@ module Lutaml
9
9
  attr_accessor :name,
10
10
  :visibility,
11
11
  :type,
12
+ :xmi_id,
12
13
  :definition,
13
14
  :contain,
14
15
  :static,
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Lutaml
4
4
  module Uml
5
- VERSION = "0.4.1"
5
+ VERSION = "0.4.3"
6
6
  end
7
7
  end
@@ -1,5 +1,6 @@
1
1
  diagram MyView {
2
2
  fontname "Arial"
3
- title "my diagram"
3
+ title "my diagram, another symbols: text."
4
4
  class Foo {}
5
+ caption "Block elements of StandardDocument, adapted from BasicDocument. Another - symbol"
5
6
  }
@@ -34,7 +34,9 @@ RSpec.describe Lutaml::Uml::Parsers::Dsl do
34
34
 
35
35
  it "creates Lutaml::Uml::Document object and sets its attributes" do
36
36
  expect(parse).to be_instance_of(Lutaml::Uml::Document)
37
- expect(parse.title).to eq("my diagram")
37
+ expect(parse.title).to eq("my diagram, another symbols: text.")
38
+ expect(parse.caption)
39
+ .to(eq("Block elements of StandardDocument, adapted from BasicDocument. Another - symbol"))
38
40
  expect(parse.fontname).to eq("Arial")
39
41
  end
40
42
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lutaml-uml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-07-18 00:00:00.000000000 Z
11
+ date: 2021-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hashie