Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Problem running ETL using Epsilon/ANT
Problem running ETL using Epsilon/ANT [message #435476] Thu, 30 July 2009 21:04 Go to next message
Ali Gondal is currently offline Ali Gondal
Messages: 13
Registered: July 2009
Junior Member
Hi;

I'm trying to run my ETL rule using launch.xml (see below). There seems to
be a problem at:
'<epsilon.loadModel name="Ecore" type="EMF">'.

I think I am not sure how to specifiy URI based model and none of the
given examples do so. My etl works fine when I go through "Run
Configuration...".


<?xml version="1.0"?>

<project default="main">
<target name="init">
<property name="models" location="${basedir}/models"/>
<property name="metamodels" location="${basedir}/metamodels"/>
</target>

<target name="loadModels">
<epsilon.loadModel name="EM" type="EMF">
<parameter name="modelFile" value="${models}/car.ecore"/>
<parameter name="metamodelUri"
value="http://www.eclipse.org/emf/2002/Ecore"/>
<parameter name="isMetamodelFileBased" value="false"/>
<parameter name="readOnLoad" value="true"/>
<parameter name="storeOnDisposal" value="false"/>
</epsilon.loadModel>


<epsilon.loadModel name="FM" type="EMF">
<parameter name="modelFile" value="${models}/car.fmm"/>
<parameter name="metamodelFile" value="${metamodels}/fmm.ecore"/>
<parameter name="isMetamodelFileBased" value="true"/>
<parameter name="readOnLoad" value="true"/>
<parameter name="storeOnDisposal" value="false"/>
</epsilon.loadModel>

<epsilon.loadModel name="Ecore" type="EMF">
<parameter name="metamodelUri"
value="http://www.eclipse.org/emf/2002/Ecore"/>
<parameter name="isMetamodelFileBased" value="false"/>
<parameter name="readOnLoad" value="false"/>
<parameter name="storeOnDisposal" value="false"/>
</epsilon.loadModel>

</target>

<target name="main" depends="init,loadModels">
<epsilon.etl src="${basedir}/fmm2ecore.etl">
<model ref="FM"/>
<model ref="EM"/>
<model ref="Ecore"/>
</epsilon.etl>
</target>
</project>


Any help would be great:)
cheers

