|
|
Re: Are null-able Enums still supported? [message #806213 is a reply to message #805941] |
Fri, 24 February 2012 17:57 |
Alex Mising name Messages: 51 Registered: August 2009 |
Member |
|
|
Thanks, good to hear it is being addressed at the OCL specification level.
From the point of view of "wrapped" enumeration pattern in Ecore, there seem to be two pieces to this. One is being able to instantiate this pattern in model definition parts of OCL, e.g. in OCLinEcore - and I think your answer is related to this.
The second is being able to evaluate OCL expressions using Ecore models [possibly already] exhibiting this pattern. My question was about the latter, since it worked (and works) fine with "mature" OCL, but does not seem to work in the new one - or maybe it is just the new editors?
The pattern itself is probably not uncommon in Ecore. EMF book describes it the context of mapping XSD nillalble elements to Ecore (9.2.2, 9.5.4), so it is most likely to surface in XSD-derived models, but there are other uses as well ...
Just for reference, here is what OCLinEcore looks like for when Gender enum in RoyalAndLoyal is wrapped into GenederObject:
datatype GenderObject : 'org.eclipse.emf.common.util.Enumerator' { serializable }
{
annotation _'http:///org/eclipse/emf/ecore/util/ExtendedMetaData'
(
'name' = 'Gender:Object',
'baseType' = 'Gender'
);
}
[Updated on: Fri, 24 February 2012 17:57] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03619 seconds