## org.eclipse.emf.ecore
Interface EValidator

All Known Implementing Classes:
  Diagnostician, EcoreValidator, EObjectValidator, GenModelValidator, XMLNamespaceValidator, XMLTypeValidator

    public interface EValidator

A validity checker.

Nested Class Summary
`static interface` `EValidator.Descriptor` An `EValidator` wrapper that is used by the `EValidator.Registry`.
`static interface` `EValidator.PatternMatcher` An common interface for pattern-based constraints.
`static interface` `EValidator.Registry` A map from `EPackage` to `EValidator`.
`static interface` `EValidator.SubstitutionLabelProvider` An interface for providing labels used within message substitutions.

Field Summary
`static java.lang.String` `MARKER` This is the ID used for Eclipse markers which are based on diagnostics.
`static java.lang.String` `RELATED_URIS_ATTRIBUTE` This is the name of the marker attribute to hold a space separated sequence of `encoded` Strings where each string is the `URI` of an object related to the target of the marker.
`static java.lang.String` `URI_ATTRIBUTE` This is the name of the marker attribute to hold the String representation of the `URI` of the object that is the target of the marker.

Method Summary
`boolean` `validate(EClass eClass, EObject eObject, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)`
`boolean` `validate(EDataType eDataType, java.lang.Object value, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)`
`boolean` `validate(EObject eObject, DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)` Validates the object in the given context, optionally producing diagnostics.

Field Detail

### MARKER

    static final java.lang.String MARKER

  This is the ID used for Eclipse markers which are based on diagnostics.

  See Also:
    Constant Field Values

### URI_ATTRIBUTE

    static final java.lang.String URI_ATTRIBUTE

  This is the name of the marker attribute to hold the String representation of the `URI` of the object that is the target of the marker.

  See Also:
    `EcoreUtil.getURI(org.eclipse.emf.ecore.EObject)`, Constant Field Values

### RELATED_URIS_ATTRIBUTE

    static final java.lang.String RELATED_URIS_ATTRIBUTE

  This is the name of the marker attribute to hold a space separated sequence of `encoded` Strings where each string is the `URI` of an object related to the target of the marker. The vale of this attribute should be processed as follows:

        for (String relatedURI : relatedURIs.split(" "))
        {
          URI uri = URI.createURI(URI.decode(relatedURI));
          // ...
        }

  See Also:
    `EcoreUtil.getURI(org.eclipse.emf.ecore.EObject)`, `URI.decode(String)`, Constant Field Values

Method Detail

### validate

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

  Validates the object in the given context, optionally producing diagnostics.

  Parameters:
    `diagnostics` - a place to accumulate diagnostics; if it's `null`, no diagnostics should be produced.
    `context` - a place to cache information, if it's `null`, no cache is supported.
  Returns:
    whether the object is valid.

### validate

    boolean validate(EClass eClass,
                     EObject eObject,
                     DiagnosticChain diagnostics,
                     java.util.Map<java.lang.Object,java.lang.Object> context)

### validate

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

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