--Ali
Re: Problem running ETL using Epsilon/ANT [message #440174 is a reply to message #435476] Fri, 31 July 2009 07:44 Go to previous messageGo to next message
Louis Rose is currently offline Louis Rose
Messages: 440
Registered: July 2009
Location: York, United Kingdom
Senior Member
Hi Ali,

It looks like you want to load the Ecore metamodel as a model named Ecore?

If so, try changing the following lines:

<epsilon.loadModel name="Ecore" type="EMF">
<parameter name="metamodelUri"
value="http://www.eclipse.org/emf/2002/Ecore"/>
<parameter name="isMetamodelFileBased" value="false"/>
<parameter name="readOnLoad" value="false"/>
<parameter name="storeOnDisposal" value="false"/>
</epsilon.loadModel>

to:

<epsilon.loadModel name="Ecore" type="EMF_M2">
<parameter name="metamodelUri"
value="http://www.eclipse.org/emf/2002/Ecore"/>
</epsilon.loadModel>

To load an EMF metamodel, such as Ecore, the EMF_M2 type should be used.
The EMF_M2 type requires only a value for the metamodelUri parameter,
and not for the isMetamodelFileBased, readOnLoad and storeOnDisposal
parameters (which are always false, true and false).

Let me know if this doesn't work, and I'll investigate more thoroughly.

Cheers,
Louis.

Ali Gondal wrote:
> Hi;
>
> I'm trying to run my ETL rule using launch.xml (see below). There seems
> to be a problem at:
> '<epsilon.loadModel name="Ecore" type="EMF">'.
>
> I think I am not sure how to specifiy URI based model and none of the
> given examples do so. My etl works fine when I go through "Run
> Configuration...".
>
>
> <?xml version="1.0"?>
> <project default="main">
> <target name="init">
> <property name="models" location="${basedir}/models"/>
> <property name="metamodels" location="${basedir}/metamodels"/>
> </target>
>
> <target name="loadModels">
> <epsilon.loadModel name="EM" type="EMF">
> <parameter name="modelFile" value="${models}/car.ecore"/>
> <parameter name="metamodelUri"
> value="http://www.eclipse.org/emf/2002/Ecore"/>
> <parameter name="isMetamodelFileBased" value="false"/>
> <parameter name="readOnLoad" value="true"/>
> <parameter name="storeOnDisposal" value="false"/>
> </epsilon.loadModel>
>
>
> <epsilon.loadModel name="FM" type="EMF">
> <parameter name="modelFile" value="${models}/car.fmm"/>
> <parameter name="metamodelFile"
> value="${metamodels}/fmm.ecore"/>
> <parameter name="isMetamodelFileBased" value="true"/>
> <parameter name="readOnLoad" value="true"/>
> <parameter name="storeOnDisposal" value="false"/>
> </epsilon.loadModel>
>
> <epsilon.loadModel name="Ecore" type="EMF">
> <parameter name="metamodelUri"
> value="http://www.eclipse.org/emf/2002/Ecore"/>
> <parameter name="isMetamodelFileBased" value="false"/>
> <parameter name="readOnLoad" value="false"/>
> <parameter name="storeOnDisposal" value="false"/>
> </epsilon.loadModel>
>
> </target>
>
> <target name="main" depends="init,loadModels">
> <epsilon.etl src="${basedir}/fmm2ecore.etl">
> <model ref="FM"/>
> <model ref="EM"/>
> <model ref="Ecore"/>
> </epsilon.etl>
> </target>
> </project>
>
>
> Any help would be great:)
> cheers
>
> --Ali
>
>
Re: Problem running ETL using Epsilon/ANT [message #446330 is a reply to message #440174] Fri, 31 July 2009 21:48 Go to previous messageGo to next message
Ali Gondal is currently offline Ali Gondal
Messages: 13
Registered: July 2009
Junior Member
Hi Louis;

yes that solved the problem but now it throws an error/warning
"[epsilon.etl - fmm2ecore.etl] Please fix your code to add using
EClass.getEStructuralFeatures() instead of EClass.getEAttributes()",
executes successfully but doesn't generate the target model.

The etl rules execute successfully when I run using configuration. Is
there anything else i need to include in the launch.xml?

Many thanks for your help.

cheers
--Ali



Louis Rose wrote:

> Hi Ali,

> It looks like you want to load the Ecore metamodel as a model named Ecore?

> If so, try changing the following lines:

> <epsilon.loadModel name="Ecore" type="EMF">
> <parameter name="metamodelUri"
> value="http://www.eclipse.org/emf/2002/Ecore"/>
> <parameter name="isMetamodelFileBased" value="false"/>
> <parameter name="readOnLoad" value="false"/>
> <parameter name="storeOnDisposal" value="false"/>
> </epsilon.loadModel>

> to:

> <epsilon.loadModel name="Ecore" type="EMF_M2">
> <parameter name="metamodelUri"
> value="http://www.eclipse.org/emf/2002/Ecore"/>
> </epsilon.loadModel>

> To load an EMF metamodel, such as Ecore, the EMF_M2 type should be used.
> The EMF_M2 type requires only a value for the metamodelUri parameter,
> and not for the isMetamodelFileBased, readOnLoad and storeOnDisposal
> parameters (which are always false, true and false).

> Let me know if this doesn't work, and I'll investigate more thoroughly.

> Cheers,
> Louis.

> Ali Gondal wrote:
>> Hi;
>>
>> I'm trying to run my ETL rule using launch.xml (see below). There seems
>> to be a problem at:
>> '<epsilon.loadModel name="Ecore" type="EMF">'.
>>
>> I think I am not sure how to specifiy URI based model and none of the
>> given examples do so. My etl works fine when I go through "Run
>> Configuration...".
>>
>>
>> <?xml version="1.0"?>
>> <project default="main">
>> <target name="init">
>> <property name="models" location="${basedir}/models"/>
>> <property name="metamodels" location="${basedir}/metamodels"/>
>> </target>
>>
>> <target name="loadModels">
>> <epsilon.loadModel name="EM" type="EMF">
>> <parameter name="modelFile" value="${models}/car.ecore"/>
>> <parameter name="metamodelUri"
>> value="http://www.eclipse.org/emf/2002/Ecore"/>
>> <parameter name="isMetamodelFileBased" value="false"/>
>> <parameter name="readOnLoad" value="true"/>
>> <parameter name="storeOnDisposal" value="false"/>
>> </epsilon.loadModel>
>>
>>
>> <epsilon.loadModel name="FM" type="EMF">
>> <parameter name="modelFile" value="${models}/car.fmm"/>
>> <parameter name="metamodelFile"
>> value="${metamodels}/fmm.ecore"/>
>> <parameter name="isMetamodelFileBased" value="true"/>
>> <parameter name="readOnLoad" value="true"/>
>> <parameter name="storeOnDisposal" value="false"/>
>> </epsilon.loadModel>
>>
>> <epsilon.loadModel name="Ecore" type="EMF">
>> <parameter name="metamodelUri"
>> value="http://www.eclipse.org/emf/2002/Ecore"/>
>> <parameter name="isMetamodelFileBased" value="false"/>
>> <parameter name="readOnLoad" value="false"/>
>> <parameter name="storeOnDisposal" value="false"/>
>> </epsilon.loadModel>
>>
>> </target>
>>
>> <target name="main" depends="init,loadModels">
>> <epsilon.etl src="${basedir}/fmm2ecore.etl">
>> <model ref="FM"/>
>> <model ref="EM"/>
>> <model ref="Ecore"/>
>> </epsilon.etl>
>> </target>
>> </project>
>>
>>
>> Any help would be great:)
>> cheers
>>
>> --Ali
>>
>>
Re: Problem running ETL using Epsilon/ANT [message #446455 is a reply to message #446330] Fri, 31 July 2009 22:00 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Ali,

It seems that the EM model is the target of your transformation. If this
is the case you should change

<parameter name="readOnLoad" value="true"/>
<parameter name="storeOnDisposal" value="false"/>

to

<parameter name="readOnLoad" value="false"/>
<parameter name="storeOnDisposal" value="true"/>

so that the model is not read when loaded but is stored when the
workflow has finished.

Regarding the warning, I must admit I haven't come across it. Are you
using 3.5?

Cheers,
Dimitris

Ali Gondal wrote:
> Hi Louis;
>
> yes that solved the problem but now it throws an error/warning
> "[epsilon.etl - fmm2ecore.etl] Please fix your code to add using
> EClass.getEStructuralFeatures() instead of EClass.getEAttributes()",
> executes successfully but doesn't generate the target model.
>
> The etl rules execute successfully when I run using configuration. Is
> there anything else i need to include in the launch.xml?
>
> Many thanks for your help.
>
> cheers
> --Ali
>
>
>
> Louis Rose wrote:
>
>> Hi Ali,
>
>> It looks like you want to load the Ecore metamodel as a model named
>> Ecore?
>
>> If so, try changing the following lines:
>
>> <epsilon.loadModel name="Ecore" type="EMF">
>> <parameter name="metamodelUri"
>> value="http://www.eclipse.org/emf/2002/Ecore"/>
>> <parameter name="isMetamodelFileBased" value="false"/>
>> <parameter name="readOnLoad" value="false"/>
>> <parameter name="storeOnDisposal" value="false"/>
>> </epsilon.loadModel>
>
>> to:
>
>> <epsilon.loadModel name="Ecore" type="EMF_M2">
>> <parameter name="metamodelUri"
>> value="http://www.eclipse.org/emf/2002/Ecore"/>
>> </epsilon.loadModel>
>
>> To load an EMF metamodel, such as Ecore, the EMF_M2 type should be
>> used. The EMF_M2 type requires only a value for the metamodelUri
>> parameter, and not for the isMetamodelFileBased, readOnLoad and
>> storeOnDisposal parameters (which are always false, true and false).
>
>> Let me know if this doesn't work, and I'll investigate more thoroughly.
>
>> Cheers,
>> Louis.
>
>> Ali Gondal wrote:
>>> Hi;
>>>
>>> I'm trying to run my ETL rule using launch.xml (see below). There
>>> seems to be a problem at:
>>> '<epsilon.loadModel name="Ecore" type="EMF">'.
>>>
>>> I think I am not sure how to specifiy URI based model and none of the
>>> given examples do so. My etl works fine when I go through "Run
>>> Configuration...".
>>>
>>>
>>> <?xml version="1.0"?>
>>> <project default="main">
>>> <target name="init">
>>> <property name="models" location="${basedir}/models"/>
>>> <property name="metamodels" location="${basedir}/metamodels"/>
>>> </target>
>>> <target name="loadModels">
>>> <epsilon.loadModel name="EM" type="EMF">
>>> <parameter name="modelFile" value="${models}/car.ecore"/>
>>> <parameter name="metamodelUri"
>>> value="http://www.eclipse.org/emf/2002/Ecore"/>
>>> <parameter name="isMetamodelFileBased" value="false"/>
>>> <parameter name="readOnLoad" value="true"/>
>>> <parameter name="storeOnDisposal" value="false"/>
>>> </epsilon.loadModel>
>>> <epsilon.loadModel name="FM" type="EMF">
>>> <parameter name="modelFile" value="${models}/car.fmm"/>
>>> <parameter name="metamodelFile"
>>> value="${metamodels}/fmm.ecore"/>
>>> <parameter name="isMetamodelFileBased" value="true"/>
>>> <parameter name="readOnLoad" value="true"/>
>>> <parameter name="storeOnDisposal" value="false"/>
>>> </epsilon.loadModel>
>>> <epsilon.loadModel name="Ecore"
>>> type="EMF"> <parameter
>>> name="metamodelUri" value="http://www.eclipse.org/emf/2002/Ecore"/>
>>> <parameter name="isMetamodelFileBased" value="false"/>
>>> <parameter name="readOnLoad" value="false"/>
>>> <parameter name="storeOnDisposal" value="false"/>
>>> </epsilon.loadModel>
>>> </target>
>>> <target name="main" depends="init,loadModels">
>>> <epsilon.etl src="${basedir}/fmm2ecore.etl">
>>> <model ref="FM"/>
>>> <model ref="EM"/>
>>> <model ref="Ecore"/>
>>> </epsilon.etl>
>>> </target>
>>> </project>
>>>
>>>
>>> Any help would be great:)
>>> cheers
>>>
>>> --Ali
>>>
>>>
>
>
Re: Problem running ETL using Epsilon/ANT [message #450332 is a reply to message #446455] Sat, 01 August 2009 07:56 Go to previous messageGo to next message
Ali Gondal is currently offline Ali Gondal
Messages: 13
Registered: July 2009
Junior Member
Hi Dimitris;

thanks... that solved my problem but the warning is still there. I am
using 3.4.2.

I have another quick question...how can I execute this launch.xml file
using java code as I want this to run on a button click inside my plugin.

many thanks
--Ali



Dimitris Kolovos wrote:

> Hi Ali,

> It seems that the EM model is the target of your transformation. If this
> is the case you should change

> <parameter name="readOnLoad" value="true"/>
> <parameter name="storeOnDisposal" value="false"/>

> to

> <parameter name="readOnLoad" value="false"/>
> <parameter name="storeOnDisposal" value="true"/>

> so that the model is not read when loaded but is stored when the
> workflow has finished.

> Regarding the warning, I must admit I haven't come across it. Are you
> using 3.5?

> Cheers,
> Dimitris

> Ali Gondal wrote:
>> Hi Louis;
>>
>> yes that solved the problem but now it throws an error/warning
>> "[epsilon.etl - fmm2ecore.etl] Please fix your code to add using
>> EClass.getEStructuralFeatures() instead of EClass.getEAttributes()",
>> executes successfully but doesn't generate the target model.
>>
>> The etl rules execute successfully when I run using configuration. Is
>> there anything else i need to include in the launch.xml?
>>
>> Many thanks for your help.
>>
>> cheers
>> --Ali
>>
>>
>>
>> Louis Rose wrote:
>>
>>> Hi Ali,
>>
>>> It looks like you want to load the Ecore metamodel as a model named
>>> Ecore?
>>
>>> If so, try changing the following lines:
>>
>>> <epsilon.loadModel name="Ecore" type="EMF">
>>> <parameter name="metamodelUri"
>>> value="http://www.eclipse.org/emf/2002/Ecore"/>
>>> <parameter name="isMetamodelFileBased" value="false"/>
>>> <parameter name="readOnLoad" value="false"/>
>>> <parameter name="storeOnDisposal" value="false"/>
>>> </epsilon.loadModel>
>>
>>> to:
>>
>>> <epsilon.loadModel name="Ecore" type="EMF_M2">
>>> <parameter name="metamodelUri"
>>> value="http://www.eclipse.org/emf/2002/Ecore"/>
>>> </epsilon.loadModel>
>>
>>> To load an EMF metamodel, such as Ecore, the EMF_M2 type should be
>>> used. The EMF_M2 type requires only a value for the metamodelUri
>>> parameter, and not for the isMetamodelFileBased, readOnLoad and
>>> storeOnDisposal parameters (which are always false, true and false).
>>
>>> Let me know if this doesn't work, and I'll investigate more thoroughly.
>>
>>> Cheers,
>>> Louis.
>>
>>> Ali Gondal wrote:
>>>> Hi;
>>>>
>>>> I'm trying to run my ETL rule using launch.xml (see below). There
>>>> seems to be a problem at:
>>>> '<epsilon.loadModel name="Ecore" type="EMF">'.
>>>>
>>>> I think I am not sure how to specifiy URI based model and none of the
>>>> given examples do so. My etl works fine when I go through "Run
>>>> Configuration...".
>>>>
>>>>
>>>> <?xml version="1.0"?>
>>>> <project default="main">
>>>> <target name="init">
>>>> <property name="models" location="${basedir}/models"/>
>>>> <property name="metamodels" location="${basedir}/metamodels"/>
>>>> </target>
>>>> <target name="loadModels">
>>>> <epsilon.loadModel name="EM" type="EMF">
>>>> <parameter name="modelFile" value="${models}/car.ecore"/>
>>>> <parameter name="metamodelUri"
>>>> value="http://www.eclipse.org/emf/2002/Ecore"/>
>>>> <parameter name="isMetamodelFileBased" value="false"/>
>>>> <parameter name="readOnLoad" value="true"/>
>>>> <parameter name="storeOnDisposal" value="false"/>
>>>> </epsilon.loadModel>
>>>> <epsilon.loadModel name="FM" type="EMF">
>>>> <parameter name="modelFile" value="${models}/car.fmm"/>
>>>> <parameter name="metamodelFile"
>>>> value="${metamodels}/fmm.ecore"/>
>>>> <parameter name="isMetamodelFileBased" value="true"/>
>>>> <parameter name="readOnLoad" value="true"/>
>>>> <parameter name="storeOnDisposal" value="false"/>
>>>> </epsilon.loadModel>
>>>> <epsilon.loadModel name="Ecore"
>>>> type="EMF"> <parameter
>>>> name="metamodelUri" value="http://www.eclipse.org/emf/2002/Ecore"/>
>>>> <parameter name="isMetamodelFileBased" value="false"/>
>>>> <parameter name="readOnLoad" value="false"/>
>>>> <parameter name="storeOnDisposal" value="false"/>
>>>> </epsilon.loadModel>
>>>> </target>
>>>> <target name="main" depends="init,loadModels">
>>>> <epsilon.etl src="${basedir}/fmm2ecore.etl">
>>>> <model ref="FM"/>
>>>> <model ref="EM"/>
>>>> <model ref="Ecore"/>
>>>> </epsilon.etl>
>>>> </target>
>>>> </project>
>>>>
>>>>
>>>> Any help would be great:)
>>>> cheers
>>>>
>>>> --Ali
>>>>
>>>>
>>
>>
Re: Problem running ETL using Epsilon/ANT [message #452924 is a reply to message #446455] Sat, 01 August 2009 14:17 Go to previous messageGo to next message
Ali Gondal is currently offline Ali Gondal
Messages: 13
Registered: July 2009
Junior Member
> Hi Dimitris;

> thanks... that solved my problem but the warning is still there. I am
> using 3.4.2.

> I have another quick question...how can I execute this launch.xml file
> using java code as I want this to run on a button click inside my plugin.

I have figured out how to do this (as in EtlStandAloneExample), if thats
the only way.

All works fine but the error/warning messages are still there i.e.
"Please fix your code to add using EClass.getEStructuralFeatures() instead
of EClass.getEAttributes()"


> many thanks
> --Ali



> Dimitris Kolovos wrote:

>> Hi Ali,

>> It seems that the EM model is the target of your transformation. If this
>> is the case you should change

>> <parameter name="readOnLoad" value="true"/>
>> <parameter name="storeOnDisposal" value="false"/>

>> to

>> <parameter name="readOnLoad" value="false"/>
>> <parameter name="storeOnDisposal" value="true"/>

>> so that the model is not read when loaded but is stored when the
>> workflow has finished.

>> Regarding the warning, I must admit I haven't come across it. Are you
>> using 3.5?

>> Cheers,
>> Dimitris

>> Ali Gondal wrote:
>>> Hi Louis;
>>>
>>> yes that solved the problem but now it throws an error/warning
>>> "[epsilon.etl - fmm2ecore.etl] Please fix your code to add using
>>> EClass.getEStructuralFeatures() instead of EClass.getEAttributes()",
>>> executes successfully but doesn't generate the target model.
>>>
>>> The etl rules execute successfully when I run using configuration. Is
>>> there anything else i need to include in the launch.xml?
>>>
>>> Many thanks for your help.
>>>
>>> cheers
>>> --Ali
>>>
>>>
>>>
>>> Louis Rose wrote:
>>>
>>>> Hi Ali,
>>>
>>>> It looks like you want to load the Ecore metamodel as a model named
>>>> Ecore?
>>>
>>>> If so, try changing the following lines:
>>>
>>>> <epsilon.loadModel name="Ecore" type="EMF">
>>>> <parameter name="metamodelUri"
>>>> value="http://www.eclipse.org/emf/2002/Ecore"/>
>>>> <parameter name="isMetamodelFileBased" value="false"/>
>>>> <parameter name="readOnLoad" value="false"/>
>>>> <parameter name="storeOnDisposal" value="false"/>
>>>> </epsilon.loadModel>
>>>
>>>> to:
>>>
>>>> <epsilon.loadModel name="Ecore" type="EMF_M2">
>>>> <parameter name="metamodelUri"
>>>> value="http://www.eclipse.org/emf/2002/Ecore"/>
>>>> </epsilon.loadModel>
>>>
>>>> To load an EMF metamodel, such as Ecore, the EMF_M2 type should be
>>>> used. The EMF_M2 type requires only a value for the metamodelUri
>>>> parameter, and not for the isMetamodelFileBased, readOnLoad and
>>>> storeOnDisposal parameters (which are always false, true and false).
>>>
>>>> Let me know if this doesn't work, and I'll investigate more thoroughly.
>>>
>>>> Cheers,
>>>> Louis.
>>>
>>>> Ali Gondal wrote:
>>>>> Hi;
>>>>>
>>>>> I'm trying to run my ETL rule using launch.xml (see below). There
>>>>> seems to be a problem at:
>>>>> '<epsilon.loadModel name="Ecore" type="EMF">'.
>>>>>
>>>>> I think I am not sure how to specifiy URI based model and none of the
>>>>> given examples do so. My etl works fine when I go through "Run
>>>>> Configuration...".
>>>>>
>>>>>
>>>>> <?xml version="1.0"?>
>>>>> <project default="main">
>>>>> <target name="init">
>>>>> <property name="models" location="${basedir}/models"/>
>>>>> <property name="metamodels" location="${basedir}/metamodels"/>
>>>>> </target>
>>>>> <target name="loadModels">
>>>>> <epsilon.loadModel name="EM" type="EMF">
>>>>> <parameter name="modelFile" value="${models}/car.ecore"/>
>>>>> <parameter name="metamodelUri"
>>>>> value="http://www.eclipse.org/emf/2002/Ecore"/>
>>>>> <parameter name="isMetamodelFileBased" value="false"/>
>>>>> <parameter name="readOnLoad" value="true"/>
>>>>> <parameter name="storeOnDisposal" value="false"/>
>>>>> </epsilon.loadModel>
>>>>> <epsilon.loadModel name="FM" type="EMF">
>>>>> <parameter name="modelFile" value="${models}/car.fmm"/>
>>>>> <parameter name="metamodelFile"
>>>>> value="${metamodels}/fmm.ecore"/>
>>>>> <parameter name="isMetamodelFileBased" value="true"/>
>>>>> <parameter name="readOnLoad" value="true"/>
>>>>> <parameter name="storeOnDisposal" value="false"/>
>>>>> </epsilon.loadModel>
>>>>> <epsilon.loadModel name="Ecore"
>>>>> type="EMF"> <parameter
>>>>> name="metamodelUri" value="http://www.eclipse.org/emf/2002/Ecore"/>
>>>>> <parameter name="isMetamodelFileBased" value="false"/>
>>>>> <parameter name="readOnLoad" value="false"/>
>>>>> <parameter name="storeOnDisposal" value="false"/>
>>>>> </epsilon.loadModel>
>>>>> </target>
>>>>> <target name="main" depends="init,loadModels">
>>>>> <epsilon.etl src="${basedir}/fmm2ecore.etl">
>>>>> <model ref="FM"/>
>>>>> <model ref="EM"/>
>>>>> <model ref="Ecore"/>
>>>>> </epsilon.etl>
>>>>> </target>
>>>>> </project>
>>>>>
>>>>>
>>>>> Any help would be great:)
>>>>> cheers
>>>>>
>>>>> --Ali
>>>>>
>>>>>
>>>
>>>
Re: Problem running ETL using Epsilon/ANT [message #453779 is a reply to message #452924] Sat, 01 August 2009 16:22 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Ali,

Running ANT files programmatically in Eclipse is supported by the
ANTRunner class:
http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/ant_running_buildfiles_programmatical ly.htm


Regarding the warning, I'd suggest following the recommendation and
changing any calls to x.eAttributes.add(...) to
x.eStructuralFeatures().add(...), as eAttributes is a derived feature
(its value is a dynamically calculated subset of eStructuralFeatures).

Cheers,
Dimitris

Ali Gondal wrote:
>
>> Hi Dimitris;
>
>> thanks... that solved my problem but the warning is still there. I am
>> using 3.4.2.
>
>> I have another quick question...how can I execute this launch.xml file
>> using java code as I want this to run on a button click inside my plugin.
>
> I have figured out how to do this (as in EtlStandAloneExample), if thats
> the only way.
> All works fine but the error/warning messages are still there i.e.
> "Please fix your code to add using EClass.getEStructuralFeatures()
> instead of EClass.getEAttributes()"
>
>
>> many thanks
>> --Ali
>
>
>
>> Dimitris Kolovos wrote:
>
>>> Hi Ali,
>
>>> It seems that the EM model is the target of your transformation. If
>>> this is the case you should change
>
>>> <parameter name="readOnLoad" value="true"/>
>>> <parameter name="storeOnDisposal" value="false"/>
>
>>> to
>
>>> <parameter name="readOnLoad" value="false"/>
>>> <parameter name="storeOnDisposal" value="true"/>
>
>>> so that the model is not read when loaded but is stored when the
>>> workflow has finished.
>
>>> Regarding the warning, I must admit I haven't come across it. Are you
>>> using 3.5?
>
>>> Cheers,
>>> Dimitris
>
>>> Ali Gondal wrote:
>>>> Hi Louis;
>>>>
>>>> yes that solved the problem but now it throws an error/warning
>>>> "[epsilon.etl - fmm2ecore.etl] Please fix your code to add using
>>>> EClass.getEStructuralFeatures() instead of EClass.getEAttributes()",
>>>> executes successfully but doesn't generate the target model.
>>>>
>>>> The etl rules execute successfully when I run using configuration.
>>>> Is there anything else i need to include in the launch.xml?
>>>>
>>>> Many thanks for your help.
>>>>
>>>> cheers
>>>> --Ali
>>>>
>>>>
>>>>
>>>> Louis Rose wrote:
>>>>
>>>>> Hi Ali,
>>>>
>>>>> It looks like you want to load the Ecore metamodel as a model named
>>>>> Ecore?
>>>>
>>>>> If so, try changing the following lines:
>>>>
>>>>> <epsilon.loadModel name="Ecore" type="EMF">
>>>>> <parameter name="metamodelUri"
>>>>> value="http://www.eclipse.org/emf/2002/Ecore"/>
>>>>> <parameter name="isMetamodelFileBased" value="false"/>
>>>>> <parameter name="readOnLoad" value="false"/>
>>>>> <parameter name="storeOnDisposal" value="false"/>
>>>>> </epsilon.loadModel>
>>>>
>>>>> to:
>>>>
>>>>> <epsilon.loadModel name="Ecore" type="EMF_M2">
>>>>> <parameter name="metamodelUri"
>>>>> value="http://www.eclipse.org/emf/2002/Ecore"/>
>>>>> </epsilon.loadModel>
>>>>
>>>>> To load an EMF metamodel, such as Ecore, the EMF_M2 type should be
>>>>> used. The EMF_M2 type requires only a value for the metamodelUri
>>>>> parameter, and not for the isMetamodelFileBased, readOnLoad and
>>>>> storeOnDisposal parameters (which are always false, true and false).
>>>>
>>>>> Let me know if this doesn't work, and I'll investigate more
>>>>> thoroughly.
>>>>
>>>>> Cheers,
>>>>> Louis.
>>>>
>>>>> Ali Gondal wrote:
>>>>>> Hi;
>>>>>>
>>>>>> I'm trying to run my ETL rule using launch.xml (see below). There
>>>>>> seems to be a problem at:
>>>>>> '<epsilon.loadModel name="Ecore" type="EMF">'.
>>>>>>
>>>>>> I think I am not sure how to specifiy URI based model and none of
>>>>>> the given examples do so. My etl works fine when I go through "Run
>>>>>> Configuration...".
>>>>>>
>>>>>>
>>>>>> <?xml version="1.0"?>
>>>>>> <project default="main">
>>>>>> <target name="init">
>>>>>> <property name="models" location="${basedir}/models"/>
>>>>>> <property name="metamodels"
>>>>>> location="${basedir}/metamodels"/>
>>>>>> </target>
>>>>>> <target name="loadModels">
>>>>>> <epsilon.loadModel name="EM" type="EMF">
>>>>>> <parameter name="modelFile" value="${models}/car.ecore"/>
>>>>>> <parameter name="metamodelUri"
>>>>>> value="http://www.eclipse.org/emf/2002/Ecore"/>
>>>>>> <parameter name="isMetamodelFileBased" value="false"/>
>>>>>> <parameter name="readOnLoad" value="true"/>
>>>>>> <parameter name="storeOnDisposal" value="false"/>
>>>>>> </epsilon.loadModel>
>>>>>> <epsilon.loadModel name="FM" type="EMF">
>>>>>> <parameter name="modelFile" value="${models}/car.fmm"/>
>>>>>> <parameter name="metamodelFile"
>>>>>> value="${metamodels}/fmm.ecore"/>
>>>>>> <parameter name="isMetamodelFileBased" value="true"/>
>>>>>> <parameter name="readOnLoad" value="true"/>
>>>>>> <parameter name="storeOnDisposal" value="false"/>
>>>>>> </epsilon.loadModel>
>>>>>> <epsilon.loadModel name="Ecore"
>>>>>> type="EMF"> <parameter
>>>>>> name="metamodelUri" value="http://www.eclipse.org/emf/2002/Ecore"/>
>>>>>> <parameter name="isMetamodelFileBased"
>>>>>> value="false"/>
>>>>>> <parameter name="readOnLoad" value="false"/>
>>>>>> <parameter name="storeOnDisposal" value="false"/>
>>>>>> </epsilon.loadModel>
>>>>>> </target>
>>>>>> <target name="main"
>>>>>> depends="init,loadModels"> <epsilon.etl
>>>>>> src="${basedir}/fmm2ecore.etl">
>>>>>> <model ref="FM"/>
>>>>>> <model ref="EM"/>
>>>>>> <model ref="Ecore"/>
>>>>>> </epsilon.etl>
>>>>>> </target>
>>>>>> </project>
>>>>>>
>>>>>>
>>>>>> Any help would be great:)
>>>>>> cheers
>>>>>>
>>>>>> --Ali
>>>>>>
>>>>>>
>>>>
>>>>
>
>
Re: Problem running ETL using Epsilon/ANT [message #571900 is a reply to message #435476] Fri, 31 July 2009 07:44 Go to previous message
Louis Rose is currently offline Louis Rose
Messages: 440
Registered: July 2009
Location: York, United Kingdom
Senior Member
Hi Ali,

It looks like you want to load the Ecore metamodel as a model named Ecore?

If so, try changing the following lines:

<epsilon.loadModel name="Ecore" type="EMF">
<parameter name="metamodelUri"
value="http://www.eclipse.org/emf/2002/Ecore"/>
<parameter name="isMetamodelFileBased" value="false"/>
<parameter name="readOnLoad" value="false"/>
<parameter name="storeOnDisposal" value="false"/>
</epsilon.loadModel>

to:

<epsilon.loadModel name="Ecore" type="EMF_M2">
<parameter name="metamodelUri"
value="http://www.eclipse.org/emf/2002/Ecore"/>
</epsilon.loadModel>

To load an EMF metamodel, such as Ecore, the EMF_M2 type should be used.
The EMF_M2 type requires only a value for the metamodelUri parameter,
and not for the isMetamodelFileBased, readOnLoad and storeOnDisposal
parameters (which are always false, true and false).

Let me know if this doesn't work, and I'll investigate more thoroughly.

Cheers,
Louis.

Ali Gondal wrote:
> Hi;
>
> I'm trying to run my ETL rule using launch.xml (see below). There seems
> to be a problem at:
> '<epsilon.loadModel name="Ecore" type="EMF">'.
>
> I think I am not sure how to specifiy URI based model and none of the
> given examples do so. My etl works fine when I go through "Run
> Configuration...".
>
>
> <?xml version="1.0"?>
> <project default="main">
> <target name="init">
> <property name="models" location="${basedir}/models"/>
> <property name="metamodels" location="${basedir}/metamodels"/>
> </target>
>
> <target name="loadModels">
> <epsilon.loadModel name="EM" type="EMF">
> <parameter name="modelFile" value="${models}/car.ecore"/>
> <parameter name="metamodelUri"
> value="http://www.eclipse.org/emf/2002/Ecore"/>
> <parameter name="isMetamodelFileBased" value="false"/>
> <parameter name="readOnLoad" value="true"/>
> <parameter name="storeOnDisposal" value="false"/>
> </epsilon.loadModel>
>
>
> <epsilon.loadModel name="FM" type="EMF">
> <parameter name="modelFile" value="${models}/car.fmm"/>
> <parameter name="metamodelFile"
> value="${metamodels}/fmm.ecore"/>
> <parameter name="isMetamodelFileBased" value="true"/>
> <parameter name="readOnLoad" value="true"/>
> <parameter name="storeOnDisposal" value="false"/>
> </epsilon.loadModel>
>
> <epsilon.loadModel name="Ecore" type="EMF">
> <parameter name="metamodelUri"
> value="http://www.eclipse.org/emf/2002/Ecore"/>
> <parameter name="isMetamodelFileBased" value="false"/>
> <parameter name="readOnLoad" value="false"/>
> <parameter name="storeOnDisposal" value="false"/>
> </epsilon.loadModel>
>
> </target>
>
> <target name="main" depends="init,loadModels">
> <epsilon.etl src="${basedir}/fmm2ecore.etl">
> <model ref="FM"/>
> <model ref="EM"/>
> <model ref="Ecore"/>
> </epsilon.etl>
> </target>
> </project>
>
>
> Any help would be great:)
> cheers
>
> --Ali
>
>
Re: Problem running ETL using Epsilon/ANT [message #572125 is a reply to message #440174] Fri, 31 July 2009 21:48 Go to previous message
Ali Gondal is currently offline Ali Gondal
Messages: 13
Registered: July 2009
Junior Member
Hi Louis;

yes that solved the problem but now it throws an error/warning
"[epsilon.etl - fmm2ecore.etl] Please fix your code to add using
EClass.getEStructuralFeatures() instead of EClass.getEAttributes()",
executes successfully but doesn't generate the target model.

The etl rules execute successfully when I run using configuration. Is
there anything else i need to include in the launch.xml?

Many thanks for your help.

cheers
--Ali



Louis Rose wrote:

> Hi Ali,

> It looks like you want to load the Ecore metamodel as a model named Ecore?

> If so, try changing the following lines:

> <epsilon.loadModel name="Ecore" type="EMF">
> <parameter name="metamodelUri"
> value="http://www.eclipse.org/emf/2002/Ecore"/>
> <parameter name="isMetamodelFileBased" value="false"/>
> <parameter name="readOnLoad" value="false"/>
> <parameter name="storeOnDisposal" value="false"/>
> </epsilon.loadModel>

> to:

> <epsilon.loadModel name="Ecore" type="EMF_M2">
> <parameter name="metamodelUri"
> value="http://www.eclipse.org/emf/2002/Ecore"/>
> </epsilon.loadModel>

> To load an EMF metamodel, such as Ecore, the EMF_M2 type should be used.
> The EMF_M2 type requires only a value for the metamodelUri parameter,
> and not for the isMetamodelFileBased, readOnLoad and storeOnDisposal
> parameters (which are always false, true and false).

> Let me know if this doesn't work, and I'll investigate more thoroughly.

> Cheers,
> Louis.

> Ali Gondal wrote:
>> Hi;
>>
>> I'm trying to run my ETL rule using launch.xml (see below). There seems
>> to be a problem at:
>> '<epsilon.loadModel name="Ecore" type="EMF">'.
>>
>> I think I am not sure how to specifiy URI based model and none of the
>> given examples do so. My etl works fine when I go through "Run
>> Configuration...".
>>
>>
>> <?xml version="1.0"?>
>> <project default="main">
>> <target name="init">
>> <property name="models" location="${basedir}/models"/>
>> <property name="metamodels" location="${basedir}/metamodels"/>
>> </target>
>>
>> <target name="loadModels">
>> <epsilon.loadModel name="EM" type="EMF">
>> <parameter name="modelFile" value="${models}/car.ecore"/>
>> <parameter name="metamodelUri"
>> value="http://www.eclipse.org/emf/2002/Ecore"/>
>> <parameter name="isMetamodelFileBased" value="false"/>
>> <parameter name="readOnLoad" value="true"/>
>> <parameter name="storeOnDisposal" value="false"/>
>> </epsilon.loadModel>
>>
>>
>> <epsilon.loadModel name="FM" type="EMF">
>> <parameter name="modelFile" value="${models}/car.fmm"/>
>> <parameter name="metamodelFile"
>> value="${metamodels}/fmm.ecore"/>
>> <parameter name="isMetamodelFileBased" value="true"/>
>> <parameter name="readOnLoad" value="true"/>
>> <parameter name="storeOnDisposal" value="false"/>
>> </epsilon.loadModel>
>>
>> <epsilon.loadModel name="Ecore" type="EMF">
>> <parameter name="metamodelUri"
>> value="http://www.eclipse.org/emf/2002/Ecore"/>
>> <parameter name="isMetamodelFileBased" value="false"/>
>> <parameter name="readOnLoad" value="false"/>
>> <parameter name="storeOnDisposal" value="false"/>
>> </epsilon.loadModel>
>>
>> </target>
>>
>> <target name="main" depends="init,loadModels">
>> <epsilon.etl src="${basedir}/fmm2ecore.etl">
>> <model ref="FM"/>
>> <model ref="EM"/>
>> <model ref="Ecore"/>
>> </epsilon.etl>
>> </target>
>> </project>
>>
>>
>> Any help would be great:)
>> cheers
>>
>> --Ali
>>
>>
Re: Problem running ETL using Epsilon/ANT [message #572145 is a reply to message #446330] Fri, 31 July 2009 22:00 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Ali,

It seems that the EM model is the target of your transformation. If this
is the case you should change

<parameter name="readOnLoad" value="true"/>
<parameter name="storeOnDisposal" value="false"/>

to

<parameter name="readOnLoad" value="false"/>
<parameter name="storeOnDisposal" value="true"/>

so that the model is not read when loaded but is stored when the
workflow has finished.

Regarding the warning, I must admit I haven't come across it. Are you
using 3.5?

Cheers,
Dimitris

Ali Gondal wrote:
> Hi Louis;
>
> yes that solved the problem but now it throws an error/warning
> "[epsilon.etl - fmm2ecore.etl] Please fix your code to add using
> EClass.getEStructuralFeatures() instead of EClass.getEAttributes()",
> executes successfully but doesn't generate the target model.
>
> The etl rules execute successfully when I run using configuration. Is
> there anything else i need to include in the launch.xml?
>
> Many thanks for your help.
>
> cheers
> --Ali
>
>
>
> Louis Rose wrote:
>
>> Hi Ali,
>
>> It looks like you want to load the Ecore metamodel as a model named
>> Ecore?
>
>> If so, try changing the following lines:
>
>> <epsilon.loadModel name="Ecore" type="EMF">
>> <parameter name="metamodelUri"
>> value="http://www.eclipse.org/emf/2002/Ecore"/>
>> <parameter name="isMetamodelFileBased" value="false"/>
>> <parameter name="readOnLoad" value="false"/>
>> <parameter name="storeOnDisposal" value="false"/>
>> </epsilon.loadModel>
>
>> to:
>
>> <epsilon.loadModel name="Ecore" type="EMF_M2">
>> <parameter name="metamodelUri"
>> value="http://www.eclipse.org/emf/2002/Ecore"/>
>> </epsilon.loadModel>
>
>> To load an EMF metamodel, such as Ecore, the EMF_M2 type should be
>> used. The EMF_M2 type requires only a value for the metamodelUri
>> parameter, and not for the isMetamodelFileBased, readOnLoad and
>> storeOnDisposal parameters (which are always false, true and false).
>
>> Let me know if this doesn't work, and I'll investigate more thoroughly.
>
>> Cheers,
>> Louis.
>
>> Ali Gondal wrote:
>>> Hi;
>>>
>>> I'm trying to run my ETL rule using launch.xml (see below). There
>>> seems to be a problem at:
>>> '<epsilon.loadModel name="Ecore" type="EMF">'.
>>>
>>> I think I am not sure how to specifiy URI based model and none of the
>>> given examples do so. My etl works fine when I go through "Run
>>> Configuration...".
>>>
>>>
>>> <?xml version="1.0"?>
>>> <project default="main">
>>> <target name="init">
>>> <property name="models" location="${basedir}/models"/>
>>> <property name="metamodels" location="${basedir}/metamodels"/>
>>> </target>
>>> <target name="loadModels">
>>> <epsilon.loadModel name="EM" type="EMF">
>>> <parameter name="modelFile" value="${models}/car.ecore"/>
>>> <parameter name="metamodelUri"
>>> value="http://www.eclipse.org/emf/2002/Ecore"/>
>>> <parameter name="isMetamodelFileBased" value="false"/>
>>> <parameter name="readOnLoad" value="true"/>
>>> <parameter name="storeOnDisposal" value="false"/>
>>> </epsilon.loadModel>
>>> <epsilon.loadModel name="FM" type="EMF">
>>> <parameter name="modelFile" value="${models}/car.fmm"/>
>>> <parameter name="metamodelFile"
>>> value="${metamodels}/fmm.ecore"/>
>>> <parameter name="isMetamodelFileBased" value="true"/>
>>> <parameter name="readOnLoad" value="true"/>
>>> <parameter name="storeOnDisposal" value="false"/>
>>> </epsilon.loadModel>
>>> <epsilon.loadModel name="Ecore"
>>> type="EMF"> <parameter
>>> name="metamodelUri" value="http://www.eclipse.org/emf/2002/Ecore"/>
>>> <parameter name="isMetamodelFileBased" value="false"/>
>>> <parameter name="readOnLoad" value="false"/>
>>> <parameter name="storeOnDisposal" value="false"/>
>>> </epsilon.loadModel>
>>> </target>
>>> <target name="main" depends="init,loadModels">
>>> <epsilon.etl src="${basedir}/fmm2ecore.etl">
>>> <model ref="FM"/>
>>> <model ref="EM"/>
>>> <model ref="Ecore"/>
>>> </epsilon.etl>
>>> </target>
>>> </project>
>>>
>>>
>>> Any help would be great:)
>>> cheers
>>>
>>> --Ali
>>>
>>>
>
>
Re: Problem running ETL using Epsilon/ANT [message #572174 is a reply to message #446455] Sat, 01 August 2009 07:56 Go to previous message
Ali Gondal is currently offline Ali Gondal
Messages: 13
Registered: July 2009
Junior Member
Hi Dimitris;

thanks... that solved my problem but the warning is still there. I am
using 3.4.2.

I have another quick question...how can I execute this launch.xml file
using java code as I want this to run on a button click inside my plugin.

many thanks
--Ali



Dimitris Kolovos wrote:

> Hi Ali,

> It seems that the EM model is the target of your transformation. If this
> is the case you should change

> <parameter name="readOnLoad" value="true"/>
> <parameter name="storeOnDisposal" value="false"/>

> to

> <parameter name="readOnLoad" value="false"/>
> <parameter name="storeOnDisposal" value="true"/>

> so that the model is not read when loaded but is stored when the
> workflow has finished.

> Regarding the warning, I must admit I haven't come across it. Are you
> using 3.5?

> Cheers,
> Dimitris

> Ali Gondal wrote:
>> Hi Louis;
>>
>> yes that solved the problem but now it throws an error/warning
>> "[epsilon.etl - fmm2ecore.etl] Please fix your code to add using
>> EClass.getEStructuralFeatures() instead of EClass.getEAttributes()",
>> executes successfully but doesn't generate the target model.
>>
>> The etl rules execute successfully when I run using configuration. Is
>> there anything else i need to include in the launch.xml?
>>
>> Many thanks for your help.
>>
>> cheers
>> --Ali
>>
>>
>>
>> Louis Rose wrote:
>>
>>> Hi Ali,
>>
>>> It looks like you want to load the Ecore metamodel as a model named
>>> Ecore?
>>
>>> If so, try changing the following lines:
>>
>>> <epsilon.loadModel name="Ecore" type="EMF">
>>> <parameter name="metamodelUri"
>>> value="http://www.eclipse.org/emf/2002/Ecore"/>
>>> <parameter name="isMetamodelFileBased" value="false"/>
>>> <parameter name="readOnLoad" value="false"/>
>>> <parameter name="storeOnDisposal" value="false"/>
>>> </epsilon.loadModel>
>>
>>> to:
>>
>>> <epsilon.loadModel name="Ecore" type="EMF_M2">
>>> <parameter name="metamodelUri"
>>> value="http://www.eclipse.org/emf/2002/Ecore"/>
>>> </epsilon.loadModel>
>>
>>> To load an EMF metamodel, such as Ecore, the EMF_M2 type should be
>>> used. The EMF_M2 type requires only a value for the metamodelUri
>>> parameter, and not for the isMetamodelFileBased, readOnLoad and
>>> storeOnDisposal parameters (which are always false, true and false).
>>
>>> Let me know if this doesn't work, and I'll investigate more thoroughly.
>>
>>> Cheers,
>>> Louis.
>>
>>> Ali Gondal wrote:
>>>> Hi;
>>>>
>>>> I'm trying to run my ETL rule using launch.xml (see below). There
>>>> seems to be a problem at:
>>>> '<epsilon.loadModel name="Ecore" type="EMF">'.
>>>>
>>>> I think I am not sure how to specifiy URI based model and none of the
>>>> given examples do so. My etl works fine when I go through "Run
>>>> Configuration...".
>>>>
>>>>
>>>> <?xml version="1.0"?>
>>>> <project default="main">
>>>> <target name="init">
>>>> <property name="models" location="${basedir}/models"/>
>>>> <property name="metamodels" location="${basedir}/metamodels"/>
>>>> </target>
>>>> <target name="loadModels">
>>>> <epsilon.loadModel name="EM" type="EMF">
>>>> <parameter name="modelFile" value="${models}/car.ecore"/>
>>>> <parameter name="metamodelUri"
>>>> value="http://www.eclipse.org/emf/2002/Ecore"/>
>>>> <parameter name="isMetamodelFileBased" value="false"/>
>>>> <parameter name="readOnLoad" value="true"/>
>>>> <parameter name="storeOnDisposal" value="false"/>
>>>> </epsilon.loadModel>
>>>> <epsilon.loadModel name="FM" type="EMF">
>>>> <parameter name="modelFile" value="${models}/car.fmm"/>
>>>> <parameter name="metamodelFile"
>>>> value="${metamodels}/fmm.ecore"/>
>>>> <parameter name="isMetamodelFileBased" value="true"/>
>>>> <parameter name="readOnLoad" value="true"/>
>>>> <parameter name="storeOnDisposal" value="false"/>
>>>> </epsilon.loadModel>
>>>> <epsilon.loadModel name="Ecore"
>>>> type="EMF"> <parameter
>>>> name="metamodelUri" value="http://www.eclipse.org/emf/2002/Ecore"/>
>>>> <parameter name="isMetamodelFileBased" value="false"/>
>>>> <parameter name="readOnLoad" value="false"/>
>>>> <parameter name="storeOnDisposal" value="false"/>
>>>> </epsilon.loadModel>
>>>> </target>
>>>> <target name="main" depends="init,loadModels">
>>>> <epsilon.etl src="${basedir}/fmm2ecore.etl">
>>>> <model ref="FM"/>
>>>> <model ref="EM"/>
>>>> <model ref="Ecore"/>
>>>> </epsilon.etl>
>>>> </target>
>>>> </project>
>>>>
>>>>
>>>> Any help would be great:)
>>>> cheers
>>>>
>>>> --Ali
>>>>
>>>>
>>
>>
Re: Problem running ETL using Epsilon/ANT [message #572201 is a reply to message #446455] Sat, 01 August 2009 14:17 Go to previous message
Ali Gondal is currently offline Ali Gondal
Messages: 13
Registered: July 2009
Junior Member
> Hi Dimitris;

> thanks... that solved my problem but the warning is still there. I am
> using 3.4.2.

> I have another quick question...how can I execute this launch.xml file
> using java code as I want this to run on a button click inside my plugin.

I have figured out how to do this (as in EtlStandAloneExample), if thats
the only way.

All works fine but the error/warning messages are still there i.e.
"Please fix your code to add using EClass.getEStructuralFeatures() instead
of EClass.getEAttributes()"


> many thanks
> --Ali



> Dimitris Kolovos wrote:

>> Hi Ali,

>> It seems that the EM model is the target of your transformation. If this
>> is the case you should change

>> <parameter name="readOnLoad" value="true"/>
>> <parameter name="storeOnDisposal" value="false"/>

>> to

>> <parameter name="readOnLoad" value="false"/>
>> <parameter name="storeOnDisposal" value="true"/>

>> so that the model is not read when loaded but is stored when the
>> workflow has finished.

>> Regarding the warning, I must admit I haven't come across it. Are you
>> using 3.5?

>> Cheers,
>> Dimitris

>> Ali Gondal wrote:
>>> Hi Louis;
>>>
>>> yes that solved the problem but now it throws an error/warning
>>> "[epsilon.etl - fmm2ecore.etl] Please fix your code to add using
>>> EClass.getEStructuralFeatures() instead of EClass.getEAttributes()",
>>> executes successfully but doesn't generate the target model.
>>>
>>> The etl rules execute successfully when I run using configuration. Is
>>> there anything else i need to include in the launch.xml?
>>>
>>> Many thanks for your help.
>>>
>>> cheers
>>> --Ali
>>>
>>>
>>>
>>> Louis Rose wrote:
>>>
>>>> Hi Ali,
>>>
>>>> It looks like you want to load the Ecore metamodel as a model named
>>>> Ecore?
>>>
>>>> If so, try changing the following lines:
>>>
>>>> <epsilon.loadModel name="Ecore" type="EMF">
>>>> <parameter name="metamodelUri"
>>>> value="http://www.eclipse.org/emf/2002/Ecore"/>
>>>> <parameter name="isMetamodelFileBased" value="false"/>
>>>> <parameter name="readOnLoad" value="false"/>
>>>> <parameter name="storeOnDisposal" value="false"/>
>>>> </epsilon.loadModel>
>>>
>>>> to:
>>>
>>>> <epsilon.loadModel name="Ecore" type="EMF_M2">
>>>> <parameter name="metamodelUri"
>>>> value="http://www.eclipse.org/emf/2002/Ecore"/>
>>>> </epsilon.loadModel>
>>>
>>>> To load an EMF metamodel, such as Ecore, the EMF_M2 type should be
>>>> used. The EMF_M2 type requires only a value for the metamodelUri
>>>> parameter, and not for the isMetamodelFileBased, readOnLoad and
>>>> storeOnDisposal parameters (which are always false, true and false).
>>>
>>>> Let me know if this doesn't work, and I'll investigate more thoroughly.
>>>
>>>> Cheers,
>>>> Louis.
>>>
>>>> Ali Gondal wrote:
>>>>> Hi;
>>>>>
>>>>> I'm trying to run my ETL rule using launch.xml (see below). There
>>>>> seems to be a problem at:
>>>>> '<epsilon.loadModel name="Ecore" type="EMF">'.
>>>>>
>>>>> I think I am not sure how to specifiy URI based model and none of the
>>>>> given examples do so. My etl works fine when I go through "Run
>>>>> Configuration...".
>>>>>
>>>>>
>>>>> <?xml version="1.0"?>
>>>>> <project default="main">
>>>>> <target name="init">
>>>>> <property name="models" location="${basedir}/models"/>
>>>>> <property name="metamodels" location="${basedir}/metamodels"/>
>>>>> </target>
>>>>> <target name="loadModels">
>>>>> <epsilon.loadModel name="EM" type="EMF">
>>>>> <parameter name="modelFile" value="${models}/car.ecore"/>
>>>>> <parameter name="metamodelUri"
>>>>> value="http://www.eclipse.org/emf/2002/Ecore"/>
>>>>> <parameter name="isMetamodelFileBased" value="false"/>
>>>>> <parameter name="readOnLoad" value="true"/>
>>>>> <parameter name="storeOnDisposal" value="false"/>
>>>>> </epsilon.loadModel>
>>>>> <epsilon.loadModel name="FM" type="EMF">
>>>>> <parameter name="modelFile" value="${models}/car.fmm"/>
>>>>> <parameter name="metamodelFile"
>>>>> value="${metamodels}/fmm.ecore"/>
>>>>> <parameter name="isMetamodelFileBased" value="true"/>
>>>>> <parameter name="readOnLoad" value="true"/>
>>>>> <parameter name="storeOnDisposal" value="false"/>
>>>>> </epsilon.loadModel>
>>>>> <epsilon.loadModel name="Ecore"
>>>>> type="EMF"> <parameter
>>>>> name="metamodelUri" value="http://www.eclipse.org/emf/2002/Ecore"/>
>>>>> <parameter name="isMetamodelFileBased" value="false"/>
>>>>> <parameter name="readOnLoad" value="false"/>
>>>>> <parameter name="storeOnDisposal" value="false"/>
>>>>> </epsilon.loadModel>
>>>>> </target>
>>>>> <target name="main" depends="init,loadModels">
>>>>> <epsilon.etl src="${basedir}/fmm2ecore.etl">
>>>>> <model ref="FM"/>
>>>>> <model ref="EM"/>
>>>>> <model ref="Ecore"/>
>>>>> </epsilon.etl>
>>>>> </target>
>>>>> </project>
>>>>>
>>>>>
>>>>> Any help would be great:)
>>>>> cheers
>>>>>
>>>>> --Ali
>>>>>
>>>>>
>>>
>>>
Re: Problem running ETL using Epsilon/ANT [message #572213 is a reply to message #452924] Sat, 01 August 2009 16:22 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Ali,

Running ANT files programmatically in Eclipse is supported by the
ANTRunner class:
http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/ant_running_buildfiles_programmatical ly.htm


Regarding the warning, I'd suggest following the recommendation and
changing any calls to x.eAttributes.add(...) to
x.eStructuralFeatures().add(...), as eAttributes is a derived feature
(its value is a dynamically calculated subset of eStructuralFeatures).

Cheers,
Dimitris

Ali Gondal wrote:
>
>> Hi Dimitris;
>
>> thanks... that solved my problem but the warning is still there. I am
>> using 3.4.2.
>
>> I have another quick question...how can I execute this launch.xml file
>> using java code as I want this to run on a button click inside my plugin.
>
> I have figured out how to do this (as in EtlStandAloneExample), if thats
> the only way.
> All works fine but the error/warning messages are still there i.e.
> "Please fix your code to add using EClass.getEStructuralFeatures()
> instead of EClass.getEAttributes()"
>
>
>> many thanks
>> --Ali
>
>
>
>> Dimitris Kolovos wrote:
>
>>> Hi Ali,
>
>>> It seems that the EM model is the target of your transformation. If
>>> this is the case you should change
>
>>> <parameter name="readOnLoad" value="true"/>
>>> <parameter name="storeOnDisposal" value="false"/>
>
>>> to
>
>>> <parameter name="readOnLoad" value="false"/>
>>> <parameter name="storeOnDisposal" value="true"/>
>
>>> so that the model is not read when loaded but is stored when the
>>> workflow has finished.
>
>>> Regarding the warning, I must admit I haven't come across it. Are you
>>> using 3.5?
>
>>> Cheers,
>>> Dimitris
>
>>> Ali Gondal wrote:
>>>> Hi Louis;
>>>>
>>>> yes that solved the problem but now it throws an error/warning
>>>> "[epsilon.etl - fmm2ecore.etl] Please fix your code to add using
>>>> EClass.getEStructuralFeatures() instead of EClass.getEAttributes()",
>>>> executes successfully but doesn't generate the target model.
>>>>
>>>> The etl rules execute successfully when I run using configuration.
>>>> Is there anything else i need to include in the launch.xml?
>>>>
>>>> Many thanks for your help.
>>>>
>>>> cheers
>>>> --Ali
>>>>
>>>>
>>>>
>>>> Louis Rose wrote:
>>>>
>>>>> Hi Ali,
>>>>
>>>>> It looks like you want to load the Ecore metamodel as a model named
>>>>> Ecore?
>>>>
>>>>> If so, try changing the following lines:
>>>>
>>>>> <epsilon.loadModel name="Ecore" type="EMF">
>>>>> <parameter name="metamodelUri"
>>>>> value="http://www.eclipse.org/emf/2002/Ecore"/>
>>>>> <parameter name="isMetamodelFileBased" value="false"/>
>>>>> <parameter name="readOnLoad" value="false"/>
>>>>> <parameter name="storeOnDisposal" value="false"/>
>>>>> </epsilon.loadModel>
>>>>
>>>>> to:
>>>>
>>>>> <epsilon.loadModel name="Ecore" type="EMF_M2">
>>>>> <parameter name="metamodelUri"
>>>>> value="http://www.eclipse.org/emf/2002/Ecore"/>
>>>>> </epsilon.loadModel>
>>>>
>>>>> To load an EMF metamodel, such as Ecore, the EMF_M2 type should be
>>>>> used. The EMF_M2 type requires only a value for the metamodelUri
>>>>> parameter, and not for the isMetamodelFileBased, readOnLoad and
>>>>> storeOnDisposal parameters (which are always false, true and false).
>>>>
>>>>> Let me know if this doesn't work, and I'll investigate more
>>>>> thoroughly.
>>>>
>>>>> Cheers,
>>>>> Louis.
>>>>
>>>>> Ali Gondal wrote:
>>>>>> Hi;
>>>>>>
>>>>>> I'm trying to run my ETL rule using launch.xml (see below). There
>>>>>> seems to be a problem at:
>>>>>> '<epsilon.loadModel name="Ecore" type="EMF">'.
>>>>>>
>>>>>> I think I am not sure how to specifiy URI based model and none of
>>>>>> the given examples do so. My etl works fine when I go through "Run
>>>>>> Configuration...".
>>>>>>
>>>>>>
>>>>>> <?xml version="1.0"?>
>>>>>> <project default="main">
>>>>>> <target name="init">
>>>>>> <property name="models" location="${basedir}/models"/>
>>>>>> <property name="metamodels"
>>>>>> location="${basedir}/metamodels"/>
>>>>>> </target>
>>>>>> <target name="loadModels">
>>>>>> <epsilon.loadModel name="EM" type="EMF">
>>>>>> <parameter name="modelFile" value="${models}/car.ecore"/>
>>>>>> <parameter name="metamodelUri"
>>>>>> value="http://www.eclipse.org/emf/2002/Ecore"/>
>>>>>> <parameter name="isMetamodelFileBased" value="false"/>
>>>>>> <parameter name="readOnLoad" value="true"/>
>>>>>> <parameter name="storeOnDisposal" value="false"/>
>>>>>> </epsilon.loadModel>
>>>>>> <epsilon.loadModel name="FM" type="EMF">
>>>>>> <parameter name="modelFile" value="${models}/car.fmm"/>
>>>>>> <parameter name="metamodelFile"
>>>>>> value="${metamodels}/fmm.ecore"/>
>>>>>> <parameter name="isMetamodelFileBased" value="true"/>
>>>>>> <parameter name="readOnLoad" value="true"/>
>>>>>> <parameter name="storeOnDisposal" value="false"/>
>>>>>> </epsilon.loadModel>
>>>>>> <epsilon.loadModel name="Ecore"
>>>>>> type="EMF"> <parameter
>>>>>> name="metamodelUri" value="http://www.eclipse.org/emf/2002/Ecore"/>
>>>>>> <parameter name="isMetamodelFileBased"
>>>>>> value="false"/>
>>>>>> <parameter name="readOnLoad" value="false"/>
>>>>>> <parameter name="storeOnDisposal" value="false"/>
>>>>>> </epsilon.loadModel>
>>>>>> </target>
>>>>>> <target name="main"
>>>>>> depends="init,loadModels"> <epsilon.etl
>>>>>> src="${basedir}/fmm2ecore.etl">
>>>>>> <model ref="FM"/>
>>>>>> <model ref="EM"/>
>>>>>> <model ref="Ecore"/>
>>>>>> </epsilon.etl>
>>>>>> </target>
>>>>>> </project>
>>>>>>
>>>>>>
>>>>>> Any help would be great:)
>>>>>> cheers
>>>>>>
>>>>>> --Ali
>>>>>>
>>>>>>
>>>>
>>>>
>
>
Previous Topic:Calling EOL from Java
Next Topic:[ETL/EOL][newbie] Dealing with EFeatureMapEntry?
Goto Forum:
  


Current Time: Thu Sep 18 01:46:44 GMT 2014

Powered by FUDForum. Page generated in 0.06396 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software