org.eclipse.emf.ecore.util
Class EcoreValidator

java.lang.Object
  extended by org.eclipse.emf.ecore.util.EObjectValidator
      extended by org.eclipse.emf.ecore.util.EcoreValidator
All Implemented Interfaces:
EValidator

public class EcoreValidator
extends EObjectValidator

The Validator for the model.

See Also:
EcorePackage

Nested Class Summary
static class EcoreValidator.EGenericTypeBuilder
          A utility for parsing generic types and generic type parameters.
 
Nested classes/interfaces inherited from class org.eclipse.emf.ecore.util.EObjectValidator
EObjectValidator.DynamicEClassValidator, EObjectValidator.DynamicEDataTypeValidator
 
Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.EValidator
EValidator.Descriptor, EValidator.PatternMatcher, EValidator.Registry, EValidator.SubstitutionLabelProvider, EValidator.ValidationDelegate
 
Field Summary
static int AT_MOST_ONE_ID
           
static int CONSISTENT_ARGUMENTS_INCORRECT_NUMBER
           
static int CONSISTENT_ARGUMENTS_INVALID_SUBSTITUTION
           
static int CONSISTENT_ARGUMENTS_NONE
           
static int CONSISTENT_ARGUMENTS_NONE_ALLOWED
           
static int CONSISTENT_BOUNDS
           
static int CONSISTENT_BOUNDS_NO_BOUNDS_WITH_TYPE_PARAMETER_OR_CLASSIFIER
           
static int CONSISTENT_BOUNDS_NO_LOWER_AND_UPPER
           
static int CONSISTENT_BOUNDS_NOT_ALLOWED
           
static int CONSISTENT_CONTAINER
           
static int CONSISTENT_KEYS
           
static int CONSISTENT_OPPOSITE_BAD_TRANSIENT
           
static int CONSISTENT_OPPOSITE_BOTH_CONTAINMENT
           
static int CONSISTENT_OPPOSITE_NOT_FROM_TYPE
           
static int CONSISTENT_OPPOSITE_NOT_MATCHING
           
static int CONSISTENT_SUPER_TYPES_CONFLICT
           
static int CONSISTENT_SUPER_TYPES_DUPLICATE
           
static int CONSISTENT_TRANSIENT
           
static int CONSISTENT_TYPE_CLASS_NOT_PERMITTED
           
static int CONSISTENT_TYPE_CLASS_REQUIRED
           
static int CONSISTENT_TYPE_DATA_TYPE_NOT_PERMITTED
           
static int CONSISTENT_TYPE_NO_TYPE_PARAMETER_AND_CLASSIFIER
           
static int CONSISTENT_TYPE_PRIMITIVE_TYPE_NOT_PERMITTED
           
static int CONSISTENT_TYPE_TYPE_PARAMETER_NOT_IN_SCOPE
           
static int CONSISTENT_TYPE_WILDCARD_NOT_PERMITTED
           
static int CONSISTENT_UNIQUE
           
protected static int DIAGNOSTIC_CODE_COUNT
          A constant with a fixed name that can be used as the base value for additional hand written constants in a derived class
static java.lang.String DIAGNOSTIC_SOURCE
          A constant for the source of diagnostic codes from this package
static int DISJOINT_FEATURE_AND_OPERATION_SIGNATURES
           
static EcoreValidator INSTANCE
          The cached model package
static int INTERFACE_IS_ABSTRACT
           
static int NO_CIRCULAR_SUPER_TYPES
           
static int NO_REPEATING_VOID
           
static int SINGLE_CONTAINER
           
static java.lang.String STRICT_NAMED_ELEMENT_NAMES
          A key to be used in context maps to indicate that stricter validation should be performed to ensure that the name of each named element is a well formed Java identifier.
static int UNIQUE_CLASSIFIER_NAMES
           
static int UNIQUE_ENUMERATOR_LITERALS
           
static int UNIQUE_ENUMERATOR_NAMES
           
static int UNIQUE_FEATURE_NAMES
           
static int UNIQUE_NS_URIS
           
static int UNIQUE_OPERATION_SIGNATURES
           
static int UNIQUE_PARAMETER_NAMES
           
static int UNIQUE_SUBPACKAGE_NAMES
           
static int UNIQUE_TYPE_PARAMETER_NAMES
           
static int VALID_DEFAULT_VALUE_LITERAL
           
static int VALID_LOWER_BOUND
           
static int VALID_TYPE
           
static int VALID_UPPER_BOUND
           
static int WELL_FORMED_INSTANCE_TYPE_NAME
           
static int WELL_FORMED_MAP_ENTRY_CLASS
           
static int WELL_FORMED_MAP_ENTRY_NO_INSTANCE_CLASS_NAME
           
static int WELL_FORMED_NAME
           
static int WELL_FORMED_NS_PREFIX
           
static int WELL_FORMED_NS_URI
           
static int WELL_FORMED_SOURCE_URI
           
protected  XMLTypeValidator xmlTypeValidator
          The cached base package validator
 
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, 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
EcoreValidator()
          Creates an instance of the switch
 
Method Summary
static boolean equalTypeArguments(EGenericType eGenericType1, EGenericType eGenericType2, java.util.Map<? extends ETypeParameter,? extends EGenericType> substitutions)
           
static boolean equalTypeArguments(EList<EGenericType> eTypeArguments1, EList<EGenericType> eTypeArguments2, java.util.Map<? extends ETypeParameter,? extends EGenericType> substitutions)
           
protected  EPackage getEPackage()
          Returns the package of this validator switch
 ResourceLocator getResourceLocator()
          Returns the resource locator that will be used to fetch messages for this validator's diagnostics
static boolean isBounded(EGenericType eGenericType, EGenericType eBound, java.util.Map<? extends ETypeParameter,? extends EGenericType> substitutions)
          Returns whether the first generic type is bounded by the second.
protected  boolean isBuiltinEDataType(EDataType eDataType)
           
static boolean isMatching(EGenericType eGenericType, EGenericType eBound, java.util.Map<? extends ETypeParameter,? extends EGenericType> substitutions)
           
protected  boolean isValidSubstitution(EGenericType eTypeArgument, ETypeParameter eTypeParameter, java.util.Map<ETypeParameter,EGenericType> substitutions)
          Returns whether the generic type argument is a valid substitution for the type parameter.
protected static boolean isWellFormedURI(java.lang.String uri)
          A well formed URI string must have a non-zero length, and must encode any special characters such as the space character.
static boolean matchingTypeArguments(EList<EGenericType> eTypeArguments1, EList<EGenericType> eTypeArguments2, java.util.Map<? extends ETypeParameter,? extends EGenericType> substitutions)
           
protected  void report(DiagnosticChain diagnostics, java.lang.String key, java.lang.Object[] substitutions, int index, java.util.Map<java.lang.Object,java.lang.Object> context)
          Creates a new diagnostic for a problem at the given index.
