Package org.eclipse.ocl.ecore

Examples of org.eclipse.ocl.ecore.Constraint


    String expession = permission.getConstraint().getExpession();
    OCL<?, EClassifier, ?, ?, ?, ?, ?, ?, ?, Constraint, EClass, EObject> ocl = OCL.newInstance(EcoreEnvironmentFactory.INSTANCE);
    OCLHelper<EClassifier, ?, ?, Constraint> helper = ocl.createOCLHelper();
    helper.setContext(permission);
    try {
      Constraint constraint = helper.createInvariant(expession);
      Query<EClassifier, EClass, EObject> constraintEval = ocl.createQuery(constraint);
      return constraintEval.check(permissionInstance);
    } catch (ParserException e) {
      e.printStackTrace();
      throw new UamClientException(MessageFormat.format("Incorrect expression: {0}. {1}", expession, e.getLocalizedMessage()));
View Full Code Here

TOP

Related Classes of org.eclipse.ocl.ecore.Constraint

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.