org.eclipse.ocl.examples.validity.locator
Class DelegateConstraintLocator

java.lang.Object
  extended by org.eclipse.ocl.examples.emf.validation.validity.locator.AbstractConstraintLocator
      extended by org.eclipse.ocl.examples.validity.locator.AbstractPivotConstraintLocator
          extended by org.eclipse.ocl.examples.validity.locator.DelegateConstraintLocator
All Implemented Interfaces:
ConstraintLocator, ConstraintLocator.Descriptor
Direct Known Subclasses:
DelegateUIConstraintLocator

public class DelegateConstraintLocator
extends AbstractPivotConstraintLocator


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.ocl.examples.validity.locator.AbstractPivotConstraintLocator
AbstractPivotConstraintLocator.AbstractConstraintLocator
 
Nested classes/interfaces inherited from interface org.eclipse.ocl.examples.emf.validation.validity.locator.ConstraintLocator
ConstraintLocator.Descriptor
 
Field Summary
static DelegateConstraintLocator INSTANCE
           
 
Constructor Summary
DelegateConstraintLocator()
           
 
Method Summary
protected  org.eclipse.emf.ecore.EObject getConstrainedObject(ResultConstrainingNode resultConstrainingNode)
           
protected  Constraint getConstraint(MetaModelManager metaModelManager, ResultConstrainingNode resultConstrainingNode)
           
 java.util.Map<org.eclipse.emf.ecore.EObject,java.util.List<LeafConstrainingNode>> getConstraints(ValidityModel validityModel, org.eclipse.emf.ecore.EPackage ePackage, java.util.Set<org.eclipse.emf.ecore.resource.Resource> resources, org.eclipse.emf.common.util.Monitor monitor)
          Return a constrainedType-to-constraint map for all types in the given resources that have an ePackage whose URI complies with the registration of this ConstraintLocator.
 java.lang.Object getImage()
          Return an icon to identify this kind of ConstraintLocator.
 java.lang.String getName()
          Return a descriptive name for this kind of constraint.
 java.lang.String getSourceExpression(LeafConstrainingNode node)
          Return the source representation of the Constraint.
protected  java.lang.String print(java.util.Map<org.eclipse.emf.ecore.EClassifier,java.util.List<LeafConstrainingNode>> map)
           
 void validate(Result result, ValidityManager validityManager, org.eclipse.emf.common.util.Monitor monitor)
          Update the validation result to include the verdict of the validation using validityManager to provide shared services.
 
Methods inherited from class org.eclipse.ocl.examples.validity.locator.AbstractPivotConstraintLocator
createEvaluationVisitor, getQuery
 
Methods inherited from class org.eclipse.ocl.examples.emf.validation.validity.locator.AbstractConstraintLocator
createLeafConstrainingNode, getAllTypes, getConstrainingURIs, getConstraintLocator, getImports, getLabel, getSeverity, getSourceResource, getURI
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

@NonNull
public static DelegateConstraintLocator INSTANCE
Constructor Detail

DelegateConstraintLocator

public DelegateConstraintLocator()
Method Detail

getConstraint

@Nullable
protected Constraint getConstraint(@NonNull
                                            MetaModelManager metaModelManager,
                                            @NonNull
                                            ResultConstrainingNode resultConstrainingNode)
                            throws ParserException
Throws:
ParserException

getConstrainedObject

@NonNull
protected org.eclipse.emf.ecore.EObject getConstrainedObject(@NonNull
                                                                     ResultConstrainingNode resultConstrainingNode)

getConstraints

@Nullable
public java.util.Map<org.eclipse.emf.ecore.EObject,java.util.List<LeafConstrainingNode>> getConstraints(@NonNull
                                                                                                                 ValidityModel validityModel,
                                                                                                                 @NonNull
                                                                                                                 org.eclipse.emf.ecore.EPackage ePackage,
                                                                                                                 @NonNull
                                                                                                                 java.util.Set<org.eclipse.emf.ecore.resource.Resource> resources,
                                                                                                                 @NonNull
                                                                                                                 org.eclipse.emf.common.util.Monitor monitor)
Description copied from interface: ConstraintLocator
Return a constrainedType-to-constraint map for all types in the given resources that have an ePackage whose URI complies with the registration of this ConstraintLocator. The validityModel is used to create the LeafConstrainingNodes for each constraint.


getImage

public java.lang.Object getImage()
Description copied from interface: ConstraintLocator
Return an icon to identify this kind of ConstraintLocator.

Specified by:
getImage in interface ConstraintLocator
Overrides:
getImage in class AbstractConstraintLocator

getName

@NonNull
public java.lang.String getName()
Description copied from interface: ConstraintLocator
Return a descriptive name for this kind of constraint.


getSourceExpression

@Nullable
public java.lang.String getSourceExpression(@NonNull
                                                     LeafConstrainingNode node)
Description copied from interface: ConstraintLocator
Return the source representation of the Constraint. Returns null if none available.

Specified by:
getSourceExpression in interface ConstraintLocator
Overrides:
getSourceExpression in class AbstractConstraintLocator

print

@NonNull
protected java.lang.String print(@NonNull
                                         java.util.Map<org.eclipse.emf.ecore.EClassifier,java.util.List<LeafConstrainingNode>> map)

validate

public void validate(@NonNull
                     Result result,
                     @NonNull
                     ValidityManager validityManager,
                     @Nullable
                     org.eclipse.emf.common.util.Monitor monitor)
Description copied from interface: ConstraintLocator
Update the validation result to include the verdict of the validation using validityManager to provide shared services.

Specified by:
validate in interface ConstraintLocator
Overrides:
validate in class AbstractConstraintLocator