Handy API to execute OCL expressions from java code [message #1694965] |
Mon, 11 May 2015 00:55 |
|
Hi,
I would like to execute OCL queries and predicates from code. The context is that I have a metamodel, say myMetamodel.ecore, I have a model, say myModel.xmi, and I have a list of OCL constraints and queries defined over myMetamodel.ecore.
I would like to:
1) execute OCL constraints over myModel.xmi, and check if each constraint is valid (i.e., returns True) or not.
2) execute OCL queries over myModel.xmi and get the results of the queries.
My question:
1) what is the community suggestion for performing above tasks: using eclipse OCL API or other APIs like Dresden OCL (note that my metamodel files are in ecore format)
2) Which libraries (i.e. jar files), should I add to my project to be able to access Eclipse OCL and where can I get them.
3) Does any sample code (or tutorial) exist on the net that can be used as a starting point for doing above tasks.
4) where can I read and understand the concepts behind Eclipse OCL implementation in terms of its Interfaces and Classes ( I mean the implementation of OCL, and not the OCL language itself).
I really appreciate the community support.
[Updated on: Mon, 11 May 2015 00:59] Report message to a moderator
|
|
|
Re: Handy API to execute OCL expressions from java code [message #1694968 is a reply to message #1694965] |
Mon, 11 May 2015 05:23 |
Ed Willink Messages: 7655 Registered: July 2009 |
Senior Member |
|
|
Hi
You should find answers to most of your questions in the Eclipse OCL
Documentation.
http://help.eclipse.org/luna/index.jsp?topic=%2Forg.eclipse.ocl.doc
There is no standardisation at the API level.
Eclipse OCL vaidation is integrated with standard EMF usage so you can
valoidate in the EMF-based editors. A Validity View provides finer
granied visulaization and entry to a debugger.
Regards
Ed Willink
On 11/05/2015 01:55, Hamid Qartal wrote:
> Hi,
>
> I would like to execute OCL queries and predicates from code. The
> context is that I have a metamodel, say myMetamodel.ecore, I have a
> model, say myModel.xmi, and I have a list of OCL constraints and queries
> defined over myMetamodel.ecore.
>
> I would like to:
> 1) execute OCL constraints over myModel.xmi, and check if each
> constraint is valid (i.e., returns True) or not.
>
> 2) execute OCL queries over myModel.xmi and get the results of the
> queries.
>
> My question:
> 1) what is the community suggestion for the doing above tasks: using
> eclipse OCL API or other APIs like Dresden OCL (note that my metamodel
> files are in ecore format)
>
> 2) Which libraries (i.e. jar file), should I add to my project to be
> able to access Eclipse OCL and where can I get them.
>
> 3) Is there any sample code (or tutorial) exists on the net to be used
> as starting point for doing above tasks.
>
> 4) where can I read and understand the concepts behind Eclipse OCL
> implementation n terms of the interfaces and Classes ( I mean the
> implementation not the OCL language itself)
>
> I really appreciate the community support.
>
|
|
|
Powered by
FUDForum. Page generated in 0.02222 seconds