xmi 0.1.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (384) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake.yml +14 -0
  3. data/.github/workflows/release.yml +22 -0
  4. data/.rubocop.yml +6 -0
  5. data/README.adoc +87 -2
  6. data/lib/xmi/documentation.rb +6 -6
  7. data/lib/xmi/ea_root.rb +316 -0
  8. data/lib/xmi/extension.rb +5 -5
  9. data/lib/xmi/root.rb +43 -20
  10. data/lib/xmi/root13.rb +0 -1
  11. data/lib/xmi/sparx.rb +368 -154
  12. data/lib/xmi/uml.rb +424 -133
  13. data/lib/xmi/uml13/abstraction.rb +90 -88
  14. data/lib/xmi/uml13/action.rb +86 -84
  15. data/lib/xmi/uml13/action_sequence.rb +76 -74
  16. data/lib/xmi/uml13/action_sequenceaction.rb +23 -21
  17. data/lib/xmi/uml13/action_sequencestate.rb +7 -5
  18. data/lib/xmi/uml13/action_sequencestate2.rb +7 -5
  19. data/lib/xmi/uml13/action_sequencetransition.rb +7 -5
  20. data/lib/xmi/uml13/action_state.rb +89 -87
  21. data/lib/xmi/uml13/actionaction_sequence.rb +7 -5
  22. data/lib/xmi/uml13/actionactual_argument.rb +7 -5
  23. data/lib/xmi/uml13/actionis_asynchronous.rb +6 -4
  24. data/lib/xmi/uml13/actionmessage.rb +7 -5
  25. data/lib/xmi/uml13/actionrecurrence.rb +15 -13
  26. data/lib/xmi/uml13/actionrequest.rb +7 -5
  27. data/lib/xmi/uml13/actionscript.rb +7 -5
  28. data/lib/xmi/uml13/actiontarget.rb +7 -5
  29. data/lib/xmi/uml13/activity_model.rb +77 -75
  30. data/lib/xmi/uml13/activity_modelpartition.rb +7 -5
  31. data/lib/xmi/uml13/activity_state.rb +88 -86
  32. data/lib/xmi/uml13/actor.rb +113 -111
  33. data/lib/xmi/uml13/argument.rb +17 -15
  34. data/lib/xmi/uml13/argumentaction.rb +7 -5
  35. data/lib/xmi/uml13/argumentvalue.rb +15 -13
  36. data/lib/xmi/uml13/association.rb +90 -88
  37. data/lib/xmi/uml13/association_class.rb +120 -118
  38. data/lib/xmi/uml13/association_end.rb +100 -98
  39. data/lib/xmi/uml13/association_end_role.rb +106 -104
  40. data/lib/xmi/uml13/association_end_roleassociation_role.rb +7 -5
  41. data/lib/xmi/uml13/association_end_rolebase.rb +7 -5
  42. data/lib/xmi/uml13/association_endaggregation.rb +6 -4
  43. data/lib/xmi/uml13/association_endassociation.rb +7 -5
  44. data/lib/xmi/uml13/association_endassociation_end_role.rb +7 -5
  45. data/lib/xmi/uml13/association_endchangeable.rb +6 -4
  46. data/lib/xmi/uml13/association_endis_navigable.rb +6 -4
  47. data/lib/xmi/uml13/association_endis_ordered.rb +6 -4
  48. data/lib/xmi/uml13/association_endlink_end.rb +7 -5
  49. data/lib/xmi/uml13/association_endmultiplicity.rb +7 -5
  50. data/lib/xmi/uml13/association_endqualifier.rb +7 -5
  51. data/lib/xmi/uml13/association_endspecification.rb +7 -5
  52. data/lib/xmi/uml13/association_endtarget_scope.rb +6 -4
  53. data/lib/xmi/uml13/association_endtype.rb +7 -5
  54. data/lib/xmi/uml13/association_role.rb +95 -93
  55. data/lib/xmi/uml13/association_rolebase.rb +7 -5
  56. data/lib/xmi/uml13/association_rolemultiplicity.rb +7 -5
  57. data/lib/xmi/uml13/association_rolenamespace.rb +7 -5
  58. data/lib/xmi/uml13/associationassociation_end.rb +7 -5
  59. data/lib/xmi/uml13/associationconnection.rb +9 -7
  60. data/lib/xmi/uml13/associationlink.rb +7 -5
  61. data/lib/xmi/uml13/attribute.rb +94 -92
  62. data/lib/xmi/uml13/attribute_link.rb +74 -72
  63. data/lib/xmi/uml13/attribute_linkattribute.rb +7 -5
  64. data/lib/xmi/uml13/attribute_linkinstance.rb +7 -5
  65. data/lib/xmi/uml13/attribute_linkvalue.rb +7 -5
  66. data/lib/xmi/uml13/attributeassociation_end.rb +7 -5
  67. data/lib/xmi/uml13/attributeattribute_link.rb +7 -5
  68. data/lib/xmi/uml13/attributeinitial_value.rb +15 -13
  69. data/lib/xmi/uml13/auxiliary_elements.rb +28 -26
  70. data/lib/xmi/uml13/behavioral_elements.rb +18 -16
  71. data/lib/xmi/uml13/behavioral_feature.rb +82 -80
  72. data/lib/xmi/uml13/behavioral_featureis_query.rb +6 -4
  73. data/lib/xmi/uml13/behavioral_featureparameter.rb +7 -5
  74. data/lib/xmi/uml13/behavioral_featureraised_exception.rb +7 -5
  75. data/lib/xmi/uml13/binding.rb +81 -79
  76. data/lib/xmi/uml13/bindingargument.rb +175 -173
  77. data/lib/xmi/uml13/boolean_expression.rb +18 -16
  78. data/lib/xmi/uml13/call_action.rb +89 -87
  79. data/lib/xmi/uml13/call_actionmode.rb +6 -4
  80. data/lib/xmi/uml13/call_event.rb +74 -72
  81. data/lib/xmi/uml13/call_eventoperation.rb +7 -5
  82. data/lib/xmi/uml13/change_event.rb +73 -71
  83. data/lib/xmi/uml13/change_eventchange_expression.rb +7 -5
  84. data/lib/xmi/uml13/class.rb +116 -114
  85. data/lib/xmi/uml13/classifier.rb +113 -111
  86. data/lib/xmi/uml13/classifier_in_state.rb +122 -120
  87. data/lib/xmi/uml13/classifier_in_statein_state.rb +7 -5
  88. data/lib/xmi/uml13/classifier_in_stateobject_flow_state.rb +7 -5
  89. data/lib/xmi/uml13/classifier_in_statetype.rb +7 -5
  90. data/lib/xmi/uml13/classifier_role.rb +130 -128
  91. data/lib/xmi/uml13/classifier_roleassociation_end_role.rb +7 -5
  92. data/lib/xmi/uml13/classifier_roleavailable_feature.rb +7 -5
  93. data/lib/xmi/uml13/classifier_rolebase.rb +7 -5
  94. data/lib/xmi/uml13/classifier_rolemessage.rb +7 -5
  95. data/lib/xmi/uml13/classifier_rolemessage2.rb +7 -5
  96. data/lib/xmi/uml13/classifier_rolemultiplicity.rb +7 -5
  97. data/lib/xmi/uml13/classifier_rolenamespace.rb +7 -5
  98. data/lib/xmi/uml13/classifierassociation_end.rb +7 -5
  99. data/lib/xmi/uml13/classifierclassifier_in_state.rb +7 -5
  100. data/lib/xmi/uml13/classifierclassifier_role.rb +7 -5
  101. data/lib/xmi/uml13/classifiercollaboration.rb +7 -5
  102. data/lib/xmi/uml13/classifiercreate_action.rb +7 -5
  103. data/lib/xmi/uml13/classifierfeature.rb +19 -17
  104. data/lib/xmi/uml13/classifierinstance.rb +7 -5
  105. data/lib/xmi/uml13/classifierparameter.rb +7 -5
  106. data/lib/xmi/uml13/classifierparticipant.rb +7 -5
  107. data/lib/xmi/uml13/classifierrealization.rb +7 -5
  108. data/lib/xmi/uml13/classifierspecification.rb +7 -5
  109. data/lib/xmi/uml13/classifierstructural_feature.rb +7 -5
  110. data/lib/xmi/uml13/classis_active.rb +6 -4
  111. data/lib/xmi/uml13/collaboration.rb +78 -76
  112. data/lib/xmi/uml13/collaborationconstraining_element.rb +7 -5
  113. data/lib/xmi/uml13/collaborationinteraction.rb +7 -5
  114. data/lib/xmi/uml13/collaborationrepresented_classifier.rb +7 -5
  115. data/lib/xmi/uml13/collaborationrepresented_operation.rb +7 -5
  116. data/lib/xmi/uml13/collaborations.rb +22 -20
  117. data/lib/xmi/uml13/comment.rb +65 -63
  118. data/lib/xmi/uml13/common_behavior.rb +56 -54
  119. data/lib/xmi/uml13/component.rb +119 -117
  120. data/lib/xmi/uml13/componentdeployment.rb +7 -5
  121. data/lib/xmi/uml13/componentimplements.rb +7 -5
  122. data/lib/xmi/uml13/composite_state.rb +94 -92
  123. data/lib/xmi/uml13/composite_stateis_concurrent.rb +6 -4
  124. data/lib/xmi/uml13/composite_statesubstate.rb +23 -21
  125. data/lib/xmi/uml13/constraint.rb +73 -71
  126. data/lib/xmi/uml13/constraintbody.rb +7 -5
  127. data/lib/xmi/uml13/constraintconstrained_element.rb +7 -5
  128. data/lib/xmi/uml13/constraintconstrained_stereotype.rb +7 -5
  129. data/lib/xmi/uml13/core.rb +52 -50
  130. data/lib/xmi/uml13/create_action.rb +89 -87
  131. data/lib/xmi/uml13/create_actioninstantiation.rb +7 -5
  132. data/lib/xmi/uml13/data_type.rb +113 -111
  133. data/lib/xmi/uml13/data_types.rb +36 -34
  134. data/lib/xmi/uml13/data_value.rb +85 -83
  135. data/lib/xmi/uml13/dependency.rb +79 -77
  136. data/lib/xmi/uml13/dependencyclient.rb +7 -5
  137. data/lib/xmi/uml13/dependencydescription.rb +7 -5
  138. data/lib/xmi/uml13/dependencyowning_dependency.rb +7 -5
  139. data/lib/xmi/uml13/dependencysub_dependencies.rb +15 -13
  140. data/lib/xmi/uml13/dependencysupplier.rb +7 -5
  141. data/lib/xmi/uml13/destroy_action.rb +86 -84
  142. data/lib/xmi/uml13/diagram.rb +25 -23
  143. data/lib/xmi/uml13/diagram_compositions.rb +7 -5
  144. data/lib/xmi/uml13/diagram_element.rb +20 -18
  145. data/lib/xmi/uml13/diagram_element_properties.rb +9 -7
  146. data/lib/xmi/uml13/diagram_elementdiagram.rb +7 -5
  147. data/lib/xmi/uml13/diagram_elementgeometry.rb +7 -5
  148. data/lib/xmi/uml13/diagram_elementstyle.rb +7 -5
  149. data/lib/xmi/uml13/diagram_properties.rb +13 -11
  150. data/lib/xmi/uml13/diagramdiagram_type.rb +7 -5
  151. data/lib/xmi/uml13/diagramelement.rb +7 -5
  152. data/lib/xmi/uml13/diagramname.rb +7 -5
  153. data/lib/xmi/uml13/diagramowner.rb +157 -155
  154. data/lib/xmi/uml13/diagramstyle.rb +7 -5
  155. data/lib/xmi/uml13/diagramtool_name.rb +7 -5
  156. data/lib/xmi/uml13/element.rb +12 -10
  157. data/lib/xmi/uml13/element_reference.rb +24 -22
  158. data/lib/xmi/uml13/element_referencealias.rb +7 -5
  159. data/lib/xmi/uml13/element_referencepackage.rb +7 -5
  160. data/lib/xmi/uml13/element_referencereferenced_element.rb +7 -5
  161. data/lib/xmi/uml13/element_referencevisibility.rb +6 -4
  162. data/lib/xmi/uml13/enumeration.rb +115 -113
  163. data/lib/xmi/uml13/enumeration_literal.rb +18 -16
  164. data/lib/xmi/uml13/enumeration_literalenumeration.rb +7 -5
  165. data/lib/xmi/uml13/enumeration_literalname.rb +7 -5
  166. data/lib/xmi/uml13/enumerationliteral.rb +7 -5
  167. data/lib/xmi/uml13/event.rb +71 -69
  168. data/lib/xmi/uml13/eventstate.rb +7 -5
  169. data/lib/xmi/uml13/eventtransition.rb +7 -5
  170. data/lib/xmi/uml13/exception.rb +99 -97
  171. data/lib/xmi/uml13/exceptioncontext.rb +7 -5
  172. data/lib/xmi/uml13/expression.rb +18 -16
  173. data/lib/xmi/uml13/expressionbody.rb +7 -5
  174. data/lib/xmi/uml13/expressionlanguage.rb +7 -5
  175. data/lib/xmi/uml13/extension_mechanisms.rb +14 -12
  176. data/lib/xmi/uml13/feature.rb +74 -72
  177. data/lib/xmi/uml13/featureclassifier_role.rb +7 -5
  178. data/lib/xmi/uml13/featureowner.rb +7 -5
  179. data/lib/xmi/uml13/featureowner_scope.rb +6 -4
  180. data/lib/xmi/uml13/foundation.rb +18 -16
  181. data/lib/xmi/uml13/generalizable_element.rb +82 -80
  182. data/lib/xmi/uml13/generalizable_elementgeneralization.rb +7 -5
  183. data/lib/xmi/uml13/generalizable_elementis_abstract.rb +6 -4
  184. data/lib/xmi/uml13/generalizable_elementis_leaf.rb +6 -4
  185. data/lib/xmi/uml13/generalizable_elementis_root.rb +6 -4
  186. data/lib/xmi/uml13/generalizable_elementspecialization.rb +7 -5
  187. data/lib/xmi/uml13/generalization.rb +74 -72
  188. data/lib/xmi/uml13/generalizationdiscriminator.rb +7 -5
  189. data/lib/xmi/uml13/generalizationsubtype.rb +7 -5
  190. data/lib/xmi/uml13/generalizationsupertype.rb +7 -5
  191. data/lib/xmi/uml13/geometry.rb +15 -13
  192. data/lib/xmi/uml13/geometrybody.rb +7 -5
  193. data/lib/xmi/uml13/graphic_marker.rb +15 -13
  194. data/lib/xmi/uml13/graphic_markerbody.rb +7 -5
  195. data/lib/xmi/uml13/guard.rb +70 -68
  196. data/lib/xmi/uml13/guardexpression.rb +7 -5
  197. data/lib/xmi/uml13/guardtransition.rb +7 -5
  198. data/lib/xmi/uml13/instance.rb +85 -83
  199. data/lib/xmi/uml13/instanceattribute_link.rb +7 -5
  200. data/lib/xmi/uml13/instanceclassifier.rb +7 -5
  201. data/lib/xmi/uml13/instancelink_end.rb +7 -5
  202. data/lib/xmi/uml13/instancemessage_instance.rb +7 -5
  203. data/lib/xmi/uml13/instancemessage_instance2.rb +7 -5
  204. data/lib/xmi/uml13/instancemessage_instance3.rb +7 -5
  205. data/lib/xmi/uml13/instanceslot.rb +7 -5
  206. data/lib/xmi/uml13/interaction.rb +70 -68
  207. data/lib/xmi/uml13/interactioncontext.rb +7 -5
  208. data/lib/xmi/uml13/interactionmessage.rb +7 -5
  209. data/lib/xmi/uml13/interface.rb +113 -111
  210. data/lib/xmi/uml13/link.rb +70 -68
  211. data/lib/xmi/uml13/link_end.rb +74 -72
  212. data/lib/xmi/uml13/link_endassociation_end.rb +7 -5
  213. data/lib/xmi/uml13/link_endinstance.rb +7 -5
  214. data/lib/xmi/uml13/link_endlink.rb +7 -5
  215. data/lib/xmi/uml13/link_object.rb +90 -88
  216. data/lib/xmi/uml13/linkassociation.rb +7 -5
  217. data/lib/xmi/uml13/linklink_role.rb +7 -5
  218. data/lib/xmi/uml13/local_invocation.rb +86 -84
  219. data/lib/xmi/uml13/mapping.rb +15 -13
  220. data/lib/xmi/uml13/mappingbody.rb +7 -5
  221. data/lib/xmi/uml13/message.rb +89 -87
  222. data/lib/xmi/uml13/message_instance.rb +77 -75
  223. data/lib/xmi/uml13/message_instanceargument.rb +7 -5
  224. data/lib/xmi/uml13/message_instancereceiver.rb +7 -5
  225. data/lib/xmi/uml13/message_instancesender.rb +7 -5
  226. data/lib/xmi/uml13/message_instancespecification.rb +7 -5
  227. data/lib/xmi/uml13/messageaction.rb +7 -5
  228. data/lib/xmi/uml13/messageactivator.rb +7 -5
  229. data/lib/xmi/uml13/messageinteraction.rb +7 -5
  230. data/lib/xmi/uml13/messagemessage.rb +7 -5
  231. data/lib/xmi/uml13/messagemessage2.rb +7 -5
  232. data/lib/xmi/uml13/messagepredecessor.rb +7 -5
  233. data/lib/xmi/uml13/messagereceiver.rb +7 -5
  234. data/lib/xmi/uml13/messagesender.rb +7 -5
  235. data/lib/xmi/uml13/method.rb +87 -85
  236. data/lib/xmi/uml13/methodbody.rb +7 -5
  237. data/lib/xmi/uml13/methodspecification.rb +7 -5
  238. data/lib/xmi/uml13/model.rb +81 -79
  239. data/lib/xmi/uml13/model_element.rb +65 -63
  240. data/lib/xmi/uml13/model_element_owns_diagramowned_diagram.rb +7 -5
  241. data/lib/xmi/uml13/model_elementbehavior.rb +7 -5
  242. data/lib/xmi/uml13/model_elementbinding.rb +7 -5
  243. data/lib/xmi/uml13/model_elementcollaboration.rb +7 -5
  244. data/lib/xmi/uml13/model_elementconstraint.rb +7 -5
  245. data/lib/xmi/uml13/model_elementelement_reference.rb +7 -5
  246. data/lib/xmi/uml13/model_elementimplementation.rb +7 -5
  247. data/lib/xmi/uml13/model_elementname.rb +7 -5
  248. data/lib/xmi/uml13/model_elementnamespace.rb +7 -5
  249. data/lib/xmi/uml13/model_elementpartition.rb +7 -5
  250. data/lib/xmi/uml13/model_elementpresentation.rb +7 -5
  251. data/lib/xmi/uml13/model_elementprovision.rb +7 -5
  252. data/lib/xmi/uml13/model_elementrequirement.rb +7 -5
  253. data/lib/xmi/uml13/model_elementstereotype.rb +7 -5
  254. data/lib/xmi/uml13/model_elementtagged_value.rb +7 -5
  255. data/lib/xmi/uml13/model_elementtemplate.rb +7 -5
  256. data/lib/xmi/uml13/model_elementtemplate_parameter.rb +7 -5
  257. data/lib/xmi/uml13/model_elementview.rb +7 -5
  258. data/lib/xmi/uml13/model_elementvisibility.rb +6 -4
  259. data/lib/xmi/uml13/model_management.rb +18 -16
  260. data/lib/xmi/uml13/multiplicity_range.rb +18 -16
  261. data/lib/xmi/uml13/multiplicity_rangelower.rb +7 -5
  262. data/lib/xmi/uml13/multiplicity_rangeupper.rb +7 -5
  263. data/lib/xmi/uml13/namespace.rb +67 -65
  264. data/lib/xmi/uml13/namespaceowned_element.rb +175 -173
  265. data/lib/xmi/uml13/node.rb +116 -114
  266. data/lib/xmi/uml13/nodecomponent.rb +7 -5
  267. data/lib/xmi/uml13/object.rb +85 -83
  268. data/lib/xmi/uml13/object_flow_state.rb +92 -90
  269. data/lib/xmi/uml13/object_flow_statetype_state.rb +7 -5
  270. data/lib/xmi/uml13/object_set_expression.rb +18 -16
  271. data/lib/xmi/uml13/operation.rb +102 -100
  272. data/lib/xmi/uml13/operationcollaboration.rb +7 -5
  273. data/lib/xmi/uml13/operationconcurrency.rb +6 -4
  274. data/lib/xmi/uml13/operationis_polymorphic.rb +6 -4
  275. data/lib/xmi/uml13/operationmethod.rb +7 -5
  276. data/lib/xmi/uml13/operationoccurrence.rb +7 -5
  277. data/lib/xmi/uml13/operationspecification.rb +7 -5
  278. data/lib/xmi/uml13/package.rb +81 -79
  279. data/lib/xmi/uml13/packageelement_reference.rb +7 -5
  280. data/lib/xmi/uml13/parameter.rb +79 -77
  281. data/lib/xmi/uml13/parameterbehavioral_feature.rb +7 -5
  282. data/lib/xmi/uml13/parameterdefault_value.rb +15 -13
  283. data/lib/xmi/uml13/parameterkind.rb +6 -4
  284. data/lib/xmi/uml13/parametersignal.rb +7 -5
  285. data/lib/xmi/uml13/parametertype.rb +7 -5
  286. data/lib/xmi/uml13/partition.rb +71 -69
  287. data/lib/xmi/uml13/partitionactivity_model.rb +7 -5
  288. data/lib/xmi/uml13/partitioncontents.rb +7 -5
  289. data/lib/xmi/uml13/presentation.rb +22 -20
  290. data/lib/xmi/uml13/presentationgeometry.rb +7 -5
  291. data/lib/xmi/uml13/presentationmodel.rb +7 -5
  292. data/lib/xmi/uml13/presentationstyle.rb +7 -5
  293. data/lib/xmi/uml13/presentationview_element.rb +7 -5
  294. data/lib/xmi/uml13/primitive.rb +113 -111
  295. data/lib/xmi/uml13/procedure_expression.rb +18 -16
  296. data/lib/xmi/uml13/pseudo_state.rb +77 -75
  297. data/lib/xmi/uml13/pseudo_statekind.rb +6 -4
  298. data/lib/xmi/uml13/reception.rb +91 -89
  299. data/lib/xmi/uml13/receptionis_polymorphic.rb +6 -4
  300. data/lib/xmi/uml13/receptionsignal.rb +7 -5
  301. data/lib/xmi/uml13/receptionspecification.rb +7 -5
  302. data/lib/xmi/uml13/refinement.rb +81 -79
  303. data/lib/xmi/uml13/refinementmapping.rb +7 -5
  304. data/lib/xmi/uml13/request.rb +71 -69
  305. data/lib/xmi/uml13/requestaction.rb +7 -5
  306. data/lib/xmi/uml13/requestmessage_instance.rb +7 -5
  307. data/lib/xmi/uml13/return_action.rb +86 -84
  308. data/lib/xmi/uml13/send_action.rb +86 -84
  309. data/lib/xmi/uml13/signal.rb +96 -94
  310. data/lib/xmi/uml13/signal_event.rb +74 -72
  311. data/lib/xmi/uml13/signal_eventsignal.rb +7 -5
  312. data/lib/xmi/uml13/signaloccurrence.rb +7 -5
  313. data/lib/xmi/uml13/signalparameter.rb +7 -5
  314. data/lib/xmi/uml13/signalreception.rb +7 -5
  315. data/lib/xmi/uml13/simple_state.rb +89 -87
  316. data/lib/xmi/uml13/state.rb +89 -87
  317. data/lib/xmi/uml13/state_machine.rb +75 -73
  318. data/lib/xmi/uml13/state_machinecontext.rb +7 -5
  319. data/lib/xmi/uml13/state_machines.rb +50 -48
  320. data/lib/xmi/uml13/state_machinesubmachine_state.rb +7 -5
  321. data/lib/xmi/uml13/state_machinetop.rb +19 -17
  322. data/lib/xmi/uml13/state_machinetransitions.rb +7 -5
  323. data/lib/xmi/uml13/state_vertex.rb +74 -72
  324. data/lib/xmi/uml13/state_vertexincoming.rb +7 -5
  325. data/lib/xmi/uml13/state_vertexoutgoing.rb +7 -5
  326. data/lib/xmi/uml13/state_vertexparent.rb +7 -5
  327. data/lib/xmi/uml13/stateclassifier_in_state.rb +7 -5
  328. data/lib/xmi/uml13/statedeferred_event.rb +7 -5
  329. data/lib/xmi/uml13/stateentry.rb +7 -5
  330. data/lib/xmi/uml13/stateexit.rb +7 -5
  331. data/lib/xmi/uml13/stateinternal_transition.rb +7 -5
  332. data/lib/xmi/uml13/statestate_machine.rb +7 -5
  333. data/lib/xmi/uml13/stereotype.rb +95 -93
  334. data/lib/xmi/uml13/stereotypebase_class.rb +7 -5
  335. data/lib/xmi/uml13/stereotypeextended_element.rb +7 -5
  336. data/lib/xmi/uml13/stereotypeicon.rb +7 -5
  337. data/lib/xmi/uml13/stereotyperequired_tag.rb +7 -5
  338. data/lib/xmi/uml13/stereotypestereotype_constraint.rb +7 -5
  339. data/lib/xmi/uml13/structural_feature.rb +86 -84
  340. data/lib/xmi/uml13/structural_featurechangeable.rb +6 -4
  341. data/lib/xmi/uml13/structural_featuremultiplicity.rb +7 -5
  342. data/lib/xmi/uml13/structural_featuretarget_scope.rb +6 -4
  343. data/lib/xmi/uml13/structural_featuretype.rb +7 -5
  344. data/lib/xmi/uml13/structure.rb +113 -111
  345. data/lib/xmi/uml13/submachine_state.rb +88 -86
  346. data/lib/xmi/uml13/submachine_statestate_machine.rb +7 -5
  347. data/lib/xmi/uml13/subsystem.rb +115 -113
  348. data/lib/xmi/uml13/subsystemis_instantiable.rb +6 -4
  349. data/lib/xmi/uml13/tagged_value.rb +24 -22
  350. data/lib/xmi/uml13/tagged_valuemodel_element.rb +7 -5
  351. data/lib/xmi/uml13/tagged_valuestereotype.rb +7 -5
  352. data/lib/xmi/uml13/tagged_valuetag.rb +7 -5
  353. data/lib/xmi/uml13/tagged_valuevalue.rb +7 -5
  354. data/lib/xmi/uml13/terminate_action.rb +86 -84
  355. data/lib/xmi/uml13/time_event.rb +73 -71
  356. data/lib/xmi/uml13/time_eventduration.rb +7 -5
  357. data/lib/xmi/uml13/time_expression.rb +18 -16
  358. data/lib/xmi/uml13/trace.rb +79 -77
  359. data/lib/xmi/uml13/transition.rb +84 -82
  360. data/lib/xmi/uml13/transitioneffect.rb +7 -5
  361. data/lib/xmi/uml13/transitionguard.rb +7 -5
  362. data/lib/xmi/uml13/transitionsource.rb +7 -5
  363. data/lib/xmi/uml13/transitionstate.rb +7 -5
  364. data/lib/xmi/uml13/transitionstatemachine.rb +7 -5
  365. data/lib/xmi/uml13/transitiontarget.rb +7 -5
  366. data/lib/xmi/uml13/transitiontrigger.rb +7 -5
  367. data/lib/xmi/uml13/uninterpreted_action.rb +89 -87
  368. data/lib/xmi/uml13/uninterpreted_actionbody.rb +7 -5
  369. data/lib/xmi/uml13/usage.rb +79 -77
  370. data/lib/xmi/uml13/use_case.rb +116 -114
  371. data/lib/xmi/uml13/use_case_instance.rb +85 -83
  372. data/lib/xmi/uml13/use_caseextension_point.rb +7 -5
  373. data/lib/xmi/uml13/use_cases.rb +16 -14
  374. data/lib/xmi/uml13/view_element.rb +18 -16
  375. data/lib/xmi/uml13/view_elementmodel.rb +7 -5
  376. data/lib/xmi/uml13/view_elementpresentation.rb +7 -5
  377. data/lib/xmi/uml13/xm_iextension.rb +11 -9
  378. data/lib/xmi/uml13/xm_ireference.rb +6 -4
  379. data/lib/xmi/uml13.rb +2 -0
  380. data/lib/xmi/version.rb +1 -1
  381. data/lib/xmi.rb +10 -0
  382. data/xmi.gemspec +2 -2
  383. metadata +10 -22
  384. data/.github/workflows/main.yml +0 -27
