Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [Eugenia] Package references in generated models
[Eugenia] Package references in generated models [message #548287] Wed, 21 July 2010 10:23 Go to next message
Toñi  Reina is currently offline Toñi ReinaFriend
Messages: 209
Registered: July 2009
Senior Member
Hello,

I really don't know if this is an Eugenia question or a GMF question,
if you think it is not Eugenia, I'll post it in the gmf corresponding
newsgroup.

The problem is related to the model generated with the editor generated
with Eugenia and the subpackages uris. I have defined a metamodel
similar to the following one:
=========================================
@namespace(uri="http://uri",prefix="pfx")
@gmf(foo="bar")
package rootPackage;

@namespace(uri="http://uri.diagram",prefix="")
package diagram{

@gmf.diagram(foo="bar")
class RootClass{

val core.Process [*] processes;
}
}

@namespace(uri="http://uri.core",prefix="")
package core{

@gmf.node(label = "name")
abstract class ModelElement
{
attr String name;

}

class Process extends BuildingBlock { }

}
============================================

And I want to create models that conform to that metamodel. In order to
create the models I have used two different options:

1)Creating a Dynamic instance and using the Sample Reflective Ecore Editor.

2) Creating models with my own editor generated with Eugenia/GMF.

The problem is that models generated with option 1) are not equals to
models generated with option 2). The difference is that with option 1)
an xsi:schemaLocation property is generated linked to RootClass,
however, this property is not generated in the model generated with the
Eugenia editor.

This property is important because I'm using these models with Mofscript
M2T transformations. The model generated with the Eugenia editor doesn't
work with the transformation engine because it doesn't know the exact
location of the diagram package.

Here I have included the xmi code of a same model generated with the two
different editors (in order you can see the differences)

Model generated with the Dynamic instance Ecore Editor
<?xml version="1.0" encoding="ASCII"?>
<RootClass xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://uri.diagram"
xsi:schemaLocation="http://uri.diagram
../model/metamodel.ecore#//diagram">
<processes name="Process1"/>
<processes name="Process2"/>
</RootClass>

Model generated with my own editor generated with Eugenia/GMF
<?xml version="1.0" encoding="UTF-8"?>
<RootClass xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns="http://uri.diagram">
<processes name="Proccess1"/>
<processes name="Process2"/>
</RootClass>


My question is if there is any way of including this xsi:schemaLocation
properties y models generated by the Eugenia editor.

Thanks in advanced,

