[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.newcomer] Re: Setting the range of an ecore datatype

You can create your own data type and give explicit boundaries for the 
minimum and maximum values as described in section 2.1 of the
XML Schema to Ecore Mapping article 
(http://www.eclipse.org/modeling/emf/docs/overviews/XMLSchemaToEcoreMapping.pdf).

Regards
Jose

"Eric Rizzo" <eclipse-bugs@xxxxxxxxxxxx> wrote in message 
news:h7pf1i$4pa$2@xxxxxxxxxxxxxxxxxxxx
> Copying this to the EMF newsgroup (eclipse.tools.emf) where it will get 
> more attention.
>
>
> On 9/3/09 4:00 PM, Barath Kumar wrote:
>> Hi guys,
>>
>> is there a possiblity to restrict or set the range of an Ecore datatype?
>>
>> Here is my situation... I have an class attribute named "Propability" in
>> my DSL metamodel. I have specified the datatype of this attribute to be
>> "Edouble" and I would like to restrict the value of the probability
>> attribute to range between 0 and 1.
>>
>> Thanks...
>>
>> - Barath
>>
>