|
|
|
|
|
|
Re: How can i define a metamodel in the properties in QVT [message #499157 is a reply to message #499133] |
Fri, 20 November 2009 03:09   |
Eclipse User |
|
|
|
Originally posted by: dvorak.radek.gmail.com
Hi Rahul,
If you mean "static input model reference" via a constant uri
in your launch configuration and need to pass an arbitrary model
using invocation in Java programmatically,
See http://wiki.eclipse.org/QVTOML/Examples/InvokeInJava
In case you talk about dynamic model type declaration, IOW
non-static nsURI in a model type declaration, it is not possible.
However, it is possible to tell QVTO what this static reference points to.
At development time via 'QVT Project/Settings/metamodel';
in InvokeInJava by passing custom EPackage.Registry to
TransformationExecutor class.
Regards,
/Radek
On Fri, 20 Nov 2009 03:46:13 +0100, Rahul Chandrashekar
<rahul.chandrashekar@in.bosch.com> wrote:
> Dear Radek,
>
> The question is something like this:
>
> In case of QVTO, the developer has to give both the input and the output
> model type, is it possible for me to load the input model type from a
> java program @ the runtime; i.e i dont want to have a static input model
> reference, but rather a dynamic model reference. i believe this is
> possible in OAW.
>
> Regds
> Rahul.
|
|
|
|
|
Re: How can i define a metamodel in the properties in QVT [message #499579 is a reply to message #499571] |
Mon, 23 November 2009 07:05  |
Eclipse User |
|
|
|
Originally posted by: dvorak.radek.gmail.com
Hi Rahul,
Yes, this is possible for the Helios release.
As I have mentioned, you can do it when invoking a QVTO transformation
programmatically.
See
org.eclipse.m2m.qvt.oml.TransformationExecutor.Transformatio nExecutor(URI,
Registry).
The package registry that you can pass to the executor will be responsible
for loading your
metamodel, IOW the executor will try to resolve the modeltype's uri within
that package registry to
a corresponding EPackage.
All is in your hands then. ;)
Not sure what OAW does, but I think this is pretty sufficient and flexible.
As for examples, it's all about loading a EPackage of your choice and
putting into
the registry under given nsURI.
Also, you seem to mix two things, metamodel resolution and loading of
input model, which
conforms to its metamodel.
We do NO conversion on input models, you can do it outside QVTO as we have
no idea about
all possible conversion that users might want.
Regards,
/Radek
On Mon, 23 Nov 2009 12:42:55 +0100, Rahul Chandrashekar
<rahul.chandrashekar@in.bosch.com> wrote:
> Hello Radek,
>
> Consider this example
>
> modeltype input "strict" uses <Java model which will be loaded
> programatically by executing java code>
> modeltype output "strict" uses 'http://www.eclipse.org/uml2/3.0.0/UML';
>
> It is something like converting input model from the java runtime to UML
> (or) any other output model.
>
> This is very much possible in OAW, can you tell me if this is possible
> in QVTO? :roll: Kindly depict with examples.
>
> Regds
> Rahul.
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.07582 seconds