Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Extended Models(EReference restrictions)
Extended Models [message #760857] Mon, 05 December 2011 13:17 Go to next message
Tim Cook is currently offline Tim CookFriend
Messages: 10
Registered: June 2011
Junior Member
I have a base model where EReferences are assigned (often to abstract classes). Now I want to create extended models and further restrict the EReferences. Maybe I am not using EMF correctly? I am not a Java developer and in fact this cannot be tied to "just" Java. It should be expressible in XML Schema as well as other OO languages.

A developer on IRC suggested using validators but my thought there is that it is restricted to Java. ????

We plan to use Acceleo to generate the artifacts for XML Schema, Python, etc.

I have a crude drawing and explanation also posted here:
http://mlhim.org/implementation-platforms/EMF%20Inheritance%20Issue.pdf/view

Thanks in advance for any help.

--Tim
Re: Extended Models [message #760868 is a reply to message #760857] Mon, 05 December 2011 13:41 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Tim,

Comments below.

On 05/12/2011 5:17 AM, Tim Cook wrote:
> I have a base model where EReferences are assigned (often to abstract
> classes). Now I want to create extended models and further restrict
> the EReferences.
Extend and restrict are kind of opposite things...
> Maybe I am not using EMF correctly? I am not a Java developer and
> in fact this cannot be tied to "just" Java. It should be expressible
> in XML Schema as well as other OO languages.
OO too is primarily about adding things, not restricting away existing
things.
> A developer on IRC suggested using validators but my thought there is
> that it is restricted to Java. ????
Not sure what you mean by restricted to Java; you mean the expression of
the validation logic?
>
> We plan to use Acceleo to generate the artifacts for XML Schema,
> Python, etc.
> I have a crude drawing and explanation also posted here:
> http://mlhim.org/implementation-platforms/EMF%20Inheritance%20Issue.pdf/view
>
In Java, if a base class has List<B> getBBB() it's not possible for a
derived class to override this with List<C> getBBB() even if C extends
B. So, in general, narrowing the type of a feature is not something
expressible in Java and it's not supported by Ecore.
>
> Thanks in advance for any help.
>
> --Tim


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Extended Models [message #760888 is a reply to message #760868] Mon, 05 December 2011 14:15 Go to previous message
Tim Cook is currently offline Tim CookFriend
Messages: 10
Registered: June 2011
Junior Member
Thanks so much for your prompt reply.

--Tim

Previous Topic:Deferring Notifications of a Compound Command
Next Topic:EMF Visual Editor is missing
Goto Forum:
  


Current Time: Thu Apr 25 09:25:51 GMT 2024

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

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

Back to the top