|
|
|
Re: [ATL] Using XSD->EMF metamodel in ATL [message #491712 is a reply to message #491676] |
Thu, 15 October 2009 14:30 |
William Piers Messages: 303 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
--------------050909080201040100030909
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Hello,
AT this time, ATL launch configuration cannot parametrize that. The
factory is automatically detected by the file extension. Then if your
xsd doesn't specify one, and you use default ".xml", you need to
programmatically set the option.
This consists on loading the models, initializing the output model using
that method:
org.eclipse.m2m.atl.core.emf.EMFModel.setEmfResourceFactory( Factory)
using the correct EMF factory.
The finally launch the transformation.
Here you can find an example of programmatic launch:
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.m2m/org .eclipse.m2m.atl/examples/org.eclipse.m2m.atl.examples.publi c2private.ui/src/org/eclipse/m2m/atl/examples/public2private /ui/PrivatizeAction.java?root=Modeling_Project&view=mark up
Also available when ATL is installe, just do :
New > Example...> ATL > Public to private
In the next ATL version (3.1, release next June), it will be possible to
specify content types (so, related factory) for model saving.
Best regards,
William
Marin Orlić a écrit :
>> I'd expect this if you used an XMIResourceImpl to serialize the
>> instance, rather than an XMLResourceImpl configured like the one in your
>> generated XyzResourceFactoryImpl.
>
> Now that you said it, it makes perfect sense :)
> I'm running the ATL from Eclipse, is there a way to set the serializer
> to the EMF-specific VN or the regular VM, I don't see such options..
> Is it only possible from ANT or Java? There are samples like Table2HTML
> that specify the XML extractor in build.xml.
>
> M.
--
Ne manquez pas notre prochaine formation ATL inter entreprises:
ATL - Paris - du 2 au 3 Décembre 2009
Pour plus de dates et pour le détail de cette formation:
http://www.obeo.fr/pages/formations/fr
Don't forget our next ATL training:
ATL - Paris - 2009 December from 2th to 3th
More dates and training program on:
http://www.obeo.fr/pages/formations/fr
--------------050909080201040100030909
Content-Type: text/x-vcard; charset=utf-8;
name="william_piers.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="william_piers.vcf"
YmVnaW46dmNhcmQNCmZuOldpbGxpYW0gUGllcnMNCm46UGllcnM7V2lsbGlh bQ0Kb3JnOk9i
ZW8NCmFkcjoyIHJ1ZSBSb2JlcnQgU2NodW1hbm47O2xvdCAyNDtOQU5URVM7 OzQ0NDA4O0Zy
YW5jZQ0KZW1haWw7aW50ZXJuZXQ6d2lsbGlhbS5waWVyc0BvYmVvLmZyDQp0 aXRsZTpNREEg
Q29uc3VsdGFudA0KdGVsO3dvcms6KzMzICgwKTIgNTEgMTMgNTAgNTMNCnVy bDpodHRwOi8v
d3d3Lm9iZW8uZnINCnZlcnNpb246Mi4xDQplbmQ6dmNhcmQNCg0K
--------------050909080201040100030909--
|
|
|
|
Powered by
FUDForum. Page generated in 0.03940 seconds