org.eclipse.ocl.examples.xtext.completeocl.validation
Class CompleteOCLConstraintProvider

java.lang.Object
  extended by org.eclipse.emf.validation.service.AbstractConstraintProvider
      extended by org.eclipse.emf.validation.xml.XmlConstraintProvider
          extended by org.eclipse.ocl.examples.pivot.validation.LoadableConstraintProvider
              extended by org.eclipse.ocl.examples.xtext.completeocl.validation.CompleteOCLConstraintProvider
All Implemented Interfaces:
org.eclipse.core.runtime.IExecutableExtension, org.eclipse.emf.validation.service.IModelConstraintProvider

public class CompleteOCLConstraintProvider
extends LoadableConstraintProvider

A CompleteOCLConstraintParser supports registration and lazy resolution of the constraints defined in a Complete OCL document for use with the EMF.Validation framework.

Since the ConstraintProvider is not extensible, it is necessary to provide support using a ConstraintParser for the CompleteOCL language.

The redirection to e.g Loans.ocl should be defined as:

Constraints determined by parsing Loans.ocl Placeholder for the actual constraints in Loans.ocl. The actual constraints are lazily loaded by the first validation run that uses them. No message

and a binding to a client context as:

and a lazy constraint creation as:


Constructor Summary
CompleteOCLConstraintProvider()
           
 
Method Summary
protected  boolean load(MetaModelManager metaModelManager, org.eclipse.emf.common.util.URI uri, java.util.Set<org.eclipse.emf.validation.model.Category> categories)
           
 
Methods inherited from class org.eclipse.ocl.examples.pivot.validation.LoadableConstraintProvider
getOCL, installConstraint, installContents, installDescriptor, installResource, setInitializationData, toString
 
Methods inherited from class org.eclipse.emf.validation.service.AbstractConstraintProvider
createModelConstraint, createModelConstraintProxy, getBatchConstraints, getConstraints, getLiveConstraints, getNamespaceUris, registerConstraints
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CompleteOCLConstraintProvider

public CompleteOCLConstraintProvider()
Method Detail

load

protected boolean load(@NonNull
                       MetaModelManager metaModelManager,
                       @NonNull
                       org.eclipse.emf.common.util.URI uri,
                       @NonNull
                       java.util.Set<org.eclipse.emf.validation.model.Category> categories)
Specified by:
load in class LoadableConstraintProvider