Please help me,
I have an attribute value in xml.ecore which is String and i have an attribute coord in the sas.ecore my target .ecore which is an EBigDecimal!!
so how to do this transformation with atl!!
On 26/03/2013 10:30, samar sousou wrote:
> Please help me,
> I have an attribute value in xml.ecore which is String and i have an
> attribute coord in the sas.ecore my target .ecore which is an
> EBigDecimal!!
> so how to do this transformation with atl!!
>
> thank you.
As said by Ed, ATL provides the "toReal" operation on Strings (cf. the corresponding entry in the ATL manual).
However the string has to be "convertible", i.e.; correctly formatted.
Hhugo
------------------------------------------
Hugo Bruneliere - R&D Engineer
AtlanMod research team (Inria, EMN & LINA)
Ecole des Mines de Nantes
Nantes - France
------------------------------------------
Op 02-05-13 16:06, samar sousou schreef:
> I tried the solution with toReal() but the error shows "The value of type
> 'class java.lang.Double' must be of type 'class java.math.BigDecimal'"
> I need your help,
> thank you.
BigDecimals are not supported by regular ATL, AFAIK. String::toReal() gives
you a Double.
Op 03-05-13 11:17, samar sousou schreef:
> Hi Mr Dennis,
> thank you for your response.
> Have you a tutorial about the EMFTVM or an exemple because I couldn't understand.
>
> thanks.
> Samar.
But How can i do the conversation from String to BigDecimal.
because right now i have the same problem "The value of type 'class java.lang.String' must be of type 'class java.math.BigDecimal'"
Op 04-05-13 08:22, samar sousou schreef:
> But How can i do the conversation from String to BigDecimal.
> because right now i have the same problem "The value of type 'class
> java.lang.String' must be of type 'class java.math.BigDecimal'"
>
> thanks
> Samar.