Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Model and Metamodel consistency
Model and Metamodel consistency [message #427393] Mon, 16 February 2009 16:09 Go to next message
Louis Rose is currently offline Louis RoseFriend
Messages: 440
Registered: July 2009
Location: York, United Kingdom
Senior Member
Hi all,

Where in EMF - if it all - is there code for checking the consistency of
a model against its metamodel? For example, it seems reasonable that
each object (in a model) must be an instance of some non-abstract
meta-class.

I'm trying to compile a complete list of consistency constraints for EMF
models and metamodels.

Many thanks,
Louis.

----
Louis Rose
Research Student
Department of Computer Science,
University of York,
Heslington, York, YO10 5DD, United Kingdom.
+44 1904 434762
Twitter: @louisrose
Re: Model and Metamodel consistency [message #427399 is a reply to message #427393] Mon, 16 February 2009 16:57 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Louis,

Comments below.

Louis Rose wrote:
> Hi all,
>
> Where in EMF - if it all - is there code for checking the consistency
> of a model against its metamodel? For example, it seems reasonable
> that each object (in a model) must be an instance of some non-abstract
> meta-class.
EMF objects are strongly typed. EObject.eClass() returns an object's
type. It must conform to this type and it's effectively impossible for
it not to. Diagnostician.INSTANCE can be used to validate that all the
other constraints that aren't enforced simply by type safety are respected.
>
> I'm trying to compile a complete list of consistency constraints for
> EMF models and metamodels.
Have a look at EObjectValidator for the basic consistency constraints.
>
>
> Many thanks,
> Louis.
>
> ----
> Louis Rose
> Research Student
> Department of Computer Science,
> University of York,
> Heslington, York, YO10 5DD, United Kingdom.
> +44 1904 434762
> Twitter: @louisrose


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Model and Metamodel consistency [message #427411 is a reply to message #427399] Tue, 17 February 2009 11:00 Go to previous message
Louis Rose is currently offline Louis RoseFriend
Messages: 440
Registered: July 2009
Location: York, United Kingdom
Senior Member
Hi Ed,

Ed Merks wrote:
> Louis,
>
> Comments below.
>
> Louis Rose wrote:
>> Hi all,
>>
>> Where in EMF - if it all - is there code for checking the consistency
>> of a model against its metamodel? For example, it seems reasonable
>> that each object (in a model) must be an instance of some non-abstract
>> meta-class.
> EMF objects are strongly typed. EObject.eClass() returns an object's
> type. It must conform to this type and it's effectively impossible for
> it not to. Diagnostician.INSTANCE can be used to validate that all the
> other constraints that aren't enforced simply by type safety are respected.

Of course! I hadn't fully understood that consistency is enforced due to
the strong typing of EMF objects.

>>
>> I'm trying to compile a complete list of consistency constraints for
>> EMF models and metamodels.
> Have a look at EObjectValidator for the basic consistency constraints.

Perfect, thanks. Just what I was after.

Cheers,
Louis.

----
Louis Rose
Research Student
Department of Computer Science,
University of York,
Heslington, York, YO10 5DD, United Kingdom.
+44 1904 434762
Twitter: @louisrose
Previous Topic:How to report errors during model load
Next Topic:[CDO] Transaction 2.0.0 M5 API
Goto Forum:
  


Current Time: Thu Apr 25 08:29:48 GMT 2024

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

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

Back to the top