Skip to main content



      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 09:12 Go to next message
Eclipse UserFriend
Hello,

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?

Regards,

Re: How to perform an OCL query with Facet? [message #1749027 is a reply to message #1748483] Thu, 01 December 2016 04:37 Go to previous message
Eclipse UserFriend
Hello,

You should take a look to the EMF Facet specific documentation from http://help.eclipse.org/, 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,

Hugo

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


Current Time: Sat May 17 07:42:53 EDT 2025

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

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

Back to the top