Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » MoDisco » How to perform an OCL query with Facet?(OCL query)
How to perform an OCL query with Facet? [message #1748483] Wed, 23 November 2016 14:12 Go to next message
Daniel San Martín is currently offline Daniel San MartínFriend
Messages: 44
Registered: October 2012

I used to use QuerySet to perform my OCL query. But now I see that the API is deprecated.

Deprecated code:

ModelQuerySetCatalog catalog = ModelQuerySetCatalog.getSingleton(); 
               //Get querySet
		ModelQuerySet modelQuerySet = catalog.getModelQuerySet("Query");
               //Call OCL query
		ModelQuery modelQuery = modelQuerySet.getQuery("getClasses");
		AbstractModelQuery myModelQuery = catalog.getModelQueryImpl(modelQuery);
               //Run the query
		ModelQueryResult result = myModelQuery.evaluate(context);
		if (result.getException() != null)
			throw new Exception();

How do I perform the above with the new way, by using Facet?


Re: How to perform an OCL query with Facet? [message #1749027 is a reply to message #1748483] Thu, 01 December 2016 09:37 Go to previous message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member

You should take a look to the EMF Facet specific documentation from, and not to the Facet/Query information from the MoDisco documentation.
The former provides all the information relating to the latest implementation that has now been externalized as the EMF Facet project.
Currently this implementation only supports Java queries, but a proper OCL support can be added via the use of the corresponding extension point offered by EMF Facet.

Kind regards,


Previous Topic:JEE WebApp Metamodel No documentation !!!!
Next Topic:Return in methods
Goto Forum:

Current Time: Sat Dec 05 14:18:54 GMT 2020

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

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

Back to the top