Checking if the ecore model is valid in code [message #1220594] |
Thu, 12 December 2013 11:33  |
Eclipse User |
|
|
|
For the provided ecore(meta-model) annotated with some OCL expression (e.g. by OCLInEcore) and model(instance) file, if would like to check if the model is the (valid) instance of the ecore file or not?
I would like to do so in code, so I am wondering if there is any API provided in EMF to do that.
checking model conformance (as far as I am concerned ) include two steps (which is kind of mixed in EMF):
1- checking if there is a morphism between the instance graph and meta-model graph.
2- check if the instance conforms to the OCL constraints in the meta-model.
In case the instance is not the valid instance of the meta-model, it would be better that the API returns the reason.
Thanks
Hamid
|
|
|
|
|
Re: Checking if the ecore model is valid in code [message #1220626 is a reply to message #1220624] |
Thu, 12 December 2013 13:44  |
Eclipse User |
|
|
|
Hi
The documentation is obtained by Help->Help Contents, or Googling for
"Eclipse OCL Tutorial"
In the OCL Documentation you will find tutorials.
Rgards
Ed Willink
On 12/12/2013 18:26, Hamid Gh wrote:
> can you please let me know which tutorial I should look, I could not
> find the link to the tutorial in your response.
>
> I know how to do this inside eclipse, by right click and clicking the
> validate from the pop up menu, but I don't know how to use the API
> behind that.
> Thanks
> Hamid
|
|
|
Powered by
FUDForum. Page generated in 0.21787 seconds