Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMT (Generative Modeling Technologies) » [Epsilon] running the ETL sample from Java
[Epsilon] running the ETL sample from Java [message #380475] Mon, 26 November 2007 18:45 Go to next message
Jose Alfredo Serrano is currently offline Jose Alfredo Serrano
Messages: 23
Registered: July 2009
Junior Member
Hello,

I'm new on Epsilon and I was trying to play with the examples.
In the ETL part, there is an example of using ETL from java. I have
modified the given Java class ETLStandaloneExample to make it compile
with the latest versions:
-EtlModuleImple becomes EtlModule,
-The method shutdown has been renamed as disposed
-the 'module.setSourceModel()' modified into
module.getContext().getTransformationStrategy().setSourceMod el()
-the 'module.setTargetModel()' modified into
module.getContext().getTransformationStrategy().setTargetMod el().

Is this alright?

Well, It says that DB!Database not found. Actually I have a plugin that
I ran as java application for this sample. The models (OO and DB) and
the instances (DBInstance and OOInstance) are placed at the project
folder. Am I missing something? Maybe the problem comes from the
modifications I made to make the class to compile.

Has anybody run this example successfully?

Jose Alfredo Serrano
Re: [Epsilon] running the ETL sample from Java [message #380479 is a reply to message #380475] Mon, 26 November 2007 21:42 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Jose,

Thanks for reporting this! In the previous version, setSourceModel() and
setTargetModel() were adding the models to the model repository
automatically. However this is not the case any more and therefore you
have to add the ooModel and dbModel to the repository manually using the
following statements:

module.getContext().getModelRepository().addModel(ooModel);
module.getContext().getModelRepository().addModel(dbModel);

I'll update the on-line example shortly.

Cheers,
Dimitrios

Jose Alfredo Serrano wrote:
> Hello,
>
> I'm new on Epsilon and I was trying to play with the examples.
> In the ETL part, there is an example of using ETL from java. I have
> modified the given Java class ETLStandaloneExample to make it compile
> with the latest versions:
> -EtlModuleImple becomes EtlModule,
> -The method shutdown has been renamed as disposed
> -the 'module.setSourceModel()' modified into
> module.getContext().getTransformationStrategy().setSourceMod el()
> -the 'module.setTargetModel()' modified into
> module.getContext().getTransformationStrategy().setTargetMod el().
>
> Is this alright?
>
> Well, It says that DB!Database not found. Actually I have a plugin that
> I ran as java application for this sample. The models (OO and DB) and
> the instances (DBInstance and OOInstance) are placed at the project
> folder. Am I missing something? Maybe the problem comes from the
> modifications I made to make the class to compile.
>
> Has anybody run this example successfully?
>
> Jose Alfredo Serrano
Re: [Epsilon] running the ETL sample from Java [message #380482 is a reply to message #380479] Tue, 27 November 2007 08:48 Go to previous messageGo to next message
Jose Alfredo Serrano is currently offline Jose Alfredo Serrano
Messages: 23
Registered: July 2009
Junior Member
Hi Dimitrios,

Thanks for your answer. I added models to repository manually as you
said but a NullPointerException is raised when calling the
AbstractTransformationStrategy#transformModel(IEtlContext). That is why
I added models using
module.getContext().getTransformationStrategy().setSourceMod el(). Is
this necessary to be done to when registering models too?

Sincerely,
Jose Alfredo

Dimitrios Kolovos a écrit :
> Hi Jose,
>
> Thanks for reporting this! In the previous version, setSourceModel() and
> setTargetModel() were adding the models to the model repository
> automatically. However this is not the case any more and therefore you
> have to add the ooModel and dbModel to the repository manually using the
> following statements:
>
> module.getContext().getModelRepository().addModel(ooModel);
> module.getContext().getModelRepository().addModel(dbModel);
>
> I'll update the on-line example shortly.
>
> Cheers,
> Dimitrios
>
> Jose Alfredo Serrano wrote:
>> Hello,
>>
>> I'm new on Epsilon and I was trying to play with the examples.
>> In the ETL part, there is an example of using ETL from java. I have
>> modified the given Java class ETLStandaloneExample to make it compile
>> with the latest versions:
>> -EtlModuleImple becomes EtlModule,
>> -The method shutdown has been renamed as disposed
>> -the 'module.setSourceModel()' modified into
>> module.getContext().getTransformationStrategy().setSourceMod el()
>> -the 'module.setTargetModel()' modified into
>> module.getContext().getTransformationStrategy().setTargetMod el().
>>
>> Is this alright?
>>
>> Well, It says that DB!Database not found. Actually I have a plugin that
>> I ran as java application for this sample. The models (OO and DB) and
>> the instances (DBInstance and OOInstance) are placed at the project
>> folder. Am I missing something? Maybe the problem comes from the
>> modifications I made to make the class to compile.
>>
>> Has anybody run this example successfully?
>>
>> Jose Alfredo Serrano
Re: [Epsilon] running the ETL sample from Java [message #380483 is a reply to message #380479] Tue, 27 November 2007 09:22 Go to previous messageGo to next message
Jose Alfredo Serrano is currently offline Jose Alfredo Serrano
Messages: 23
Registered: July 2009
Junior Member
Hi,

I have register models in the model repository and in the
TransformationStrategy. And it seems to work. Maybe one single method as
it was before (setSourceModel and setTargetModel) can do this work
transparent for the client that use the module? Or maybe it is not
intended to be done this way? Anyway, I will stay tuned on any
information about Epsilon.

Thanks
Sincerely,
Jose Alfredo Serrano
Re: [Epsilon] running the ETL sample from Java [message #380484 is a reply to message #380483] Tue, 27 November 2007 12:15 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Jose,

We are actually currently working on eliminating setSourceModel() and
setTargetModel() from ETL at all. In the next version (which should be
available by the end of this week) you won't have to define only one
source and one target model but instead you'll be able to specify rules
between any pair of models in the model repository
(context.getModelRepository()). Stay tuned :)

Cheers,
Dimitrios

Jose Alfredo Serrano wrote:
> Hi,
>
> I have register models in the model repository and in the
> TransformationStrategy. And it seems to work. Maybe one single method as
> it was before (setSourceModel and setTargetModel) can do this work
> transparent for the client that use the module? Or maybe it is not
> intended to be done this way? Anyway, I will stay tuned on any
> information about Epsilon.
>
> Thanks
> Sincerely,
> Jose Alfredo Serrano
Re: [Epsilon] running the ETL sample from Java [message #609673 is a reply to message #380475] Mon, 26 November 2007 21:42 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Jose,

Thanks for reporting this! In the previous version, setSourceModel() and
setTargetModel() were adding the models to the model repository
automatically. However this is not the case any more and therefore you
have to add the ooModel and dbModel to the repository manually using the
following statements:

module.getContext().getModelRepository().addModel(ooModel);
module.getContext().getModelRepository().addModel(dbModel);

I'll update the on-line example shortly.

Cheers,
Dimitrios

Jose Alfredo Serrano wrote:
> Hello,
>
> I'm new on Epsilon and I was trying to play with the examples.
> In the ETL part, there is an example of using ETL from java. I have
> modified the given Java class ETLStandaloneExample to make it compile
> with the latest versions:
> -EtlModuleImple becomes EtlModule,
> -The method shutdown has been renamed as disposed
> -the 'module.setSourceModel()' modified into
> module.getContext().getTransformationStrategy().setSourceMod el()
> -the 'module.setTargetModel()' modified into
> module.getContext().getTransformationStrategy().setTargetMod el().
>
> Is this alright?
>
> Well, It says that DB!Database not found. Actually I have a plugin that
> I ran as java application for this sample. The models (OO and DB) and
> the instances (DBInstance and OOInstance) are placed at the project
> folder. Am I missing something? Maybe the problem comes from the
> modifications I made to make the class to compile.
>
> Has anybody run this example successfully?
>
> Jose Alfredo Serrano
Re: [Epsilon] running the ETL sample from Java [message #609678 is a reply to message #380479] Tue, 27 November 2007 08:48 Go to previous message
Jose Alfredo Serrano is currently offline Jose Alfredo Serrano
Messages: 23
Registered: July 2009
Junior Member
Hi Dimitrios,

Thanks for your answer. I added models to repository manually as you
said but a NullPointerException is raised when calling the
AbstractTransformationStrategy#transformModel(IEtlContext). That is why
I added models using
module.getContext().getTransformationStrategy().setSourceMod el(). Is
this necessary to be done to when registering models too?

Sincerely,
Jose Alfredo

Dimitrios Kolovos a écrit :
> Hi Jose,
>
> Thanks for reporting this! In the previous version, setSourceModel() and
> setTargetModel() were adding the models to the model repository
> automatically. However this is not the case any more and therefore you
> have to add the ooModel and dbModel to the repository manually using the
> following statements:
>
> module.getContext().getModelRepository().addModel(ooModel);
> module.getContext().getModelRepository().addModel(dbModel);
>
> I'll update the on-line example shortly.
>
> Cheers,
> Dimitrios
>
> Jose Alfredo Serrano wrote:
>> Hello,
>>
>> I'm new on Epsilon and I was trying to play with the examples.
>> In the ETL part, there is an example of using ETL from java. I have
>> modified the given Java class ETLStandaloneExample to make it compile
>> with the latest versions:
>> -EtlModuleImple becomes EtlModule,
>> -The method shutdown has been renamed as disposed
>> -the 'module.setSourceModel()' modified into
>> module.getContext().getTransformationStrategy().setSourceMod el()
>> -the 'module.setTargetModel()' modified into
>> module.getContext().getTransformationStrategy().setTargetMod el().
>>
>> Is this alright?
>>
>> Well, It says that DB!Database not found. Actually I have a plugin that
>> I ran as java application for this sample. The models (OO and DB) and
>> the instances (DBInstance and OOInstance) are placed at the project
>> folder. Am I missing something? Maybe the problem comes from the
>> modifications I made to make the class to compile.
>>
>> Has anybody run this example successfully?
>>
>> Jose Alfredo Serrano
Re: [Epsilon] running the ETL sample from Java [message #609679 is a reply to message #380479] Tue, 27 November 2007 09:22 Go to previous message
Jose Alfredo Serrano is currently offline Jose Alfredo Serrano
Messages: 23
Registered: July 2009
Junior Member
Hi,

I have register models in the model repository and in the
TransformationStrategy. And it seems to work. Maybe one single method as
it was before (setSourceModel and setTargetModel) can do this work
transparent for the client that use the module? Or maybe it is not
intended to be done this way? Anyway, I will stay tuned on any
information about Epsilon.

Thanks
Sincerely,
Jose Alfredo Serrano
Re: [Epsilon] running the ETL sample from Java [message #609681 is a reply to message #380483] Tue, 27 November 2007 12:15 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Jose,

We are actually currently working on eliminating setSourceModel() and
setTargetModel() from ETL at all. In the next version (which should be
available by the end of this week) you won't have to define only one
source and one target model but instead you'll be able to specify rules
between any pair of models in the model repository
(context.getModelRepository()). Stay tuned :)

Cheers,
Dimitrios

Jose Alfredo Serrano wrote:
> Hi,
>
> I have register models in the model repository and in the
> TransformationStrategy. And it seems to work. Maybe one single method as
> it was before (setSourceModel and setTargetModel) can do this work
> transparent for the client that use the module? Or maybe it is not
> intended to be done this way? Anyway, I will stay tuned on any
> information about Epsilon.
>
> Thanks
> Sincerely,
> Jose Alfredo Serrano
Previous Topic:Re: [MOFScript] Unprotected regions
Next Topic:[Epsilon] @Override on interface implementations
Goto Forum:
  


Current Time: Tue Sep 23 18:23:26 GMT 2014

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

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