xmi 0.3.17 → 0.3.18
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/lib/xmi/add.rb +27 -3
- data/lib/xmi/delete.rb +27 -3
- data/lib/xmi/difference.rb +27 -3
- data/lib/xmi/documentation.rb +95 -9
- data/lib/xmi/ea_root.rb +5 -1
- data/lib/xmi/replace.rb +27 -3
- data/lib/xmi/root.rb +157 -13
- data/lib/xmi/sparx.rb +349 -33
- data/lib/xmi/uml.rb +270 -26
- data/lib/xmi/version.rb +1 -1
- metadata +2 -2
data/lib/xmi/uml.rb
CHANGED
@@ -212,13 +212,39 @@ module Xmi
|
|
212
212
|
attribute :precondition, Precondition
|
213
213
|
attribute :uml_type, Uml::Type, collection: true
|
214
214
|
|
215
|
-
xml do
|
215
|
+
xml do # rubocop:disable Metrics/BlockLength
|
216
216
|
root "ownedOperation"
|
217
217
|
map_attribute "id", to: :id, namespace: "http://www.omg.org/spec/XMI/20131001", prefix: "xmi"
|
218
218
|
map_attribute "name", to: :name
|
219
|
-
map_element "ownedParameter", to: :owned_parameter, namespace: nil,
|
220
|
-
|
221
|
-
|
219
|
+
map_element "ownedParameter", to: :owned_parameter, namespace: nil,
|
220
|
+
prefix: nil,
|
221
|
+
value_map: {
|
222
|
+
from: {
|
223
|
+
nil: :empty,
|
224
|
+
empty: :empty,
|
225
|
+
omitted: :empty
|
226
|
+
},
|
227
|
+
to: {
|
228
|
+
nil: :empty,
|
229
|
+
empty: :empty,
|
230
|
+
omitted: :empty
|
231
|
+
}
|
232
|
+
}
|
233
|
+
map_element "precondition", to: :precondition, namespace: nil,
|
234
|
+
prefix: nil
|
235
|
+
map_element "type", to: :uml_type, namespace: nil, prefix: nil,
|
236
|
+
value_map: {
|
237
|
+
from: {
|
238
|
+
nil: :empty,
|
239
|
+
empty: :empty,
|
240
|
+
omitted: :empty
|
241
|
+
},
|
242
|
+
to: {
|
243
|
+
nil: :empty,
|
244
|
+
empty: :empty,
|
245
|
+
omitted: :empty
|
246
|
+
}
|
247
|
+
}
|
222
248
|
end
|
223
249
|
end
|
224
250
|
|
@@ -293,7 +319,7 @@ module Xmi
|
|
293
319
|
end
|
294
320
|
end
|
295
321
|
|
296
|
-
class PackagedElement < Lutaml::Model::Serializable
|
322
|
+
class PackagedElement < Lutaml::Model::Serializable # rubocop:disable Metrics/ClassLength
|
297
323
|
include PackagedElementAttributes
|
298
324
|
attribute :packaged_element, PackagedElement, collection: true
|
299
325
|
attribute :owned_end, OwnedEnd, collection: true
|
@@ -301,7 +327,7 @@ module Xmi
|
|
301
327
|
attribute :owned_comment, OwnedComment, collection: true
|
302
328
|
attribute :generalization, AssociationGeneralization, collection: true
|
303
329
|
|
304
|
-
xml do
|
330
|
+
xml do # rubocop:disable Metrics/BlockLength
|
305
331
|
root "packagedElement"
|
306
332
|
|
307
333
|
map_attribute "type", to: :type, namespace: "http://www.omg.org/spec/XMI/20131001", prefix: "xmi"
|
@@ -313,14 +339,116 @@ module Xmi
|
|
313
339
|
map_attribute "supplier", to: :supplier
|
314
340
|
map_attribute "client", to: :client
|
315
341
|
|
316
|
-
map_element "generalization", to: :generalization, namespace: nil,
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
342
|
+
map_element "generalization", to: :generalization, namespace: nil,
|
343
|
+
prefix: nil,
|
344
|
+
value_map: {
|
345
|
+
from: {
|
346
|
+
nil: :empty,
|
347
|
+
empty: :empty,
|
348
|
+
omitted: :empty
|
349
|
+
},
|
350
|
+
to: {
|
351
|
+
nil: :empty,
|
352
|
+
empty: :empty,
|
353
|
+
omitted: :empty
|
354
|
+
}
|
355
|
+
}
|
356
|
+
map_element "ownedComment", to: :owned_comment, namespace: nil,
|
357
|
+
prefix: nil,
|
358
|
+
value_map: {
|
359
|
+
from: {
|
360
|
+
nil: :empty,
|
361
|
+
empty: :empty,
|
362
|
+
omitted: :empty
|
363
|
+
},
|
364
|
+
to: {
|
365
|
+
nil: :empty,
|
366
|
+
empty: :empty,
|
367
|
+
omitted: :empty
|
368
|
+
}
|
369
|
+
}
|
370
|
+
map_element "ownedEnd", to: :owned_end, namespace: nil, prefix: nil,
|
371
|
+
value_map: {
|
372
|
+
from: {
|
373
|
+
nil: :empty,
|
374
|
+
empty: :empty,
|
375
|
+
omitted: :empty
|
376
|
+
},
|
377
|
+
to: {
|
378
|
+
nil: :empty,
|
379
|
+
empty: :empty,
|
380
|
+
omitted: :empty
|
381
|
+
}
|
382
|
+
}
|
383
|
+
map_element "ownedLiteral", to: :owned_literal, namespace: nil,
|
384
|
+
prefix: nil,
|
385
|
+
value_map: {
|
386
|
+
from: {
|
387
|
+
nil: :empty,
|
388
|
+
empty: :empty,
|
389
|
+
omitted: :empty
|
390
|
+
},
|
391
|
+
to: {
|
392
|
+
nil: :empty,
|
393
|
+
empty: :empty,
|
394
|
+
omitted: :empty
|
395
|
+
}
|
396
|
+
}
|
397
|
+
map_element "ownedAttribute", to: :owned_attribute, namespace: nil,
|
398
|
+
prefix: nil,
|
399
|
+
value_map: {
|
400
|
+
from: {
|
401
|
+
nil: :empty,
|
402
|
+
empty: :empty,
|
403
|
+
omitted: :empty
|
404
|
+
},
|
405
|
+
to: {
|
406
|
+
nil: :empty,
|
407
|
+
empty: :empty,
|
408
|
+
omitted: :empty
|
409
|
+
}
|
410
|
+
}
|
411
|
+
map_element "ownedOperation", to: :owned_operation, namespace: nil,
|
412
|
+
prefix: nil,
|
413
|
+
value_map: {
|
414
|
+
from: {
|
415
|
+
nil: :empty,
|
416
|
+
empty: :empty,
|
417
|
+
omitted: :empty
|
418
|
+
},
|
419
|
+
to: {
|
420
|
+
nil: :empty,
|
421
|
+
empty: :empty,
|
422
|
+
omitted: :empty
|
423
|
+
}
|
424
|
+
}
|
425
|
+
map_element "packagedElement", to: :packaged_element, namespace: nil,
|
426
|
+
prefix: nil,
|
427
|
+
value_map: {
|
428
|
+
from: {
|
429
|
+
nil: :empty,
|
430
|
+
empty: :empty,
|
431
|
+
omitted: :empty
|
432
|
+
},
|
433
|
+
to: {
|
434
|
+
nil: :empty,
|
435
|
+
empty: :empty,
|
436
|
+
omitted: :empty
|
437
|
+
}
|
438
|
+
}
|
439
|
+
map_element "memberEnd", to: :member_ends, namespace: nil, prefix: nil,
|
440
|
+
value_map: {
|
441
|
+
from: {
|
442
|
+
nil: :empty,
|
443
|
+
empty: :empty,
|
444
|
+
omitted: :empty
|
445
|
+
},
|
446
|
+
to: {
|
447
|
+
nil: :empty,
|
448
|
+
empty: :empty,
|
449
|
+
omitted: :empty
|
450
|
+
}
|
451
|
+
}
|
324
452
|
end
|
325
453
|
end
|
326
454
|
|
@@ -371,7 +499,7 @@ module Xmi
|
|
371
499
|
attribute :target, :string
|
372
500
|
attribute :waypoint, Waypoint
|
373
501
|
|
374
|
-
xml do
|
502
|
+
xml do # rubocop:disable Metrics/BlockLength
|
375
503
|
root "ownedElement"
|
376
504
|
|
377
505
|
map_attribute "type", to: :type, namespace: "http://www.omg.org/spec/XMI/20131001", prefix: "xmi"
|
@@ -379,8 +507,33 @@ module Xmi
|
|
379
507
|
map_attribute "text", to: :text
|
380
508
|
map_attribute "modelElement", to: :model_element
|
381
509
|
|
382
|
-
map_element "ownedElement", to: :owned_element, namespace: nil,
|
383
|
-
|
510
|
+
map_element "ownedElement", to: :owned_element, namespace: nil,
|
511
|
+
prefix: nil,
|
512
|
+
value_map: {
|
513
|
+
from: {
|
514
|
+
nil: :empty,
|
515
|
+
empty: :empty,
|
516
|
+
omitted: :empty
|
517
|
+
},
|
518
|
+
to: {
|
519
|
+
nil: :empty,
|
520
|
+
empty: :empty,
|
521
|
+
omitted: :empty
|
522
|
+
}
|
523
|
+
}
|
524
|
+
map_element "bounds", to: :bounds, namespace: nil, prefix: nil,
|
525
|
+
value_map: {
|
526
|
+
from: {
|
527
|
+
nil: :empty,
|
528
|
+
empty: :empty,
|
529
|
+
omitted: :empty
|
530
|
+
},
|
531
|
+
to: {
|
532
|
+
nil: :empty,
|
533
|
+
empty: :empty,
|
534
|
+
omitted: :empty
|
535
|
+
}
|
536
|
+
}
|
384
537
|
map_element "source", to: :source, namespace: nil, prefix: nil
|
385
538
|
map_element "target", to: :target, namespace: nil, prefix: nil
|
386
539
|
map_element "waypoint", to: :waypoint, namespace: nil, prefix: nil
|
@@ -411,7 +564,20 @@ module Xmi
|
|
411
564
|
map_attribute "isFrame", to: :is_frame
|
412
565
|
map_attribute "modelElement", to: :model_element
|
413
566
|
|
414
|
-
map_element "ownedElement", to: :owned_element, namespace: nil,
|
567
|
+
map_element "ownedElement", to: :owned_element, namespace: nil,
|
568
|
+
prefix: nil,
|
569
|
+
value_map: {
|
570
|
+
from: {
|
571
|
+
nil: :empty,
|
572
|
+
empty: :empty,
|
573
|
+
omitted: :empty
|
574
|
+
},
|
575
|
+
to: {
|
576
|
+
nil: :empty,
|
577
|
+
empty: :empty,
|
578
|
+
omitted: :empty
|
579
|
+
}
|
580
|
+
}
|
415
581
|
end
|
416
582
|
end
|
417
583
|
|
@@ -489,17 +655,56 @@ module Xmi
|
|
489
655
|
attribute :package_import, PackageImport, collection: true
|
490
656
|
attribute :diagram, Diagram
|
491
657
|
|
492
|
-
xml do
|
658
|
+
xml do # rubocop:disable Metrics/BlockLength
|
493
659
|
root "Model"
|
494
660
|
namespace "http://www.omg.org/spec/UML/20131001", "uml"
|
495
661
|
|
496
662
|
map_attribute "type", to: :type, namespace: "http://www.omg.org/spec/XMI/20131001", prefix: "xmi"
|
497
663
|
map_attribute "name", to: :name
|
498
664
|
|
499
|
-
map_element "packageImport", to: :package_import, namespace: nil,
|
500
|
-
|
665
|
+
map_element "packageImport", to: :package_import, namespace: nil,
|
666
|
+
prefix: nil,
|
667
|
+
value_map: {
|
668
|
+
from: {
|
669
|
+
nil: :empty,
|
670
|
+
empty: :empty,
|
671
|
+
omitted: :empty
|
672
|
+
},
|
673
|
+
to: {
|
674
|
+
nil: :empty,
|
675
|
+
empty: :empty,
|
676
|
+
omitted: :empty
|
677
|
+
}
|
678
|
+
}
|
679
|
+
map_element "packagedElement", to: :packaged_element, namespace: nil,
|
680
|
+
prefix: nil,
|
681
|
+
value_map: {
|
682
|
+
from: {
|
683
|
+
nil: :empty,
|
684
|
+
empty: :empty,
|
685
|
+
omitted: :empty
|
686
|
+
},
|
687
|
+
to: {
|
688
|
+
nil: :empty,
|
689
|
+
empty: :empty,
|
690
|
+
omitted: :empty
|
691
|
+
}
|
692
|
+
}
|
501
693
|
map_element "Diagram", to: :diagram, namespace: "http://www.omg.org/spec/UML/20131001/UMLDI", prefix: "umldi"
|
502
|
-
map_element "profileApplication", to: :profile_application,
|
694
|
+
map_element "profileApplication", to: :profile_application,
|
695
|
+
namespace: nil, prefix: nil,
|
696
|
+
value_map: {
|
697
|
+
from: {
|
698
|
+
nil: :empty,
|
699
|
+
empty: :empty,
|
700
|
+
omitted: :empty
|
701
|
+
},
|
702
|
+
to: {
|
703
|
+
nil: :empty,
|
704
|
+
empty: :empty,
|
705
|
+
omitted: :empty
|
706
|
+
}
|
707
|
+
}
|
503
708
|
end
|
504
709
|
end
|
505
710
|
|
@@ -525,7 +730,7 @@ module Xmi
|
|
525
730
|
include ProfileAttributes
|
526
731
|
attribute :owned_comment, OwnedComment, collection: true
|
527
732
|
|
528
|
-
xml do
|
733
|
+
xml do # rubocop:disable Metrics/BlockLength
|
529
734
|
root "Profile"
|
530
735
|
|
531
736
|
map_attribute "id", to: :id, namespace: "http://www.omg.org/spec/XMI/20131001", prefix: "xmi"
|
@@ -533,9 +738,48 @@ module Xmi
|
|
533
738
|
map_attribute "metamodelReference", to: :metamodel_reference
|
534
739
|
map_attribute "nsPrefix", to: :ns_prefix
|
535
740
|
|
536
|
-
map_element "ownedComment", to: :owned_comment, namespace: nil,
|
537
|
-
|
538
|
-
|
741
|
+
map_element "ownedComment", to: :owned_comment, namespace: nil,
|
742
|
+
prefix: nil,
|
743
|
+
value_map: {
|
744
|
+
from: {
|
745
|
+
nil: :empty,
|
746
|
+
empty: :empty,
|
747
|
+
omitted: :empty
|
748
|
+
},
|
749
|
+
to: {
|
750
|
+
nil: :empty,
|
751
|
+
empty: :empty,
|
752
|
+
omitted: :empty
|
753
|
+
}
|
754
|
+
}
|
755
|
+
map_element "packageImport", to: :package_import, namespace: nil,
|
756
|
+
prefix: nil,
|
757
|
+
value_map: {
|
758
|
+
from: {
|
759
|
+
nil: :empty,
|
760
|
+
empty: :empty,
|
761
|
+
omitted: :empty
|
762
|
+
},
|
763
|
+
to: {
|
764
|
+
nil: :empty,
|
765
|
+
empty: :empty,
|
766
|
+
omitted: :empty
|
767
|
+
}
|
768
|
+
}
|
769
|
+
map_element "packagedElement", to: :packaged_element, namespace: nil,
|
770
|
+
prefix: nil,
|
771
|
+
value_map: {
|
772
|
+
from: {
|
773
|
+
nil: :empty,
|
774
|
+
empty: :empty,
|
775
|
+
omitted: :empty
|
776
|
+
},
|
777
|
+
to: {
|
778
|
+
nil: :empty,
|
779
|
+
empty: :empty,
|
780
|
+
omitted: :empty
|
781
|
+
}
|
782
|
+
}
|
539
783
|
end
|
540
784
|
end
|
541
785
|
end
|
data/lib/xmi/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xmi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-03-
|
11
|
+
date: 2025-03-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lutaml-model
|