[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.m2m] [ATL] How to output custom structured xmi file.

Hello Everyone,

I have an ATL code that i use to get the required information from the UML Model. But i want to output this data in a specifically organized xmi format. Is it possible to create such multiple hierarchies at the output xmi.

Currently, using the ATL i can do it for two layers but what for multiple layers.I have tried this code:

rule processor {
  from s :UML2!Component(s.isStereotypeApplied('HwProcessor')    )
  to     t : MYUML!component (    name<-s.name,

busInterfaces<-ibusIf,
model<-imodel,
cpus<-icpus ), ibusIf : MYUML!busInterface,
imodel : MYUML!model (ports<-prt),
icpus : MYUML!cpus (cpu<-icpu),
prt : MYUML!logicalPort(name<-prt.name),
icpu : MYUML!cpu (name<-s.name)
}


Here i try to create the component object and in it, i create the name,busInterface,model and cpus. But when I want to extend this hierarchy, I mean i create ports in the model and cpu in the cpus, it actually creates them outside the processor main component.

I wanted to have multiple hierarchies. Any help is really appreciating.

Thanks alot,

-aamir-