Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [QVTo] run configuration requirements for input model
[QVTo] run configuration requirements for input model [message #433699] Thu, 30 July 2009 18:46 Go to next message
Derek Palma is currently offline Derek PalmaFriend
Messages: 141
Registered: July 2009
Senior Member
Hi,

I am trying make a simple transformation which uses my model as input and
output.

When creating the run configuration for my transformation, the QVTo
configuration dialog rejects my input model saying invalid source URI for my
input model. The input model is stored in an XMI file. It has an Ecore model
registered in the QVTo project properties metamodel mappings. The QVTo
editor has no errors for the transformation. It seems to pick up the Ecore
model correctly.

I looked at the SimpleUMLToRDB input model and it looks simiar although it
is using a diferent Ecore model. I am unable to see the effective difference
between my model and the sample unfortunately.

Any insight is appreciated.
Thanks,
Derek




Transformation:

modeltype VML uses 'http://model.virtunomic.com/vml/Instance';


transformation TestTransformation(in vml: VML, out VML);

main() {
vml.objectsOfType(VML::QVTOTest1_A)-> map aToB();
}


mapping VML::QVTOTest1_A::aToB() : VML::QVTOTest1_B {
x = self.x;
}




Model instance stored in .xmi file.

<?xml version="1.0" encoding="UTF-8"?>
<vmlinst:com_virtunomic_vml_lang_ModelRoot xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:vmlinst="http://model.virtunomic.com/vml/Instance">
<allInstances xsi:type="vmlinst:QVTOTest1_A" x="x's value">
<vmlClassDef-QVTOTest1_A
href=" ../../../runtime-EclipseApplication(1)/VMLTest/QVTOTest1.vml #//@classDefs.0 "/>
</allInstances>
<vmlClassDef-com_virtunomic_vml_lang_ModelRoot
href=" ../../../runtime-EclipseApplication(1)/VMLTest/vml/lang/Lang .vml#//@classDefs.5 "/>
</vmlinst:com_virtunomic_vml_lang_ModelRoot>
Re: [QVTo] run configuration requirements for input model [message #434686 is a reply to message #433699] Thu, 30 July 2009 20:02 Go to previous messageGo to next message
Radomil Dvorak is currently offline Radomil DvorakFriend
Messages: 249
Registered: July 2009
Senior Member
Hi Derek,

The input does not seem to be a dynamic model instance.
In case it refers to a workspace located ecore file,
there should be something like

xsi:schemaLocation="http://model.virtunomic.com/vml/Instance
vmlinst.ecore">

in the input .xmi file.

Your transformation compiles against metamodel loaded from the ecore file
that
you have registered with your QVT project.
Though logically identical, the metamodel which your xmi input model
conforms to
is distinct from the one used to compile the transformation.

Is not the metamodel installed in the platform as well? IOW, present in
the global package registry?

Regards,
/Radek


On Thu, 30 Jul 2009 20:46:00 +0200, Derek Palma <derek.palma@gmail.com>
wrote:

> Hi,
>
> I am trying make a simple transformation which uses my model as input
> and output.
>
> When creating the run configuration for my transformation, the QVTo
> configuration dialog rejects my input model saying invalid source URI
> for my input model. The input model is stored in an XMI file. It has an
> Ecore model registered in the QVTo project properties metamodel
> mappings. The QVTo editor has no errors for the transformation. It seems
> to pick up the Ecore model correctly.
>
> I looked at the SimpleUMLToRDB input model and it looks simiar although
> it is using a diferent Ecore model. I am unable to see the effective
> difference between my model and the sample unfortunately.
>
> Any insight is appreciated.
> Thanks,
> Derek
>
>
>
>
> Transformation:
>
> modeltype VML uses 'http://model.virtunomic.com/vml/Instance';
>
>
> transformation TestTransformation(in vml: VML, out VML);
>
> main() {
> vml.objectsOfType(VML::QVTOTest1_A)-> map aToB();
> }
>
>
> mapping VML::QVTOTest1_A::aToB() : VML::QVTOTest1_B {
> x = self.x;
> }
>
>
>
>
> Model instance stored in .xmi file.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <vmlinst:com_virtunomic_vml_lang_ModelRoot xmi:version="2.0"
> xmlns:xmi="http://www.omg.org/XMI"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:vmlinst="http://model.virtunomic.com/vml/Instance">
> <allInstances xsi:type="vmlinst:QVTOTest1_A" x="x's value">
> <vmlClassDef-QVTOTest1_A
> href=" ../../../runtime-EclipseApplication(1)/VMLTest/QVTOTest1.vml #//@classDefs.0 "/>
> </allInstances>
> <vmlClassDef-com_virtunomic_vml_lang_ModelRoot
> href=" ../../../runtime-EclipseApplication(1)/VMLTest/vml/lang/Lang .vml#//@classDefs.5 "/>
> </vmlinst:com_virtunomic_vml_lang_ModelRoot>
>
>
Re: [QVTo] run configuration requirements for input model [message #434892 is a reply to message #434686] Thu, 30 July 2009 20:18 Go to previous messageGo to next message
Derek Palma is currently offline Derek PalmaFriend
Messages: 141
Registered: July 2009
Senior Member
Hi Radek,

I don't have the model installed in the platform registry. I will do that
and check the effect. I was assuming that when the transformation is
executed it will use the metamodel mappings for the project is defined in.

It it correct to assume that the error I am seeing means specifically that
the model URI cannot be resolved in the input? I was trying to understand
the meaning of the message to know what to look at.

Thanks for your help!

Derek

"Radek Dvorak" <radek.dvorak@borland.com> wrote in message
news:op.uxwcpymghj1a1g@czprl-rdvorak2.emea.borl.net...
> Hi Derek,
>
> The input does not seem to be a dynamic model instance.
> In case it refers to a workspace located ecore file,
> there should be something like
>
> xsi:schemaLocation="http://model.virtunomic.com/vml/Instance
> vmlinst.ecore">
>
> in the input .xmi file.
>
> Your transformation compiles against metamodel loaded from the ecore file
> that
> you have registered with your QVT project.
> Though logically identical, the metamodel which your xmi input model
> conforms to
> is distinct from the one used to compile the transformation.
>
> Is not the metamodel installed in the platform as well? IOW, present in
> the global package registry?
>
> Regards,
> /Radek
>
>
> On Thu, 30 Jul 2009 20:46:00 +0200, Derek Palma <derek.palma@gmail.com>
> wrote:
>
>> Hi,
>>
>> I am trying make a simple transformation which uses my model as input
>> and output.
>>
>> When creating the run configuration for my transformation, the QVTo
>> configuration dialog rejects my input model saying invalid source URI
>> for my input model. The input model is stored in an XMI file. It has an
>> Ecore model registered in the QVTo project properties metamodel
>> mappings. The QVTo editor has no errors for the transformation. It seems
>> to pick up the Ecore model correctly.
>>
>> I looked at the SimpleUMLToRDB input model and it looks simiar although
>> it is using a diferent Ecore model. I am unable to see the effective
>> difference between my model and the sample unfortunately.
>>
>> Any insight is appreciated.
>> Thanks,
>> Derek
>>
>>
>>
>>
>> Transformation:
>>
>> modeltype VML uses 'http://model.virtunomic.com/vml/Instance';
>>
>>
>> transformation TestTransformation(in vml: VML, out VML);
>>
>> main() {
>> vml.objectsOfType(VML::QVTOTest1_A)-> map aToB();
>> }
>>
>>
>> mapping VML::QVTOTest1_A::aToB() : VML::QVTOTest1_B {
>> x = self.x;
>> }
>>
>>
>>
>>
>> Model instance stored in .xmi file.
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <vmlinst:com_virtunomic_vml_lang_ModelRoot xmi:version="2.0"
>> xmlns:xmi="http://www.omg.org/XMI"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xmlns:vmlinst="http://model.virtunomic.com/vml/Instance">
>> <allInstances xsi:type="vmlinst:QVTOTest1_A" x="x's value">
>> <vmlClassDef-QVTOTest1_A
>> href=" ../../../runtime-EclipseApplication(1)/VMLTest/QVTOTest1.vml #//@classDefs.0 "/>
>> </allInstances>
>> <vmlClassDef-com_virtunomic_vml_lang_ModelRoot
>> href=" ../../../runtime-EclipseApplication(1)/VMLTest/vml/lang/Lang .vml#//@classDefs.5 "/>
>> </vmlinst:com_virtunomic_vml_lang_ModelRoot>
>>
>>
>
Re: [QVTo] run configuration requirements for input model [message #435517 is a reply to message #434892] Thu, 30 July 2009 20:51 Go to previous message
Radomil Dvorak is currently offline Radomil DvorakFriend
Messages: 249
Registered: July 2009
Senior Member
> I don't have the model installed in the platform registry. I will do
> that and check the effect. I was assuming that when the transformation
> is executed it will use the metamodel mappings for the project is
> defined in.

Right, it will use the metamodel mapping. But your input model in the .xmi
file specifies only the metamodel nsURI. That is why I have pointed out
that it does not include the scheme location attribute.
It should refer to the ecore file containing the metamodel of the
given namespace uri.

You can use the "Create Dynamic Instance..." action in Ecore editor,
which is available for a class selection and see the contents.

> It it correct to assume that the error I am seeing means specifically
> that the model URI cannot be resolved in the input? I was trying to
> understand the meaning of the message to know what to look at.
>
> Thanks for your help!
>
> Derek
>
> "Radek Dvorak" <radek.dvorak@borland.com> wrote in message
> news:op.uxwcpymghj1a1g@czprl-rdvorak2.emea.borl.net...
>> Hi Derek,
>>
>> The input does not seem to be a dynamic model instance.
>> In case it refers to a workspace located ecore file,
>> there should be something like
>>
>> xsi:schemaLocation="http://model.virtunomic.com/vml/Instance
>> vmlinst.ecore">
>>
>> in the input .xmi file.
>>
>> Your transformation compiles against metamodel loaded from the ecore
>> file that
>> you have registered with your QVT project.
>> Though logically identical, the metamodel which your xmi input model
>> conforms to
>> is distinct from the one used to compile the transformation.
>>
>> Is not the metamodel installed in the platform as well? IOW, present in
>> the global package registry?
>>
>> Regards,
>> /Radek
>>
>>
>> On Thu, 30 Jul 2009 20:46:00 +0200, Derek Palma <derek.palma@gmail.com>
>> wrote:
>>
>>> Hi,
>>>
>>> I am trying make a simple transformation which uses my model as input
>>> and output.
>>>
>>> When creating the run configuration for my transformation, the QVTo
>>> configuration dialog rejects my input model saying invalid source URI
>>> for my input model. The input model is stored in an XMI file. It has
>>> an Ecore model registered in the QVTo project properties metamodel
>>> mappings. The QVTo editor has no errors for the transformation. It
>>> seems to pick up the Ecore model correctly.
>>>
>>> I looked at the SimpleUMLToRDB input model and it looks simiar
>>> although it is using a diferent Ecore model. I am unable to see the
>>> effective difference between my model and the sample unfortunately.
>>>
>>> Any insight is appreciated.
>>> Thanks,
>>> Derek
>>>
>>>
>>>
>>>
>>> Transformation:
>>>
>>> modeltype VML uses 'http://model.virtunomic.com/vml/Instance';
>>>
>>>
>>> transformation TestTransformation(in vml: VML, out VML);
>>>
>>> main() {
>>> vml.objectsOfType(VML::QVTOTest1_A)-> map aToB();
>>> }
>>>
>>>
>>> mapping VML::QVTOTest1_A::aToB() : VML::QVTOTest1_B {
>>> x = self.x;
>>> }
>>>
>>>
>>>
>>>
>>> Model instance stored in .xmi file.
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <vmlinst:com_virtunomic_vml_lang_ModelRoot xmi:version="2.0"
>>> xmlns:xmi="http://www.omg.org/XMI"
>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>> xmlns:vmlinst="http://model.virtunomic.com/vml/Instance">
>>> <allInstances xsi:type="vmlinst:QVTOTest1_A" x="x's value">
>>> <vmlClassDef-QVTOTest1_A
>>> href=" ../../../runtime-EclipseApplication(1)/VMLTest/QVTOTest1.vml #//@classDefs.0 "/>
>>> </allInstances>
>>> <vmlClassDef-com_virtunomic_vml_lang_ModelRoot
>>> href=" ../../../runtime-EclipseApplication(1)/VMLTest/vml/lang/Lang .vml#//@classDefs.5 "/>
>>> </vmlinst:com_virtunomic_vml_lang_ModelRoot>
>>>
>>>
>>
>
Previous Topic:[QVTO] Ant tasks
Next Topic:ATL:How to add Sequence of TupleType?
Goto Forum:
  


Current Time: Fri Apr 26 21:14:55 GMT 2024

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

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

Back to the top