Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Using XSD as Metamodel
[ATL] Using XSD as Metamodel [message #869487] Thu, 03 May 2012 13:20 Go to next message
Tex Iano is currently offline Tex IanoFriend
Messages: 99
Registered: February 2012
Member
Hi,

is it possible to use an XSD as metamodel in ATL (programmatically within a Java application) or is it necessary to create an ecore from the XSD?

Regards,

Tex
Re: [ATL] Using XSD as Metamodel [message #869550 is a reply to message #869487] Thu, 03 May 2012 15:08 Go to previous messageGo to next message
Eclipse UserFriend
On 03.05.2012 15:20, Tex Iano wrote:
> is it possible to use an XSD as metamodel in ATL (programmatically
> within a Java application) or is it necessary to create an ecore from
> the XSD?

I don't know if this helps you, but you can do that with QVTo. With QVTo
you can simply load an Xsd using the XsdEcoreBuilder and pass the (then
in-memory Ecore) Model to the engine.

Regards
Marius
Re: [ATL] Using XSD as Metamodel [message #869555 is a reply to message #869550] Thu, 03 May 2012 15:23 Go to previous messageGo to next message
Tex Iano is currently offline Tex IanoFriend
Messages: 99
Registered: February 2012
Member
And can I do model to model transformations with QVTo? Is it ready for production use or still in early test phases?

I want to transform my model to UML. Here I have the Eclipse UML2. Can I use QVTo for this?

Regards,

Tex
Re: [ATL] Using XSD as Metamodel [message #869567 is a reply to message #869555] Thu, 03 May 2012 15:50 Go to previous messageGo to next message
Tex Iano is currently offline Tex IanoFriend
Messages: 99
Registered: February 2012
Member
Just did my first QVTo transformation. Man this was easy Smile Thanks

Tex
Re: [ATL] Using XSD as Metamodel [message #869582 is a reply to message #869567] Thu, 03 May 2012 16:24 Go to previous messageGo to next message
Tex Iano is currently offline Tex IanoFriend
Messages: 99
Registered: February 2012
Member
Unfortunately I am now at the same situation as before:

I have my metamodel as XSD and my instance. I want to perform the transformation from Java directly. And now the problem is: when loading the model with:

		Resource inResource = resourceSet.getResource(
				URI.createURI("samples/testfile.wsdl"), true);	


I get the error:

Exception in thread "main" java.lang.RuntimeException: Cannot create a resource for 'samples/testfile.wsdl'; a registered resource factory is needed

Ok, but how to register?


		Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("wsdl",
			???);


In order to load the XSD I can use:

 
		Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("xsd",
			new XSDResourceFactoryImpl());


But I don't have this for my Metamodel (which is wsdl in this case, but could be something more custom). Do I have to generate the Ecore, then GenModel etc.?

Regards,

Tex

QVTo status (was Re: [ATL] Using XSD as Metamodel) [message #869588 is a reply to message #869555] Thu, 03 May 2012 16:32 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

QVTo was developed by Borland and has been useable and stable for a
couple of years.

Since Borland's demise, QVTo has had limited maintenance; sufficient to
keep it in the Eclipse release train.

There are a number of parties with significant interest in QVTo so
expect observable development to pick up again in a year or so, possibly
after a minor internal API hiccough to align with and exploit Xtext and
the automated tooling for the revised UML-aligned implementation of OCL.

Today, if you like QVTo; great. If you have a problem; it's Open Source;
you can fix it or discuss the problem with others.

Contact me if you are interested in participating actively.

Regards

Ed Willink

On 03/05/2012 16:23, Tex Iano wrote:
> And can I do model to model transformations with QVTo? Is it ready for
> production use or still in early test phases?
>
> I want to transform my model to UML. Here I have the Eclipse UML2. Can
> I use QVTo for this?
>
> Regards,
>
> Tex
Previous Topic:[QVTo] Access qName local part
Next Topic:M2M is moving to MMT
Goto Forum:
  


Current Time: Fri Apr 19 20:18:30 GMT 2024

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

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

Back to the top