protected  boolean validate(int classifierID, java.lang.Object value, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Calls validateXXX for the corresponding classifier of the model
 boolean validateEAnnotation_WellFormedSourceURI(EAnnotation eAnnotation, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Validates the WellFormedSourceURI constraint of 'EAnnotation'
 boolean validateEAnnotation(EAnnotation eAnnotation, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEAttribute_ConsistentTransient(EAttribute eAttribute, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Validates the ConsistentTransient constraint of 'EAttribute'
 boolean validateEAttribute(EAttribute eAttribute, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEBigDecimal(java.math.BigDecimal eBigDecimal, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEBigInteger(java.math.BigInteger eBigInteger, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEBoolean(boolean eBoolean, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEBooleanObject(java.lang.Boolean eBooleanObject, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEByte(byte eByte, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEByteArray(byte[] eByteArray, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEByteObject(java.lang.Byte eByteObject, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEChar(char eChar, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateECharacterObject(java.lang.Character eCharacterObject, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEClass_AtMostOneID(EClass eClass, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Validates the AtMostOneID constraint of 'EClass'
 boolean validateEClass_ConsistentSuperTypes(EClass eClass, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Validates the ConsistentSuperTypes constraint of 'EClass'
 boolean validateEClass_DisjointFeatureAndOperationSignatures(EClass eClass, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Validates the DisjointFeatureAndOperationSignatures constraint of 'EClass'
 boolean validateEClass_InterfaceIsAbstract(EClass eClass, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Validates the InterfaceIsAbstract constraint of 'EClass'
 boolean validateEClass_NoCircularSuperTypes(EClass eClass, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Validates the NoCircularSuperTypes constraint of 'EClass'
 boolean validateEClass_UniqueFeatureNames(EClass eClass, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Validates the UniqueFeatureNames constraint of 'EClass'
 boolean validateEClass_UniqueOperationSignatures(EClass eClass, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Validates the UniqueOperationSignatures constraint of 'EClass'
 boolean validateEClass_WellFormedMapEntryClass(EClass eClass, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Validates the WellFormedMapEntryClass constraint of 'EClass'
 boolean validateEClass(EClass eClass, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEClassifier_UniqueTypeParameterNames(EClassifier eClassifier, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Validates the UniqueTypeParameterNames constraint of 'EClassifier'
 boolean validateEClassifier_WellFormedInstanceTypeName(EClassifier eClassifier, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Validates the WellFormedInstanceTypeName constraint of 'EClassifier'
 boolean validateEClassifier(EClassifier eClassifier, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEDataType(EDataType eDataType, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEDate(java.util.Date eDate, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEDiagnosticChain(DiagnosticChain eDiagnosticChain, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEDouble(double eDouble, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEDoubleObject(java.lang.Double eDoubleObject, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEEList(EList<?> eeList, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEEnum_UniqueEnumeratorLiterals(EEnum eEnum, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Validates the UniqueEnumeratorLiterals constraint of 'EEnum'
 boolean validateEEnum_UniqueEnumeratorNames(EEnum eEnum, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Validates the UniqueEnumeratorNames constraint of 'EEnum'
 boolean validateEEnum(EEnum eEnum, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEEnumerator(Enumerator eEnumerator, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEEnumLiteral(EEnumLiteral eEnumLiteral, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEFactory(EFactory eFactory, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEFeatureMap(FeatureMap eFeatureMap, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEFeatureMapEntry(FeatureMap.Entry eFeatureMapEntry, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEFloat(float eFloat, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEFloatObject(java.lang.Float eFloatObject, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEGenericType_ConsistentArguments(EGenericType eGenericType, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Validates the ConsistentArguments constraint of 'EGeneric Type'
 boolean validateEGenericType_ConsistentBounds(EGenericType eGenericType, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Validates the ConsistentBounds constraint of 'EGeneric Type'
 boolean validateEGenericType_ConsistentType(EGenericType eGenericType, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Validates the ConsistentType constraint of 'EGeneric Type'
 boolean validateEGenericType(EGenericType eGenericType, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEInt(int eInt, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEIntegerObject(java.lang.Integer eIntegerObject, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEInvocationTargetException(java.lang.reflect.InvocationTargetException eInvocationTargetException, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEJavaClass(java.lang.Class<?> eJavaClass, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEJavaObject(java.lang.Object eJavaObject, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateELong(long eLong, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateELongObject(java.lang.Long eLongObject, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEMap(java.util.Map<?,?> eMap, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEModelElement(EModelElement eModelElement, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateENamedElement_WellFormedName(ENamedElement eNamedElement, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Validates the WellFormedName constraint of 'ENamed Element'
 boolean validateENamedElement(ENamedElement eNamedElement, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEObject(EObject eObject, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEOperation_NoRepeatingVoid(EOperation eOperation, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Validates the NoRepeatingVoid constraint of 'EOperation'
 boolean validateEOperation_UniqueParameterNames(EOperation eOperation, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Validates the UniqueParameterNames constraint of 'EOperation'
 boolean validateEOperation_UniqueTypeParameterNames(EOperation eOperation, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Validates the UniqueTypeParameterNames constraint of 'EOperation'
 boolean validateEOperation(EOperation eOperation, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEPackage_UniqueClassifierNames(EPackage ePackage, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Validates the UniqueClassifierNames constraint of 'EPackage'
 boolean validateEPackage_UniqueNsURIs(EPackage ePackage, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Validates the UniqueNsURIs constraint of 'EPackage'
 boolean validateEPackage_UniqueSubpackageNames(EPackage ePackage, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Validates the UniqueSubpackageNames constraint of 'EPackage'
 boolean validateEPackage_WellFormedNsPrefix(EPackage ePackage, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Validates the WellFormedNsPrefix constraint of 'EPackage'
 boolean validateEPackage_WellFormedNsURI(EPackage ePackage, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Validates the WellFormedNsURI constraint of 'EPackage'
 boolean validateEPackage(EPackage ePackage, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEParameter(EParameter eParameter, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEReference_ConsistentContainer(EReference eReference, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Validates the ConsistentContainer constraint of 'EReference'
 boolean validateEReference_ConsistentKeys(EReference eReference, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Validates the ConsistentKeys constraint of 'EReference'
 boolean validateEReference_ConsistentOpposite(EReference eReference, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Validates the ConsistentOpposite constraint of 'EReference'
 boolean validateEReference_ConsistentUnique(EReference eReference, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Validates the ConsistentUnique constraint of 'EReference'
 boolean validateEReference_SingleContainer(EReference eReference, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Validates the SingleContainer constraint of 'EReference'
 boolean validateEReference(EReference eReference, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEResource(Resource eResource, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEResourceSet(ResourceSet eResourceSet, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEShort(short eShort, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEShortObject(java.lang.Short eShortObject, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEString(java.lang.String eString, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEStringToStringMapEntry(java.util.Map.Entry<?,?> eStringToStringMapEntry, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateEStructuralFeature_ValidDefaultValueLiteral(EStructuralFeature eStructuralFeature, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Validates the ValidDefaultValueLiteral constraint of 'EStructural Feature'
 boolean validateEStructuralFeature(EStructuralFeature eStructuralFeature, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateETreeIterator(TreeIterator<?> eTreeIterator, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateETypedElement_ConsistentBounds(ETypedElement eTypedElement, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Validates the ConsistentBounds constraint of 'ETyped Element'
 boolean validateETypedElement_ValidLowerBound(ETypedElement eTypedElement, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Validates the ValidLowerBound constraint of 'ETyped Element'
 boolean validateETypedElement_ValidType(ETypedElement eTypedElement, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Validates the ValidType constraint of 'ETyped Element'
 boolean validateETypedElement_ValidUpperBound(ETypedElement eTypedElement, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Validates the ValidUpperBound constraint of 'ETyped Element'
 boolean validateETypedElement(ETypedElement eTypedElement, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean validateETypeParameter(ETypeParameter eTypeParameter, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 
Methods inherited from class org.eclipse.emf.ecore.util.EObjectValidator
createBadDataValueDiagnostic, createDiagnostic, getEcoreResourceLocator, getEcoreString, getFeatureLabel, getObjectLabel, 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, validate, validatePattern, wrapEnumerationValues
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final EcoreValidator INSTANCE
The cached model package


STRICT_NAMED_ELEMENT_NAMES

public static final java.lang.String STRICT_NAMED_ELEMENT_NAMES
A key to be used in context maps to indicate that stricter validation should be performed to ensure that the name of each named element is a well formed Java identifier. The value of the entry must be a Boolean. The default value is Boolean.TRUE.

Since:
2.4
See Also:
EValidator.validate(EObject, DiagnosticChain, Map), validateENamedElement_WellFormedName(ENamedElement, DiagnosticChain, Map), Constant Field Values

DIAGNOSTIC_SOURCE

public static final java.lang.String DIAGNOSTIC_SOURCE
A constant for the source of diagnostic codes from this package.

See Also:
Diagnostic.getSource(), Diagnostic.getCode(), Constant Field Values

AT_MOST_ONE_ID

public static final int AT_MOST_ONE_ID
See Also:
validateEClass_AtMostOneID(EClass, DiagnosticChain, Map), Constant Field Values

CONSISTENT_ARGUMENTS_INCORRECT_NUMBER

public static final int CONSISTENT_ARGUMENTS_INCORRECT_NUMBER
See Also:
validateEGenericType_ConsistentArguments(EGenericType, DiagnosticChain, Map), Constant Field Values

CONSISTENT_ARGUMENTS_INVALID_SUBSTITUTION

public static final int CONSISTENT_ARGUMENTS_INVALID_SUBSTITUTION
See Also:
validateEGenericType_ConsistentArguments(EGenericType, DiagnosticChain, Map), Constant Field Values

CONSISTENT_ARGUMENTS_NONE

public static final int CONSISTENT_ARGUMENTS_NONE
See Also:
validateEGenericType_ConsistentArguments(EGenericType, DiagnosticChain, Map), Constant Field Values

CONSISTENT_ARGUMENTS_NONE_ALLOWED

public static final int CONSISTENT_ARGUMENTS_NONE_ALLOWED
See Also:
validateEGenericType_ConsistentArguments(EGenericType, DiagnosticChain, Map), Constant Field Values

CONSISTENT_BOUNDS

public static final int CONSISTENT_BOUNDS
See Also:
validateETypedElement_ConsistentBounds(ETypedElement, DiagnosticChain, Map), Constant Field Values

CONSISTENT_BOUNDS_NOT_ALLOWED

public static final int CONSISTENT_BOUNDS_NOT_ALLOWED
See Also:
validateEGenericType_ConsistentBounds(EGenericType, DiagnosticChain, Map), Constant Field Values

CONSISTENT_BOUNDS_NO_BOUNDS_WITH_TYPE_PARAMETER_OR_CLASSIFIER

public static final int CONSISTENT_BOUNDS_NO_BOUNDS_WITH_TYPE_PARAMETER_OR_CLASSIFIER
See Also:
validateEGenericType_ConsistentBounds(EGenericType, DiagnosticChain, Map), Constant Field Values

CONSISTENT_BOUNDS_NO_LOWER_AND_UPPER

public static final int CONSISTENT_BOUNDS_NO_LOWER_AND_UPPER
See Also:
validateEGenericType_ConsistentBounds(EGenericType, DiagnosticChain, Map), Constant Field Values

CONSISTENT_KEYS

public static final int CONSISTENT_KEYS
See Also:
validateEReference_ConsistentKeys(EReference, DiagnosticChain, Map), Constant Field Values

CONSISTENT_OPPOSITE_BAD_TRANSIENT

public static final int CONSISTENT_OPPOSITE_BAD_TRANSIENT
See Also:
validateEReference_ConsistentOpposite(EReference, DiagnosticChain, Map), Constant Field Values

CONSISTENT_OPPOSITE_BOTH_CONTAINMENT

public static final int CONSISTENT_OPPOSITE_BOTH_CONTAINMENT
See Also:
validateEReference_ConsistentOpposite(EReference, DiagnosticChain, Map), Constant Field Values

CONSISTENT_OPPOSITE_NOT_FROM_TYPE

public static final int CONSISTENT_OPPOSITE_NOT_FROM_TYPE
See Also:
validateEReference_ConsistentOpposite(EReference, DiagnosticChain, Map), Constant Field Values

CONSISTENT_OPPOSITE_NOT_MATCHING

public static final int CONSISTENT_OPPOSITE_NOT_MATCHING
See Also:
validateEReference_ConsistentOpposite(EReference, DiagnosticChain, Map), Constant Field Values

CONSISTENT_SUPER_TYPES_CONFLICT

public static final int CONSISTENT_SUPER_TYPES_CONFLICT
See Also:
validateEClass_ConsistentSuperTypes(EClass, DiagnosticChain, Map), Constant Field Values

CONSISTENT_SUPER_TYPES_DUPLICATE

public static final int CONSISTENT_SUPER_TYPES_DUPLICATE
See Also:
validateEClass_ConsistentSuperTypes(EClass, DiagnosticChain, Map), Constant Field Values

CONSISTENT_TRANSIENT

public static final int CONSISTENT_TRANSIENT
See Also:
validateEAttribute_ConsistentTransient(EAttribute, DiagnosticChain, Map), Constant Field Values

CONSISTENT_TYPE_CLASS_REQUIRED

public static final int CONSISTENT_TYPE_CLASS_REQUIRED
See Also:
validateEGenericType_ConsistentType(EGenericType, DiagnosticChain, Map), Constant Field Values

CONSISTENT_TYPE_CLASS_NOT_PERMITTED

public static final int CONSISTENT_TYPE_CLASS_NOT_PERMITTED
See Also:
validateEGenericType_ConsistentType(EGenericType, DiagnosticChain, Map), Constant Field Values

CONSISTENT_TYPE_DATA_TYPE_NOT_PERMITTED

public static final int CONSISTENT_TYPE_DATA_TYPE_NOT_PERMITTED
See Also:
validateEGenericType_ConsistentType(EGenericType, DiagnosticChain, Map), Constant Field Values

CONSISTENT_TYPE_NO_TYPE_PARAMETER_AND_CLASSIFIER

public static final int CONSISTENT_TYPE_NO_TYPE_PARAMETER_AND_CLASSIFIER
See Also:
validateEGenericType_ConsistentType(EGenericType, DiagnosticChain, Map), Constant Field Values

CONSISTENT_TYPE_PRIMITIVE_TYPE_NOT_PERMITTED

public static final int CONSISTENT_TYPE_PRIMITIVE_TYPE_NOT_PERMITTED
See Also:
validateEGenericType_ConsistentType(EGenericType, DiagnosticChain, Map), Constant Field Values

CONSISTENT_TYPE_TYPE_PARAMETER_NOT_IN_SCOPE

public static final int CONSISTENT_TYPE_TYPE_PARAMETER_NOT_IN_SCOPE
See Also:
validateEGenericType_ConsistentType(EGenericType, DiagnosticChain, Map), Constant Field Values

CONSISTENT_TYPE_WILDCARD_NOT_PERMITTED

public static final int CONSISTENT_TYPE_WILDCARD_NOT_PERMITTED
See Also:
validateEGenericType_ConsistentType(EGenericType, DiagnosticChain, Map), Constant Field Values

INTERFACE_IS_ABSTRACT

public static final int INTERFACE_IS_ABSTRACT
See Also:
validateEClass_InterfaceIsAbstract(EClass, DiagnosticChain, Map), Constant Field Values

NO_CIRCULAR_SUPER_TYPES

public static final int NO_CIRCULAR_SUPER_TYPES
See Also:
validateEClass_NoCircularSuperTypes(EClass, DiagnosticChain, Map), Constant Field Values

NO_REPEATING_VOID

public static final int NO_REPEATING_VOID
See Also:
validateEOperation_NoRepeatingVoid(EOperation, DiagnosticChain, Map), Constant Field Values

SINGLE_CONTAINER

public static final int SINGLE_CONTAINER
See Also:
validateEReference_SingleContainer(EReference, DiagnosticChain, Map), Constant Field Values

UNIQUE_CLASSIFIER_NAMES

public static final int UNIQUE_CLASSIFIER_NAMES
See Also:
validateEPackage_UniqueClassifierNames(EPackage, DiagnosticChain, Map), Constant Field Values

UNIQUE_ENUMERATOR_LITERALS

public static final int UNIQUE_ENUMERATOR_LITERALS
See Also:
validateEEnum_UniqueEnumeratorNames(EEnum, DiagnosticChain, Map), Constant Field Values

UNIQUE_ENUMERATOR_NAMES

public static final int UNIQUE_ENUMERATOR_NAMES
See Also:
validateEEnum_UniqueEnumeratorNames(EEnum, DiagnosticChain, Map), Constant Field Values

UNIQUE_FEATURE_NAMES

public static final int UNIQUE_FEATURE_NAMES
See Also:
validateEClass_UniqueFeatureNames(EClass, DiagnosticChain, Map), Constant Field Values

UNIQUE_NS_URIS

public static final int UNIQUE_NS_URIS
See Also:
validateEPackage_UniqueNsURIs(EPackage, DiagnosticChain, Map), Constant Field Values

UNIQUE_OPERATION_SIGNATURES

public static final int UNIQUE_OPERATION_SIGNATURES
See Also:
validateEClass_UniqueOperationSignatures(EClass, DiagnosticChain, Map), Constant Field Values

UNIQUE_PARAMETER_NAMES

public static final int UNIQUE_PARAMETER_NAMES
See Also:
validateEOperation_UniqueParameterNames(EOperation, DiagnosticChain, Map), Constant Field Values

UNIQUE_SUBPACKAGE_NAMES

public static final int UNIQUE_SUBPACKAGE_NAMES
See Also:
validateEPackage_UniqueSubpackageNames(EPackage, DiagnosticChain, Map), Constant Field Values

UNIQUE_TYPE_PARAMETER_NAMES

public static final int UNIQUE_TYPE_PARAMETER_NAMES
See Also:
validateEOperation_UniqueParameterNames(EOperation, DiagnosticChain, Map), validateEClassifier_UniqueTypeParameterNames(EClassifier, DiagnosticChain, Map), Constant Field Values

VALID_DEFAULT_VALUE_LITERAL

public static final int VALID_DEFAULT_VALUE_LITERAL
See Also:
validateEStructuralFeature_ValidDefaultValueLiteral(EStructuralFeature, DiagnosticChain, Map), Constant Field Values

VALID_LOWER_BOUND

public static final int VALID_LOWER_BOUND
See Also:
validateETypedElement_ValidLowerBound(ETypedElement, DiagnosticChain, Map), Constant Field Values

VALID_TYPE

public static final int VALID_TYPE
See Also:
validateETypedElement_ValidType(ETypedElement, DiagnosticChain, Map), Constant Field Values

VALID_UPPER_BOUND

public static final int VALID_UPPER_BOUND
See Also:
validateETypedElement_ValidUpperBound(ETypedElement, DiagnosticChain, Map), Constant Field Values

WELL_FORMED_INSTANCE_TYPE_NAME

public static final int WELL_FORMED_INSTANCE_TYPE_NAME
See Also:
validateEClassifier_WellFormedInstanceTypeName(EClassifier, DiagnosticChain, Map), Constant Field Values

WELL_FORMED_MAP_ENTRY_CLASS

public static final int WELL_FORMED_MAP_ENTRY_CLASS
See Also:
validateEClass_WellFormedMapEntryClass(EClass, DiagnosticChain, Map), Constant Field Values

WELL_FORMED_NAME

public static final int WELL_FORMED_NAME
See Also:
validateEClass_WellFormedMapEntryClass(EClass, DiagnosticChain, Map), Constant Field Values

WELL_FORMED_NS_PREFIX

public static final int WELL_FORMED_NS_PREFIX
See Also:
validateEPackage_WellFormedNsPrefix(EPackage, DiagnosticChain, Map), Constant Field Values

WELL_FORMED_NS_URI

public static final int WELL_FORMED_NS_URI
See Also:
validateEPackage_WellFormedNsURI(EPackage, DiagnosticChain, Map), Constant Field Values

WELL_FORMED_SOURCE_URI

public static final int WELL_FORMED_SOURCE_URI
See Also:
validateEAnnotation_WellFormedSourceURI(EAnnotation, DiagnosticChain, Map), Constant Field Values

DISJOINT_FEATURE_AND_OPERATION_SIGNATURES

public static final int DISJOINT_FEATURE_AND_OPERATION_SIGNATURES
See Also:
validateEClass_DisjointFeatureAndOperationSignatures(EClass, DiagnosticChain, Map), Constant Field Values

WELL_FORMED_MAP_ENTRY_NO_INSTANCE_CLASS_NAME

public static final int WELL_FORMED_MAP_ENTRY_NO_INSTANCE_CLASS_NAME
See Also:
validateEClass_WellFormedMapEntryClass(EClass, DiagnosticChain, Map), Constant Field Values

CONSISTENT_UNIQUE

public static final int CONSISTENT_UNIQUE
See Also:
validateEReference_ConsistentUnique(EReference, DiagnosticChain, Map), Constant Field Values

CONSISTENT_CONTAINER

public static final int CONSISTENT_CONTAINER
See Also:
validateEReference_ConsistentContainer(EReference, DiagnosticChain, Map), Constant Field Values

DIAGNOSTIC_CODE_COUNT

protected static final int DIAGNOSTIC_CODE_COUNT
A constant with a fixed name that can be used as the base value for additional hand written constants in a derived class.

See Also:
Constant Field Values

xmlTypeValidator

protected XMLTypeValidator xmlTypeValidator
The cached base package validator.

Constructor Detail

EcoreValidator

public EcoreValidator()
Creates an instance of the switch.

Method Detail

getEPackage

protected EPackage getEPackage()
Returns the package of this validator switch.

Overrides:
getEPackage in class EObjectValidator

validate

protected boolean validate(int classifierID,
                           java.lang.Object value,
                           DiagnosticChain diagnostics,
                           java.util.Map<java.lang.Object,java.lang.Object> context)
Calls validateXXX for the corresponding classifier of the model.

Overrides:
validate in class EObjectValidator

validateEAttribute

public boolean validateEAttribute(EAttribute eAttribute,
                                  DiagnosticChain diagnostics,
                                  java.util.Map<java.lang.Object,java.lang.Object> context)


validateEAttribute_ConsistentTransient

public boolean validateEAttribute_ConsistentTransient(EAttribute eAttribute,
                                                      DiagnosticChain diagnostics,
                                                      java.util.Map<java.lang.Object,java.lang.Object> context)
Validates the ConsistentTransient constraint of 'EAttribute'.


validateEAnnotation

public boolean validateEAnnotation(EAnnotation eAnnotation,
                                   DiagnosticChain diagnostics,
                                   java.util.Map<java.lang.Object,java.lang.Object> context)


validateEAnnotation_WellFormedSourceURI

public boolean validateEAnnotation_WellFormedSourceURI(EAnnotation eAnnotation,
                                                       DiagnosticChain diagnostics,
                                                       java.util.Map<java.lang.Object,java.lang.Object> context)
Validates the WellFormedSourceURI constraint of 'EAnnotation'. The source URI must either be either null or well formed.


isWellFormedURI

protected static boolean isWellFormedURI(java.lang.String uri)
A well formed URI string must have a non-zero length, and must encode any special characters such as the space character. As such, creating a URI, ignoring the properly encoded characters, and converting that to a string, must yield this URI string itself.

Parameters:
uri - the URI string in question.
Returns:
whether the URI is well formed.

validateEClass

public boolean validateEClass(EClass eClass,
                              DiagnosticChain diagnostics,
                              java.util.Map<java.lang.Object,java.lang.Object> context)


validateEClass_InterfaceIsAbstract

public boolean validateEClass_InterfaceIsAbstract(EClass eClass,
                                                  DiagnosticChain diagnostics,
                                                  java.util.Map<java.lang.Object,java.lang.Object> context)
Validates the InterfaceIsAbstract constraint of 'EClass'. A class that is an interface must be abstract.


validateEClass_AtMostOneID

public boolean validateEClass_AtMostOneID(EClass eClass,
                                          DiagnosticChain diagnostics,
                                          java.util.Map<java.lang.Object,java.lang.Object> context)
Validates the AtMostOneID constraint of 'EClass'. There can be at most one attribute that is an ID.


validateEClass_UniqueFeatureNames

public boolean validateEClass_UniqueFeatureNames(EClass eClass,
                                                 DiagnosticChain diagnostics,
                                                 java.util.Map<java.lang.Object,java.lang.Object> context)
Validates the UniqueFeatureNames constraint of 'EClass'. No two features may have matching names. Feature names are matched ignoring their case and their underscore separators. It is an error to have two features with names that are equal but only a warning to have two features with names that match.


validateEClass_UniqueOperationSignatures

public boolean validateEClass_UniqueOperationSignatures(EClass eClass,
                                                        DiagnosticChain diagnostics,
                                                        java.util.Map<java.lang.Object,java.lang.Object> context)
Validates the UniqueOperationSignatures constraint of 'EClass'. No two operations defined in the same class may have matching signatures. The signature is determined by the name of the operation and the types of its parameters. If the name is the same and the types match, the signatures match. Types match if they are the same classifier, or both classifiers have instance class names that are the same.


validateEClass_NoCircularSuperTypes

public boolean validateEClass_NoCircularSuperTypes(EClass eClass,
                                                   DiagnosticChain diagnostics,
                                                   java.util.Map<java.lang.Object,java.lang.Object> context)
Validates the NoCircularSuperTypes constraint of 'EClass'. A super type must not appear in its own list of all super types.


validateEClass_WellFormedMapEntryClass

public boolean validateEClass_WellFormedMapEntryClass(EClass eClass,
                                                      DiagnosticChain diagnostics,
                                                      java.util.Map<java.lang.Object,java.lang.Object> context)
Validates the WellFormedMapEntryClass constraint of 'EClass'. A map entry class must have features named 'key' and 'value'.


validateEClass_ConsistentSuperTypes

public boolean validateEClass_ConsistentSuperTypes(EClass eClass,
                                                   DiagnosticChain diagnostics,
                                                   java.util.Map<java.lang.Object,java.lang.Object> context)
Validates the ConsistentSuperTypes constraint of 'EClass'. The same class must not occur more than once among the generic super types nor among all the generic super types where occurrences in the latter represent conflicting instantiations of the same classifier.


validateEClass_DisjointFeatureAndOperationSignatures

public boolean validateEClass_DisjointFeatureAndOperationSignatures(EClass eClass,
                                                                    DiagnosticChain diagnostics,
                                                                    java.util.Map<java.lang.Object,java.lang.Object> context)
Validates the DisjointFeatureAndOperationSignatures constraint of 'EClass'. Each feature defined in the class is interpreted as implicitly defining the operations with the signatures corresponding to the generated accessors for that feature hence the same type of constraint as validateEClass_UniqueOperationSignatures(EClass, DiagnosticChain, Map) applies.


validateEClassifier

public boolean validateEClassifier(EClassifier eClassifier,
                                   DiagnosticChain diagnostics,
                                   java.util.Map<java.lang.Object,java.lang.Object> context)


validateEClassifier_WellFormedInstanceTypeName

public boolean validateEClassifier_WellFormedInstanceTypeName(EClassifier eClassifier,
                                                              DiagnosticChain diagnostics,
                                                              java.util.Map<java.lang.Object,java.lang.Object> context)
Validates the WellFormedInstanceTypeName constraint of 'EClassifier'. The instance type name may be null only for a class or an enum and must be well formed when not null.


validateEClassifier_UniqueTypeParameterNames

public boolean validateEClassifier_UniqueTypeParameterNames(EClassifier eClassifier,
                                                            DiagnosticChain diagnostics,
                                                            java.util.Map<java.lang.Object,java.lang.Object> context)
Validates the UniqueTypeParameterNames constraint of 'EClassifier'.


validateEDataType

public boolean validateEDataType(EDataType eDataType,
                                 DiagnosticChain diagnostics,
                                 java.util.Map<java.lang.Object,java.lang.Object> context)


validateEEnum

public boolean validateEEnum(EEnum eEnum,
                             DiagnosticChain diagnostics,
                             java.util.Map<java.lang.Object,java.lang.Object> context)


validateEEnum_UniqueEnumeratorNames

public boolean validateEEnum_UniqueEnumeratorNames(EEnum eEnum,
                                                   DiagnosticChain diagnostics,
                                                   java.util.Map<java.lang.Object,java.lang.Object> context)
Validates the UniqueEnumeratorNames constraint of 'EEnum'. No two enum literals may have matching names. Literal names are matched ignoring their case and their underscore separators. It is an error to have two enum literals with names that are equal but only a warning to have two enum literals with names that match.


validateEEnum_UniqueEnumeratorLiterals

public boolean validateEEnum_UniqueEnumeratorLiterals(EEnum eEnum,
                                                      DiagnosticChain diagnostics,
                                                      java.util.Map<java.lang.Object,java.lang.Object> context)
Validates the UniqueEnumeratorLiterals constraint of 'EEnum'. No two enum literals may have the same literal value.


validateEEnumLiteral

public boolean validateEEnumLiteral(EEnumLiteral eEnumLiteral,
                                    DiagnosticChain diagnostics,
                                    java.util.Map<java.lang.Object,java.lang.Object> context)


validateEFactory

public boolean validateEFactory(EFactory eFactory,
                                DiagnosticChain diagnostics,
                                java.util.Map<java.lang.Object,java.lang.Object> context)


validateEModelElement

public boolean validateEModelElement(EModelElement eModelElement,
                                     DiagnosticChain diagnostics,
                                     java.util.Map<java.lang.Object,java.lang.Object> context)


validateENamedElement

public boolean validateENamedElement(ENamedElement eNamedElement,
                                     DiagnosticChain diagnostics,
                                     java.util.Map<java.lang.Object,java.lang.Object> context)


validateENamedElement_WellFormedName

public boolean validateENamedElement_WellFormedName(ENamedElement eNamedElement,
                                                    DiagnosticChain diagnostics,
                                                    java.util.Map<java.lang.Object,java.lang.Object> context)
Validates the WellFormedName constraint of 'ENamed Element'. The name must be a valid Java identifier. I.e., it must start with a Java identifier start character, that is followed by zero or more Java identifier part characters. This constraint is only enforced in a STRICT_NAMED_ELEMENT_NAMES context.


validateEObject

public boolean validateEObject(EObject eObject,
                               DiagnosticChain diagnostics,
                               java.util.Map<java.lang.Object,java.lang.Object> context)


validateEOperation

public boolean validateEOperation(EOperation eOperation,
                                  DiagnosticChain diagnostics,
                                  java.util.Map<java.lang.Object,java.lang.Object> context)


validateEOperation_UniqueParameterNames

public boolean validateEOperation_UniqueParameterNames(EOperation eOperation,
                                                       DiagnosticChain diagnostics,
                                                       java.util.Map<java.lang.Object,java.lang.Object> context)
Validates the UniqueParameterNames constraint of 'EOperation'. No two parameters may have the same name.


validateEOperation_UniqueTypeParameterNames

public boolean validateEOperation_UniqueTypeParameterNames(EOperation eOperation,
                                                           DiagnosticChain diagnostics,
                                                           java.util.Map<java.lang.Object,java.lang.Object> context)
Validates the UniqueTypeParameterNames constraint of 'EOperation'.


validateEOperation_NoRepeatingVoid

public boolean validateEOperation_NoRepeatingVoid(EOperation eOperation,
                                                  DiagnosticChain diagnostics,
                                                  java.util.Map<java.lang.Object,java.lang.Object> context)
Validates the NoRepeatingVoid constraint of 'EOperation'. An operation without a type, which represents void, must have an upper bound of 1.


validateEPackage

public boolean validateEPackage(EPackage ePackage,
                                DiagnosticChain diagnostics,
                                java.util.Map<java.lang.Object,java.lang.Object> context)


validateEPackage_WellFormedNsURI

public boolean validateEPackage_WellFormedNsURI(EPackage ePackage,
                                                DiagnosticChain diagnostics,
                                                java.util.Map<java.lang.Object,java.lang.Object> context)
Validates the WellFormedNsURI constraint of 'EPackage'. The namespace URI must be well formed and may not be null.


validateEPackage_WellFormedNsPrefix

public boolean validateEPackage_WellFormedNsPrefix(EPackage ePackage,
                                                   DiagnosticChain diagnostics,
                                                   java.util.Map<java.lang.Object,java.lang.Object> context)
Validates the WellFormedNsPrefix constraint of 'EPackage'. The namespace prefix must be either the empty string or a valid NCName that does not start with any case combination of the three letters "xml".


validateEPackage_UniqueSubpackageNames

public boolean validateEPackage_UniqueSubpackageNames(EPackage ePackage,
                                                      DiagnosticChain diagnostics,
                                                      java.util.Map<java.lang.Object,java.lang.Object> context)
Validates the UniqueSubpackageNames constraint of 'EPackage'. No two packages my have the same name.


validateEPackage_UniqueClassifierNames

public boolean validateEPackage_UniqueClassifierNames(EPackage ePackage,
                                                      DiagnosticChain diagnostics,
                                                      java.util.Map<java.lang.Object,java.lang.Object> context)
Validates the UniqueClassifierNames constraint of 'EPackage'. No two classifiers may have matching names. Classifier names are matched ignoring their case and their underscore separators. It is an error to have two classifier with names that are equal but only a warning to have two classifiers with names that match.


validateEPackage_UniqueNsURIs

public boolean validateEPackage_UniqueNsURIs(EPackage ePackage,
                                             DiagnosticChain diagnostics,
                                             java.util.Map<java.lang.Object,java.lang.Object> context)
Validates the UniqueNsURIs constraint of 'EPackage'.


validateEParameter

public boolean validateEParameter(EParameter eParameter,
                                  DiagnosticChain diagnostics,
                                  java.util.Map<java.lang.Object,java.lang.Object> context)


validateEReference

public boolean validateEReference(EReference eReference,
                                  DiagnosticChain diagnostics,
                                  java.util.Map<java.lang.Object,java.lang.Object> context)


validateEReference_ConsistentOpposite

public boolean validateEReference_ConsistentOpposite(EReference eReference,
                                                     DiagnosticChain diagnostics,
                                                     java.util.Map<java.lang.Object,java.lang.Object> context)
Validates the ConsistentOpposite constraint of 'EReference'. An opposite is optional but if one exists, it must be a feature of this references's type, it must have this reference as its opposite, and, if this feature is transient, then the opposite must also be transient, must not resolve proxies. or must be a containment,


validateEReference_SingleContainer

public boolean validateEReference_SingleContainer(EReference eReference,
                                                  DiagnosticChain diagnostics,
                                                  java.util.Map<java.lang.Object,java.lang.Object> context)
Validates the SingleContainer constraint of 'EReference'. A container reference must have a upper bound of 1.


validateEReference_ConsistentKeys

public boolean validateEReference_ConsistentKeys(EReference eReference,
                                                 DiagnosticChain diagnostics,
                                                 java.util.Map<java.lang.Object,java.lang.Object> context)
Validates the ConsistentKeys constraint of 'EReference'. The keys of a reference must be features of the reference's ETypedElement.getEType().


validateEReference_ConsistentUnique

public boolean validateEReference_ConsistentUnique(EReference eReference,
                                                   DiagnosticChain diagnostics,
                                                   java.util.Map<java.lang.Object,java.lang.Object> context)
Validates the ConsistentUnique constraint of 'EReference'.


validateEReference_ConsistentContainer

public boolean validateEReference_ConsistentContainer(EReference eReference,
                                                      DiagnosticChain diagnostics,
                                                      java.util.Map<java.lang.Object,java.lang.Object> context)
Validates the ConsistentContainer constraint of 'EReference'.


validateEStructuralFeature

public boolean validateEStructuralFeature(EStructuralFeature eStructuralFeature,
                                          DiagnosticChain diagnostics,
                                          java.util.Map<java.lang.Object,java.lang.Object> context)


validateEStructuralFeature_ValidDefaultValueLiteral

public boolean validateEStructuralFeature_ValidDefaultValueLiteral(EStructuralFeature eStructuralFeature,
                                                                   DiagnosticChain diagnostics,
                                                                   java.util.Map<java.lang.Object,java.lang.Object> context)
Validates the ValidDefaultValueLiteral constraint of 'EStructural Feature'.


isBuiltinEDataType

protected boolean isBuiltinEDataType(EDataType eDataType)

validateETypedElement

public boolean validateETypedElement(ETypedElement eTypedElement,
                                     DiagnosticChain diagnostics,
                                     java.util.Map<java.lang.Object,java.lang.Object> context)


validateETypedElement_ValidLowerBound

public boolean validateETypedElement_ValidLowerBound(ETypedElement eTypedElement,
                                                     DiagnosticChain diagnostics,
                                                     java.util.Map<java.lang.Object,java.lang.Object> context)
Validates the ValidLowerBound constraint of 'ETyped Element'. The lower bound must be greater or equal to 0


validateETypedElement_ValidUpperBound

public boolean validateETypedElement_ValidUpperBound(ETypedElement eTypedElement,
                                                     DiagnosticChain diagnostics,
                                                     java.util.Map<java.lang.Object,java.lang.Object> context)
Validates the ValidUpperBound constraint of 'ETyped Element'. The upper bound must be either ETypedElement.UNBOUNDED_MULTIPLICITY, ETypedElement.UNSPECIFIED_MULTIPLICITY, or greater than 0.


validateETypedElement_ConsistentBounds

public boolean validateETypedElement_ConsistentBounds(ETypedElement eTypedElement,
                                                      DiagnosticChain diagnostics,
                                                      java.util.Map<java.lang.Object,java.lang.Object> context)
Validates the ConsistentBounds constraint of 'ETyped Element'. The lower bound must be less than or equal to the upper bound, unless the upper bound is one of the two special values ETypedElement.UNBOUNDED_MULTIPLICITY or ETypedElement.UNSPECIFIED_MULTIPLICITY.


validateETypedElement_ValidType

public boolean validateETypedElement_ValidType(ETypedElement eTypedElement,
                                               DiagnosticChain diagnostics,
                                               java.util.Map<java.lang.Object,java.lang.Object> context)
Validates the ValidType constraint of 'ETyped Element'. The type may be null only if this in an operation.


validateEStringToStringMapEntry

public boolean validateEStringToStringMapEntry(java.util.Map.Entry<?,?> eStringToStringMapEntry,
                                               DiagnosticChain diagnostics,
                                               java.util.Map<java.lang.Object,java.lang.Object> context)


validateEGenericType

public boolean validateEGenericType(EGenericType eGenericType,
                                    DiagnosticChain diagnostics,
                                    java.util.Map<java.lang.Object,java.lang.Object> context)


validateEGenericType_ConsistentType

public boolean validateEGenericType_ConsistentType(EGenericType eGenericType,
                                                   DiagnosticChain diagnostics,
                                                   java.util.Map<java.lang.Object,java.lang.Object> context)
Validates the ConsistentType constraint of 'EGeneric Type'. A generic type must not reference both a classifier and a type parameter. The referenced type parameter must be in scope, i.e., its EObject.eContainer() must be an EcoreUtil.isAncestor(EObject, EObject) of this generic type. A generic type used as a generic super type must have a classifier that refers to a class. A generic type used as a type argument of a generic type used as a generic super type must specify either a classifier or a type parameter, i.e., it can't be a wildcard. A generic type may omit both the classifier and the type argument to act as a wildcard only when used as a type argument of some generic type, with the above exception. If present, the classifier of generic type used as the type of an attribute must be a data type. If present, the classifier of generic type used as the type of a reference must be a class.


validateEGenericType_ConsistentBounds

public boolean validateEGenericType_ConsistentBounds(EGenericType eGenericType,
                                                     DiagnosticChain diagnostics,
                                                     java.util.Map<java.lang.Object,java.lang.Object> context)
Validates the ConsistentBounds constraint of 'EGeneric Type'. A generic type may have bounds only when used as a type argument. A generic type may not have both a lower and an upper bound. A generic type may not have bounds as well as a classifier or a type parameter.


validateEGenericType_ConsistentArguments

public boolean validateEGenericType_ConsistentArguments(EGenericType eGenericType,
                                                        DiagnosticChain diagnostics,
                                                        java.util.Map<java.lang.Object,java.lang.Object> context)
Validates the ConsistentArguments constraint of 'EGeneric Type'. A generic type can have type arguments only if it has a classifier that specifies EClassifier.getETypeParameters(); the number of type arguments must match the number of type parameters. It is only a warning for there to be no arguments when there are parameters, but any other mismatch is an error.


isValidSubstitution

protected boolean isValidSubstitution(EGenericType eTypeArgument,
                                      ETypeParameter eTypeParameter,
                                      java.util.Map<ETypeParameter,EGenericType> substitutions)
Returns whether the generic type argument is a valid substitution for the type parameter. A generic type is a valid substitution if it is bounded by every bound of the type parameter. It follows that for a type parameter without bounds, every type argument is a valid substitution.

Parameters:
eTypeArgument - the generic type argument to consider.
eTypeParameter - the type parameter in question.
Returns:
whether the generic type argument is a valid substitution for the type parameter.

isBounded

public static boolean isBounded(EGenericType eGenericType,
                                EGenericType eBound,
                                java.util.Map<? extends ETypeParameter,? extends EGenericType> substitutions)
Returns whether the first generic type is bounded by the second. If they both reference a classifier, then the classifier of the first must be bounded by the classifier of the second, and the type arguments must match. A classifier is bounded by another classifier, if they are the same classifier, if both are classes and the first is a EClass.isSuperTypeOf(EClass) the second, or if both have an non-null instance class for which the first is assignable from the second, or, failing all these, if they have non-null EClassifier.getInstanceTypeName() that are equal. If the bound references a classifier, and the generic type argument references a type parameter, one of the bounds of that type parameter must be bounded by bound. If the bound has a lower bound, the generic type argument must be bounded by that lower bound. If the bound has an upper bound, the generic type argument must be bounded by that upper bound. If the bound references a type parameter, the generic type argument must be bounded by every bound of that type parameter. If the bound has a lower bound, the generic type argument must be bounded by it. If the bound has an upper bound, the generic type argument must be bound that upper bound. Failing all these cases, the bound is a wildcard with no constraint, and the type argument is bounded.

Parameters:
eGenericType - the generic type in question.
eBound - the bound it's being assessed against.
substitutions - the map of substitutions that are in effect.
Returns:
whether the first generic type is bounded by the second.

matchingTypeArguments

public static boolean matchingTypeArguments(EList<EGenericType> eTypeArguments1,
                                            EList<EGenericType> eTypeArguments2,
                                            java.util.Map<? extends ETypeParameter,? extends EGenericType> substitutions)

isMatching

public static boolean isMatching(EGenericType eGenericType,
                                 EGenericType eBound,
                                 java.util.Map<? extends ETypeParameter,? extends EGenericType> substitutions)

equalTypeArguments

public static boolean equalTypeArguments(EList<EGenericType> eTypeArguments1,
                                         EList<EGenericType> eTypeArguments2,
                                         java.util.Map<? extends ETypeParameter,? extends EGenericType> substitutions)

equalTypeArguments

public static boolean equalTypeArguments(EGenericType eGenericType1,
                                         EGenericType eGenericType2,
                                         java.util.Map<? extends ETypeParameter,? extends EGenericType> substitutions)

validateETypeParameter

public boolean validateETypeParameter(ETypeParameter eTypeParameter,
                                      DiagnosticChain diagnostics,
                                      java.util.Map<java.lang.Object,java.lang.Object> context)


validateEBigDecimal

public boolean validateEBigDecimal(java.math.BigDecimal eBigDecimal,
                                   DiagnosticChain diagnostics,
                                   java.util.Map<java.lang.Object,java.lang.Object> context)


validateEBigInteger

public boolean validateEBigInteger(java.math.BigInteger eBigInteger,
                                   DiagnosticChain diagnostics,
                                   java.util.Map<java.lang.Object,java.lang.Object> context)


validateEBoolean

public boolean validateEBoolean(boolean eBoolean,
                                DiagnosticChain diagnostics,
                                java.util.Map<java.lang.Object,java.lang.Object> context)


validateEBooleanObject

public boolean validateEBooleanObject(java.lang.Boolean eBooleanObject,
                                      DiagnosticChain diagnostics,
                                      java.util.Map<java.lang.Object,java.lang.Object> context)


validateEByte

public boolean validateEByte(byte eByte,
                             DiagnosticChain diagnostics,
                             java.util.Map<java.lang.Object,java.lang.Object> context)


validateEByteArray

public boolean validateEByteArray(byte[] eByteArray,
                                  DiagnosticChain diagnostics,
                                  java.util.Map<java.lang.Object,java.lang.Object> context)


validateEByteObject

public boolean validateEByteObject(java.lang.Byte eByteObject,
                                   DiagnosticChain diagnostics,
                                   java.util.Map<java.lang.Object,java.lang.Object> context)


validateEChar

public boolean validateEChar(char eChar,
                             DiagnosticChain diagnostics,
                             java.util.Map<java.lang.Object,java.lang.Object> context)


validateECharacterObject

public boolean validateECharacterObject(java.lang.Character eCharacterObject,
                                        DiagnosticChain diagnostics,
                                        java.util.Map<java.lang.Object,java.lang.Object> context)


validateEDate

public boolean validateEDate(java.util.Date eDate,
                             DiagnosticChain diagnostics,
                             java.util.Map<java.lang.Object,java.lang.Object> context)


validateEDiagnosticChain

public boolean validateEDiagnosticChain(DiagnosticChain eDiagnosticChain,
                                        DiagnosticChain diagnostics,
                                        java.util.Map<java.lang.Object,java.lang.Object> context)


validateEDouble

public boolean validateEDouble(double eDouble,
                               DiagnosticChain diagnostics,
                               java.util.Map<java.lang.Object,java.lang.Object> context)


validateEDoubleObject

public boolean validateEDoubleObject(java.lang.Double eDoubleObject,
                                     DiagnosticChain diagnostics,
                                     java.util.Map<java.lang.Object,java.lang.Object> context)


validateEEList

public boolean validateEEList(EList<?> eeList,
                              DiagnosticChain diagnostics,
                              java.util.Map<java.lang.Object,java.lang.Object> context)


validateEEnumerator

public boolean validateEEnumerator(Enumerator eEnumerator,
                                   DiagnosticChain diagnostics,
                                   java.util.Map<java.lang.Object,java.lang.Object> context)


validateEFeatureMap

public boolean validateEFeatureMap(FeatureMap eFeatureMap,
                                   DiagnosticChain diagnostics,
                                   java.util.Map<java.lang.Object,java.lang.Object> context)


validateEFeatureMapEntry

public boolean validateEFeatureMapEntry(FeatureMap.Entry eFeatureMapEntry,
                                        DiagnosticChain diagnostics,
                                        java.util.Map<java.lang.Object,java.lang.Object> context)


validateEFloat

public boolean validateEFloat(float eFloat,
                              DiagnosticChain diagnostics,
                              java.util.Map<java.lang.Object,java.lang.Object> context)


validateEFloatObject

public boolean validateEFloatObject(java.lang.Float eFloatObject,
                                    DiagnosticChain diagnostics,
                                    java.util.Map<java.lang.Object,java.lang.Object> context)


validateEInt

public boolean validateEInt(int eInt,
                            DiagnosticChain diagnostics,
                            java.util.Map<java.lang.Object,java.lang.Object> context)


validateEIntegerObject

public boolean validateEIntegerObject(java.lang.Integer eIntegerObject,
                                      DiagnosticChain diagnostics,
                                      java.util.Map<java.lang.Object,java.lang.Object> context)


validateEJavaClass

public boolean validateEJavaClass(java.lang.Class<?> eJavaClass,
                                  DiagnosticChain diagnostics,
                                  java.util.Map<java.lang.Object,java.lang.Object> context)


validateEJavaObject

public boolean validateEJavaObject(java.lang.Object eJavaObject,
                                   DiagnosticChain diagnostics,
                                   java.util.Map<java.lang.Object,java.lang.Object> context)


validateELong

public boolean validateELong(long eLong,
                             DiagnosticChain diagnostics,
                             java.util.Map<java.lang.Object,java.lang.Object> context)


validateELongObject

public boolean validateELongObject(java.lang.Long eLongObject,
                                   DiagnosticChain diagnostics,
                                   java.util.Map<java.lang.Object,java.lang.Object> context)


validateEMap

public boolean validateEMap(java.util.Map<?,?> eMap,
                            DiagnosticChain diagnostics,
                            java.util.Map<java.lang.Object,java.lang.Object> context)


validateEResource

public boolean validateEResource(Resource eResource,
                                 DiagnosticChain diagnostics,
                                 java.util.Map<java.lang.Object,java.lang.Object> context)


validateEResourceSet

public boolean validateEResourceSet(ResourceSet eResourceSet,
                                    DiagnosticChain diagnostics,
                                    java.util.Map<java.lang.Object,java.lang.Object> context)


validateEShort

public boolean validateEShort(short eShort,
                              DiagnosticChain diagnostics,
                              java.util.Map<java.lang.Object,java.lang.Object> context)


validateEShortObject

public boolean validateEShortObject(java.lang.Short eShortObject,
                                    DiagnosticChain diagnostics,
                                    java.util.Map<java.lang.Object,java.lang.Object> context)


validateEString

public boolean validateEString(java.lang.String eString,
                               DiagnosticChain diagnostics,
                               java.util.Map<java.lang.Object,java.lang.Object> context)


validateETreeIterator

public boolean validateETreeIterator(TreeIterator<?> eTreeIterator,
                                     DiagnosticChain diagnostics,
                                     java.util.Map<java.lang.Object,java.lang.Object> context)


validateEInvocationTargetException

public boolean validateEInvocationTargetException(java.lang.reflect.InvocationTargetException eInvocationTargetException,
                                                  DiagnosticChain diagnostics,
                                                  java.util.Map<java.lang.Object,java.lang.Object> context)


getResourceLocator

public ResourceLocator getResourceLocator()
Returns the resource locator that will be used to fetch messages for this validator's diagnostics.

Overrides:
getResourceLocator in class EObjectValidator
Returns:
the resource locator for fetching model-specific messages.

report

protected void report(DiagnosticChain diagnostics,
                      java.lang.String key,
                      java.lang.Object[] substitutions,
                      int index,
                      java.util.Map<java.lang.Object,java.lang.Object> context)
Creates a new diagnostic for a problem at the given index.

Parameters:
diagnostics - the target for the new diagnostic.
key - the key for the message.
substitutions - the substitutions for the key; null if there are no substitutions.
index - the index at which the problem occurred.
Since:
2.4
See Also:
EcoreValidator.EGenericTypeBuilder.report(DiagnosticChain, String, Object[], int)

Copyright 2001-2006 IBM Corporation and others.
All Rights Reserved.