Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » Handy API to execute OCL expressions from java code(how can I execute OCL queries and OCL predicates over an ecore model from code )
Handy API to execute OCL expressions from java code [message #1694965] Mon, 11 May 2015 00:55 Go to next message
Hamid Qartal is currently offline Hamid QartalFriend
Messages: 33
Registered: December 2013
Member
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 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 5583
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.
>
Previous Topic:Unregistering OclInEcore in lieu of CompleteOCL at runtime?
Next Topic:Specification of operation bodies in 'plain Java' + OCL-based constraints
Goto Forum:
  


Current Time: Sun Jan 21 12:58:04 GMT 2018

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

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