Skip to content

atlanmod/FluidTL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FluidTL

A Fluid API for model transformation.

AtomicReference<Member> inref = new AtomicReference<Member>();
AtomicReference<Male> outref = new AtomicReference<Male>();
Member member = FamiliesFactory.eINSTANCE.createMember();
inref.set(member);

moduleBuilder.module("Families2Persons")
.create("OUT",Person.class.getPackage())
.from("IN",Family.class.getPackage())
.rule("Member2Male")
	.from(member,(EObject s)->{
		Member mem = (Member) s;
		inref.getAndSet(mem);
		return !mem.isFemale();
	})
	.to((EObject t)->{
		Member s = inref.get();
		Male male = (Male) t;
		male.setFullName(s.getFirstName() + ' ' + s.getFamilyName());
		outref.getAndSet(male);
	});
Module module = ModuleBuilder
.create(SmmPackage.eINSTANCE)
.from(JavaPackage.eINSTANCE)

Rule class2mesure = module
        .createRule("class2mesure")
        .from(JavaPackage.CLASS_DECLARATION)
        .to(SmmPackage.MEASURE)
        .bind(SmmPackage.MEASURE__NAME, "name")
---

About

Fluid API for Model Transformation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •