Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc) » How to combine Teneo with Jet?
How to combine Teneo with Jet? [message #63409] |
Fri, 01 December 2006 03:25  |
Eclipse User |
|
|
|
Originally posted by: kalin.nakov.gmail.com
Hello,
My application needs to generate code out of a very huge model
(thousands of classes). Since loading everything into memory is not an
option, I think Teneo will suit best. I am able to run JET
transformation in Java using Jet2Platform.runTransformOnResource() by
specifying a XMI file, but how can I run a Jet transformation on a
ResourceSet object?
I want to load the huge model from the database as a ResourceSet
(through EMF/JPOX resources) and then run a JET transformation.
Thanks in advance,
Kalin
|
|
| |
Re: How to combine Teneo with Jet? [message #63962 is a reply to message #63409] |
Thu, 07 December 2006 11:58   |
Eclipse User |
|
|
|
Kalin:
Sorry, I didn't notice your post sooner...
You'll have to pardon my ignorance of Teneo details, I have only scanned the
tutorial, but here goes...
As you note, JET2Platform.runTransfornOnResource() works on an Eclipse
IResource, something you won't have if using Teneo. But all
JET2Platform.runTransformOnResource() does is load the EMF resource for the
IResource, and then pass the loaded EMF Resource off to the execution
engine.
Try the following:
1) Load the Teneo-based resource. Here's the snippet from the Teneo/JPOX
tutorial:
String uriStr = "jpox://?" + JPOXResource.DS_NAME_PARAM + "=MyPMF";
final URI uri = URI.createURI(uriStr);
ResourceSet resourceSet = new ResourceSetImpl();
final Resource res =
resourceSet.createResource(uri);res.load(Collections.EMPTY_M AP);2) Pass the
loaded resource to JET2Platform.runTransformOnObject();
JET2Platform.runTransformOnObject("...id", res, progressMonitor);
If Teneo delivers as promised, then JET should have not problem navigating
your model.
Paul
"Kalin Nakov" <kalin.nakov@gmail.com> wrote in message
news:ekoot3$5uq$1@utils.eclipse.org...
> Hello,
>
> My application needs to generate code out of a very huge model (thousands
> of classes). Since loading everything into memory is not an option, I
> think Teneo will suit best. I am able to run JET transformation in Java
> using Jet2Platform.runTransformOnResource() by specifying a XMI file, but
> how can I run a Jet transformation on a ResourceSet object?
>
> I want to load the huge model from the database as a ResourceSet (through
> EMF/JPOX resources) and then run a JET transformation.
>
> Thanks in advance,
> Kalin
|
|
|
Re: How to combine Teneo with Jet? [message #63985 is a reply to message #63962] |
Thu, 07 December 2006 15:13   |
Eclipse User |
|
|
|
Originally posted by: kalin.nakov.gmail.com
Thank you very much for the help, it works that way. One note - I just
had to define the org.eclipse.jet.resource.project.name variable when
using runTransformOnObject(), otherwise it throws exception for the
undefined variable.
Paul Elder wrote:
> Kalin:
>
> Sorry, I didn't notice your post sooner...
>
> You'll have to pardon my ignorance of Teneo details, I have only scanned the
> tutorial, but here goes...
>
> As you note, JET2Platform.runTransfornOnResource() works on an Eclipse
> IResource, something you won't have if using Teneo. But all
> JET2Platform.runTransformOnResource() does is load the EMF resource for the
> IResource, and then pass the loaded EMF Resource off to the execution
> engine.
>
> Try the following:
>
> 1) Load the Teneo-based resource. Here's the snippet from the Teneo/JPOX
> tutorial:
> String uriStr = "jpox://?" + JPOXResource.DS_NAME_PARAM + "=MyPMF";
> final URI uri = URI.createURI(uriStr);
> ResourceSet resourceSet = new ResourceSetImpl();
> final Resource res =
> resourceSet.createResource(uri);res.load(Collections.EMPTY_M AP);2) Pass the
> loaded resource to JET2Platform.runTransformOnObject();
>
> JET2Platform.runTransformOnObject("...id", res, progressMonitor);
>
> If Teneo delivers as promised, then JET should have not problem navigating
> your model.
>
> Paul
>
> "Kalin Nakov" <kalin.nakov@gmail.com> wrote in message
> news:ekoot3$5uq$1@utils.eclipse.org...
>> Hello,
>>
>> My application needs to generate code out of a very huge model (thousands
>> of classes). Since loading everything into memory is not an option, I
>> think Teneo will suit best. I am able to run JET transformation in Java
>> using Jet2Platform.runTransformOnResource() by specifying a XMI file, but
>> how can I run a Jet transformation on a ResourceSet object?
>>
>> I want to load the huge model from the database as a ResourceSet (through
>> EMF/JPOX resources) and then run a JET transformation.
>>
>> Thanks in advance,
>> Kalin
>
>
|
|
|
Re: How to combine Teneo with Jet? [message #64154 is a reply to message #63985] |
Fri, 08 December 2006 09:19  |
Eclipse User |
|
|
|
Kalin:
Good to hear it worked - kudo's go to Teneo for that.
To predefine variables for a JET transformation, you can pass in a map:
Map variables = new HashMap();
variables.put("org.eclipse.jet.resource.project.name", ...);
JET2Platform.runTransformOnObject("... jet id ..", res, variables, ..
progress montitor ...);
Paul
"Kalin Nakov" <kalin.nakov@gmail.com> wrote in message
news:el9sma$m2e$1@utils.eclipse.org...
> Thank you very much for the help, it works that way. One note - I just had
> to define the org.eclipse.jet.resource.project.name variable when using
> runTransformOnObject(), otherwise it throws exception for the undefined
> variable.
>
> Paul Elder wrote:
>> Kalin:
>>
>> Sorry, I didn't notice your post sooner...
>>
>> You'll have to pardon my ignorance of Teneo details, I have only scanned
>> the tutorial, but here goes...
>>
>> As you note, JET2Platform.runTransfornOnResource() works on an Eclipse
>> IResource, something you won't have if using Teneo. But all
>> JET2Platform.runTransformOnResource() does is load the EMF resource for
>> the IResource, and then pass the loaded EMF Resource off to the execution
>> engine.
>>
>> Try the following:
>>
>> 1) Load the Teneo-based resource. Here's the snippet from the Teneo/JPOX
>> tutorial:
>> String uriStr = "jpox://?" + JPOXResource.DS_NAME_PARAM + "=MyPMF";
>> final URI uri = URI.createURI(uriStr);
>> ResourceSet resourceSet = new ResourceSetImpl();
>> final Resource res =
>> resourceSet.createResource(uri);res.load(Collections.EMPTY_M AP);2) Pass
>> the loaded resource to JET2Platform.runTransformOnObject();
>>
>> JET2Platform.runTransformOnObject("...id", res, progressMonitor);
>>
>> If Teneo delivers as promised, then JET should have not problem
>> navigating your model.
>>
>> Paul
>>
>> "Kalin Nakov" <kalin.nakov@gmail.com> wrote in message
>> news:ekoot3$5uq$1@utils.eclipse.org...
>>> Hello,
>>>
>>> My application needs to generate code out of a very huge model
>>> (thousands of classes). Since loading everything into memory is not an
>>> option, I think Teneo will suit best. I am able to run JET
>>> transformation in Java using Jet2Platform.runTransformOnResource() by
>>> specifying a XMI file, but how can I run a Jet transformation on a
>>> ResourceSet object?
>>>
>>> I want to load the huge model from the database as a ResourceSet
>>> (through EMF/JPOX resources) and then run a JET transformation.
>>>
>>> Thanks in advance,
>>> Kalin
>>
|
|
|
Re: How to combine Teneo with Jet? [message #596416 is a reply to message #63409] |
Fri, 01 December 2006 05:58  |
Eclipse User |
|
|
|
Hi Kalin,
I think that this is more a Jet question then a Teneo question. I have not used Jet in this way so I
hope Paul can answer it.
gr. Martin
Kalin Nakov wrote:
> Hello,
>
> My application needs to generate code out of a very huge model
> (thousands of classes). Since loading everything into memory is not an
> option, I think Teneo will suit best. I am able to run JET
> transformation in Java using Jet2Platform.runTransformOnResource() by
> specifying a XMI file, but how can I run a Jet transformation on a
> ResourceSet object?
>
> I want to load the huge model from the database as a ResourceSet
> (through EMF/JPOX resources) and then run a JET transformation.
>
> Thanks in advance,
> Kalin
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
Re: How to combine Teneo with Jet? [message #596623 is a reply to message #63409] |
Thu, 07 December 2006 11:58  |
Eclipse User |
|
|
|
Kalin:
Sorry, I didn't notice your post sooner...
You'll have to pardon my ignorance of Teneo details, I have only scanned the
tutorial, but here goes...
As you note, JET2Platform.runTransfornOnResource() works on an Eclipse
IResource, something you won't have if using Teneo. But all
JET2Platform.runTransformOnResource() does is load the EMF resource for the
IResource, and then pass the loaded EMF Resource off to the execution
engine.
Try the following:
1) Load the Teneo-based resource. Here's the snippet from the Teneo/JPOX
tutorial:
String uriStr = "jpox://?" + JPOXResource.DS_NAME_PARAM + "=MyPMF";
final URI uri = URI.createURI(uriStr);
ResourceSet resourceSet = new ResourceSetImpl();
final Resource res =
resourceSet.createResource(uri);res.load(Collections.EMPTY_M AP);2) Pass the
loaded resource to JET2Platform.runTransformOnObject();
JET2Platform.runTransformOnObject("...id", res, progressMonitor);
If Teneo delivers as promised, then JET should have not problem navigating
your model.
Paul
"Kalin Nakov" <kalin.nakov@gmail.com> wrote in message
news:ekoot3$5uq$1@utils.eclipse.org...
> Hello,
>
> My application needs to generate code out of a very huge model (thousands
> of classes). Since loading everything into memory is not an option, I
> think Teneo will suit best. I am able to run JET transformation in Java
> using Jet2Platform.runTransformOnResource() by specifying a XMI file, but
> how can I run a Jet transformation on a ResourceSet object?
>
> I want to load the huge model from the database as a ResourceSet (through
> EMF/JPOX resources) and then run a JET transformation.
>
> Thanks in advance,
> Kalin
|
|
|
Re: How to combine Teneo with Jet? [message #596638 is a reply to message #63962] |
Thu, 07 December 2006 15:13  |
Eclipse User |
|
|
|
Originally posted by: kalin.nakov.gmail.com
Thank you very much for the help, it works that way. One note - I just
had to define the org.eclipse.jet.resource.project.name variable when
using runTransformOnObject(), otherwise it throws exception for the
undefined variable.
Paul Elder wrote:
> Kalin:
>
> Sorry, I didn't notice your post sooner...
>
> You'll have to pardon my ignorance of Teneo details, I have only scanned the
> tutorial, but here goes...
>
> As you note, JET2Platform.runTransfornOnResource() works on an Eclipse
> IResource, something you won't have if using Teneo. But all
> JET2Platform.runTransformOnResource() does is load the EMF resource for the
> IResource, and then pass the loaded EMF Resource off to the execution
> engine.
>
> Try the following:
>
> 1) Load the Teneo-based resource. Here's the snippet from the Teneo/JPOX
> tutorial:
> String uriStr = "jpox://?" + JPOXResource.DS_NAME_PARAM + "=MyPMF";
> final URI uri = URI.createURI(uriStr);
> ResourceSet resourceSet = new ResourceSetImpl();
> final Resource res =
> resourceSet.createResource(uri);res.load(Collections.EMPTY_M AP);2) Pass the
> loaded resource to JET2Platform.runTransformOnObject();
>
> JET2Platform.runTransformOnObject("...id", res, progressMonitor);
>
> If Teneo delivers as promised, then JET should have not problem navigating
> your model.
>
> Paul
>
> "Kalin Nakov" <kalin.nakov@gmail.com> wrote in message
> news:ekoot3$5uq$1@utils.eclipse.org...
>> Hello,
>>
>> My application needs to generate code out of a very huge model (thousands
>> of classes). Since loading everything into memory is not an option, I
>> think Teneo will suit best. I am able to run JET transformation in Java
>> using Jet2Platform.runTransformOnResource() by specifying a XMI file, but
>> how can I run a Jet transformation on a ResourceSet object?
>>
>> I want to load the huge model from the database as a ResourceSet (through
>> EMF/JPOX resources) and then run a JET transformation.
>>
>> Thanks in advance,
>> Kalin
>
>
|
|
|
Re: How to combine Teneo with Jet? [message #596724 is a reply to message #63985] |
Fri, 08 December 2006 09:19  |
Eclipse User |
|
|
|
Kalin:
Good to hear it worked - kudo's go to Teneo for that.
To predefine variables for a JET transformation, you can pass in a map:
Map variables = new HashMap();
variables.put("org.eclipse.jet.resource.project.name", ...);
JET2Platform.runTransformOnObject("... jet id ..", res, variables, ..
progress montitor ...);
Paul
"Kalin Nakov" <kalin.nakov@gmail.com> wrote in message
news:el9sma$m2e$1@utils.eclipse.org...
> Thank you very much for the help, it works that way. One note - I just had
> to define the org.eclipse.jet.resource.project.name variable when using
> runTransformOnObject(), otherwise it throws exception for the undefined
> variable.
>
> Paul Elder wrote:
>> Kalin:
>>
>> Sorry, I didn't notice your post sooner...
>>
>> You'll have to pardon my ignorance of Teneo details, I have only scanned
>> the tutorial, but here goes...
>>
>> As you note, JET2Platform.runTransfornOnResource() works on an Eclipse
>> IResource, something you won't have if using Teneo. But all
>> JET2Platform.runTransformOnResource() does is load the EMF resource for
>> the IResource, and then pass the loaded EMF Resource off to the execution
>> engine.
>>
>> Try the following:
>>
>> 1) Load the Teneo-based resource. Here's the snippet from the Teneo/JPOX
>> tutorial:
>> String uriStr = "jpox://?" + JPOXResource.DS_NAME_PARAM + "=MyPMF";
>> final URI uri = URI.createURI(uriStr);
>> ResourceSet resourceSet = new ResourceSetImpl();
>> final Resource res =
>> resourceSet.createResource(uri);res.load(Collections.EMPTY_M AP);2) Pass
>> the loaded resource to JET2Platform.runTransformOnObject();
>>
>> JET2Platform.runTransformOnObject("...id", res, progressMonitor);
>>
>> If Teneo delivers as promised, then JET should have not problem
>> navigating your model.
>>
>> Paul
>>
>> "Kalin Nakov" <kalin.nakov@gmail.com> wrote in message
>> news:ekoot3$5uq$1@utils.eclipse.org...
>>> Hello,
>>>
>>> My application needs to generate code out of a very huge model
>>> (thousands of classes). Since loading everything into memory is not an
>>> option, I think Teneo will suit best. I am able to run JET
>>> transformation in Java using Jet2Platform.runTransformOnResource() by
>>> specifying a XMI file, but how can I run a Jet transformation on a
>>> ResourceSet object?
>>>
>>> I want to load the huge model from the database as a ResourceSet
>>> (through EMF/JPOX resources) and then run a JET transformation.
>>>
>>> Thanks in advance,
>>> Kalin
>>
|
|
|
Goto Forum:
Current Time: Tue May 06 10:20:22 EDT 2025
Powered by FUDForum. Page generated in 0.03570 seconds
|