Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [QVTO] QvtoTransformationHelper executeTransformation using generated java objects([QVTO] QvtoTransformationHelper executeTransformation using generated java objects)
[QVTO] QvtoTransformationHelper executeTransformation using generated java objects [message #493698] Tue, 27 October 2009 15:29 Go to next message
Sean Muir is currently offline Sean MuirFriend
Messages: 7
Registered: July 2009
Junior Member
I am attempting to run the QvtoTransformationHelper.executeTransformation using emf generated java classes.

The qvto is


inModel.rootObjects()->forEach(rox)
{
log("rox "+rox.repr());
}

I receive the following log when i run the script using the interpreter
rox org.eclipse.emf.ecore.impl.DynamicEObjectImpl@76f076f0 (eClass: org.eclipse.emf.ecore.impl.EClassImpl@4d934d93 (name: Qvt) (instanceClassName: null) (abstract: false, interface: false))

and i receive the following log when i run it through a junit test.
rox qvt.impl.QvtImpl@1a9c1a9c (qvtname: name is set from java)

The problem is the following mapping is not found.

mapping qvt::Qvt::toEDI()

and i can not seem to create a qvt::QvtImpl mapping

Is it possible to use generated java to populate the inobjects on executeTransformation?
and if so - are there specific emf generation properties that need to be set (I tried a few variations but was not successful)?


Thanks

Sean


Re: [QVTO] QvtoTransformationHelper executeTransformation using generated java objects [message #493842 is a reply to message #493698] Wed, 28 October 2009 09:28 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dvorak.radek.gmail.com

Hi Sean,

I recommend to use 'org.eclipse.m2m.qvt.oml.TransformationExecutor',
the new transformation API.
Just a hint, beware that your generated java model gets published into
the global package registry only when launched in another Eclipse instance.
Also, your input model must reference correct EClasses, it does not seem
to be in your case.

Your QVTO snippet does involve any mapping yet.
Sure, you can use generated Java model to populate <inobjects>.

We do not require any specific settings for model generation,
a good start would be to validate your ecore model before you generate it.

Regards,
/Radek


On Tue, 27 Oct 2009 16:29:52 +0100, Sean Muir <sean.w.muir@gmail.com>
wrote:

> I am attempting to run the
> QvtoTransformationHelper.executeTransformation using emf generated java
> classes. The qvto is
>
>
> inModel.rootObjects()->forEach(rox)
> {
> log("rox "+rox.repr());
> }
>
> I receive the following log when i run the script using the interpreter
> rox mailto:org.eclipse.emf.ecore.impl.DynamicEObjectImpl@76f076f0
> (eClass: mailto:org.eclipse.emf.ecore.impl.EClassImpl@4d934d93 (name:
> Qvt) (instanceClassName: null) (abstract: false, interface: false))
>
> and i receive the following log when i run it through a junit test.
> rox mailto:qvt.impl.QvtImpl@1a9c1a9c (qvtname: name is set from java)
>
> The problem is the following mapping is not found. mapping
> qvt::Qvt::toEDI() and i can not seem to create a qvt::QvtImpl mapping
>
> Is it possible to use generated java to populate the inobjects on
> executeTransformation?
> and if so - are there specific emf generation properties that need to be
> set (I tried a few variations but was not successful)?
>
>
> Thanks
>
> Sean
>
>
>
Re: [QVTO] QvtoTransformationHelper executeTransformation using generated java objects [message #493904 is a reply to message #493842] Wed, 28 October 2009 13:04 Go to previous message
Sean Muir is currently offline Sean MuirFriend
Messages: 7
Registered: July 2009
Junior Member
Thank you for the response - I changed to the TransformationExecutor but your comment on the package getting registered was the key to my error
the generated namespace was not in synch with the transformation code but I also had org.eclipse.emf.ecore.dynamic_package defined in the plugin.xml so the transformation ran

works like a champ

thanks again

Sean
Previous Topic:EDataType
Next Topic:[QVTO] Running my first QVTO Transformation produces empty model, but why?
Goto Forum:
  


Current Time: Tue Apr 23 14:46:29 GMT 2024

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

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

Back to the top