You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Christian Landbo Frederiksen <Ch...@ementor.dk> on 2007/02/02 17:39:03 UTC

Enumeration

 
Can anybody tell me where I can find the enumerated values (X, Y, Z)
when I have defined a dataobject containing this:
 
<simpleType name="Test">
  <restriction base="string">
   <enumeration value="X"/>
   <enumeration value="Y"/>
   <enumeration value="Z"/>
  </restriction>
 </simpleType>
 
If SDO does not offer it directly can I use the underlying EMF?
 
/Chr
 

SV: Enumeration

Posted by Christian Landbo Frederiksen <Ch...@ementor.dk>.
Bummer.
 
Does anybody have an example where you go from Tuscany SDO property or type to the EEnum mentioned?
 
Perhaps just pseudo code...
 
/Chr

________________________________

Fra: Yang ZHONG [mailto:leiwang.yangzhong@gmail.com]
Sendt: fr 02-02-2007 18:13
Til: tuscany-user@ws.apache.org
Emne: Re: Enumeration



No SDO API to access enumeration for the moment.
FYI EEnum#getELiterals() is the EMF API.


On 2/2/07, Christian Landbo Frederiksen <
Christian.Landbo.Frederiksen@ementor.dk> wrote:
>
>
> Can anybody tell me where I can find the enumerated values (X, Y, Z)
> when I have defined a dataobject containing this:
>
> <simpleType name="Test">
> <restriction base="string">
>   <enumeration value="X"/>
>   <enumeration value="Y"/>
>   <enumeration value="Z"/>
> </restriction>
> </simpleType>
>
> If SDO does not offer it directly can I use the underlying EMF?
>
> /Chr
>
>


--

Yang ZHONG




Re: Enumeration

Posted by Frank Budinsky <fr...@ca.ibm.com>.
Unlike SDO 1, in SDO 2, there is no Enum DataType (it just maps to 
String), so you can't call EEnum#getElitterals() either.

Today, you can only access the litteral values by looking at the EMF 
EAnnotations on the Type, but we plan to provide access to them through 
Type.getInstanceProperties() (new SDO 2.1 feature) in the near future.

Frank.

"Yang ZHONG" <le...@gmail.com> wrote on 02/02/2007 12:13:18 
PM:

> No SDO API to access enumeration for the moment.
> FYI EEnum#getELiterals() is the EMF API.
> 
> 
> On 2/2/07, Christian Landbo Frederiksen <
> Christian.Landbo.Frederiksen@ementor.dk> wrote:
> >
> >
> > Can anybody tell me where I can find the enumerated values (X, Y, Z)
> > when I have defined a dataobject containing this:
> >
> > <simpleType name="Test">
> > <restriction base="string">
> >   <enumeration value="X"/>
> >   <enumeration value="Y"/>
> >   <enumeration value="Z"/>
> > </restriction>
> > </simpleType>
> >
> > If SDO does not offer it directly can I use the underlying EMF?
> >
> > /Chr
> >
> >
> 
> 
> -- 
> 
> Yang ZHONG


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org


Re: Enumeration

Posted by Yang ZHONG <le...@gmail.com>.
No SDO API to access enumeration for the moment.
FYI EEnum#getELiterals() is the EMF API.


On 2/2/07, Christian Landbo Frederiksen <
Christian.Landbo.Frederiksen@ementor.dk> wrote:
>
>
> Can anybody tell me where I can find the enumerated values (X, Y, Z)
> when I have defined a dataobject containing this:
>
> <simpleType name="Test">
> <restriction base="string">
>   <enumeration value="X"/>
>   <enumeration value="Y"/>
>   <enumeration value="Z"/>
> </restriction>
> </simpleType>
>
> If SDO does not offer it directly can I use the underlying EMF?
>
> /Chr
>
>


-- 

Yang ZHONG