Skip to main content



      Home
Home » Archived » M2M (model-to-model transformation) » [ATL] How to create non existent Class in new model
[ATL] How to create non existent Class in new model [message #7850] Mon, 15 January 2007 10:21
Eclipse UserFriend
Hello,

I want to create a new Class (Using Class2Relational Class metamodel)
without getting any information from input model. But i couldn't succeed
in that.

example rule:

rule CreateClass {
from input : Class!Class

to output : Class!Class (
name <- 'NewClass',
attr <- input.attr
)
}

But this rule creates a new class for every class in input model. How can
i create just 1 NewClass for output model?

I hope i could explain :(

Thanks.


MetaModel (Class2Relational class metamodel):

package Class {

abstract class NamedElt {
attribute name : String;
}

abstract class Classifier extends NamedElt {
}

class DataType extends Classifier {

}

class Class extends Classifier {
reference super[*] : Class; -- -: no sub reference
reference attr[*] ordered container : Attribute oppositeOf owner;
attribute isAbstract : Boolean;
}

class Attribute extends NamedElt {
attribute multiValued : Boolean;
reference type : Classifier;
reference owner : Class oppositeOf attr; -- +: opposite of attr
}
}

package PrimitiveTypes {
datatype Boolean;
datatype Integer;
datatype String;
}
Previous Topic:ATL and RSA
Next Topic:[ATL] New ATL Use Case: "Families to Persons"
Goto Forum:
  


Current Time: Sun May 11 00:51:23 EDT 2025

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

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

Back to the top