Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [ETL] Accesing existing output model elements
icon5.gif  [ETL] Accesing existing output model elements [message #522714] Tue, 23 March 2010 17:25 Go to next message
Horacio Hoyos is currently offline Horacio HoyosFriend
Messages: 242
Registered: October 2009
Location: Mexico
Senior Member

I am working on a ETL rule that creates elements on an output model that already has some elements on it. Some of the existent elements and the new ones need a consecutive id number, so I need to collect all the elements of type IdElement to get a list of existing ids and use the next one. My problem seems that I can not access the existent elements of the output model. I use read on load and store on disposal and new elements are indeed created. Any idea on how to access existent elements?

Thanks,





Horacio Hoyos Rodriguez
Kinori Tech
Need professional support for Epsilon, EMF?
Go to: https://kinori.tech
Re: [ETL] Accesing existing output model elements [message #522726 is a reply to message #522714] Tue, 23 March 2010 17:57 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Horacio,

If your target model is named Target, you should be able to get all
elements of type IdElement using Target!IdElement.all. What does
Target!IdElement.all.println() print?

Cheers,
Dimitris

Horacio wrote:
> I am working on a ETL rule that creates elements on an output model that
> already has some elements on it. Some of the existent elements and the
> new ones need a consecutive id number, so I need to collect all the
> elements of type IdElement to get a list of existing ids and use the
> next one. My problem seems that I can not access the existent elements
> of the output model. I use read on load and store on disposal and new
> elements are indeed created. Any idea on how to access existent elements?
>
> Thanks,
>
>
>
>


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: [ETL] Accesing existing output model elements [message #522748 is a reply to message #522726] Tue, 23 March 2010 20:01 Go to previous messageGo to next message
Horacio Hoyos is currently offline Horacio HoyosFriend
Messages: 242
Registered: October 2009
Location: Mexico
Senior Member

Hi Dimitris,

This is what I get: Sequence {}

I have tried with different element types and all return an empty set. The only thing that seems to return something is if I get the elements of the type the rule has as output, which returns 1 element, the one I am creating?

Cheers,


Horacio Hoyos Rodriguez
Kinori Tech
Need professional support for Epsilon, EMF?
Go to: https://kinori.tech
Re: [ETL] Accesing existing output model elements [message #522751 is a reply to message #522748] Tue, 23 March 2010 20:03 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Horacio,

Metamodel(s), sample input model and transformation are then due I guess :)

Cheers,
Dimitris

Horacio wrote:
> Hi Dimitris,
>
> This is what I get: Sequence {}
>
> I have tried with different element types and all return an empty set.
> The only thing that seems to return something is if I get the elements
> of the type the rule has as output, which returns 1 element, the one I
> am creating?
>
> Cheers,
>


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: [ETL] Accesing existing output model elements [message #525425 is a reply to message #522751] Tue, 06 April 2010 14:34 Go to previous messageGo to next message
Horacio Hoyos is currently offline Horacio HoyosFriend
Messages: 242
Registered: October 2009
Location: Mexico
Senior Member

Hello,

I have tried to test this to see if somehow I managed to see the elements. Looking at the documentation I did a small eol test:

base!Font.all().println();
var f : new base!Font;
base!Font.all().println();
base.allContents().println();


For which I get the next console output:

Sequence {}
Sequence {Font [id=null, color=null, faceName=null, pointSize=null]}
Sequence {DocumentRoot [mixed=[ecore.xml.type:text=
], ], EStringToStringMapEntry [key=xmi, value=http://www.omg.org/XMI], EStringToStringMapEntry [key=xsi, value=http://www.w3.org/2001/XMLSchema-instance], EStringToStringMapEntry [key=tdml, value=http://moosas.uniandes.edu.co/HiLeSPL/tdml], Font [id=null, color=null, faceName=null, pointSize=null]}


If I look at the xml of the base model I see:

<?xml version="1.0" encoding="ASCII"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tdml="http://moosas.uniandes.edu.co/HiLeSPL/tdml">
  <tdml:TimingDiagram defaultTimeUnits="1e-6" delayRule="first" fontPtr="HL4" lineThickness="1" showDelays="1" showHolds="1" showSamples="1" showSetups="1" showUncertainty="ALL">
  <tdmlAdminInfo>
...


Comparing it to the console output it would seem that only the model information is beeing loaded (the xmi description) and not the element information.

Hope this helps.




Horacio Hoyos Rodriguez
Kinori Tech
Need professional support for Epsilon, EMF?
Go to: https://kinori.tech
Re: [ETL] Accesing existing output model elements [message #525461 is a reply to message #525425] Tue, 06 April 2010 16:05 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Horacio,

Not sure why this might be happening. Could you please zip and send me
your metamodels/models/transformations so that I can have a closer look
at this?

Cheers,
Dimitris

On 06/04/2010 17:34, Horacio wrote:
> Hello,
>
> I have tried to test this to see if somehow I managed to see the
> elements. Looking at the documentation I did a small eol test:
>
> base!Font.all().println();
> var f : new base!Font;
> base!Font.all().println();
> base.allContents().println();
>
> For which I get the next console output:
>
> Sequence {}
> Sequence {Font [id=null, color=null, faceName=null, pointSize=null]}
> Sequence {DocumentRoot [mixed=[ecore.xml.type:text=
> ], ], EStringToStringMapEntry [key=xmi, value=http://www.omg.org/XMI],
> EStringToStringMapEntry [key=xsi,
> value=http://www.w3.org/2001/XMLSchema-instance],
> EStringToStringMapEntry [key=tdml,
> value=http://moosas.uniandes.edu.co/HiLeSPL/tdml], Font [id=null,
> color=null, faceName=null, pointSize=null]}
>
>
> If I look at the xml of the base model I see:
>
> <?xml version="1.0" encoding="ASCII"?>
> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:tdml="http://moosas.uniandes.edu.co/HiLeSPL/tdml">
> <tdml:TimingDiagram defaultTimeUnits="1e-6" delayRule="first"
> fontPtr="HL4" lineThickness="1" showDelays="1" showHolds="1"
> showSamples="1" showSetups="1" showUncertainty="ALL">
> <tdmlAdminInfo>
> ..
>
> Comparing it to the console output it would seem that only the model
> information is beeing loaded (the xmi description) and not the element
> information.
> Hope this helps.
>
>
>
Re: [ETL] Accesing existing output model elements [message #525676 is a reply to message #525461] Wed, 07 April 2010 12:56 Go to previous messageGo to next message
Horacio Hoyos is currently offline Horacio HoyosFriend
Messages: 242
Registered: October 2009
Location: Mexico
Senior Member

Dimitris,

I sent you the files to your gmail account the 23 of March from h.hoyos95 at uniandes dot edu dot co. Please tell me if you received them or if I send them to another account.

Regards,


Horacio Hoyos Rodriguez
Kinori Tech
Need professional support for Epsilon, EMF?
Go to: https://kinori.tech
Re: [ETL] Accesing existing output model elements [message #525681 is a reply to message #525676] Wed, 07 April 2010 13:00 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Horacio,

You're right. I somehow managed to miss it :S Sorry about that. I'll
have a look at this tomorrow (it's a pretty busy day today) and get back
to you.

Cheers,
Dimitris

On 07/04/2010 15:56, Horacio wrote:
> Dimitris,
>
> I sent you the files to your gmail account the 23 of March from
> h.hoyos95 at uniandes dot edu dot co. Please tell me if you received
> them or if I send them to another account.
>
> Regards,
Re: [ETL] Accesing existing output model elements [message #587617 is a reply to message #522726] Tue, 23 March 2010 20:01 Go to previous message
Horacio Hoyos is currently offline Horacio HoyosFriend
Messages: 242
Registered: October 2009
Location: Mexico
Senior Member

Hi Dimitris,

This is what I get: Sequence {}

I have tried with different element types and all return an empty set. The only thing that seems to return something is if I get the elements of the type the rule has as output, which returns 1 element, the one I am creating?

Cheers,

--
Horacio Hoyos Rodriguez
Research Assistant
Universidad de los Andes
http://moosas.uniandes.edu.co/


Horacio Hoyos Rodriguez
Kinori Tech
Need professional support for Epsilon, EMF?
Go to: https://kinori.tech
Re: [ETL] Accesing existing output model elements [message #587621 is a reply to message #522748] Tue, 23 March 2010 20:03 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Horacio,

Metamodel(s), sample input model and transformation are then due I guess :)

Cheers,
Dimitris

Horacio wrote:
> Hi Dimitris,
>
> This is what I get: Sequence {}
>
> I have tried with different element types and all return an empty set.
> The only thing that seems to return something is if I get the elements
> of the type the rule has as output, which returns 1 element, the one I
> am creating?
>
> Cheers,
>


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: [ETL] Accesing existing output model elements [message #588182 is a reply to message #522751] Tue, 06 April 2010 14:34 Go to previous message
Horacio Hoyos is currently offline Horacio HoyosFriend
Messages: 242
Registered: October 2009
Location: Mexico
Senior Member

Hello,

I have tried to test this to see if somehow I managed to see the elements. Looking at the documentation I did a small eol test:

base!Font.all().println();
var f : new base!Font;
base!Font.all().println();
base.allContents().println();

For which I get the next console output:

Sequence {}
Sequence {Font [id=null, color=null, faceName=null, pointSize=null]}
Sequence {DocumentRoot [mixed=[ecore.xml.type:text=
], ], EStringToStringMapEntry [key=xmi, value=http://www.omg.org/XMI], EStringToStringMapEntry [key=xsi, value=http://www.w3.org/2001/XMLSchema-instance], EStringToStringMapEntry [key=tdml, value=http://moosas.uniandes.edu.co/HiLeSPL/tdml], Font [id=null, color=null, faceName=null, pointSize=null]}


If I look at the xml of the base model I see:

<?xml version="1.0" encoding="ASCII"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tdml="http://moosas.uniandes.edu.co/HiLeSPL/tdml">
<tdml:TimingDiagram defaultTimeUnits="1e-6" delayRule="first" fontPtr="HL4" lineThickness="1" showDelays="1" showHolds="1" showSamples="1" showSetups="1" showUncertainty="ALL">
<tdmlAdminInfo>
...

Comparing it to the console output it would seem that only the model information is beeing loaded (the xmi description) and not the element information.

Hope this helps.



--
Horacio Hoyos Rodriguez
Research Assistant
Universidad de los Andes
http://moosas.uniandes.edu.co/


Horacio Hoyos Rodriguez
Kinori Tech
Need professional support for Epsilon, EMF?
Go to: https://kinori.tech
Re: [ETL] Accesing existing output model elements [message #588190 is a reply to message #588182] Tue, 06 April 2010 16:05 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Horacio,

Not sure why this might be happening. Could you please zip and send me
your metamodels/models/transformations so that I can have a closer look
at this?

Cheers,
Dimitris

On 06/04/2010 17:34, Horacio wrote:
> Hello,
>
> I have tried to test this to see if somehow I managed to see the
> elements. Looking at the documentation I did a small eol test:
>
> base!Font.all().println();
> var f : new base!Font;
> base!Font.all().println();
> base.allContents().println();
>
> For which I get the next console output:
>
> Sequence {}
> Sequence {Font [id=null, color=null, faceName=null, pointSize=null]}
> Sequence {DocumentRoot [mixed=[ecore.xml.type:text=
> ], ], EStringToStringMapEntry [key=xmi, value=http://www.omg.org/XMI],
> EStringToStringMapEntry [key=xsi,
> value=http://www.w3.org/2001/XMLSchema-instance],
> EStringToStringMapEntry [key=tdml,
> value=http://moosas.uniandes.edu.co/HiLeSPL/tdml], Font [id=null,
> color=null, faceName=null, pointSize=null]}
>
>
> If I look at the xml of the base model I see:
>
> <?xml version="1.0" encoding="ASCII"?>
> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:tdml="http://moosas.uniandes.edu.co/HiLeSPL/tdml">
> <tdml:TimingDiagram defaultTimeUnits="1e-6" delayRule="first"
> fontPtr="HL4" lineThickness="1" showDelays="1" showHolds="1"
> showSamples="1" showSetups="1" showUncertainty="ALL">
> <tdmlAdminInfo>
> ..
>
> Comparing it to the console output it would seem that only the model
> information is beeing loaded (the xmi description) and not the element
> information.
> Hope this helps.
>
>
>
Re: [ETL] Accesing existing output model elements [message #588196 is a reply to message #525461] Wed, 07 April 2010 12:56 Go to previous message
Horacio Hoyos is currently offline Horacio HoyosFriend
Messages: 242
Registered: October 2009
Location: Mexico
Senior Member

Dimitris,

I sent you the files to your gmail account the 23 of March from h.hoyos95 at uniandes dot edu dot co. Please tell me if you received them or if I send them to another account.

Regards,
--
Horacio Hoyos Rodriguez
Research Assistant
Universidad de los Andes
http://moosas.uniandes.edu.co/


Horacio Hoyos Rodriguez
Kinori Tech
Need professional support for Epsilon, EMF?
Go to: https://kinori.tech
Re: [ETL] Accesing existing output model elements [message #588205 is a reply to message #525676] Wed, 07 April 2010 13:00 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Horacio,

You're right. I somehow managed to miss it :S Sorry about that. I'll
have a look at this tomorrow (it's a pretty busy day today) and get back
to you.

Cheers,
Dimitris

On 07/04/2010 15:56, Horacio wrote:
> Dimitris,
>
> I sent you the files to your gmail account the 23 of March from
> h.hoyos95 at uniandes dot edu dot co. Please tell me if you received
> them or if I send them to another account.
>
> Regards,
Previous Topic:ETL question
Next Topic:Accessing Enum Literals from ETL
Goto Forum:
  


Current Time: Thu Apr 18 15:12:49 GMT 2024

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

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

Back to the top