data/lib/xmi/sparx.rb CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  module Xmi
4
4
  module Sparx
5
- # <model package2="EAID_C799E047_A10F_4203_9E22_9C47183CED98" package="EAPK_4C859105_86A2_46e7_8227_43951535FB4C" tpos="1" ea_localid="2" ea_eleType="package"/>
6
5
  class SparxElementModel < Shale::Mapper
7
6
  attribute :package, Shale::Type::String
8
7
  attribute :package2, Shale::Type::String
@@ -21,7 +20,6 @@ module Xmi
21
20
  end
22
21
  end
23
22
 
24
- # <properties isSpecification="false" sType="Class" nType="0" scope="public" stereotype="BasicDoc" isRoot="false" isLeaf="false" isAbstract="false" isActive="false"/>
25
23
  class SparxElementProperties < Shale::Mapper
26
24
  attribute :name, Shale::Type::String
27
25
  attribute :type, Shale::Type::String
@@ -56,7 +54,6 @@ module Xmi
56
54
  end
57
55
  end
58
56
 
59
- # <project author="LUKA" version="1.0" phase="1.0" created="2020-12-16 09:44:14" modified="2020-12-16 09:45:25" complexity="1" status="Proposed"/>
60
57
  class SparxElementProject < Shale::Mapper
