Small bug in XMI 2.x generation

Please use this forum to signal bugs.
Merci d'utiliser ce forum pour signaler des bugs.

Small bug in XMI 2.x generation

Postby thomas.beale » Mon 8 Dec 2014 17:51

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>
   </specification>
   </ownedRule>
   <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;"/>
</ownedAttribute>


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
thomas.beale
 
Posts: 45
Joined: Wed 21 Mar 2012 20:37

Re: Small bug in XMI 2.x generation

Postby Bruno Pagès » Mon 8 Dec 2014 18:49

I disagree, referring to http://www.omg.org/spec/UML/20110701/Superstructure.xmi in an element a constraint is an ownedRule like for instance in a class an operation is an ownedOperation
ImageAuthor of Bouml
Bruno Pagès
 
Posts: 454
Joined: Mon 20 Feb 2012 08:23
Location: France

Re: Small bug in XMI 2.x generation

Postby thomas.beale » Mon 5 Jan 2015 16:06

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 http://www.omg.org/spec/UML/20110701/Superstructure.xmi
"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
thomas.beale
 
Posts: 45
Joined: Wed 21 Mar 2012 20:37

Re: Small bug in XMI 2.x generation

Postby Bruno Pagès » Mon 5 Jan 2015 18:54

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
ImageAuthor of Bouml
Bruno Pagès
 
Posts: 454
Joined: Mon 20 Feb 2012 08:23
Location: France

Re: Small bug in XMI 2.x generation

Postby Bruno Pagès » Sun 11 Jan 2015 12:15

The release 6.7.1 is available fixing this bug

Best regards,

Bruno Pagès
ImageAuthor of Bouml
Bruno Pagès
 
Posts: 454
Joined: Mon 20 Feb 2012 08:23
Location: France


Return to Bug reports / Rapports de bugs

Who is online

Users browsing this forum: No registered users and 0 guests