Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Is there any guide book about Ecore?
Is there any guide book about Ecore? [message #424658] Fri, 31 October 2008 16:45 Go to next message
Mikai Yang is currently offline Mikai YangFriend
Messages: 149
Registered: July 2009
Senior Member
Hi there:
I am using Ecore modeling a very complicated model. So I need a
thorough understanding of Ecore. I have no idea of some Ecore
attributes. For example:
1) Can you explain the meaning of `Derived', `Econtaining class'
and `Volatile' in the property view of an Ecore attribute or reference.
In addition, what's the difference betweeen `EReferenceType' and `EType'?
2) For a EClass, what's meaning of `Default Value', 'Instance Class
Name' and 'Instance Type Name'.
The final question is how I can model association inheritance,
which means an association specializing another assocation.
Thanks.

Best regards.
Michael.
Re: Is there any guide book about Ecore? [message #424659 is a reply to message #424658] Fri, 31 October 2008 17:03 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------080300070901020900080701
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Michael,

Comments below.

Michael wrote:
> Hi there:
> I am using Ecore modeling a very complicated model. So I need a
> thorough understanding of Ecore. I have no idea of some Ecore
> attributes. For example:
> 1) Can you explain the meaning of `Derived',
A derived feature derives its value from the values of other features.
It will not be copied by EcoreUtil.copier and changes will not be
recorded by ChangeRecorder. The assumption is that the state can always
be derived from other things.
> `Econtaining class'
The class that contains/owns the feature.
> and `Volatile' in the property view of an Ecore attribute or reference.
Probably it shouldn't be in the model. It only affects the generator.
No variables will be declared and the accessor methods will all be stubs
you have to fill in yourself.
> In addition, what's the difference betweeen `EReferenceType' and `EType'?
An EReference's eType must be an EClass while an EAttributes eType must
be an EDataType; this just provides a downcasted view of the type.
> 2) For a EClass, what's meaning of `Default Value'
Most classes will have default null, but the classes for primitives will
have a value like "0" for the default, and for enums, it will be the
first enum literal.
> , 'Instance Class Name' and 'Instance Type Name'.
This represents the wrapped class or generate class. Values will be an
instance of this class. The former is the erasure of the latter. I.e.,
if the instance type name is java.util.List<java.lang.Object> the
instance class name will be java.util.List.
> The final question is how I can model association inheritance,
> which means an association specializing another assocation.
Just as in EMOF, there's no direct concept of an association in Ecore:

http://ed-merks.blogspot.com/2008/01/modeling-associations-w ith-ecore.html

> Thanks.
>
> Best regards.
> Michael.

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

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Michael,<br>
<br>
Comments below.<br>
<br>
Michael wrote:
<blockquote cite="mid:gefcnc$hen$1@build.eclipse.org" type="cite">Hi
there:
<br>
&nbsp;&nbsp;&nbsp; I am using Ecore modeling a very complicated model. So I need a
thorough understanding of Ecore.&nbsp; I have no idea of some Ecore
attributes. For example:
<br>
&nbsp;&nbsp;&nbsp; 1) Can you explain the meaning of `Derived',</blockquote>
A derived feature derives its value from the values of other features.
It will not be copied by EcoreUtil.copier and changes will not be
recorded by ChangeRecorder.&nbsp; The assumption is that the state can
always be derived from other things.<br>
<blockquote cite="mid:gefcnc$hen$1@build.eclipse.org" type="cite">
`Econtaining class' </blockquote>
The class that contains/owns the feature.<br>
<blockquote cite="mid:gefcnc$hen$1@build.eclipse.org" type="cite">and
`Volatile' in the property view of an Ecore attribute or reference.</blockquote>
Probably it shouldn't be in the model.&nbsp; It only affects the generator.&nbsp;
No variables will be declared and the accessor methods will all be
stubs you have to fill in yourself.<br>
<blockquote cite="mid:gefcnc$hen$1@build.eclipse.org" type="cite"> In
addition, what's the difference betweeen `EReferenceType' and `EType'?
<br>
</blockquote>
An EReference's eType must be an EClass while an EAttributes eType must
be an EDataType; this just provides a downcasted view of the type.<br>
<blockquote cite="mid:gefcnc$hen$1@build.eclipse.org" type="cite">&nbsp;&nbsp;&nbsp;
2) For a EClass, what's meaning of `Default Value'</blockquote>
Most classes will have default null, but the classes for primitives
will have a value like "0" for the default, and for enums, it will be
the first enum literal.<br>
<blockquote cite="mid:gefcnc$hen$1@build.eclipse.org" type="cite">,
'Instance Class Name' and 'Instance Type Name'.
<br>
</blockquote>
This represents the wrapped class or generate class.&nbsp; Values will be an
instance of this class.&nbsp; The former is the erasure of the latter.&nbsp;
I.e., if the instance type name is
java.util.List&lt;java.lang.Object&gt; the instance class name will be
java.util.List.<br>
<blockquote cite="mid:gefcnc$hen$1@build.eclipse.org" type="cite">&nbsp;&nbsp;&nbsp;
The final question is how I can model association inheritance, which
means an association specializing another assocation.
<br>
</blockquote>
Just as in EMOF, there's no direct concept of an association in Ecore:<br>
<blockquote><a
href=" http://ed-merks.blogspot.com/2008/01/modeling-associations-w ith-ecore.html"> http://ed-merks.blogspot.com/2008/01/modeling-associations-w ith-ecore.html</a><br>
</blockquote>
<blockquote cite="mid:gefcnc$hen$1@build.eclipse.org" type="cite">&nbsp;&nbsp;&nbsp;
Thanks.
<br>
<br>
Best regards.
<br>
Michael.
<br>
</blockquote>
</body>
</html>

--------------080300070901020900080701--


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:ModificationTrackingAdapter criteria doesn't use isTouch
Next Topic:Generate Schema behavior from a genmodel ?
Goto Forum:
  


Current Time: Sat Apr 20 01:12:41 GMT 2024

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

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

Back to the top