Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsNmodels2Nmodels transformation [qvto]
https://www.eclipse.org/forums/index.php/mv/msg/321005/834315/#msg_834315
I want to perform an in-place qvto transformation on two input models where the transformation copy some elements from one model to the other. what is the best way to do that, tnx a million ]]>sohaib soso2012-04-01T19:32:41-00:00Re: Nmodels2Nmodels transformation [qvto]
https://www.eclipse.org/forums/index.php/mv/msg/321005/834752/#msg_834752
QVTo has the ability to define inout models, so I guess that you could
define two inout models.
I've never understood the basic semantics of even one inout, so I cannot
advise on how best to do two.
Regards
Ed Willink
On 01/04/2012 20:32, sohaib soso wrote:
> Hello everybody,
>
> I want to perform an in-place qvto transformation on two input models
> where the transformation copy some elements from one model to the
> other. what is the best way to do that, tnx a million :d]]>Ed Willink2012-04-02T10:55:05-00:00Re: Nmodels2Nmodels transformation [qvto]
https://www.eclipse.org/forums/index.php/mv/msg/321005/834886/#msg_834886
I tried several in-place transformations but the challange here is "how to copy a set of input model elements to the other input model".Tnx anyway Edward.]]>sohaib soso2012-04-02T14:20:48-00:00Re: Nmodels2Nmodels transformation [qvto]
https://www.eclipse.org/forums/index.php/mv/msg/321005/834970/#msg_834970
some pre-processing in EMF using the EcoreUtil.Copier. Otherwise
you'll need to implement a mapping for each class you want to copy with
the input/output as the same type, e.g.:
If you just want a copy of some or all of the input elements it may be
simpler to build a set and pass it to a blackbox and let it make the
copies then pass them back. Alternatively if you know in advance build
the copies in Java code and pass them as an additional inout.
You need to make it inout if you're going to add any elements, when a
parameter is 'in' it will throw an exception if you try and add an
object to it.
Alan
On 2012-04-02 14:20:48 +0000, sohaib soso said:
> hi,
>
> I tried several in-place transformations but the challange here is "how
> to copy a set of input model elements to the other input model".Tnx
> anyway Edward.]]>Alan McMorran2012-04-02T16:16:33-00:00Re: Nmodels2Nmodels transformation [qvto]
https://www.eclipse.org/forums/index.php/mv/msg/321005/835046/#msg_835046
I will try the blackbox operation, by the way, beside the "Meta Object Facility (MOF) 2.0 Query/View/Transformation Specification" of OMG and the "QVT - Operational Mappings : Modellierung mit der Query Views Transformation" ebook, is there any qvt tutorial or books that you advice?.]]>sohaib soso2012-04-02T18:24:23-00:00Re: Nmodels2Nmodels transformation [qvto]
https://www.eclipse.org/forums/index.php/mv/msg/321005/835063/#msg_835063
> hi Alan,
> I will try the blackbox operation, by the way, beside the "Meta Object
> Facility (MOF) 2.0 Query/View/Transformation Specification" of OMG and
> the "QVT - Operational Mappings : Modellierung mit der Query Views
> Transformation" ebook, is there any qvt tutorial or books that you
> advice?.
Hi
I find the QVTo Simple UML to RDB example helpful.
[The lack of an ability to define a mapping as a potentially modified
copy is a limitation in all three QVT languages and a number of other
transformation langues as well.]
Regards
Ed Willink]]>Ed Willink2012-04-02T18:46:15-00:00Re: Nmodels2Nmodels transformation [qvto]
https://www.eclipse.org/forums/index.php/mv/msg/321005/835228/#msg_835228
sohaib soso2012-04-03T00:17:21-00:00Re: Nmodels2Nmodels transformation [qvto]
https://www.eclipse.org/forums/index.php/mv/msg/321005/838414/#msg_838414
about ocl. If one has two elements A and B when A.oclistypeof(type) and type is the same ocltype of B, but obviously A<>B. how to compare A and B according to their type such that A=B is true (e.g. A.type=B.type)? ]]>sohaib soso2012-04-07T02:33:10-00:00Re: Nmodels2Nmodels transformation [qvto]
https://www.eclipse.org/forums/index.php/mv/msg/321005/838500/#msg_838500
The OCL newsgroup is for OCL questions.
In principle it's
a,oclType() = b.oclType()
which is supported by the new -pivot-based OCL.
Earlier OCL's may support eClass() rather than oclType().
Regards
Ed Willink
On 07/04/2012 03:33, sohaib soso wrote:
> hello again,this time Im gonna ask a quick noob question :blush:
> about ocl. If one has two elements A and B when A.oclistypeof(type)
> and type is the same ocltype of B, but obviously A<>B. how to compare
> A and B according to their type such that A=B is true (e.g.
> A.type=B.type)?]]>Ed Willink2012-04-07T06:00:03-00:00Re: Nmodels2Nmodels transformation [qvto]
https://www.eclipse.org/forums/index.php/mv/msg/321005/838613/#msg_838613
> The OCL newsgroup is for OCL questions.
yes you're right
> In principle it's
> a,oclType() = b.oclType()
I tried this but it's not suported and that's why I came here.I'm using eclipse indigo and ocl 3.1.0.
> which is supported by the new -pivot-based OCL.
> Earlier OCL's may support eClass() rather than oclType().
even eClass() didn't work.
tnx ED
Regards
Sohaib]]>sohaib soso2012-04-07T10:27:27-00:00Re: Nmodels2Nmodels transformation [qvto]
https://www.eclipse.org/forums/index.php/mv/msg/321005/838627/#msg_838627
eClass() used to work in Helios, but an EMF change, arguably a bug fix,
made EObject methods invisible.
If your environment allows you to write Java you can set the
implicitRootClass option. Otherwise you can write a Java bloack box to
do eClass() for you.
Regards
Ed Willink
On 07/04/2012 11:27, sohaib soso wrote:
> Hi,
>
>> The OCL newsgroup is for OCL questions.
>
> yes you're right
>
>> In principle it's
>
>> a,oclType() = b.oclType()
>
> I tried this but it's not suported and that's why I came here.I'm
> using eclipse indigo and ocl 3.1.0.
>
>> which is supported by the new -pivot-based OCL.
>> Earlier OCL's may support eClass() rather than oclType().
>
> even eClass() didn't work.
> tnx ED
>
> Regards
>
> Sohaib]]>Ed Willink2012-04-07T10:53:46-00:00Re: Nmodels2Nmodels transformation [qvto]
https://www.eclipse.org/forums/index.php/mv/msg/321005/838655/#msg_838655
First make sure you've imported the Ecore metamodel:
modeltype ECORE "strict" uses 'http://www.eclipse.org/emf/2002/Ecore';
And this can be thus be called on your A and B objects as:
A.equalsType(B)
This is a bit of a hack but seems to work and doesn't require a
blackbox (and I use something similar for checking isSet on EAttributes
of primitive types)
Alan
On 2012-04-07 10:53:46 +0000, Ed Willink said:
> Hi
>
> eClass() used to work in Helios, but an EMF change, arguably a bug fix,
> made EObject methods invisible.
>
> See
> http://wiki.eclipse.org/MDT/OCL/FAQ#How_do_I_invoke_methods_such_as_eContainer.28.29.2C_eContents.28.29.2C_eGet.28.29.3F
>
>
> If your environment allows you to write Java you can set the
> implicitRootClass option. Otherwise you can write a Java bloack box to
> do eClass() for you.
>
> Regards
>
> Ed Willink
>
> On 07/04/2012 11:27, sohaib soso wrote:
>> Hi,
>>
>>> The OCL newsgroup is for OCL questions.
>>
>> yes you're right
>>
>>> In principle it's
>>
>>> a,oclType() = b.oclType()
>>
>> I tried this but it's not suported and that's why I came here.I'm using
>> eclipse indigo and ocl 3.1.0.
>>
>>> which is supported by the new -pivot-based OCL.
>>> Earlier OCL's may support eClass() rather than oclType().
>>
>> even eClass() didn't work.
>> tnx ED
>>
>> Regards
>>
>> Sohaib]]>Alan McMorran2012-04-07T11:51:48-00:00Re: Nmodels2Nmodels transformation [qvto]
https://www.eclipse.org/forums/index.php/mv/msg/321005/838707/#msg_838707
I just wanna say: "you are a hero"