Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Referencing DataTypes-library elements.
[ATL] Referencing DataTypes-library elements. [message #96061] Tue, 25 November 2008 15:39
Juan Pedro Silva is currently offline Juan Pedro SilvaFriend
Messages: 258
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------060009080309010406080405
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi everybody.
I'm trying to use XSDDataTypes (which is the name RSA calles it's XML
types libraries).
I've been reading all documentation and related newsgroup posts, and
what I understood so far is that I should declare the
XSDDataTypes.library.uml as an input model of UML2 type.
However, my problem is I don't know how to reference the elements in
this library.

For instance, I want to check if an attribute type is from one of the
types in XSDDataTypes

--@atlcompiler atl2006
module UML2iBuilder; -- Module Template
create OUT : iBuilderMM from IN : UML2, XSD_DT : UML2;

helper context UML2!Attribute def: isXMLPrimitive() : Boolean =
self.type.oclIsKindOf(*UML2!XSDDataTypes:anyType*);

This doesn't compile. I cannot use XSDDataTypes!anyType either because I
get a /"cannot find model XSDDataTypes"/ error message (because it is a
UML model input). I also tried other alternatives using doule and single
quotes with no better luck.
The references within the UML input file are in the form:

<type xmi:type="uml:Class"
href="XSDDataTypes.library.uml#_vAis0Lr5Ed2qAb2t1I4HXQ"/>

So I thought of checking for UML2!Class but I don't know which is the
condition to apply in such a match rule to only get the instances of
XSDDataTypes.
Can anyone help me with this?.
Thank you all.
Regards,
Juan Pedro

--------------060009080309010406080405
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi everybody.<br>
I'm trying to use XSDDataTypes (which is the name RSA calles it's XML
types libraries).<br>
I've been reading all documentation and related newsgroup posts, and
what I understood so far is that I should declare the
XSDDataTypes.library.uml as an input model of UML2 type.<br>
However, my problem is I don't know how to reference the elements in
this library.<br>
<br>
For instance, I want to check if an attribute type is from one of the
types in XSDDataTypes<br>
<br>
<font color="#3366ff">--@atlcompiler atl2006 <br>
module UML2iBuilder; -- Module Template<br>
create OUT : iBuilderMM from IN : UML2, XSD_DT : UML2;<br>
<br>
helper context UML2!Attribute def: isXMLPrimitive() : Boolean =
self.type.oclIsKindOf(<b>UML2!XSDDataTypes:anyType</b>); <br>
<br>
<font color="#000000">This doesn't compile. I cannot use
XSDDataTypes!anyType either because I get a&nbsp; <i>"cannot find model
XSDDataTypes"</i> error message (because it is a UML model input). I
also tried other alternatives using doule and single quotes with no
better luck.<br>
The references within the UML input file are in the form:<br>
<br>
<font color="#3366ff">&lt;type xmi:type="uml:Class"
href="XSDDataTypes.library.uml#_vAis0Lr5Ed2qAb2t1I4HXQ"/&gt; </font><br>
<br>
So I thought of checking for UML2!Class but I don't know which is the
condition to apply in such a match rule to only get the instances of
XSDDataTypes.<br>
Can anyone help me with this?.<br>
Thank you all.<br>
Regards,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; Juan Pedro<br>
</font></font>
</body>
</html>

--------------060009080309010406080405--
Previous Topic:[ATL] How "getAppliedStereotypes()" operation works with ATL
Next Topic:[ATL] Problem when copying association
Goto Forum:
  


Current Time: Mon Sep 23 15:12:40 GMT 2024

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

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

Back to the top