Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Model-to-Model Transformation » [ATL]different transformed results between ATL configuration and Java programming transformation
[ATL]different transformed results between ATL configuration and Java programming transformation [message #988850] Mon, 03 December 2012 13:04
Beatus Ding is currently offline Beatus DingFriend
Messages: 18
Registered: November 2012
Junior Member
Hi everyone,I'm transforming one ".fm model" into another ".unify" model using ATL.Nothing wrong with ATL configuration.But when I try to programming launch atl transformation with the following code.I get exactly the same result,the only differences is that the prefix is gone.How to resolve the problem?
String srcMetaURI="file:///e:/SynModel/unify.core/model/unify.ecore";
		String tgtMetaURI="file:///e:/SynModel/fm.core/model/fm.ecore";
		String srcModelURI="file:///E:/SynModel/atl/fm/generic model/new_domain.unify";
		String tgtModelURI="D:/Document/workspace_test/AGM_FM/new_domain.xml";
		String asmPath="file:///E:/SynModel/atl/fm/atl/unify2fm.asm";
		String srcMetaURI2="";
		String tgtMetaURI2="http:///featureIDE";
		register(resource(srcMetaURI, true));
		register(resource(tgtMetaURI, true));
		Resource model = resource(srcModelURI, true);
		OneInOneOutTransformation trans = new Transformations.Builder()
		.in(get(srcMetaURI2), "IN", "FM")
		.out(get(tgtMetaURI2), "OUT","UNIFY")
		EMFModel out = transform(inject(model, get(srcMetaURI2)), trans);
		try {
		} catch (IOException e) {

The result of ATL Configuration(from the graphical operation´╝ëis as follows:
<?xml version="1.0" encoding="ASCII"?>
<unify:Model xmlns:unify="" unify:type="FeatureModelType">
  <unify:entities unify:type="StructType" unify:variable="false">
  <unify:attributes unify:name="chosenLayoutAlgorithm" unify:type="String" unify:value="1"/>

The result of Java programming transformation is as follows:
<?xml version="1.0" encoding="ASCII"?>
<unify:Model xmi:version="2.0" xmlns:xmi="" xmlns:unify="" type="FeatureModelType">
  <entities type="StructType" variable="false">
  <attributes name="chosenLayoutAlgorithm" type="String" value="1"/>

Previous Topic:Behavioral features ( state machine) support
Next Topic:Ant ATL tasks command line execution
Goto Forum:

Current Time: Wed Oct 07 21:16:18 GMT 2015

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

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