61
58
  attribute :author, Shale::Type::String
62
59
  attribute :version, Shale::Type::String
@@ -79,8 +76,6 @@ module Xmi
79
76
  end
80
77
  end
81
78
 
82
- # <code gentype="&lt;none&gt;"/>
83
- # <code product_name="Java" gentype="Java"/>
84
79
  class SparxElementCode < Shale::Mapper
85
80
  attribute :gentype, Shale::Type::String
86
81
  attribute :product_name, Shale::Type::String
@@ -93,17 +88,16 @@ module Xmi
93
88
  end
94
89
  end
95
90
 
96
- # <style appearance="BackColor=-1;BorderColor=-1;BorderWidth=-1;FontColor=-1;VSwimLanes=1;HSwimLanes=1;BorderStyle=0;"/>
97
91
  class SparxElementStyle < Shale::Mapper
98
92
  attribute :appearance, Shale::Type::String
99
93
 
100
94
  xml do
101
95
  root "style"
96
+
102
97
  map_attribute "appearance", to: :appearance
103
98
  end
104
99
  end
105
100
 
106
- # <tag xmi:id="EAID_DA606969_8B1E_440d_BFF4_7EFF137F3C09" name="edition" value="2" modelElement="EAID_D235A1D4_1924_44ba_AA1E_0B0510AE9DCB"/>
107
101
  class SparxElementTag < Shale::Mapper
