Page 1 of 1

Small bug in XMI 2.x generation

PostPosted: Mon 8 Dec 2014 18:51
by thomas.beale
According to the people from MagicDraw, the following is an error in the XMI produced by BOUML. IN the below, the ownedRule is only supposed to appear within a Namespace, not a Property. I'm not 100% sure what this means but presumably that the outer ownedAttribute's xmi:type should be "uml:Namespace" instead of "uml:Property". This would need to be checked against the OMG XMI 2.x specification.

Code: Select all
<ownedAttribute xmi:type="uml:Property" name="charset" xmi:id="BOUML_0x22002_1" visibility="public">
   <type xmi:type="uml:Class" xmi:idref="BOUML_0x20f02_4"/>
   <lowerValue xmi:type="uml:LiteralString" xmi:id="BOUML_MULTIPLICITY_L_0x22002_1" value="0"/>
   <upperValue xmi:type="uml:LiteralString" xmi:id="BOUML_MULTIPLICITY_U_0x22002_1" value="1"/>
   <ownedRule xmi:type="uml:Constraint" xmi:id="BOUML_CONSTRAINT_0x22002_1" constrainedElement="BOUML_0x22002_1">
   <specification xmi:type="uml:OpaqueExpression" xmi:id="BOUML_CSPEC_0x22002_1">
      <body>coded by openEHR codeset &quot;character sets&quot;</body>
   <ownedComment xmi:type="uml:Comment" xmi:id="COMMENT_232" body="Name of character encoding scheme in which this value is encoded. Coded from openEHR &#10;Code Set  character sets . Unicode is the default assumption in openEHR, with UTF-8 &#10;being the assumed encoding. This attribute allows for variations from these assumptions. &#10;"/>

This problem isn't causing an immediate problem, because the MagicDraw importer is smart enough to get past the error (it just rejects the ownedRules), but I guess it would be good to fix in the long run.

Other than this one error, the BOUML XMI for my model, with about 150 classes imports fine into MagicDraw, and in fact they have an error in their own XMI importer that they need to fix.

- thomas

Re: Small bug in XMI 2.x generation

PostPosted: Mon 8 Dec 2014 19:49
by Bruno Pagès
I disagree, referring to in an element a constraint is an ownedRule like for instance in a class an operation is an ownedOperation

Re: Small bug in XMI 2.x generation

PostPosted: Mon 5 Jan 2015 17:06
by thomas.beale
Happy new year all..

~~~~~~ now back to work :) ~~~~~~~~~

Here's the reply from NoMagic (MagicDraw):

Here's the answer from our team:

Lets look at
"OwnedRule" is defined at line: 8019 and it is within "Namespace" element which is defined starting at line 7978.
<packagedElement xmi:type="uml:Class" xmi:id="Classes-Kernel-Namespace" name="Namespace" isAbstract="true">

So ownedRule may be contained only in Namespace.

In the wrong sample ownedRule is serialized inside property which is not namespace, and thus can not contain ownedRule.

Maybe it makes sense to talk to BOUML people?

I personally don't know who is right, and don't have time to study this detail, but I hope it's useful for you with BOUML.

- thomas

Re: Small bug in XMI 2.x generation

PostPosted: Mon 5 Jan 2015 19:54
by Bruno Pagès
Oh yes, property doesn't inherit (indirectly) namespace, contrarily to class and operation for instance

So I have to move the definitions of the constraints of the embedding class

Re: Small bug in XMI 2.x generation

PostPosted: Sun 11 Jan 2015 13:15
by Bruno Pagès
The release 6.7.1 is available fixing this bug

Best regards,

Bruno Pagès