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

java.lang.Object
  extended by org.eclipse.emf.ecore.util.EObjectValidator
      extended by org.eclipse.ocl.examples.xtext.completeocl.validation.BasicCompleteOCLEObjectValidator
          extended by org.eclipse.ocl.examples.xtext.completeocl.validation.CompleteOCLEObjectValidator
All Implemented Interfaces:
org.eclipse.emf.ecore.EValidator

public class CompleteOCLEObjectValidator
extends BasicCompleteOCLEObjectValidator

A CompleteOCLEObjectValidator validates CompleteOCL invariants during an EMF validation, provided an CompleteOCLEObjectValidator instance has been registered as a validator in the EValidator.Registry. Loading of the Complete OCL occurs during @link{initialize()} which may be called explicitly or lazily during validation.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.emf.ecore.util.EObjectValidator
org.eclipse.emf.ecore.util.EObjectValidator.DynamicEClassValidator, org.eclipse.emf.ecore.util.EObjectValidator.DynamicEDataTypeValidator
 
Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.EValidator
org.eclipse.emf.ecore.EValidator.Descriptor, org.eclipse.emf.ecore.EValidator.PatternMatcher, org.eclipse.emf.ecore.EValidator.Registry, org.eclipse.emf.ecore.EValidator.SubstitutionLabelProvider, org.eclipse.emf.ecore.EValidator.ValidationDelegate
 
Field Summary
protected  org.eclipse.emf.ecore.EPackage ePackage
           
protected  MetaModelManager metaModelManager
           
protected  org.eclipse.emf.common.util.URI oclURI
           
 
Fields inherited from class org.eclipse.emf.ecore.util.EObjectValidator
DATA_VALUE__FRACTION_DIGITS_IN_RANGE, DATA_VALUE__LENGTH_IN_RANGE, DATA_VALUE__MATCHES_PATTERN, DATA_VALUE__TOTAL_DIGITS_IN_RANGE, DATA_VALUE__TYPE_CORRECT, DATA_VALUE__VALUE_IN_ENUMERATION, DATA_VALUE__VALUE_IN_RANGE, DIAGNOSTIC_SOURCE, EOBJECT__EVERY_BIDIRECTIONAL_REFERENCE_IS_PAIRED, EOBJECT__EVERY_DATA_VALUE_CONFORMS, EOBJECT__EVERY_KEY_UNIQUE, EOBJECT__EVERY_MAP_ENTRY_UNIQUE, EOBJECT__EVERY_MULTIPCITY_CONFORMS, EOBJECT__EVERY_PROXY_RESOLVES, EOBJECT__EVERY_REFERENCE_IS_CONTAINED, EOBJECT__NO_CIRCULAR_CONTAINMENT, EOBJECT__UNIQUE_ID, ROOT_OBJECT
 
Fields inherited from interface org.eclipse.emf.ecore.EValidator
MARKER, RELATED_URIS_ATTRIBUTE, URI_ATTRIBUTE
 
Constructor Summary
CompleteOCLEObjectValidator(org.eclipse.emf.ecore.EPackage ePackage, org.eclipse.emf.common.util.URI oclURI)
          Deprecated. 
CompleteOCLEObjectValidator(org.eclipse.emf.ecore.EPackage ePackage, org.eclipse.emf.common.util.URI oclURI, MetaModelManager metaModelManager)
          Construct a validator to apply the CompleteOCL invariants from oclURI to ePackage for the meta-models managed by metaModelManager.
 
Method Summary
protected  org.eclipse.emf.ecore.EPackage getEPackage()
           
 MetaModelManager getMetaModelManager()
           
 boolean initialize()
          Perform the loading and installation of the Complete OCL, returning true if successful.
protected  boolean validatePivot(org.eclipse.emf.ecore.EClassifier eClassifier, java.lang.Object object, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 
Methods inherited from class org.eclipse.ocl.examples.xtext.completeocl.validation.BasicCompleteOCLEObjectValidator
getResourceSet, install, install, validate, validate
 
Methods inherited from class org.eclipse.emf.ecore.util.EObjectValidator
createBadDataValueDiagnostic, createDiagnostic, getEcoreResourceLocator, getEcoreString, getFeatureLabel, getObjectLabel, getResourceLocator, getRootEValidator, getString, getValidationDelegateRegistry, getValueLabel, isEcoreString, reportConstraintDelegateException, reportConstraintDelegateException, reportConstraintDelegateNotFound, reportConstraintDelegateNotFound, reportConstraintDelegateViolation, reportConstraintDelegateViolation, reportDataValuePatternViolation, reportDataValueTypeViolation, reportEnumerationViolation, reportFractionDigitsViolation, reportInvariantDelegateException, reportInvariantDelegateNotFound, reportInvariantDelegateViolation, reportMaxLengthViolation, reportMaxViolation, reportMinLengthViolation, reportMinViolation, reportTotalDigitsViolation, validate_BidirectionalReferenceIsPaired, validate_DataValueConforms, validate_EveryBidirectionalReferenceIsPaired, validate_EveryDataValueConforms, validate_EveryDefaultConstraint, validate_EveryKeyUnique, validate_EveryMapEntryUnique, validate_EveryMultiplicityConforms, validate_EveryProxyResolves, validate_EveryReferenceIsContained, validate_KeyUnique, validate_MapEntryUnique, validate_MultiplicityConforms, validate_NoCircularContainment, validate_UniqueID, validate, validate, validate, validate, validate, validatePattern, wrapEnumerationValues
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

metaModelManager

protected final MetaModelManager metaModelManager

ePackage

protected final org.eclipse.emf.ecore.EPackage ePackage

oclURI

protected final org.eclipse.emf.common.util.URI oclURI
Constructor Detail

CompleteOCLEObjectValidator

@Deprecated
public CompleteOCLEObjectValidator(org.eclipse.emf.ecore.EPackage ePackage,
                                              org.eclipse.emf.common.util.URI oclURI)
Deprecated. 

Construct a validator to apply the CompleteOCL invariants from oclURI to ePackage.


CompleteOCLEObjectValidator

public CompleteOCLEObjectValidator(org.eclipse.emf.ecore.EPackage ePackage,
                                   org.eclipse.emf.common.util.URI oclURI,
                                   MetaModelManager metaModelManager)
Construct a validator to apply the CompleteOCL invariants from oclURI to ePackage for the meta-models managed by metaModelManager.

Method Detail

getEPackage

protected org.eclipse.emf.ecore.EPackage getEPackage()
Overrides:
getEPackage in class org.eclipse.emf.ecore.util.EObjectValidator

getMetaModelManager

public MetaModelManager getMetaModelManager()

initialize

public boolean initialize()
Perform the loading and installation of the Complete OCL, returning true if successful.

Returns:

validatePivot

protected boolean validatePivot(org.eclipse.emf.ecore.EClassifier eClassifier,
                                java.lang.Object object,
                                org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                java.util.Map<java.lang.Object,java.lang.Object> context)
Overrides:
validatePivot in class BasicCompleteOCLEObjectValidator