108
102
  attribute :id, Shale::Type::String
109
103
  attribute :name, Shale::Type::String
@@ -112,6 +106,7 @@ module Xmi
112
106
 
113
107
  xml do
114
108
  root "tag"
109
+
115
110
  map_attribute "id", to: :id, prefix: "xmi", namespace: "http://www.omg.org/spec/XMI/20131001"
116
111
  map_attribute "name", to: :name
117
112
  map_attribute "value", to: :value
@@ -121,42 +116,45 @@ module Xmi
121
116
 
122
117
  class SparxElementTags < Shale::Mapper
123
118
  attribute :tags, SparxElementTag, collection: true
119
+
124
120
  xml do
125
121
  root "tags"
126
122
  map_element "tag", to: :tags
127
123
  end
128
124
  end
129
125
 
130
- # <xrefs value="$XREFPROP=$XID={141F50DE-580C-4a82-AC5E-5BE2554B1671}$XID;$NAM=Stereotypes$NAM;$TYP=element property$TYP;$VIS=Public$VIS;$PAR=0$PAR;$DES=@STEREO;Name=Bibliography;@ENDSTEREO;$DES;$CLT={D832D6D8-0518-43f7-9166-7A4E3E8605AA}$CLT;$SUP=&lt;none&gt;$SUP;$ENDXREF;"/>
131
126
  class SparxElementXrefs < Shale::Mapper
132
127
  attribute :value, Shale::Type::String
133
128
 
134
129
  xml do
135
130
  root "xrefs"
131
+
136
132
  map_attribute "value", to: :value
137
133
  end
138
134
  end
139
135
 
140
- # <extendedProperties tagged="0" package_name="Model"/>
141
136
  class SparxElementExtendedProperties < Shale::Mapper
142
137
  attribute :tagged, Shale::Type::String
143
138
  attribute :package_name, Shale::Type::String
144
139
  attribute :virtual_inheritance, Shale::Type::Integer
140
+
145
141
  xml do
146
142
  root "extendedProperties"
143
+
147
144
  map_attribute "tagged", to: :tagged
148
145
  map_attribute "package_name", to: :package_name
149
146
  map_attribute "virtualInheritance", to: :virtual_inheritance
150
147
  end
151
148
  end
152
149
 
153
- # <packageproperties version="1.0" tpos="1"/>
154
150
  class SparxElementPackageProperties < Shale::Mapper
155
151
  attribute :version, Shale::Type::String
156
152
  attribute :xmiver, Shale::Type::String
157
153
  attribute :tpos, Shale::Type::String
154
+
158
155
  xml do
159
156
  root "packagedproperties"
157
+
160
158
  map_attribute "version", to: :version
161
159
  map_attribute "xmiver", to: :xmiver
162
160
  map_attribute "tpos", to: :tpos
@@ -168,11 +166,11 @@ module Xmi
168
166
 
169
167
  xml do
170
168
  root "paths"
169
+
171
170
  map_attribute "xmlpath", to: :xmlpath
172
171
  end
173
172
  end
174
173
 
175
- # <times created="2020-12-16 09:44:14" modified="2021-01-13 11:17:46" lastloaddate="2019-01-23 13:38:10" lastsavedate="2019-01-23 13:38:10"/>
176
174
  class SparxElementTimes < Shale::Mapper
177
175
  attribute :created, Shale::Type::String
178
176
  attribute :modified, Shale::Type::String
@@ -181,6 +179,7 @@ module Xmi
181
179
 
182
180
  xml do
183
181
  root "times"
182
+
184
183
  map_attribute "created", to: :created
185
184
  map_attribute "modified", to: :modified
186
185
  map_attribute "lastloaddate", to: :last_load_date
@@ -188,7 +187,6 @@ module Xmi
188
187
  end
189
188
  end
190
189
 
191
- # <flags iscontrolled="FALSE" isprotected="FALSE" batchsave="0" batchload="0" usedtd="FALSE" logxml="FALSE"/>
192
190
  class SparxElementFlags < Shale::Mapper
193
191
  attribute :is_controlled, Shale::Type::Integer
194
192
  attribute :is_protected, Shale::Type::Integer
@@ -200,6 +198,7 @@ module Xmi
200
198
 
201
199
  xml do
202
200
  root "flags"
201
+
203
202
  map_attribute "iscontrolled", to: :is_controlled
204
203
  map_attribute "isprotected", to: :is_protected
205
204
  map_attribute "batchsave", to: :batch_save
@@ -211,29 +210,177 @@ module Xmi
211
210
  end
212
211
 
213
212
  class SparxElementAssociation < Shale::Mapper
