Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » createQuery() takes a considerable time?
createQuery() takes a considerable time? [message #1058271] Mon, 13 May 2013 12:28
Kosala Yapa is currently offline Kosala YapaFriend
Messages: 159
Registered: September 2010
Senior Member
Hi there,

I create a OCL query and execute that over EObject.

Sample code:
// create OCL instance for Ecore
OCL ocl = OCL.newInstance(EcoreEnvironmentFactory.INSTANCE);

// create OCL helper
OCLHelper<EClassifier, EOperation, EStructuralFeature, Constraint> helper = ocl

// set OCL context classifier
// helper.setInstanceContext(ModelPackage.Literals.DEVICE__MODULES);

// create query
OCLExpression<EClassifier> query = helper

// use the query expression parsed before to create a Query
Query eval = ocl.createQuery(query);
int result = (Integer) eval.evaluate(device);

This is working fine, but createQuery() statement takes a considerable time. Any approach to fix that issue?

Thanks in advance.

Previous Topic:OCL to validate XML models?
Next Topic:How to execute OCL constraint?
Goto Forum:

Current Time: Mon Jun 18 19:23:22 GMT 2018

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

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

Back to the top