java - Model OCL evaluation vs Object evaluation -
i need check if model fires 1 or more ocl constraints. models stored in xmi, loaded emf. ocl constraints generated automatically (string or like).
i found way check constraint on eobject
helper.setcontext(ecclass); query = helper.createquery(expression); object o = ocl.check(eo, invariant);
o contains result : true or false.
do have check every object of model 'by hand' or there way, method or class make directly (and more efficiently) ?
note : - no modelling information hard-coded : metamodels, models , ocl manipulated in generic way, - work on standalone soft : jars added specifically. i've tried use dresdenocl, don't know why registering of packages troublesome.
depending on requirements (when , check objects) may try use notifications and/or add logic own eobject implementation extending emf eobject.
Comments
Post a Comment