213
+ attribute :id, Shale::Type::String
214
+ attribute :start, Shale::Type::String
215
+ attribute :end, Shale::Type::String
216
+ attribute :name, Shale::Type::String, default: -> { "Association" }
217
+
218
+ xml do
219
+ root "Association"
220
+
221
+ map_attribute "id", to: :id, prefix: "xmi", namespace: "http://www.omg.org/spec/XMI/20131001"
222
+ map_attribute "start", to: :start
223
+ map_attribute "end", to: :end
224
+ end
225
+ end
226
+
227
+ class SparxElementGeneralization < SparxElementAssociation
228
+ attribute :name, Shale::Type::String, default: -> { "Generalization" }
229
+
230
+ xml do
231
+ root "Generalization"
232
+
233
+ map_attribute "id", to: :id, prefix: "xmi", namespace: "http://www.omg.org/spec/XMI/20131001"
234
+ map_attribute "start", to: :start
235
+ map_attribute "end", to: :end
236
+ end
237
+ end
238
+
239
+ class SparxElementAggregation < SparxElementAssociation
240
+ attribute :name, Shale::Type::String, default: -> { "Aggregation" }
241
+
242
+ xml do
243
+ root "Aggregation"
244
+
245
+ map_attribute "id", to: :id, prefix: "xmi", namespace: "http://www.omg.org/spec/XMI/20131001"
246
+ map_attribute "start", to: :start
247
+ map_attribute "end", to: :end
248
+ end
249
+ end
250
+
251
+ class SparxElementNoteLink < SparxElementAssociation
252
+ attribute :name, Shale::Type::String, default: -> { "NoteLink" }
253
+
254
+ xml do
255
+ root "NoteLink"
256
+
257
+ map_attribute "id", to: :id, prefix: "xmi", namespace: "http://www.omg.org/spec/XMI/20131001"
258
+ map_attribute "start", to: :start
259
+ map_attribute "end", to: :end
260
+ end
261
+ end
262
+
263
+ class SparxElementStyleex < Shale::Mapper
264
+ attribute :value, Shale::Type::String
265
+
266
+ xml do
267
+ root "styleex"
268
+
269
+ map_attribute "value", to: :value
270
+ end
271
+ end
272
+
273
+ class SparxElementBounds < Shale::Mapper
274
+ attribute :lower, Shale::Type::Integer
275
+ attribute :upper, Shale::Type::Integer
276
+
277
+ xml do
278
+ root "bounds"
279
+
280
+ map_attribute "lower", to: :lower
281
+ map_attribute "upper", to: :upper
282
+ end
283
+ end
284
+
285
+ class SparxElementStereotype < Shale::Mapper
286
+ attribute :stereotype, Shale::Type::String
287
+
288
+ xml do
289
+ root "stereotype"
290
+
291
+ map_attribute "stereotype", to: :stereotype
292
+ end
293
+ end
294
+
295
+ class SparxElementContainment < Shale::Mapper
296
+ attribute :containment, Shale::Type::String
297
+ attribute :position, Shale::Type::Integer
298
+
299
+ xml do
300
+ root "containment"
301
+
302
+ map_attribute "containment", to: :containment
303
+ map_attribute "position", to: :position
304
+ end
305
+ end
306
+
307
+ class SparxElementCoords < Shale::Mapper
308
+ attribute :ordered, Shale::Type::Integer
309
+ attribute :scale, Shale::Type::Integer
310
+
311
+ xml do
312
+ root "coords"
313
+
314
+ map_attribute "ordered", to: :ordered
315
+ map_attribute "scale", to: :scale
316
+ end
317
+ end
318
+
319
+ class SparxElementAttribute < Shale::Mapper
320
+ attribute :initial, Shale::Type::String
321
+ attribute :documentation, Shale::Type::String
322
+ attribute :options, Shale::Type::String
323
+ attribute :style, Shale::Type::String
324
+ attribute :tags, Shale::Type::String, collection: true
325
+
326
+ attribute :model, SparxElementModel
327
+ attribute :properties, SparxElementProperties
328
+ attribute :coords, SparxElementCoords
329
+ attribute :containment, SparxElementContainment
330
+ attribute :stereotype, SparxElementStereotype
331
+ attribute :bounds, SparxElementBounds
332
+ attribute :styleex, SparxElementStyleex
333
+ attribute :xrefs, SparxElementXrefs
334
+
335
+ xml do
336
+ root "attribute"
337
+
338
+ map_attribute "initial", to: :initial
339
+ map_attribute "documentation", to: :documentation
340
+ map_attribute "options", to: :options
341
+ map_attribute "style", to: :style
342
+ map_attribute "tags", to: :tags
343
+
344
+ map_element "model", to: :model
345
+ map_element "properties", to: :properties
346
+ map_element "coords", to: :coords
347
+ map_element "containment", to: :containment
348
+ map_element "stereotype", to: :stereotype
349
+ map_element "bounds", to: :bounds
350
+ map_element "styleex", to: :styleex
351
+ map_element "xrefs", to: :xrefs
352
+ end
214
353
  end
215
354
 
216
355
  class SparxElementAttributes < Shale::Mapper
356
+ attribute :attribute, SparxElementAttribute, collection: true
357
+
358
+ xml do
359
+ root "attributes"
360
+
361
+ map_element "attribute", to: :attribute
362
+ end
217
363
  end
218
364
 
219
- # <links>
220
- # <Association xmi:id="EAID_322379DE_61A8_411d_9638_5BB92DDF0A54" start="EAID_C1155D80_E68B_46d5_ADE5_F5639486163D" end="EAID_10AD8D60_9972_475a_AB7E_FA40212D5297"/>
221
- # </links>
222
365
  class SparxElementLinks < Shale::Mapper
223
- attribute :associations, SparxElementAssociation
366
+ attribute :association, SparxElementAssociation, collection: true
367
+ attribute :generalization, SparxElementGeneralization, collection: true
368
+ attribute :note_link, SparxElementNoteLink, collection: true
369
+
224
370
  xml do
225
371
  root "links"
226
- map_element "Association", to: :associations
372
+
373
+ map_element "Association", to: :association
374
+ map_element "Generalization", to: :generalization
375
+ map_element "NoteLink", to: :note_link
227
376
  end
228
377
  end
229
378
 
230
- # <element xmi:idref="EAPK_C799E047_A10F_4203_9E22_9C47183CED98" xmi:type="uml:Package" name="requirement type class diagram" scope="public">
231
379
  class SparxElement < Shale::Mapper
232
380
  attribute :idref, Shale::Type::String
233
381
  attribute :type, Shale::Type::String
234
382
  attribute :name, Shale::Type::String
235
383
  attribute :scope, Shale::Type::String
236
-
237
384
  attribute :model, SparxElementModel
238
385
  attribute :properties, SparxElementProperties
239
386
  attribute :project, SparxElementProject
@@ -251,6 +398,7 @@ module Xmi
251
398
 
252
399
  xml do
253
400
  root "element"
401
+
254
402
  map_attribute "idref", to: :idref, prefix: "xmi", namespace: "http://www.omg.org/spec/XMI/20131001"
255
403
  map_attribute "type", to: :type, prefix: "xmi", namespace: "http://www.omg.org/spec/XMI/20131001"
256
404
  map_attribute "name", to: :name
@@ -263,62 +411,31 @@ module Xmi
263
411
  map_element "style", to: :style
264
412
  map_element "tags", to: :tags
265
413
  map_element "xrefs", to: :xrefs
266
- map_element "extendedProperties", to: :extended_properties
414
+ map_element "extendedProperties", to: :extended_properties, namespace: nil, prefix: nil
267
415
  map_element "packageproperties", to: :package_properties
268
416
  map_element "paths", to: :paths
269
417
  map_element "times", to: :times
270
418
  map_element "flags", to: :flags
419
+ map_element "links", to: :links
420
+ map_element "attributes", to: :attributes
271
421
  end
272
422
  end
273
423
 
274
- # <elements>
275
424
  class SparxElements < Shale::Mapper
276
425
  attribute :element, SparxElement, collection: true
277
426
 
278
427
  xml do
279
428
  root "elements"
429
+
280
430
  map_element "element", to: :element
281
431
  end
282
432
  end
283
433
 
284
- # <connector xmi:idref="EAID_21FAA572_89A7_4d52_99FD_05B76DD348B2">
285
- # <source xmi:idref="EAID_D235A1D4_1924_44ba_AA1E_0B0510AE9DCB">
286
- # <model ea_localid="23471" type="Package" name="ISO 6709 Edition 2"/>
287
- # <role visibility="Public"/>
288
- # <type aggregation="none"/>
289
- # <constraints/>
290
- # <modifiers isOrdered="false" isNavigable="false"/>
291
- # <style value="Owned=0;Navigable=Non-Navigable;"/>
292
- # <documentation/>
293
- # <xrefs/>
294
- # <tags/>
295
- # </source>
296
- # <target xmi:idref="EAID_8A7B787D_513E_4be9_B65A_4139FC1D63BE">
297
- # <model ea_localid="18393" type="Package" name="ISO 19111 Edition 3"/>
298
- # <role visibility="Public"/>
299
- # <type aggregation="none"/>
300
- # <constraints/>
301
- # <modifiers isOrdered="false" isNavigable="false"/>
302
- # <style value="Owned=0;Navigable=Navigable;"/>
303
- # <documentation/>
304
- # <xrefs/>
305
- # <tags/>
306
- # </target>
307
- # <model ea_localid="26444"/>
308
- # <properties ea_type="Dependency" direction="Source -&gt; Destination"/>
309
- # <documentation/>
310
- # <appearance linemode="3" linecolor="0" linewidth="0" seqno="0" headStyle="0" lineStyle="0"/>
311
- # <labels/>
312
- # <extendedProperties virtualInheritance="0"/>
313
- # <style/>
314
- # <xrefs/>
315
- # <tags/>
316
- # </connector>
317
-
318
434
  class SparxConnectorModel < Shale::Mapper
