Lars Ködderitzsch wrote:

Hi all,

It seem I solved my problem.
The trick is that attributes should be added with *aClassifier.getFeature().add(aAttribute)*
and NOT with *aClassifier.getOwnedElement().add(aAttribute)*


It looks as this is a problem within Schema2XMI too (which was my starting point).
SchemaTransformer Line 508: umlClass.getOwnedElement().addAll(this.createAttributes(metadata, corePackage, tableName));

Thanks for the info Lars, I'll fix (I'm not sure how I missed that the first time).



Cheers, Lars

Lars Ködderitzsch schrieb:

Hi,

I am writing a sort of roundtrip engineering tool for OFBiz.
I generated a XMI model using the UML MOF used in AndroMDA (similar approach as Schema2XMI) from several ofbiz configuration files.
On the forward generating side I re(build) the ofbiz configuration files using AndroMDA with my custom cartridge.


The problem if I use the XMI I produced using the UML MOF cannot be fully read by AndroMDA. For instance attributes get lost.
If I load the freshly produce XMI file into MagicDraw all information is there.
If I save the XMI with MagicDraw then - suddently all information I missed before is accessible by AndroMDA.


So to say it short: It seems to me that the UML MOF cannot completely read the XMI itself produced.

I append snips from the XMI to show the differences.
As you see there are som significant differences, especially how attributes are specified.


Am I doing something wrong while generating the model?


Thanks, Lars Ködderitzsch


XMI produced by UML MOF (snip)

<UML:Class xmi.id = 'a3157' name = 'createBillingAccountECA' isSpecification = 'false' isRoot = 'false' isLeaf = 'false' isAbstract = 'false' isActive = 'false'>
<UML:ModelElement.clientDependency>
<UML:Dependency xmi.idref = 'a3156'/>
<UML:Dependency xmi.idref = 'a3158'/>
</UML:ModelElement.clientDependency>
<UML:ModelElement.stereotype>
<UML:Stereotype xmi.idref = 'a3129'/>
</UML:ModelElement.stereotype>
<UML:ModelElement.taggedValue>
<UML:TaggedValue xmi.id = 'a3160' name = 'event' visibility = 'public' isSpecification = 'false'>
<UML:TaggedValue.dataValue>return</UML:TaggedValue.dataValue>
<UML:TaggedValue.type>
<UML:TagDefinition xmi.idref = 'a3131'/>
</UML:TaggedValue.type>
</UML:TaggedValue>
</UML:ModelElement.taggedValue>
<UML:Namespace.ownedElement>
<UML:Attribute xmi.id = 'a3161' name = 'roleTypeId' visibility = 'private' isSpecification = 'false' ownerScope = 'instance' changeability = 'changeable' targetScope = 'instance' ordering = 'unordered'>
<UML:ModelElement.stereotype>
<UML:Stereotype xmi.idref = 'a3133'/>
</UML:ModelElement.stereotype>
<UML:ModelElement.taggedValue>
<UML:TaggedValue xmi.id = 'a3162' name = 'operator' visibility = 'public' isSpecification = 'false'>
<UML:TaggedValue.dataValue>is-not-empty</UML:TaggedValue.dataValue>
<UML:TaggedValue.type>
<UML:TagDefinition xmi.idref = 'a3135'/>
</UML:TaggedValue.type>
</UML:TaggedValue>
</UML:ModelElement.taggedValue>
</UML:Attribute>


XMI imported into MagicDraw then saved (same element like above):

<UML:Class xmi.id='_9_0_2_3ae0193_1112638881330_955376_3156' name='createBillingAccountECA' visibility='public' isRoot='false' isLeaf='false' isAbstract='false' isActive='false' stereotype='_9_0_2_3ae0193_1112638881330_295304_3128'>
<UML:ModelElement.clientDependency>
<UML:Dependency xmi.idref='_9_0_2_3ae0193_1112638881330_98202_3157'/>
<UML:Dependency xmi.idref='_9_0_2_3ae0193_1112638881330_812606_3155'/>
</UML:ModelElement.clientDependency>
<UML:ModelElement.taggedValue>
<UML:TaggedValue xmi.id='_9_0_2_3ae0193_1112638881330_173557_3159' name='event' modelElement='_9_0_2_3ae0193_1112638881330_955376_3156' type='_9_0_2_3ae0193_1112638881330_310099_3130'>
<UML:TaggedValue.dataValue>return</UML:TaggedValue.dataValue>
</UML:TaggedValue>
</UML:ModelElement.taggedValue>
<UML:Classifier.feature>
<UML:Attribute xmi.id='_9_0_2_3ae0193_1112638881330_233625_3160' name='roleTypeId' visibility='private' ownerScope='instance' changeability='changeable' targetScope='instance' ordering='unordered' stereotype='_9_0_2_3ae0193_1112638881330_337775_3132' owner='_9_0_2_3ae0193_1112638881330_955376_3156'>
<UML:ModelElement.taggedValue>
<UML:TaggedValue xmi.id='_9_0_2_3ae0193_1112638881330_314049_3161' name='operator' modelElement='_9_0_2_3ae0193_1112638881330_233625_3160' type='_9_0_2_3ae0193_1112638881330_830134_3134'>
<UML:TaggedValue.dataValue>is-not-empty</UML:TaggedValue.dataValue>
</UML:TaggedValue>
</UML:ModelElement.taggedValue>
</UML:Attribute




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
Andromda-user mailing list
Andromda-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/andromda-user




------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click _______________________________________________ Andromda-user mailing list Andromda-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/andromda-user




------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Andromda-user mailing list Andromda-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/andromda-user

Reply via email to