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/sparx.rb
CHANGED
@@ -129,7 +129,19 @@ module Xmi
|
|
129
129
|
|
130
130
|
xml do
|
131
131
|
root "tags"
|
132
|
-
map_element "tag", to: :tags, namespace: nil, prefix: nil
|
132
|
+
map_element "tag", to: :tags, namespace: nil, prefix: nil,
|
133
|
+
value_map: {
|
134
|
+
from: {
|
135
|
+
nil: :empty,
|
136
|
+
empty: :empty,
|
137
|
+
omitted: :empty
|
138
|
+
},
|
139
|
+
to: {
|
140
|
+
nil: :empty,
|
141
|
+
empty: :empty,
|
142
|
+
omitted: :empty
|
143
|
+
}
|
144
|
+
}
|
133
145
|
end
|
134
146
|
end
|
135
147
|
|
@@ -344,7 +356,7 @@ module Xmi
|
|
344
356
|
attribute :styleex, SparxElementStyleex
|
345
357
|
attribute :xrefs, SparxElementXrefs
|
346
358
|
|
347
|
-
xml do
|
359
|
+
xml do # rubocop:disable Metrics/BlockLength
|
348
360
|
root "attribute"
|
349
361
|
|
350
362
|
map_attribute "idref", to: :idref, prefix: "xmi", namespace: "http://www.omg.org/spec/XMI/20131001"
|
@@ -354,8 +366,21 @@ module Xmi
|
|
354
366
|
map_element "initial", to: :initial, namespace: nil, prefix: nil
|
355
367
|
map_element "options", to: :options, namespace: nil, prefix: nil
|
356
368
|
map_element "style", to: :style, namespace: nil, prefix: nil
|
357
|
-
map_element "tags", to: :tags, namespace: nil, prefix: nil
|
358
|
-
|
369
|
+
map_element "tags", to: :tags, namespace: nil, prefix: nil,
|
370
|
+
value_map: {
|
371
|
+
from: {
|
372
|
+
nil: :empty,
|
373
|
+
empty: :empty,
|
374
|
+
omitted: :empty
|
375
|
+
},
|
376
|
+
to: {
|
377
|
+
nil: :empty,
|
378
|
+
empty: :empty,
|
379
|
+
omitted: :empty
|
380
|
+
}
|
381
|
+
}
|
382
|
+
map_element "documentation", to: :documentation, namespace: nil,
|
383
|
+
prefix: nil
|
359
384
|
map_element "model", to: :model, namespace: nil, prefix: nil
|
360
385
|
map_element "properties", to: :properties, namespace: nil, prefix: nil
|
361
386
|
map_element "coords", to: :coords, namespace: nil, prefix: nil
|
@@ -373,7 +398,19 @@ module Xmi
|
|
373
398
|
xml do
|
374
399
|
root "attributes"
|
375
400
|
|
376
|
-
map_element "attribute", to: :attribute, namespace: nil, prefix: nil
|
401
|
+
map_element "attribute", to: :attribute, namespace: nil, prefix: nil,
|
402
|
+
value_map: {
|
403
|
+
from: {
|
404
|
+
nil: :empty,
|
405
|
+
empty: :empty,
|
406
|
+
omitted: :empty
|
407
|
+
},
|
408
|
+
to: {
|
409
|
+
nil: :empty,
|
410
|
+
empty: :empty,
|
411
|
+
omitted: :empty
|
412
|
+
}
|
413
|
+
}
|
377
414
|
end
|
378
415
|
end
|
379
416
|
|
@@ -382,12 +419,50 @@ module Xmi
|
|
382
419
|
attribute :generalization, SparxElementGeneralization, collection: true
|
383
420
|
attribute :note_link, SparxElementNoteLink, collection: true
|
384
421
|
|
385
|
-
xml do
|
422
|
+
xml do # rubocop:disable Metrics/BlockLength
|
386
423
|
root "links"
|
387
424
|
|
388
|
-
map_element "Association", to: :association, namespace: nil,
|
389
|
-
|
390
|
-
|
425
|
+
map_element "Association", to: :association, 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 "Generalization", to: :generalization, namespace: nil,
|
440
|
+
prefix: nil,
|
441
|
+
value_map: {
|
442
|
+
from: {
|
443
|
+
nil: :empty,
|
444
|
+
empty: :empty,
|
445
|
+
omitted: :empty
|
446
|
+
},
|
447
|
+
to: {
|
448
|
+
nil: :empty,
|
449
|
+
empty: :empty,
|
450
|
+
omitted: :empty
|
451
|
+
}
|
452
|
+
}
|
453
|
+
map_element "NoteLink", to: :note_link, namespace: nil, prefix: nil,
|
454
|
+
value_map: {
|
455
|
+
from: {
|
456
|
+
nil: :empty,
|
457
|
+
empty: :empty,
|
458
|
+
omitted: :empty
|
459
|
+
},
|
460
|
+
to: {
|
461
|
+
nil: :empty,
|
462
|
+
empty: :empty,
|
463
|
+
omitted: :empty
|
464
|
+
}
|
465
|
+
}
|
391
466
|
end
|
392
467
|
end
|
393
468
|
|
@@ -442,7 +517,19 @@ module Xmi
|
|
442
517
|
xml do
|
443
518
|
root "elements"
|
444
519
|
|
445
|
-
map_element "element", to: :element, namespace: nil, prefix: nil
|
520
|
+
map_element "element", to: :element, namespace: nil, prefix: nil,
|
521
|
+
value_map: {
|
522
|
+
from: {
|
523
|
+
nil: :empty,
|
524
|
+
empty: :empty,
|
525
|
+
omitted: :empty
|
526
|
+
},
|
527
|
+
to: {
|
528
|
+
nil: :empty,
|
529
|
+
empty: :empty,
|
530
|
+
omitted: :empty
|
531
|
+
}
|
532
|
+
}
|
446
533
|
end
|
447
534
|
end
|
448
535
|
|
@@ -519,7 +606,19 @@ module Xmi
|
|
519
606
|
xml do
|
520
607
|
root "constraints"
|
521
608
|
|
522
|
-
map_element "constraint", to: :constraint, namespace: nil, prefix: nil
|
609
|
+
map_element "constraint", to: :constraint, namespace: nil, prefix: nil,
|
610
|
+
value_map: {
|
611
|
+
from: {
|
612
|
+
nil: :empty,
|
613
|
+
empty: :empty,
|
614
|
+
omitted: :empty
|
615
|
+
},
|
616
|
+
to: {
|
617
|
+
nil: :empty,
|
618
|
+
empty: :empty,
|
619
|
+
omitted: :empty
|
620
|
+
}
|
621
|
+
}
|
523
622
|
end
|
524
623
|
end
|
525
624
|
|
@@ -564,8 +663,20 @@ module Xmi
|
|
564
663
|
map_element "constraints", to: :constraints, render_nil: true, namespace: nil, prefix: nil
|
565
664
|
map_element "modifiers", to: :modifiers, render_nil: true, namespace: nil, prefix: nil
|
566
665
|
map_element "style", to: :style, render_nil: true, namespace: nil, prefix: nil
|
567
|
-
map_element "documentation", to: :documentation, namespace: nil,
|
568
|
-
|
666
|
+
map_element "documentation", to: :documentation, namespace: nil,
|
667
|
+
prefix: nil,
|
668
|
+
value_map: {
|
669
|
+
from: {
|
670
|
+
nil: :empty,
|
671
|
+
empty: :empty,
|
672
|
+
omitted: :empty
|
673
|
+
},
|
674
|
+
to: {
|
675
|
+
nil: :empty,
|
676
|
+
empty: :empty,
|
677
|
+
omitted: :empty
|
678
|
+
}
|
679
|
+
}
|
569
680
|
map_element "xrefs", to: :xrefs, render_nil: true, namespace: nil, prefix: nil
|
570
681
|
map_element "tags", to: :tags, render_nil: true, namespace: nil, prefix: nil
|
571
682
|
end
|
@@ -585,7 +696,19 @@ module Xmi
|
|
585
696
|
map_element "constraints", to: :constraints, render_nil: true, namespace: nil, prefix: nil
|
586
697
|
map_element "modifiers", to: :modifiers, render_nil: true, namespace: nil, prefix: nil
|
587
698
|
map_element "style", to: :style, render_nil: true, namespace: nil, prefix: nil
|
588
|
-
map_element "documentation", to: :documentation, prefix: nil,
|
699
|
+
map_element "documentation", to: :documentation, prefix: nil,
|
700
|
+
value_map: {
|
701
|
+
from: {
|
702
|
+
nil: :empty,
|
703
|
+
empty: :empty,
|
704
|
+
omitted: :empty
|
705
|
+
},
|
706
|
+
to: {
|
707
|
+
nil: :empty,
|
708
|
+
empty: :empty,
|
709
|
+
omitted: :empty
|
710
|
+
}
|
711
|
+
}
|
589
712
|
map_element "xrefs", to: :xrefs, render_nil: true, namespace: nil, prefix: nil
|
590
713
|
map_element "tags", to: :tags, render_nil: true, namespace: nil, prefix: nil
|
591
714
|
end
|
@@ -657,7 +780,7 @@ module Xmi
|
|
657
780
|
attribute :tags, SparxElementTags
|
658
781
|
attribute :xrefs, SparxElementXrefs
|
659
782
|
|
660
|
-
xml do
|
783
|
+
xml do # rubocop:disable Metrics/BlockLength
|
661
784
|
root "element"
|
662
785
|
|
663
786
|
map_attribute "idref", to: :idref, prefix: "xmi", namespace: "http://www.omg.org/spec/XMI/20131001"
|
@@ -666,8 +789,20 @@ module Xmi
|
|
666
789
|
map_element "target", to: :target, namespace: nil, prefix: nil
|
667
790
|
map_element "model", to: :model, namespace: nil, prefix: nil
|
668
791
|
map_element "properties", to: :properties, namespace: nil, prefix: nil
|
669
|
-
map_element "documentation", to: :documentation, namespace: nil,
|
670
|
-
|
792
|
+
map_element "documentation", to: :documentation, namespace: nil,
|
793
|
+
prefix: nil,
|
794
|
+
value_map: {
|
795
|
+
from: {
|
796
|
+
nil: :empty,
|
797
|
+
empty: :empty,
|
798
|
+
omitted: :empty
|
799
|
+
},
|
800
|
+
to: {
|
801
|
+
nil: :empty,
|
802
|
+
empty: :empty,
|
803
|
+
omitted: :empty
|
804
|
+
}
|
805
|
+
}
|
671
806
|
map_element "appearance", to: :appearance, namespace: nil, prefix: nil
|
672
807
|
map_element "labels", to: :labels, render_nil: true, namespace: nil, prefix: nil
|
673
808
|
map_element "extendedProperties", to: :extended_properties, namespace: nil, prefix: nil
|
@@ -682,7 +817,19 @@ module Xmi
|
|
682
817
|
xml do
|
683
818
|
root "connectors"
|
684
819
|
|
685
|
-
map_element "connector", to: :connector, namespace: nil, prefix: nil
|
820
|
+
map_element "connector", to: :connector, namespace: nil, prefix: nil,
|
821
|
+
value_map: {
|
822
|
+
from: {
|
823
|
+
nil: :empty,
|
824
|
+
empty: :empty,
|
825
|
+
omitted: :empty
|
826
|
+
},
|
827
|
+
to: {
|
828
|
+
nil: :empty,
|
829
|
+
empty: :empty,
|
830
|
+
omitted: :empty
|
831
|
+
}
|
832
|
+
}
|
686
833
|
end
|
687
834
|
end
|
688
835
|
|
@@ -692,7 +839,20 @@ module Xmi
|
|
692
839
|
xml do
|
693
840
|
root "primitivetypes"
|
694
841
|
|
695
|
-
map_element "packagedElement", to: :packaged_element, namespace: nil,
|
842
|
+
map_element "packagedElement", to: :packaged_element, namespace: nil,
|
843
|
+
prefix: nil,
|
844
|
+
value_map: {
|
845
|
+
from: {
|
846
|
+
nil: :empty,
|
847
|
+
empty: :empty,
|
848
|
+
omitted: :empty
|
849
|
+
},
|
850
|
+
to: {
|
851
|
+
nil: :empty,
|
852
|
+
empty: :empty,
|
853
|
+
omitted: :empty
|
854
|
+
}
|
855
|
+
}
|
696
856
|
end
|
697
857
|
end
|
698
858
|
|
@@ -704,7 +864,19 @@ module Xmi
|
|
704
864
|
|
705
865
|
map_element "Profile", to: :profile,
|
706
866
|
namespace: "http://www.omg.org/spec/UML/20131001",
|
707
|
-
prefix: "uml"
|
867
|
+
prefix: "uml",
|
868
|
+
value_map: {
|
869
|
+
from: {
|
870
|
+
nil: :empty,
|
871
|
+
empty: :empty,
|
872
|
+
omitted: :empty
|
873
|
+
},
|
874
|
+
to: {
|
875
|
+
nil: :empty,
|
876
|
+
empty: :empty,
|
877
|
+
omitted: :empty
|
878
|
+
}
|
879
|
+
}
|
708
880
|
end
|
709
881
|
end
|
710
882
|
|
@@ -729,7 +901,19 @@ module Xmi
|
|
729
901
|
xml do
|
730
902
|
root "elements"
|
731
903
|
|
732
|
-
map_element "element", to: :element, namespace: nil, prefix: nil
|
904
|
+
map_element "element", to: :element, namespace: nil, prefix: nil,
|
905
|
+
value_map: {
|
906
|
+
from: {
|
907
|
+
nil: :empty,
|
908
|
+
empty: :empty,
|
909
|
+
omitted: :empty
|
910
|
+
},
|
911
|
+
to: {
|
912
|
+
nil: :empty,
|
913
|
+
empty: :empty,
|
914
|
+
omitted: :empty
|
915
|
+
}
|
916
|
+
}
|
733
917
|
end
|
734
918
|
end
|
735
919
|
|
@@ -792,7 +976,19 @@ module Xmi
|
|
792
976
|
xml do
|
793
977
|
root "diagrams"
|
794
978
|
|
795
|
-
map_element "diagram", to: :diagram, namespace: nil, prefix: nil
|
979
|
+
map_element "diagram", to: :diagram, namespace: nil, prefix: nil,
|
980
|
+
value_map: {
|
981
|
+
from: {
|
982
|
+
nil: :empty,
|
983
|
+
empty: :empty,
|
984
|
+
omitted: :empty
|
985
|
+
},
|
986
|
+
to: {
|
987
|
+
nil: :empty,
|
988
|
+
empty: :empty,
|
989
|
+
omitted: :empty
|
990
|
+
}
|
991
|
+
}
|
796
992
|
end
|
797
993
|
end
|
798
994
|
|
@@ -834,7 +1030,7 @@ module Xmi
|
|
834
1030
|
include SparxExtensionAttributes
|
835
1031
|
attribute :profiles, SparxProfiles
|
836
1032
|
|
837
|
-
xml do
|
1033
|
+
xml do # rubocop:disable Metrics/BlockLength
|
838
1034
|
root "Extension"
|
839
1035
|
|
840
1036
|
map_attribute "id", to: :id, prefix: "xmi", namespace: "http://www.omg.org/spec/XMI/20131001"
|
@@ -851,7 +1047,19 @@ module Xmi
|
|
851
1047
|
map_element "primitivetypes", to: :primitive_types, namespace: nil, prefix: nil
|
852
1048
|
map_element "profiles", to: :profiles, namespace: nil, prefix: nil
|
853
1049
|
map_element "diagrams", to: :diagrams, namespace: nil, prefix: nil
|
854
|
-
map_element "EAStub", to: :ea_stub, namespace: nil, prefix: nil
|
1050
|
+
map_element "EAStub", to: :ea_stub, namespace: nil, prefix: nil,
|
1051
|
+
value_map: {
|
1052
|
+
from: {
|
1053
|
+
nil: :empty,
|
1054
|
+
empty: :empty,
|
1055
|
+
omitted: :empty
|
1056
|
+
},
|
1057
|
+
to: {
|
1058
|
+
nil: :empty,
|
1059
|
+
empty: :empty,
|
1060
|
+
omitted: :empty
|
1061
|
+
}
|
1062
|
+
}
|
855
1063
|
end
|
856
1064
|
end
|
857
1065
|
|
@@ -1023,31 +1231,139 @@ module Xmi
|
|
1023
1231
|
prefix: "SysPhS"
|
1024
1232
|
map_element "import", to: :eauml_import,
|
1025
1233
|
namespace: "http://www.sparxsystems.com/profiles/EAUML/1.0",
|
1026
|
-
prefix: "EAUML"
|
1234
|
+
prefix: "EAUML",
|
1235
|
+
value_map: {
|
1236
|
+
from: {
|
1237
|
+
nil: :empty,
|
1238
|
+
empty: :empty,
|
1239
|
+
omitted: :empty
|
1240
|
+
},
|
1241
|
+
to: {
|
1242
|
+
nil: :empty,
|
1243
|
+
empty: :empty,
|
1244
|
+
omitted: :empty
|
1245
|
+
}
|
1246
|
+
}
|
1027
1247
|
map_element "ApplicationSchema", to: :gml_application_schema,
|
1028
1248
|
namespace: "http://www.sparxsystems.com/profiles/GML/1.0",
|
1029
|
-
prefix: "GML"
|
1249
|
+
prefix: "GML",
|
1250
|
+
value_map: {
|
1251
|
+
from: {
|
1252
|
+
nil: :empty,
|
1253
|
+
empty: :empty,
|
1254
|
+
omitted: :empty
|
1255
|
+
},
|
1256
|
+
to: {
|
1257
|
+
nil: :empty,
|
1258
|
+
empty: :empty,
|
1259
|
+
omitted: :empty
|
1260
|
+
}
|
1261
|
+
}
|
1030
1262
|
map_element "CodeList", to: :gml_code_list,
|
1031
1263
|
namespace: "http://www.sparxsystems.com/profiles/GML/1.0",
|
1032
|
-
prefix: "GML"
|
1264
|
+
prefix: "GML",
|
1265
|
+
value_map: {
|
1266
|
+
from: {
|
1267
|
+
nil: :empty,
|
1268
|
+
empty: :empty,
|
1269
|
+
omitted: :empty
|
1270
|
+
},
|
1271
|
+
to: {
|
1272
|
+
nil: :empty,
|
1273
|
+
empty: :empty,
|
1274
|
+
omitted: :empty
|
1275
|
+
}
|
1276
|
+
}
|
1033
1277
|
map_element "DataType", to: :gml_data_type,
|
1034
1278
|
namespace: "http://www.sparxsystems.com/profiles/GML/1.0",
|
1035
|
-
prefix: "GML"
|
1279
|
+
prefix: "GML",
|
1280
|
+
value_map: {
|
1281
|
+
from: {
|
1282
|
+
nil: :empty,
|
1283
|
+
empty: :empty,
|
1284
|
+
omitted: :empty
|
1285
|
+
},
|
1286
|
+
to: {
|
1287
|
+
nil: :empty,
|
1288
|
+
empty: :empty,
|
1289
|
+
omitted: :empty
|
1290
|
+
}
|
1291
|
+
}
|
1036
1292
|
map_element "Union", to: :gml_union,
|
1037
1293
|
namespace: "http://www.sparxsystems.com/profiles/GML/1.0",
|
1038
|
-
prefix: "GML"
|
1294
|
+
prefix: "GML",
|
1295
|
+
value_map: {
|
1296
|
+
from: {
|
1297
|
+
nil: :empty,
|
1298
|
+
empty: :empty,
|
1299
|
+
omitted: :empty
|
1300
|
+
},
|
1301
|
+
to: {
|
1302
|
+
nil: :empty,
|
1303
|
+
empty: :empty,
|
1304
|
+
omitted: :empty
|
1305
|
+
}
|
1306
|
+
}
|
1039
1307
|
map_element "Enumeration", to: :gml_enumeration,
|
1040
1308
|
namespace: "http://www.sparxsystems.com/profiles/GML/1.0",
|
1041
|
-
prefix: "GML"
|
1309
|
+
prefix: "GML",
|
1310
|
+
value_map: {
|
1311
|
+
from: {
|
1312
|
+
nil: :empty,
|
1313
|
+
empty: :empty,
|
1314
|
+
omitted: :empty
|
1315
|
+
},
|
1316
|
+
to: {
|
1317
|
+
nil: :empty,
|
1318
|
+
empty: :empty,
|
1319
|
+
omitted: :empty
|
1320
|
+
}
|
1321
|
+
}
|
1042
1322
|
map_element "Type", to: :gml_type,
|
1043
1323
|
namespace: "http://www.sparxsystems.com/profiles/GML/1.0",
|
1044
|
-
prefix: "GML"
|
1324
|
+
prefix: "GML",
|
1325
|
+
value_map: {
|
1326
|
+
from: {
|
1327
|
+
nil: :empty,
|
1328
|
+
empty: :empty,
|
1329
|
+
omitted: :empty
|
1330
|
+
},
|
1331
|
+
to: {
|
1332
|
+
nil: :empty,
|
1333
|
+
empty: :empty,
|
1334
|
+
omitted: :empty
|
1335
|
+
}
|
1336
|
+
}
|
1045
1337
|
map_element "FeatureType", to: :gml_feature_type,
|
1046
1338
|
namespace: "http://www.sparxsystems.com/profiles/GML/1.0",
|
1047
|
-
prefix: "GML"
|
1339
|
+
prefix: "GML",
|
1340
|
+
value_map: {
|
1341
|
+
from: {
|
1342
|
+
nil: :empty,
|
1343
|
+
empty: :empty,
|
1344
|
+
omitted: :empty
|
1345
|
+
},
|
1346
|
+
to: {
|
1347
|
+
nil: :empty,
|
1348
|
+
empty: :empty,
|
1349
|
+
omitted: :empty
|
1350
|
+
}
|
1351
|
+
}
|
1048
1352
|
map_element "property", to: :gml_property,
|
1049
1353
|
namespace: "http://www.sparxsystems.com/profiles/GML/1.0",
|
1050
|
-
prefix: "GML"
|
1354
|
+
prefix: "GML",
|
1355
|
+
value_map: {
|
1356
|
+
from: {
|
1357
|
+
nil: :empty,
|
1358
|
+
empty: :empty,
|
1359
|
+
omitted: :empty
|
1360
|
+
},
|
1361
|
+
to: {
|
1362
|
+
nil: :empty,
|
1363
|
+
empty: :empty,
|
1364
|
+
omitted: :empty
|
1365
|
+
}
|
1366
|
+
}
|
1051
1367
|
|
1052
1368
|
map_element "Model", to: :model,
|
1053
1369
|
namespace: "http://www.omg.org/spec/UML/20131001",
|