319
435
  attribute :ea_localid, Shale::Type::String
320
436
  attribute :type, Shale::Type::String
321
437
  attribute :name, Shale::Type::String
438
+
322
439
  xml do
323
440
  map_attribute "ea_localid", to: :ea_localid
324
441
  map_attribute "type", to: :type
@@ -327,32 +444,68 @@ module Xmi
327
444
  end
328
445
 
329
446
  class SparxConnectorEndRole < Shale::Mapper
447
+ attribute :name, Shale::Type::String
330
448
  attribute :visibility, Shale::Type::String
449
+ attribute :target_scope, Shale::Type::String
450
+
331
451
  xml do
332
452
  root "role"
453
+
454
+ map_attribute :name, to: :name
333
455
  map_attribute :visibility, to: :visibility
456
+ map_attribute :targetScope, to: :target_scope
334
457
  end
335
458
  end
336
459
 
337
460
  class SparxConnectorEndType < Shale::Mapper
338
461
  attribute :aggregation, Shale::Type::String
462
+ attribute :multiplicity, Shale::Type::String
463
+ attribute :containment, Shale::Type::String
464
+
339
465
  xml do
340
466
  root "type"
467
+
341
468
  map_attribute :aggregation, to: :aggregation
469
+ map_attribute :multiplicity, to: :multiplicity
470
+ map_attribute :containment, to: :containment
342
471
  end
343
472
  end
344
473
 
345
474
  class SparxConnectorEndModifiers < Shale::Mapper
346
475
  attribute :is_ordered, Shale::Type::Boolean
347
476
  attribute :is_navigable, Shale::Type::Boolean
477
+
348
478
  xml do
349
479
  root "type"
480
+
350
481
  map_attribute "isOrdered", to: :is_ordered
351
482
  map_attribute "isNavigable", to: :is_navigable
352
483
  end
353
484
  end
354
485
 
486
+ class SparxConnectorEndConstraint < Shale::Mapper
487
+ attribute :name, Shale::Type::String
488
+ attribute :type, Shale::Type::String
489
+ attribute :weight, Shale::Type::Float
490
+ attribute :status, Shale::Type::String
491
+
492
+ xml do
493
+ root "constraint"
494
+
495
+ map_attribute "name", to: :name
496
+ map_attribute "type", to: :type
497
+ map_attribute "weight", to: :weight
498
+ map_attribute "status", to: :status
499
+ end
500
+ end
501
+
355
502
  class SparxConnectorEndConstraints < Shale::Mapper
503
+ attribute :constraint, SparxConnectorEndConstraint, collection: true
504
+ xml do
505
+ root "constraints"
506
+
507
+ map_element "constraint", to: :constraint
508
+ end
356
509
  end
357
510
 
358
511
  class SparxConnectorEndStyle < Shale::Mapper
@@ -360,12 +513,13 @@ module Xmi
360
513
 
361
514
  xml do
362
515
  root "style"
516
+
363
517
  map_attribute "value", to: :value
364
518
  end
365
519
  end
366
520
 
367
521
  module SparxConnectorEnd
368
- def self.included(klass)
522
+ def self.included(klass) # rubocop:disable Metrics/MethodLength
369
523
  klass.class_eval do
370
524
  attribute :idref, Shale::Type::String
371
525
  attribute :model, SparxConnectorModel
@@ -386,6 +540,7 @@ module Xmi
386
540
 
387
541
  xml do
388
542
  root "source"
543
+
389
544
  map_attribute "idref", to: :idref, prefix: "xmi", namespace: "http://www.omg.org/spec/XMI/20131001"
390
545
 
391
546
  map_element "model", to: :model, render_nil: true
@@ -405,6 +560,7 @@ module Xmi
405
560
 
406
561
  xml do
407
562
  root "target"
563
+
408
564
  map_attribute "idref", to: :idref, prefix: "xmi", namespace: "http://www.omg.org/spec/XMI/20131001"
409
565
 
410
566
  map_element "model", to: :model, render_nil: true
@@ -419,19 +575,18 @@ module Xmi
419
575
  end
420
576
  end
421
577
 
422
- # <properties ea_type="Dependency" direction="Source -&gt; Destination"/>
423
578
  class SparxConnectorProperties < Shale::Mapper
424
579
  attribute :ea_type, Shale::Type::String
425
580
  attribute :direction, Shale::Type::String
426
581
 
427
582
  xml do
428
583
  root "properties"
584
+
429
585
  map_attribute :ea_type, to: :ea_type
430
586
  map_attribute :direction, to: :direction
431
587
  end
432
588
  end
433
589
 
434
- # <appearance linemode="3" linecolor="0" linewidth="0" seqno="0" headStyle="0" lineStyle="0"/>
435
590
  class SparxConnectorAppearance < Shale::Mapper
436
591
  attribute :linemode, Shale::Type::Integer
437
592
  attribute :linecolor, Shale::Type::Integer
@@ -442,6 +597,7 @@ module Xmi
442
597
 
443
598
  xml do
444
599
  root "appearance"
600
+
445
601
  map_attribute :linemode, to: :linemode
446
602
  map_attribute :linecolor, to: :linecolor
447
603
  map_attribute :linewidth, to: :linewidth
@@ -453,9 +609,6 @@ module Xmi
453
609
 
454
610
  class SparxConnector < Shale::Mapper
455
611
  attribute :idref, Shale::Type::String
456
- attribute :source, SparxConnectorSource
457
- attribute :target, SparxConnectorTarget
458
-
459
612
  attribute :source, SparxConnectorSource
460
613
  attribute :target, SparxConnectorTarget
461
614
  attribute :model, SparxConnectorModel
@@ -470,6 +623,7 @@ module Xmi
470
623
 
471
624
  xml do
472
625
  root "element"
626
+
473
627
  map_attribute "idref", to: :idref, prefix: "xmi", namespace: "http://www.omg.org/spec/XMI/20131001"
474
628
 
475
629
  map_element "source", to: :source
@@ -486,19 +640,15 @@ module Xmi
486
640
  end
487
641
  end
488
642
 
489
- # <connectors>
490
643
  class SparxConnectors < Shale::Mapper
491
644
  attribute :connector, SparxConnector, collection: true
492
645
  xml do
493
646
  root "connectors"
647
+
494
648
  map_element "connector", to: :connector
495
649
  end
496
650
  end
497
651
 
498
- # <primitivetypes>
499
- # <packagedElement xmi:type="uml:Package" xmi:id="EAPrimitiveTypesPackage" name="EA_PrimitiveTypes_Package"/>
500
- # </primitivetypes>
501
-
502
652
  class SparxPrimitiveTypes < Shale::Mapper
503
653
  attribute :packaged_element, Uml::PackagedElement, collection: true
504
654
 
@@ -514,29 +664,24 @@ module Xmi
514
664
 
515
665
  xml do
516
666
  root "profiles"
517
- map_element "Profile", to: :profile,
518
- namespace: "http://www.omg.org/spec/UML/20161101",
519
- prefix: "uml"
520
667
 
668
+ map_element "Profile", to: :profile,
669
+ namespace: "http://www.omg.org/spec/UML/20161101",
670
+ prefix: "uml"
521
671
  end
522
672
  end
523
673
 
