Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » How to set TYPE in UMl models
How to set TYPE in UMl models [message #83865] Sat, 07 June 2008 11:46
ATIF AFTAB AHMED JILANI is currently offline ATIF AFTAB AHMED JILANIFriend
Messages: 2
Registered: July 2009
Junior Member
Hi Friends
I am felling problem in assigning type to UML class diagram attribute.
Consider the example

helper def: primitiveTypeMap : Map(String, String) =
Map {
('String', ' pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#string'),
('Integer', 'pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#int'),
('Boolean',
' pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#boolea n'),
('Comment', ' pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#string')

};

lazy rule CreateAttribute{
from
de : DDMM!DataElement
to
out : CDMM!Property(
name <- de.name,
defaultValue <- new_dValue,
visibility <- #public,
type <- new_dataType
),
new_dValue:CDMM!LiteralString(
value<- de.getElementValue(de)
)
,
new_dataType : CDMM!PrimitiveType(
name <-
thisModule.primitiveTypeMap.get(de.valueSpecification.name)

)
}
Here CDMM is a UML Metamodel and i want to create a property for a class
but i cannot find a way how to assign primitive type or user define type
for property. In the above i want to create property for my each defined
data element. In XMI , if i assign type in this way then generated output
is like that.

Excerpt of Output File :

<ownedAttribute xmi:id="_yor48TIKEd226PNED25asQ" name="TelephoneNumber"
visibility="public" type="_yo1p8DIKEd226PNED25asQ">
<defaultValue xmi:type="uml:LiteralString"
xmi:id="_yor48jIKEd226PNED25asQ" value="false"/>
</ownedAttribute>

<uml:DataType xmi:id="_ymTTUzIKEd226PNED25asQ"
name=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#string"/>
<uml:DataType xmi:id="_yo1p8DIKEd226PNED25asQ"
name=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#boolea n"/>
<uml:DataType xmi:id="_ynfmIzIKEd226PNED25asQ"
name="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#int"/>


In this UML data Type produces repeatedly , can anyone help me out to
sort that issue. or any example in whihc UML model is generated from some
other model for instance table2Class etc I am a new user in ATL .
Thanks in Advance.
Previous Topic:[ATL] org.eclipse.m2m.atl.engine jar
Next Topic:[ATL, UML] How to structure output model elements
Goto Forum:
  


Current Time: Thu Apr 25 14:55:35 GMT 2024

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

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

Back to the top