Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Error when with classifier reference in EnumerationLiterals
Error when with classifier reference in EnumerationLiterals [message #1105198] Mon, 09 September 2013 09:54 Go to next message
felix Kurth is currently offline felix Kurth
Messages: 5
Registered: July 2013
Junior Member
Hi,
The uml specification descripes a reference called classifier for EnumerationLiteral and InstanceSpecification. When setting the reference classifier by hand in the xmi file to the containing Enumeration this causes trouble. I am using a commercial UML Modeling tool setting this in its xmi Export. When loading this example model with uml Model Editor you will see the error i am describing. Although the superfluous classifier specification in the second EnumerationLiteral could also just be ignored.
<?xml version="1.0" encoding="UTF-8"?>
<uml:Model xmi:version="2.1" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xmi:id="_f8a5714e-86c0-4925-a64c-23d3dcd80b72" name="MyRelease_with_Custimization">
  <packagedElement xmi:type="uml:Profile" xmi:id="_7D4FDC6D-1BCC-4904-B52C-A1CD5EA7609A" name="C Profile">
    <packagedElement xmi:type="uml:Enumeration" xmi:id="_67E11EAD-9B71-4438-88B0-556F698F836CEnumeration" name="C Storage Class_Enumeration" redefinedClassifier="_67E11EAD-9B71-4438-88B0-556F698F836CEnumeration">
      <ownedLiteral xmi:id="_67E11EAD-9B71-4438-88B0-556F698F836CEnumerationLiteral" name="empty">
        <specification xmi:type="uml:LiteralInteger" xmi:id="_67E11EAD-9B71-4438-88B0-556F698F836CLiteralInteger"/>
      </ownedLiteral>
      <ownedLiteral xmi:id="_67E11EAD-9B71-4438-88B0-556F698F836CEnumerationLiteralstatic" name="static" classifier="_67E11EAD-9B71-4438-88B0-556F698F836CEnumeration">
        <specification xmi:type="uml:LiteralInteger" xmi:id="_67E11EAD-9B71-4438-88B0-556F698F836CLiteralIntegerstatic" value="1"/>
      </ownedLiteral>
      <ownedLiteral xmi:id="_67E11EAD-9B71-4438-88B0-556F698F836CEnumerationLiteralauto" name="auto">
        <specification xmi:type="uml:LiteralInteger" xmi:id="_67E11EAD-9B71-4438-88B0-556F698F836CLiteralIntegerauto" value="2"/>
      </ownedLiteral>
      <ownedLiteral xmi:id="_67E11EAD-9B71-4438-88B0-556F698F836CEnumerationLiteralregister" name="register">
        <specification xmi:type="uml:LiteralInteger" xmi:id="_67E11EAD-9B71-4438-88B0-556F698F836CLiteralIntegerregister" value="3"/>
      </ownedLiteral>
      <ownedLiteral xmi:id="_67E11EAD-9B71-4438-88B0-556F698F836CEnumerationLiteralextern" name="extern">
        <specification xmi:type="uml:LiteralInteger" xmi:id="_67E11EAD-9B71-4438-88B0-556F698F836CLiteralIntegerextern" value="4"/>
      </ownedLiteral>
    </packagedElement>
  </packagedElement>
</uml:Model>

Re: Error when with classifier reference in EnumerationLiterals [message #1105327 is a reply to message #1105198] Mon, 09 September 2013 13:46 Go to previous message
Ed Willink is currently offline Ed Willink
Messages: 3446
Registered: July 2009
Senior Member
Hi

I think you need to read the various XMI serialization specifications
very very carefully to determine whether the redundant "classifier"
container reference is gratuitous or erroneous.

Even if it is erroneous, this is at least the third distinct occasion on
which I have seen this problem arise, so it would seem helpful if the
MDT/UML2 model loader could ignore no-change assignments of the container.

(The candidate XMI for UM 2.5 has the same problem.)

Please raise a Bugzilla.

Regards

Ed Willink


On 09/09/2013 14:54, felix Kurth wrote:
> Hi,
> The uml specification descripes a reference called classifier for
> EnumerationLiteral and InstanceSpecification. When setting the
> reference classifier by hand in the xmi file to the containing
> Enumeration this causes trouble. I am using a commercial UML Modeling
> tool setting this in its xmi Export. When loading this example model
> with uml Model Editor you will see the error i am describing. Although
> the superfluous classifier specification in the second
> EnumerationLiteral could also just be ignored.
> <?xml version="1.0" encoding="UTF-8"?>
> <uml:Model xmi:version="2.1"
> xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML"
> xmi:id="_f8a5714e-86c0-4925-a64c-23d3dcd80b72"
> name="MyRelease_with_Custimization">
> <packagedElement xmi:type="uml:Profile"
> xmi:id="_7D4FDC6D-1BCC-4904-B52C-A1CD5EA7609A" name="C Profile">
> <packagedElement xmi:type="uml:Enumeration"
> xmi:id="_67E11EAD-9B71-4438-88B0-556F698F836CEnumeration" name="C
> Storage Class_Enumeration"
> redefinedClassifier="_67E11EAD-9B71-4438-88B0-556F698F836CEnumeration">
> <ownedLiteral
> xmi:id="_67E11EAD-9B71-4438-88B0-556F698F836CEnumerationLiteral"
> name="empty">
> <specification xmi:type="uml:LiteralInteger"
> xmi:id="_67E11EAD-9B71-4438-88B0-556F698F836CLiteralInteger"/>
> </ownedLiteral>
> <ownedLiteral
> xmi:id="_67E11EAD-9B71-4438-88B0-556F698F836CEnumerationLiteralstatic"
> name="static"
> classifier="_67E11EAD-9B71-4438-88B0-556F698F836CEnumeration">
> <specification xmi:type="uml:LiteralInteger"
> xmi:id="_67E11EAD-9B71-4438-88B0-556F698F836CLiteralIntegerstatic"
> value="1"/>
> </ownedLiteral>
> <ownedLiteral
> xmi:id="_67E11EAD-9B71-4438-88B0-556F698F836CEnumerationLiteralauto"
> name="auto">
> <specification xmi:type="uml:LiteralInteger"
> xmi:id="_67E11EAD-9B71-4438-88B0-556F698F836CLiteralIntegerauto"
> value="2"/>
> </ownedLiteral>
> <ownedLiteral
> xmi:id="_67E11EAD-9B71-4438-88B0-556F698F836CEnumerationLiteralregister"
> name="register">
> <specification xmi:type="uml:LiteralInteger"
> xmi:id="_67E11EAD-9B71-4438-88B0-556F698F836CLiteralIntegerregister"
> value="3"/>
> </ownedLiteral>
> <ownedLiteral
> xmi:id="_67E11EAD-9B71-4438-88B0-556F698F836CEnumerationLiteralextern"
> name="extern">
> <specification xmi:type="uml:LiteralInteger"
> xmi:id="_67E11EAD-9B71-4438-88B0-556F698F836CLiteralIntegerextern"
> value="4"/>
> </ownedLiteral>
> </packagedElement>
> </packagedElement>
> </uml:Model>
>
>
Previous Topic:Package Merge Observation when using Stereotypes/Enumerations
Next Topic:Thread-safe UML CacheAdapter?
Goto Forum:
  


Current Time: Mon Oct 07 10:41:34 EDT 2013

Powered by FUDForum. Page generated in 0.02721 seconds