524
- # <diagrams>
525
- # <diagram xmi:id="EAID_C4D531A8_EF26_4b23_AD1F_FD383AB9082E">
526
- # <model package="EAPK_D235A1D4_1924_44ba_AA1E_0B0510AE9DCB" localID="10065" owner="EAPK_D235A1D4_1924_44ba_AA1E_0B0510AE9DCB"/>
527
- # <properties name="Main" type="Logical"/>
528
- # <project author="friisan" version="2022" created="2018-05-29 12:37:04" modified="2018-05-30 10:15:54"/>
529
- # <style1 value="ShowPrivate=1;ShowProtected=1;ShowPublic=1;HideRelationships=0;Locked=0;Border=1;HighlightForeign=1;PackageContents=0;SequenceNotes=0;ScalePrintImage=1;PPgs.cx=1;PPgs.cy=1;DocSize.cx=1720;DocSize.cy=1000;ShowDetails=0;Orientation=P;Zoom=94;ShowTags=0;OpParams=1;VisibleAttributeDetail=0;ShowOpRetType=1;ShowIcons=1;CollabNums=1;HideProps=1;ShowReqs=0;ShowCons=0;PaperSize=1;HideParents=1;UseAlias=0;HideAtts=0;HideOps=0;HideStereo=0;HideElemStereo=0;ShowTests=0;ShowMaint=0;ConnectorNotation=UML 2.1;ExplicitNavigability=0;ShowShape=1;AllDockable=0;AdvancedElementProps=1;AdvancedFeatureProps=1;AdvancedConnectorProps=1;m_bElementClassifier=1;SPT=1;ShowNotes=0;SuppressBrackets=0;SuppConnectorLabels=0;PrintPageHeadFoot=0;ShowAsList=0;"/>
530
- # <style2 value="SaveTag=48361D1F;ExcludeRTF=0;DocAll=0;HideQuals=0;AttPkg=1;ShowTests=0;ShowMaint=0;SuppressFOC=1;MatrixActive=0;SwimlanesActive=1;KanbanActive=0;MatrixLineWidth=1;MatrixLineClr=0;MatrixLocked=0;TConnectorNotation=UML 2.1;TExplicitNavigability=0;AdvancedElementProps=1;AdvancedFeatureProps=1;AdvancedConnectorProps=1;m_bElementClassifier=1;SPT=1;MDGDgm=;STBLDgm=;ShowNotes=0;VisibleAttributeDetail=0;ShowOpRetType=1;SuppressBrackets=0;SuppConnectorLabels=0;PrintPageHeadFoot=0;ShowAsList=0;SuppressedCompartments=;Theme=:119;"/>
531
- # <swimlanes value="locked=false;orientation=0;width=0;inbar=false;names=false;color=0;bold=false;fcol=0;tcol=-1;ofCol=-1;ufCol=-1;hl=0;ufh=0;hh=0;cls=0;bw=0;hli=0;bro=0;SwimlaneFont=lfh:-10,lfw:0,lfi:0,lfu:0,lfs:0,lfface:Carlito,lfe:0,lfo:0,lfchar:1,lfop:0,lfcp:0,lfq:0,lfpf=0,lfWidth=0;"/>
532
- # <matrixitems value="locked=false;matrixactive=false;swimlanesactive=true;kanbanactive=false;width=1;clrLine=0;"/>
533
- # <extendedProperties/>
534
- # <xrefs/>
535
- # <elements>
536
- # <element geometry="Left=312;Top=115;Right=427;Bottom=170;" subject="EAID_FB86C623_9125_4d6d_BE60_58B1C55534CE" seqno="1" style="DUID=2B20EDAD;"/>
537
- # </elements>
538
- # </diagram>
539
- # </diagrams>
674
+ class SparxProfiles2013 < Shale::Mapper
675
+ attribute :profile, Uml::Profile2013, collection: true
676
+
677
+ xml do
678
+ root "profiles"
679
+
680
+ map_element "Profile", to: :profile,
681
+ namespace: "http://www.omg.org/spec/UML/20131001",
682
+ prefix: "uml"
683
+ end
684
+ end
540
685
 
541
686
  class SparxDiagramElement < Shale::Mapper
542
687
  attribute :geometry, Shale::Type::String
@@ -546,6 +691,7 @@ module Xmi
546
691
 
547
692
  xml do
548
693
  root "element"
694
+
549
695
  map_attribute "geometry", to: :geometry
550
696
  map_attribute "subject", to: :subject
551
697
  map_attribute "seqno", to: :seqno
@@ -593,7 +739,7 @@ module Xmi
593
739
  attribute :style2, SparxDiagramStyle
594
740
  attribute :swimlanes, SparxDiagramStyle
595
741
  attribute :matrixitems, SparxDiagramStyle
596
- attribute :extendedProperties, SparxElementExtendedProperties
742
+ attribute :extended_properties, SparxElementExtendedProperties
597
743
  attribute :xrefs, SparxElementXrefs
598
744
  attribute :elements, SparxDiagramElements
599
745
 
@@ -601,6 +747,7 @@ module Xmi
601
747
  root "diagram"
602
748
 
603
749
  map_attribute "id", to: :id, prefix: "xmi", namespace: "http://www.omg.org/spec/XMI/20131001"
750
+
604
751
  map_element "model", to: :model
605
752
  map_element "properties", to: :properties
606
753
  map_element "project", to: :project
@@ -612,7 +759,6 @@ module Xmi
612
759
  map_element "xrefs", to: :xrefs, render_nil: true
613
760
  map_element "elements", to: :elements
614
761
  end
615
-
616
762
  end
617
763
 
618
764
  class SparxDiagrams < Shale::Mapper
@@ -620,30 +766,36 @@ module Xmi
620
766
 
621
767
  xml do
622
768
  root "diagrams"
769
+
623
770
  map_element "diagram", to: :diagram
624
771
  end
625
772
  end
626
773
 
774
+ module SparxExtensionAttributes
775
+ def self.included(klass) # rubocop:disable Metrics/MethodLength
776
+ klass.class_eval do
777
+ attribute :id, Shale::Type::String
778
+ attribute :label, Shale::Type::String
779
+ attribute :uuid, Shale::Type::String
780
+ attribute :href, Shale::Type::String
781
+ attribute :idref, Shale::Type::String
782
+ attribute :type, Shale::Type::String
783
+ attribute :extender, Shale::Type::String
784
+ attribute :extender_id, Shale::Type::String
785
+ attribute :elements, SparxElements
786
+ attribute :connectors, SparxConnectors
787
+ attribute :primitive_types, SparxPrimitiveTypes
788
+ attribute :diagrams, SparxDiagrams
789
+ end
790
+ end
791
+ end
627
792
 
628
793
  class SparxExtension < Shale::Mapper
629
- attribute :id, Shale::Type::String
630
- attribute :label, Shale::Type::String
631
- attribute :uuid, Shale::Type::String
632
- attribute :href, Shale::Type::String
633
- attribute :idref, Shale::Type::String
634
- attribute :type, Shale::Type::String
635
- attribute :extender, Shale::Type::String
636
- attribute :extender_id, Shale::Type::String
637
-
638
- attribute :elements, SparxElements
639
- attribute :connectors, SparxConnectors
640
- attribute :primitive_types, SparxPrimitiveTypes
794
+ include SparxExtensionAttributes
641
795
  attribute :profiles, SparxProfiles
642
- attribute :diagrams, SparxDiagrams
643
796
 
644
797
  xml do
645
798
  root "Extension"
646
- # namespace "http://www.omg.org/spec/XMI/20131001", "xmi"
647
799
 
648
800
  map_attribute "id", to: :id, prefix: "xmi", namespace: "http://www.omg.org/spec/XMI/20131001"
649
801
  map_attribute "label", to: :label, prefix: "xmi", namespace: "http://www.omg.org/spec/XMI/20131001"
@@ -662,7 +814,30 @@ module Xmi
662
814
  end
663
815
  end
664
816
 
665
- # <SysPhS:ModelicaParameter base_Package="EAPK_D235A1D4_1924_44ba_AA1E_0B0510AE9DCB" name="Standard representation of geographic point location by coordinates"/>
817
+ class SparxExtension2013 < Shale::Mapper
818
+ include SparxExtensionAttributes
819
+ attribute :profiles, SparxProfiles2013
820
+
821
+ xml do
822
+ root "Extension"
823
+
824
+ map_attribute "id", to: :id, prefix: "xmi", namespace: "http://www.omg.org/spec/XMI/20131001"
825
+ map_attribute "label", to: :label, prefix: "xmi", namespace: "http://www.omg.org/spec/XMI/20131001"
826
+ map_attribute "uuid", to: :uuid, prefix: "xmi", namespace: "http://www.omg.org/spec/XMI/20131001"
827
+ map_attribute "href", to: :href
828
+ map_attribute "idref", to: :idref, prefix: "xmi", namespace: "http://www.omg.org/spec/XMI/20131001"
829
+ map_attribute "type", to: :type, prefix: "xmi", namespace: "http://www.omg.org/spec/XMI/20131001"
830
+ map_attribute "extender", to: :extender
831
+ map_attribute "extenderID", to: :extender_id
832
+
833
+ map_element "elements", to: :elements
834
+ map_element "connectors", to: :connectors
835
+ map_element "primitivetypes", to: :primitive_types
836
+ map_element "profiles", to: :profiles
837
+ map_element "diagrams", to: :diagrams
838
+ end
839
+ end
840
+
666
841
  class SparxSysPhS < Shale::Mapper
667
842
  attribute :base_package, Shale::Type::String
668
843
  attribute :name, Shale::Type::String
@@ -670,12 +845,12 @@ module Xmi
670
845
  xml do
671
846
  root "ModelicaParameter"
672
847
  namespace "http://www.sparxsystems.com/profiles/SysPhS/1.0", "SysPhS"
848
+
673
849
  map_attribute "base_Package", to: :base_package
674
850
  map_attribute "name", to: :name
675
851
  end
676
852
  end
677
853
 
678
- # <thecustomprofile:publicationDate base_Package="EAPK_D235A1D4_1924_44ba_AA1E_0B0510AE9DCB" publicationDate="2022-09"/>
679
854
  class SparxCustomProfilePublicationDate < Shale::Mapper
680
855
  attribute :base_package, Shale::Type::String
681
856
  attribute :publication_date, Shale::Type::String
@@ -683,12 +858,12 @@ module Xmi
683
858
  xml do
684
859
  root "publicationDate"
685
860
  namespace "http://www.sparxsystems.com/profiles/thecustomprofile/1.0", "thecustomprofile"
861
+
686
862
  map_attribute "base_Package", to: :base_package
687
863
  map_attribute "publicationDate", to: :publication_date
688
864
  end
689
865
  end
