Page 1 of 1

XMI 2.2 UML generation

PostPosted: Mon 1 Dec 2014 14:00
by thomas.beale
I have generated UML 2.2 XMI, with no options selected on the generation dialog. The result, apart from constraints, is imported correctly by MagicDraw 18. However, there are UML 'artifacts' all over the place at various package levels, as well as the proper definitions. These appear to be generated by lines like the following in the XMI:

<packagedElement xmi:type="uml:Artifact" xmi:id="BOUML_0x21502_8" name="DV_ORDINAL">
<manifestation xmi:type="uml:Manifestation" xmi:id="BOUML_MANIFESTATION1_0x21502_8" client="BOUML_0x21502_8" supplier="BOUML_0x21102_4" utilizedElement="BOUML_0x21102_4" name="source"/>

Similarly, there are 'manifestation' nodes for all classes, in various places, corresponding to the XML:

<packagedElement xmi:type="uml:Artifact" xmi:id="BOUML_0x1f402_8" name="rm_lib">
<manifestation xmi:type="uml:Manifestation" xmi:id="BOUML_MANIFESTATION1_0x1f402_8" client="BOUML_0x1f402_8" supplier="BOUML_0x21f02_8" utilizedElement="BOUML_0x21f02_8"/>

Are these necessary? They seem like junk to me. Is there a way to turn them off?

thanks in advance for any help

- thomas

Re: XMI 2.2 UML generation

PostPosted: Mon 1 Dec 2014 18:12
by Bruno Pag├Ęs
Thomas,

There are no option to not produce the "manifestations".

If you load the plug-out project "xmi2" (installed by the setup) then generate C++ code and look at UmlArtifact.cpp you will see the reasons where a manifestation is generated for an artifact :
- there is one per dependency stereotyped "manifest"
- if the artifact is stereotyped "source" there is one for each associated class
- if the artifact isn't stereotyped "source" there is one for each associated artifact

During an xmi import these manifestations allow to create the appropriate relations.

Recall than the plug-outs like the xmi generator are in GPL, so you are able to modify their implementation to not produce these manifestations, but in this case an xmi import will not set the associated classes/artifact because

Best regards,

Bruno