Toñi
Re: [Eugenia] Package references in generated models [message #548395 is a reply to message #548287] Wed, 21 July 2010 16:52 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Toni,

I don't think Eugenia has any control over this but I'll have a closer
look and get back to you shortly.

Cheers,
Dimitris

On 21/07/2010 11:23, Toñi Reina Quintero wrote:
> Hello,
>
> I really don't know if this is an Eugenia question or a GMF question, if
> you think it is not Eugenia, I'll post it in the gmf corresponding
> newsgroup.
>
> The problem is related to the model generated with the editor generated
> with Eugenia and the subpackages uris. I have defined a metamodel
> similar to the following one:
> =========================================
> @namespace(uri="http://uri",prefix="pfx")
> @gmf(foo="bar")
> package rootPackage;
>
> @namespace(uri="http://uri.diagram",prefix="")
> package diagram{
>
> @gmf.diagram(foo="bar")
> class RootClass{
>
> val core.Process [*] processes;
> }
> }
>
> @namespace(uri="http://uri.core",prefix="")
> package core{
>
> @gmf.node(label = "name")
> abstract class ModelElement
> {
> attr String name;
>
> }
>
> class Process extends BuildingBlock { }
>
> }
> ============================================
>
> And I want to create models that conform to that metamodel. In order to
> create the models I have used two different options:
>
> 1)Creating a Dynamic instance and using the Sample Reflective Ecore Editor.
>
> 2) Creating models with my own editor generated with Eugenia/GMF.
>
> The problem is that models generated with option 1) are not equals to
> models generated with option 2). The difference is that with option 1)
> an xsi:schemaLocation property is generated linked to RootClass,
> however, this property is not generated in the model generated with the
> Eugenia editor.
>
> This property is important because I'm using these models with Mofscript
> M2T transformations. The model generated with the Eugenia editor doesn't
> work with the transformation engine because it doesn't know the exact
> location of the diagram package.
>
> Here I have included the xmi code of a same model generated with the two
> different editors (in order you can see the differences)
>
> Model generated with the Dynamic instance Ecore Editor
> <?xml version="1.0" encoding="ASCII"?>
> <RootClass xmi:version="2.0"
> xmlns:xmi="http://www.omg.org/XMI"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns="http://uri.diagram"
> xsi:schemaLocation="http://uri.diagram
> ../model/metamodel.ecore#//diagram">
> <processes name="Process1"/>
> <processes name="Process2"/>
> </RootClass>
>
> Model generated with my own editor generated with Eugenia/GMF
> <?xml version="1.0" encoding="UTF-8"?>
> <RootClass xmi:version="2.0"
> xmlns:xmi="http://www.omg.org/XMI"
> xmlns="http://uri.diagram">
> <processes name="Proccess1"/>
> <processes name="Process2"/>
> </RootClass>
>
>
> My question is if there is any way of including this xsi:schemaLocation
> properties y models generated by the Eugenia editor.
>
> Thanks in advanced,
>
> Toñi
>
>
>
>
Re: [Eugenia] Package references in generated models [message #590805 is a reply to message #548287] Wed, 21 July 2010 16:52 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Toni,

I don't think Eugenia has any control over this but I'll have a closer
look and get back to you shortly.

Cheers,
Dimitris

On 21/07/2010 11:23, Toñi Reina Quintero wrote:
> Hello,
>
> I really don't know if this is an Eugenia question or a GMF question, if
> you think it is not Eugenia, I'll post it in the gmf corresponding
> newsgroup.
>
> The problem is related to the model generated with the editor generated
> with Eugenia and the subpackages uris. I have defined a metamodel
> similar to the following one:
> =========================================
> @namespace(uri="http://uri",prefix="pfx")
> @gmf(foo="bar")
> package rootPackage;
>
> @namespace(uri="http://uri.diagram",prefix="")
> package diagram{
>
> @gmf.diagram(foo="bar")
> class RootClass{
>
> val core.Process [*] processes;
> }
> }
>
> @namespace(uri="http://uri.core",prefix="")
> package core{
>
> @gmf.node(label = "name")
> abstract class ModelElement
> {
> attr String name;
>
> }
>
> class Process extends BuildingBlock { }
>
> }
> ============================================
>
> And I want to create models that conform to that metamodel. In order to
> create the models I have used two different options:
>
> 1)Creating a Dynamic instance and using the Sample Reflective Ecore Editor.
>
> 2) Creating models with my own editor generated with Eugenia/GMF.
>
> The problem is that models generated with option 1) are not equals to
> models generated with option 2). The difference is that with option 1)
> an xsi:schemaLocation property is generated linked to RootClass,
> however, this property is not generated in the model generated with the
> Eugenia editor.
>
> This property is important because I'm using these models with Mofscript
> M2T transformations. The model generated with the Eugenia editor doesn't
> work with the transformation engine because it doesn't know the exact
> location of the diagram package.
>
> Here I have included the xmi code of a same model generated with the two
> different editors (in order you can see the differences)
>
> Model generated with the Dynamic instance Ecore Editor
> <?xml version="1.0" encoding="ASCII"?>
> <RootClass xmi:version="2.0"
> xmlns:xmi="http://www.omg.org/XMI"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns="http://uri.diagram"
> xsi:schemaLocation="http://uri.diagram
> ../model/metamodel.ecore#//diagram">
> <processes name="Process1"/>
> <processes name="Process2"/>
> </RootClass>
>
> Model generated with my own editor generated with Eugenia/GMF
> <?xml version="1.0" encoding="UTF-8"?>
> <RootClass xmi:version="2.0"
> xmlns:xmi="http://www.omg.org/XMI"
> xmlns="http://uri.diagram">
> <processes name="Proccess1"/>
> <processes name="Process2"/>
> </RootClass>
>
>
> My question is if there is any way of including this xsi:schemaLocation
> properties y models generated by the Eugenia editor.
>
> Thanks in advanced,
>
> Toñi
>
>
>
>
Previous Topic:[ETL] parameterised equivalent("rule")
Next Topic:[Eugenia] Drawing blocks with predefined inputs and outputs
Goto Forum:
  


Current Time: Fri Apr 19 18:32:13 GMT 2024

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

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

Back to the top