Skip to main content



      Home
Home » Modeling » Epsilon » Re: ETL, ::= and equivalent()
Re: ETL, ::= and equivalent() [message #584961] Sun, 24 January 2010 11:07 Go to next message
Eclipse UserFriend
Re,

I'm trying to add inheritance management to the transformation :

rule ePackage2Package
transform i : ecore!EPackage
to o : doctrine!doctrine::Record::Package{
o.name = i.name;

if( i.eSuperPackage.isDefined())
{
o.superPackage ::= i.eSuperPackage;
}
if( i.eSubpackages.isDefined() )
{
for( package in i.eSubpackages )
{
o.subPackages.add( package.equivalent() );
}
}
if( i.eClassifiers.isDefined() )
{
for( class in i.eClassifiers )
{
o.records.add( class.equivalent() );
}
}
}


rule eClass2Record
transform i : ecore!EClass
to o : doctrine!doctrine::Record::Record{

if( i.ePackage.isDefined() )
{
o.package ::= i.ePackage;
}
o.name = i.name;

if( i.eSuperTypes.select(c|not c.interface).size()>0)
{
o.inheritance = doctrine!doctrine::Record::Inheritance::Inheritance.createIn stance();
o.inheritance.extending ::= i.eSuperTypes.select(c|not c.interface).first(); //line 40
}
}



But I get this error : Property 'extending' not found in object Record [name=Party, ] (/home/serard/Documents/workspaces/modeling_one/se.ecore2doc trine/src/mailto:ecore2doctrine.etl@40:26)

(from model, I deleted the doctrine!Model element to use Package instead and renamed the Record.extends to extending to avoid some more problems, but looks like it is not solving the problem -_-)

Thanks :)
Re: ETL, ::= and equivalent() [message #584974 is a reply to message #584961] Sun, 24 January 2010 12:24 Go to previous messageGo to next message
Eclipse UserFriend
Hi Stephane,

Would you mind uploading a .zip file with the current version of your
transformation/metamodels so that I can have a look?

Cheers,
Dimitris

Stéphane wrote:
> Re,
>
> I'm trying to add inheritance management to the transformation :
>
> rule ePackage2Package
> transform i : ecore!EPackage
> to o : doctrine!doctrine::Record::Package{
> o.name = i.name;
>
> if( i.eSuperPackage.isDefined())
> {
> o.superPackage ::= i.eSuperPackage;
> }
> if( i.eSubpackages.isDefined() )
> {
> for( package in i.eSubpackages )
> {
> o.subPackages.add( package.equivalent() );
> }
> }
> if( i.eClassifiers.isDefined() )
> {
> for( class in i.eClassifiers )
> {
> o.records.add( class.equivalent() );
> }
> }
> }
>
>
> rule eClass2Record
> transform i : ecore!EClass
> to o : doctrine!doctrine::Record::Record{
>
> if( i.ePackage.isDefined() )
> {
> o.package ::= i.ePackage;
> }
> o.name = i.name;
>
> if( i.eSuperTypes.select(c|not c.interface).size()>0)
> {
> o.inheritance =
> doctrine!doctrine::Record::Inheritance::Inheritance.createIn stance();
> o.inheritance.extending ::= i.eSuperTypes.select(c|not
> c.interface).first(); //line 40
> }
> }
>
>
>
> But I get this error : Property 'extending' not found in object Record
> [name=Party, ]
> (/home/serard/Documents/workspaces/modeling_one/se.ecore2doc
> trine/src/mailto:ecore2doctrine.etl@40:26)
>
> (from model, I deleted the doctrine!Model element to use Package instead
> and renamed the Record.extends to extending to avoid some more problems,
> but looks like it is not solving the problem -_-)
>
> Thanks :)
Re: ETL, ::= and equivalent() [message #584997 is a reply to message #584974] Sun, 24 January 2010 12:39 Go to previous messageGo to next message
Eclipse UserFriend
Latest here (I'll have a svn soon ^^):
http://stephaneerard.fr/modeling_one.zip

I have problems in ecore2doctrine.etl at lines
41,
68

If you have any suggestion for other things (way I code, etc), don't hesitate ;)

Thaaaanks :o)
Re: ETL, ::= and equivalent() [message #585003 is a reply to message #584997] Sun, 24 January 2010 13:10 Go to previous message
Eclipse UserFriend
Hi Stephane,

The problem was that you configured your models as "EMF Decorator
Model"s instead of plain "EMF Model"s. Not quite sure what might be
going wrong with this (another bugzilla is probably due) but
reconfiguring your models as plain EMF models solves this problem.

Below is the modified ecore2doctrine.launch

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration
type=" org.epsilon.etl.eclipse.dt.launching.EtlLaunchConfigurationD elegate ">
<listAttribute key="models">
<listEntry value="#&#13;&#10;#Sun Jan 24 18:03:38 GMT
2010&#13;&#10;isMetamodelFileBased=false&#13;&am p;#10;name=ecore&#13;&#10;readOnLoad=true&#13;&a mp;#10;storeOnDisposal=false&#13;&#10;aliases=ecore& amp;#13;&#10;metamodelUri=http\://www.eclipse.org/emf/2002/Ecore&#13 ;&#10;type=EMF&#13;&#10;modelFile=/se.eds.mm/mod el/eds.ecore&#13;&#10;expand=true&#13;&#10;m etamodelFile=&#13;&#10; "/>
<listEntry value="#&#13;&#10;#Sun Jan 24 18:03:41 GMT
2010&#13;&#10;isMetamodelFileBased=true&#13;& ;#10;name=doctrine&#13;&#10;readOnLoad=false&#13 ;&#10;storeOnDisposal=true&#13;&#10;aliases=& ;#13;&#10;metamodelUri=&#13;&#10;type=EMF&#1 3;&#10;modelFile=/se.ecore2doctrine/src/gen.xmi&#13; &#10;expand=true&#13;&#10;metamodelFile=/se.doct rine.mm/model/doctrine.ecore&#13;&#10; "/>
</listAttribute>
<stringAttribute key="source"
value="/se.ecore2doctrine/src/ecore2doctrine.etl"/>
</launchConfiguration>

Cheers,
Dimitris

Stéphane wrote:
> Latest here (I'll have a svn soon ^^):
> http://stephaneerard.fr/modeling_one.zip
>
> I have problems in ecore2doctrine.etl at lines
> 41,
> 68
>
> If you have any suggestion for other things (way I code, etc), don't
> hesitate ;)
>
> Thaaaanks :o)
Previous Topic:ETL, ::= and equivalent()
Next Topic:Problem to run basic epsilon examples
Goto Forum:
  


Current Time: Tue Jul 01 15:40:41 EDT 2025

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

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

Back to the top