|Derived unions and subsetted properties in UML to Ecore converter [message #1770458]
||Fri, 11 August 2017 19:53
| Ernesto Posse
Registered: March 2011
I am trying to convert a UML model (attached) to Ecore but I'm running into unexpected trouble.
The model is a simple representation of key-value maps, so it has, abstract classes Map, Field, Key and Value, each of which is specialized by ConcreteMap, ConcreteField, ConcreteKey and ConcreteValue, and it has the expected associations. For example there is a composition association from Map to Field. I want ConcreteMap's fields to be ConcreteFields so there is an association from ConcreteMap to ConcreteField where the "field" end of the Map-Field association is declared as derived, derived union and read-only, while the 'concretefield' end of the ConcreteMap-ConcreteField association is declared as subsetting the "field" property. The same is done with the keys and values.
The problem is that when I try to make the genmodel from this UML with the New->EMF Generator Model wizard, I get a bunch of warnings (see attached screenshot), stating for example that
Feature 'maps::Map::field' should be annotated as a union and made non-changeable
Feature 'maps::ConcreteMap::concretefield' should be annotated as subset of feature 'maps::Maps::filed
But the model has those very attributes set! See the attached model.
When I see the generated ecore, I see that for example, Map::field is derived, and non-changeable, so it seems that the transformation was correct.
The question is: why do I get those warnings? Is this a case of incorrect error reporting?
Powered by FUDForum
. Page generated in 0.01648 seconds