690
866
 
691
- # <thecustomprofile:edition base_Package="EAPK_D235A1D4_1924_44ba_AA1E_0B0510AE9DCB" edition="2"/>
692
867
  class SparxCustomProfileEdition < Shale::Mapper
693
868
  attribute :base_package, Shale::Type::String
694
869
  attribute :edition, Shale::Type::String
@@ -696,12 +871,12 @@ module Xmi
696
871
  xml do
697
872
  root "edition"
698
873
  namespace "http://www.sparxsystems.com/profiles/thecustomprofile/1.0", "thecustomprofile"
874
+
699
875
  map_attribute "base_Package", to: :base_package
700
876
  map_attribute "edition", to: :edition
701
877
  end
702
878
  end
703
879
 
704
- # <thecustomprofile:number base_Package="EAPK_D235A1D4_1924_44ba_AA1E_0B0510AE9DCB" number="6709"/>
705
880
  class SparxCustomProfileNumber < Shale::Mapper
706
881
  attribute :base_package, Shale::Type::String
707
882
  attribute :number, Shale::Type::String
@@ -709,12 +884,12 @@ module Xmi
709
884
  xml do
710
885
  root "number"
711
886
  namespace "http://www.sparxsystems.com/profiles/thecustomprofile/1.0", "thecustomprofile"
887
+
712
888
  map_attribute "base_Package", to: :base_package
713
889
  map_attribute "number", to: :number
714
890
  end
715
891
  end
716
892
 
717
- # <thecustomprofile:yearVersion base_Package="EAPK_D235A1D4_1924_44ba_AA1E_0B0510AE9DCB" yearVersion="2022"/>
718
893
  class SparxCustomProfileYearVersion < Shale::Mapper
719
894
  attribute :base_package, Shale::Type::String
720
895
  attribute :year_version, Shale::Type::String
@@ -722,63 +897,102 @@ module Xmi
722
897
  xml do
723
898
  root "yearVersion"
724
899
  namespace "http://www.sparxsystems.com/profiles/thecustomprofile/1.0", "thecustomprofile"
900
+
725
901
  map_attribute "base_Package", to: :base_package
726
902
  map_attribute "yearVersion", to: :year_version
727
903
  end
728
904
  end
729
905
 
906
+ module SparxRootAttributes
907
+ def self.included(klass)
908
+ klass.class_eval do
909
+ attribute :publication_date, SparxCustomProfilePublicationDate
910
+ attribute :edition, SparxCustomProfileEdition
911
+ attribute :number, SparxCustomProfileNumber
912
+ attribute :year_version, SparxCustomProfileYearVersion
913
+ attribute :modelica_parameter, SparxSysPhS
914
+ end
915
+ end
916
+ end
917
+
730
918
  class SparxRoot < Root
919
+ include SparxRootAttributes
731
920
  attribute :extension, SparxExtension
732
921
 
733
- attribute :publication_date, SparxCustomProfilePublicationDate
734
- attribute :edition, SparxCustomProfileEdition
735
- attribute :number, SparxCustomProfileNumber
736
- attribute :year_version, SparxCustomProfileYearVersion
737
- attribute :modelica_parameter, SparxSysPhS
738
-
739
- xml do
740
- root "XMI"
741
- namespace "http://www.omg.org/spec/XMI/20131001", "xmi"
742
-
743
- map_attribute "id", to: :id, prefix: "xmi", namespace: "http://www.omg.org/spec/XMI/20131001"
744
- map_attribute "label", to: :label, prefix: "xmi", namespace: "http://www.omg.org/spec/XMI/20131001"
745
- map_attribute "uuid", to: :uuid, prefix: "xmi", namespace: "http://www.omg.org/spec/XMI/20131001"
746
- map_attribute "href", to: :href
747
- map_attribute "idref", to: :idref, prefix: "xmi", namespace: "http://www.omg.org/spec/XMI/20131001"
748
- map_attribute "type", to: :type, prefix: "xmi", namespace: "http://www.omg.org/spec/XMI/20131001"
749
-
750
- map_element "Documentation", to: :documentation,
751
- prefix: "xmi", namespace: "http://www.omg.org/spec/XMI/20131001"
752
-
753
- map_element "Model", to: :model,
754
- namespace: "http://www.omg.org/spec/UML/20161101",
755
- prefix: "uml"
756
-
757
- map_element "Extension", to: :extension,
758
- namespace: "http://www.omg.org/spec/XMI/20131001",
759
- prefix: "xmi"
760
-
761
- map_element "publicationDate", to: :publication_date,
762
- namespace: "http://www.sparxsystems.com/profiles/thecustomprofile/1.0",
763
- prefix: "thecustomprofile"
764
-
765
- map_element "ModelicaParameter", to: :modelica_parameter,
766
- namespace: "http://www.sparxsystems.com/profiles/SysPhS/1.0",
767
- prefix: "SysPhS"
768
-
769
- map_element "edition", to: :edition,
770
- namespace: "http://www.sparxsystems.com/profiles/thecustomprofile/1.0",
771
- prefix: "thecustomprofile"
772
-
773
- map_element "number", to: :number,
774
- namespace: "http://www.sparxsystems.com/profiles/thecustomprofile/1.0",
775
- prefix: "thecustomprofile"
776
-
777
- map_element "yearVersion", to: :year_version,
778
- namespace: "http://www.sparxsystems.com/profiles/thecustomprofile/1.0",
779
- prefix: "thecustomprofile"
922
+ @@default_mapping = <<-MAP # rubocop:disable Style/ClassVars
923
+ root "XMI"
924
+ namespace "http://www.omg.org/spec/XMI/20131001", "xmi"
925
+
926
+ map_attribute "id", to: :id
927
+ map_attribute "label", to: :label
928
+ map_attribute "uuid", to: :uuid
929
+ map_attribute "href", to: :href
930
+ map_attribute "idref", to: :idref
931
+ map_attribute "type", to: :type
932
+
933
+ map_element "Extension", to: :extension
934
+ map_element "publicationDate", to: :publication_date,
935
+ namespace: "http://www.sparxsystems.com/profiles/thecustomprofile/1.0",
936
+ prefix: "thecustomprofile"
937
+ map_element "edition", to: :edition,
938
+ namespace: "http://www.sparxsystems.com/profiles/thecustomprofile/1.0",
939
+ prefix: "thecustomprofile"
940
+ map_element "number", to: :number,
941
+ namespace: "http://www.sparxsystems.com/profiles/thecustomprofile/1.0",
942
+ prefix: "thecustomprofile"
943
+ map_element "yearVersion", to: :year_version,
944
+ namespace: "http://www.sparxsystems.com/profiles/thecustomprofile/1.0",
945
+ prefix: "thecustomprofile"
946
+ map_element "ModelicaParameter", to: :modelica_parameter,
947
+ namespace: "http://www.sparxsystems.com/profiles/SysPhS/1.0",
948
+ prefix: "SysPhS"
949
+ MAP
950
+
951
+ @@mapping ||= @@default_mapping # rubocop:disable Style/ClassVars
952
+
953
+ xml do
954
+ eval Xmi::Sparx::SparxRoot.class_variable_get("@@mapping") # rubocop:disable Security/Eval
955
+ end
956
+ end
957
+
958
+ class SparxRoot2013 < Root2013
959
+ include SparxRootAttributes
960
+ attribute :extension, SparxExtension2013
961
+
962
+ @@default_mapping = <<-MAP # rubocop:disable Style/ClassVars
963
+ root "XMI"
964
+ namespace "http://www.omg.org/spec/XMI/20131001", "xmi"
965
+
966
+ map_attribute "id", to: :id
967
+ map_attribute "label", to: :label
968
+ map_attribute "uuid", to: :uuid
969
+ map_attribute "href", to: :href
970
+ map_attribute "idref", to: :idref
971
+ map_attribute "type", to: :type
972
+
973
+ map_element "Extension", to: :extension
974
+ map_element "publicationDate", to: :publication_date,
975
+ namespace: "http://www.sparxsystems.com/profiles/thecustomprofile/1.0",
976
+ prefix: "thecustomprofile"
977
+ map_element "edition", to: :edition,
978
+ namespace: "http://www.sparxsystems.com/profiles/thecustomprofile/1.0",
979
+ prefix: "thecustomprofile"
980
+ map_element "number", to: :number,
981
+ namespace: "http://www.sparxsystems.com/profiles/thecustomprofile/1.0",
982
+ prefix: "thecustomprofile"
983
+ map_element "yearVersion", to: :year_version,
984
+ namespace: "http://www.sparxsystems.com/profiles/thecustomprofile/1.0",
985
+ prefix: "thecustomprofile"
986
+ map_element "ModelicaParameter", to: :modelica_parameter,
987
+ namespace: "http://www.sparxsystems.com/profiles/SysPhS/1.0",
988
+ prefix: "SysPhS"
989
+ MAP
990
+
991
+ @@mapping ||= @@default_mapping # rubocop:disable Style/ClassVars
992
+
993
+ xml do
994
+ eval Xmi::Sparx::SparxRoot2013.class_variable_get("@@mapping") # rubocop:disable Security/Eval
780
995
  end
781
996
  end
782
-
783
997
  end
784
998
  end