Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [QVT] its output model is in only XMI?
[QVT] its output model is in only XMI? [message #83471] Mon, 02 June 2008 14:57 Go to next message
Eclipse UserFriend
Originally posted by: David-392.Li.MorganStanley.com

Hi All,

Some questions related to QVT?

1. The output of QVT tranformation is *only* in XMI serialization format?

2. Is there any good example showing how to use QVT? Seems there is not
much use cases as ATL.

Thanks for any suggestion/help.
Re: [QVT] its output model is in only XMI? [message #83504 is a reply to message #83471] Mon, 02 June 2008 18:27 Go to previous messageGo to next message
Radomil Dvorak is currently offline Radomil DvorakFriend
Messages: 249
Registered: July 2009
Senior Member
Hi David,

1. QVTO does not provide any special serialization format other then those
provided by EMF.
If you do have a need for a custom serialization, you can create your
own ResourceImpl which implements
specific load and save operations and register a proper resource
factory per file extension.
QVTO then writes the output in the desired format based on the uri
assigned to the output resource.

2) So far, we do not have many good examples and want to improve that ASAP.
The QVT spec itself contains some examples, however if you wanna get a
quick
high level overview of the language, I suggest you to look at
http://www.eclipse.org/m2m/qvto/doc/M2M-QVTO.pdf.
I'm about to publish Ecore2EMOF example soon, which is of reasonable
size and uses a number of QVT lang
advanced features.

Regards,
/Radek


On Mon, 02 Jun 2008 16:57:22 +0200, David <David-392.Li@MorganStanley.com>
wrote:

> Hi All,
>
> Some questions related to QVT?
>
> 1. The output of QVT tranformation is *only* in XMI serialization format?
>
> 2. Is there any good example showing how to use QVT? Seems there is not
> much use cases as ATL.
>
> Thanks for any suggestion/help.
>
>
>



--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Re: [QVT] its output model is in only XMI? [message #83518 is a reply to message #83504] Mon, 02 June 2008 19:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: David-392.Li.MorganStanley.com

Thanks Radek. Can I have further clarification?

Assume that I just want to use default serialization format (no customized
implementation as you suggested).

If I want to transform a model A which conforms to a
intermediateModel.ecore into a XSD model which conform to XSD.ecore model
(org.eclipse.xsd), in this case, what is the serialization format for the
outout XSD model? Because xsd package does not use XMI serialization
format, can I understand that I will get a xsd schema, not XMI formated
output file? If I get a xsd schema file, how can I validate that it
conforms to the XSD.ecore model?

Too many questions, because I am new to EMF and m2m/QVT.

Thanks again.
Re: [QVT] its output model is in only XMI? [message #83548 is a reply to message #83518] Tue, 03 June 2008 10:10 Go to previous messageGo to next message
Radomil Dvorak is currently offline Radomil DvorakFriend
Messages: 249
Registered: July 2009
Senior Member
Hi David,

You are right, the output will not be XMI and EMF involves exactly the =

mechanism I have decribed.
There is XSDResourceImpl with custom serialization and is applied to *.x=
sd.

The following code snippet loads a schema file into QVT transf as a XSD =
=

model.
--
modeltype XSD uses "http://www.eclipse.org/xsd/2002/XSD";

transformation FooXSD(inout inOutModel : XSD);

main() {
var schemas : Collection(XSDSchema) :=3D =

inOutModel.rootObjects()[XSDSchema];
}
--
As for validation, in case you can deserialize xsd file as a XSD model,
it conforms to XSD.ecore metamodel.
But I'm not sure this way is what you are looking for ;-).

You can also build a XSD model instance as the output of the transf and =
=

save it as
myOut.xsd.

I have just explained a bit what you can do with QVTO in this case,
so about XSD Schema and XMI specific questions I suggest you to ask in E=
MF =

newsgroup.

Regards,
/Radek



On Mon, 02 Jun 2008 21:10:00 +0200, David <David-392.Li@MorganStanley.co=
m> =

wrote:

> Thanks Radek. Can I have further clarification?
>
> Assume that I just want to use default serialization format (no =

> customized implementation as you suggested).
>
> If I want to transform a model A which conforms to a =

> intermediateModel.ecore into a XSD model which conform to XSD.ecore =

> model (org.eclipse.xsd), in this case, what is the serialization forma=
t =

> for the outout XSD model? Because xsd package does not use XMI =

> serialization format, can I understand that I will get a xsd schema, n=
ot =

> XMI formated output file? If I get a xsd schema file, how can I valida=
te =

> that it conforms to the XSD.ecore model? Too many questions, because I=
=

> am new to EMF and m2m/QVT.
>
> Thanks again.
>



-- =

Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Re: [QVT] its output model is in only XMI? [message #83563 is a reply to message #83548] Tue, 03 June 2008 11:13 Go to previous message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Radek,

I pay attention to this newsgroup has well. :-P

The XSD model support full validation of conformance to the XML Schema
specification's defined XML Schema syntax as well as all conformance to
all the constraints on schemas. Invoking XSDSchema.validate will give a
full report of any and all violations. The XSD model doesn't currently
support serialization to XMI...


Radek Dvorak wrote:
> Hi David,
>
> You are right, the output will not be XMI and EMF involves exactly the
> mechanism I have decribed.
> There is XSDResourceImpl with custom serialization and is applied to
> *.xsd.
>
> The following code snippet loads a schema file into QVT transf as a
> XSD model.
> --
> modeltype XSD uses "http://www.eclipse.org/xsd/2002/XSD";
>
> transformation FooXSD(inout inOutModel : XSD);
>
> main() {
> var schemas : Collection(XSDSchema) :=
> inOutModel.rootObjects()[XSDSchema];
> }
> --
> As for validation, in case you can deserialize xsd file as a XSD model,
> it conforms to XSD.ecore metamodel.
> But I'm not sure this way is what you are looking for ;-).
>
> You can also build a XSD model instance as the output of the transf
> and save it as
> myOut.xsd.
>
> I have just explained a bit what you can do with QVTO in this case,
> so about XSD Schema and XMI specific questions I suggest you to ask in
> EMF newsgroup.
>
> Regards,
> /Radek
>
>
>
> On Mon, 02 Jun 2008 21:10:00 +0200, David
> <David-392.Li@MorganStanley.com> wrote:
>
>> Thanks Radek. Can I have further clarification?
>>
>> Assume that I just want to use default serialization format (no
>> customized implementation as you suggested).
>>
>> If I want to transform a model A which conforms to a
>> intermediateModel.ecore into a XSD model which conform to XSD.ecore
>> model (org.eclipse.xsd), in this case, what is the serialization
>> format for the outout XSD model? Because xsd package does not use XMI
>> serialization format, can I understand that I will get a xsd schema,
>> not XMI formated output file? If I get a xsd schema file, how can I
>> validate that it conforms to the XSD.ecore model? Too many questions,
>> because I am new to EMF and m2m/QVT.
>>
>> Thanks again.
>>
>
>
>
Previous Topic:[ATL] using getters and setters of static profiles in ATL code
Next Topic:[ATL] How to output custom structured xmi file.
Goto Forum:
  


Current Time: Fri Apr 19 19:58:29 GMT 2024

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

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

Back to the top