Package org.eclipse.emf.cdo.etypes.util

# Klasse BasicAnnotationValidator

java.lang.Object
org.eclipse.emf.cdo.etypes.util.BasicAnnotationValidator

Alle implementierten Schnittstellen:
  `AnnotationValidator`

public abstract class BasicAnnotationValidator extends Object implements AnnotationValidator
A basic implementation of an `annotation validator`.

An implementation must specialize the `getResourceLocator()` method in order for the `getValidLocationDescription()` method to function correctly. The most straight-forward way to implement an annotation validator is to model the supported keys, specializing `getPropertyClasses(ModelElement)` with one or more `classes` that can be `instantiated` to represent the information in the annotation. These classes are used to induce `a mapping` of keys onto the underlying annotation model's features. If the annotation model includes references, `validateReferenceDetailValueLiteral` and `convertPropertyReferenceValueToLiteralItem(EObject, EReference, Object)` must also be specialized. Alternatively an implementation can specialize `validateDetail(Annotation, ModelElement, Map.Entry, DiagnosticChain, Map)` without providing a modeled representation. The annotation validator's `assistant` is especially useful for inducing a user interface based on the modeled annotation representation.

Seit:
  4.22
Siehe auch:
  - `AnnotationValidator`
  - `BasicAnnotationValidator.Assistant`

## Verschachtelte Klassen - Übersicht

Verschachtelte Klassen
Modifizierer und Typ
Klasse
Beschreibung
`static class`
`BasicAnnotationValidator.Assistant`
An assistant that is useful for inducing a user interface that represents the annotation information in a more structured way using `modeled objects` that are created by `BasicAnnotationValidator.Assistant.createInstance(EClass, Annotation)`.
`static class`
`BasicAnnotationValidator.ValidationContext`
Context data used by `validateAttributeDetailValueLiteral` to pass contextual information that can be used when a data type's value is `validated`.

## Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen org.eclipse.emf.cdo.etypes.AnnotationValidator

`AnnotationValidator.Registry`

## Feldübersicht

Felder
Modifizierer und Typ
Feld
Beschreibung
`protected final String`
`annotationName`
The name used in messages for this validator's annotations.
`protected final String`
`annotationSource`
The `annotation source` validated by this annotation validator.
`protected final BasicAnnotationValidator.Assistant`
`assistant`
The `assistant` used by the framework to induce a user interface.
`protected final String`
`diagnosticSource`
The `source` used in this validator's diagnostics.
`static final int`
`IGNORED_ANNOTATIONS`
`static final int`
`IGNORED_CONTENTS`
`static final int`
`IGNORED_ENTRY`
`static final int`
`IGNORED_REFERENCES`
`static final int`
`INVALID_ANNOTATION`
`static final int`
`INVALID_CONTENT`
`static final int`
`INVALID_DETAIL_VALUE`
`static final int`
`INVALID_DUPLICATE`
`static final int`
`INVALID_LOCATION`
`static final int`
`INVALID_REFERENCE`
`static final int`
`INVALID_REFERENCE_LITERAL`
`static final int`
`INVALID_VALUE_LITERAL`
`static final int`
`MISSING_ENTRY`
`static final int`
`MISSING_REQUIRED_ENTRY_VALUE`
`static final int`
`TOO_FEW_VALUES`
`static final int`
`TOO_MANY_VALUES`

## Konstruktorübersicht

Konstruktoren
Konstruktor
Beschreibung
`BasicAnnotationValidator(String annotationSource, String annotationName, String diagnosticSource)`
Creates an instance for the given `annotation source` validated by this annotation validator.

## Methodenübersicht

Modifizierer und Typ
Methode
Beschreibung
`protected String`
`convertPropertyAttributeValueToLiteralItem(EObject eObject, EAttribute eAttribute, Object value)`
Returns the single value of the attribute's `type` for the modeled object converted to a literal representation as used in `detail entry`.
`protected String`
`convertPropertyReferenceValueToLiteralItem(EObject eObject, EReference eReference, Object value)`
Returns the single value of the references's `type` for the modeled object converted to a literal representation as used in `detail entry`.
`protected String`
`convertPropertyValueToLiteral(EObject eObject, EStructuralFeature eStructuralFeature, Object value)`
Returns the value of the feature of the modeled object converted to a literal representation as used in `detail entry`.
`protected String`
`convertPropertyValueToLiteralItem(EObject eObject, EStructuralFeature eStructuralFeature, Object value)`
Returns the single value of the feature's `type` for the modeled object converted to a literal representation as used in `detail entry`.
`protected BasicAnnotationValidator.Assistant`
`createAssistant()`
Creates the assistant.
`protected BasicDiagnostic`
`createDiagnostic(int severity, int code, String message, Object... data)`
Creates a diagnostic using the given parameters and the `annotationSource`.
`protected EObject`
`createInstance(EClass eClass, Annotation annotation)`
Creates an instance of the modeled representation for the given annotation.
`protected BasicDiagnostic`
`createValueDiagnostic(Annotation annotation, ModelElement modelElement, Map.Entry<String,String> entry, EStructuralFeature feature)`
Creates the placeholder diagnostic used by `validateFeatureDetail`.
`protected Collection<? extends Annotation>`
`getAllValidAnnotations(Annotation annotation, ModelElement modelElement, Collection<? extends Annotation> annotations)`
Returns the filtered collection of nested annotations that are valid for this annotation.
`String`
`getAnnotationSource()`
Returns the `annotation source` of the annotations validated by this annotation validator.
`BasicAnnotationValidator.Assistant`
`getAssistant()`
Returns the assistant provided by this annotation validator which is generally useful to provide access to protected methods that are needed primarily for inducing a user interface that represents the annotations in a more structured form.
`protected ResourceLocator`
`getEcoreResourceLocator()`
Returns the resource locator for fetching messages supported directly by the base implementation.
`protected Map<String,EStructuralFeature>`
`getProperties(ModelElement modelElement)`
Returns a map from key to `feature`.
`protected abstract List<EClass>`
`getPropertyClasses(ModelElement modelElement)`
Returns the model classes used to represent annotations for the given model element.
`protected abstract ResourceLocator`
`getResourceLocator()`
Returns the resource locator for fetching implementation-specific messages.
`protected EValidator`
`getRootEValidator(Map<Object,Object> context)`
Returns the root validator of the context.
`protected String`
`getString(ResourceLocator resourceLocator, String key, Object... substitutions)`
Fetches a translated string from the resource locator using the message key and the give substitutions, if any.
`protected Collection<? extends Annotation>`
`getValidAnnotations(Annotation annotation, ModelElement modelElement, Collection<? extends Annotation> annotations)`
Returns the filtered collection of nested annotations that are valid for this annotation.
`protected Collection<? extends EObject>`
`getValidContents(Annotation annotation, ModelElement modelElement, Collection<? extends EObject> contents)`
Returns the filtered collection of contents that are valid for this annotation.
`protected String`
`getValidLocationDescription()`
Returns a description of the valid locations supported for annotations of this annotation validator.
`protected Collection<?>`
`getValidReferences(Annotation annotation, ModelElement modelElement, Collection<?> references)`
Returns the filtered collection of references that are valid for this annotation.
`protected EObject`
`initialize(EObject eObject, Annotation annotation)`
Returns an initialized instance of the given object for the given annotation.
`protected boolean`
`isAnnotationsSupported(Annotation annotation, ModelElement modelElement)`
Returns whether `nested annotations` are meaningful for this annotation.
`protected boolean`
`isApplicable(EObject eObject, EStructuralFeature eStructuralFeature)`
Returns whether the given feature of the given modeled representation is meaningful for the current state of the model.
`protected boolean`
`isContentsSupported(Annotation annotation, ModelElement modelElement)`
Returns whether `contents` are meaningful for this annotation.
`protected boolean`
`isDuplicateValid(ModelElement modelElement, Annotation primaryAnnotation, Annotation secondaryAnnotation)`
Returns whether the given two annotations, both with the annotation validator's annotation source, both `contained` by the given model element, are valid.
`protected boolean`
`isIncludedProperty(ModelElement modelElement, EClass eClass, EStructuralFeature eStructuralFeature)`
Returns whether the given structural feature of the given class for the given model element is `included as a property`.
`protected boolean`
`isReferencesSupported(Annotation annotation, ModelElement modelElement)`
Returns whether `references` are meaningful for this annotation.
`boolean`
`isValidLocation(Annotation annotation)`
Returns whether this annotation with this annotation validator's `annotation source` is valid at its `current location`.
`protected boolean`
`isValidLocation(Annotation annotation, ModelElement modelElement)`
Returns whether this annotation `contained` by this model element is valid at this location.
`protected String`
`join(EObject eObject, EStructuralFeature eStructuralFeature, List<String> literalValues)`
Returns the joined list of values of this modeled object's feature.
`protected static EPackage`
`loadEPackage(String uri)`
Returns the package loaded from the location specified by the given URI.
`protected void`
`reportDuplicate(Annotation primaryAnnotation, Annotation secondaryAnnotation, ModelElement modelElement, DiagnosticChain diagnostics, Map<Object,Object> context)`
`protected void`
`reportIgnoredAnnotations(Annotation annotation, ModelElement modelElement, Collection<? extends Annotation> ignoredAnnotations, DiagnosticChain diagnostics, Map<Object,Object> context)`
`protected void`
`reportIgnoredContents(Annotation annotation, ModelElement modelElement, Collection<? extends EObject> ignoredContents, DiagnosticChain diagnostics, Map<Object,Object> context)`
`protected void`
`reportIgnoredEntry(Annotation annotation, ModelElement modelElement, Map.Entry<String,String> entry, DiagnosticChain diagnostics, Map<Object,Object> context)`
`protected void`
`reportIgnoredReferences(Annotation annotation, ModelElement modelElement, Collection<? extends EObject> ignoredReferences, DiagnosticChain diagnostics, Map<Object,Object> context)`
`protected void`
`reportInvalidAnnotation(Annotation annotation, ModelElement modelElement, Annotation nestedAnnotation, DiagnosticChain diagnostics, Map<Object,Object> context)`
`protected void`
`reportInvalidContent(Annotation annotation, ModelElement modelElement, EObject content, DiagnosticChain diagnostics, Map<Object,Object> context)`
`protected void`
`reportInvalidLocation(Annotation annotation, DiagnosticChain diagnostics, Map<Object,Object> context)`
`protected void`
`reportInvalidReference(Annotation annotation, ModelElement modelElement, EObject reference, DiagnosticChain diagnostics, Map<Object,Object> context)`
`protected void`
`reportInvalidReferenceLiteral(Annotation annotation, ModelElement modelElement, Map.Entry<String,String> entry, EReference reference, String literalValue, DiagnosticChain diagnostics, Map<Object,Object> context)`
`protected void`
`reportInvalidValueLiteral(Annotation annotation, ModelElement modelElement, Map.Entry<String,String> entry, EAttribute attribute, String literalValue, EDataType dataType, DiagnosticChain diagnostics, RuntimeException exception, Map<Object,Object> context)`
`protected void`
`reportMissingEntry(Annotation annotation, ModelElement modelElement, String key, EStructuralFeature property, DiagnosticChain diagnostics, Map<Object,Object> context)`
`protected void`
`reportMissingRequiredEntryValue(Annotation annotation, ModelElement modelElement, EStructuralFeature feature, List<Object> values, DiagnosticChain diagnostics, Map<Object,Object> context)`
`protected void`
`reportTooFewValues(Annotation annotation, ModelElement modelElement, Map.Entry<String,String> entry, EStructuralFeature feature, List<Object> values, int size, int lowerBound, DiagnosticChain diagnostics, Map<Object,Object> context)`
`protected void`
`reportTooManyValues(Annotation annotation, ModelElement modelElement, Map.Entry<String,String> entry, EStructuralFeature feature, List<Object> values, int size, int upperBound, DiagnosticChain diagnostics, Map<Object,Object> context)`
`protected List<String>`
`split(Annotation annotation, ModelElement modelElement, Map.Entry<String,String> entry, String literalValue, EStructuralFeature feature, DiagnosticChain diagnostics, Map<Object,Object> context)`
Splits the literal value into a list of literal values as appropriate for this feature.
`boolean`
`validate(Annotation annotation, DiagnosticChain diagnostics, Map<Object,Object> context)`
Returns whether this annotation is valid.
`protected boolean`
`validateAnnotations(Annotation annotation, ModelElement modelElement, DiagnosticChain diagnostics, Map<Object,Object> context)`
Returns whether this annotation's `nested annotations` are valid.
`protected boolean`
`validateAttributeDetailLiteralValue(Annotation annotation, ModelElement modelElement, Map.Entry<String,String> entry, EAttribute attribute, List<Object> dataValues, DiagnosticChain diagnostics, Map<Object,Object> context)`
Returns whether the literal value of this detail entry for the corresponding attribute is valid.
`protected boolean`
`validateAttributeDetailValueLiteral(Annotation annotation, ModelElement modelElement, Map.Entry<String,String> entry, EAttribute attribute, String literalValue, List<Object> dataValues, DiagnosticChain diagnostics, Map<Object,Object> context)`
Returns whether the given literal value is valid with respect to this detail entry's corresponding attribute's `data type`.
`protected boolean`
`validateContents(Annotation annotation, ModelElement modelElement, DiagnosticChain diagnostics, Map<Object,Object> context)`
Returns whether this annotation's `contents` are valid.
`protected boolean`
`validateDetail(Annotation annotation, ModelElement modelElement, Map.Entry<String,String> entry, DiagnosticChain diagnostics, Map<Object,Object> context)`
Returns whether this detail entry is valid.
`protected boolean`
`validateDetails(Annotation annotation, ModelElement modelElement, DiagnosticChain diagnostics, Map<Object,Object> context)`
Returns whether this annotation's `details` are valid.
`protected boolean`
`validateFeatureDetail(Annotation annotation, ModelElement modelElement, Map.Entry<String,String> entry, EStructuralFeature feature, DiagnosticChain diagnostics, Map<Object,Object> context)`
Returns whether the value of this detail entry for the corresponding feature is valid.
`protected boolean`
`validateFeatureDetailValue(Annotation annotation, ModelElement modelElement, Map.Entry<String,String> entry, EStructuralFeature feature, List<Object> values, DiagnosticChain diagnostics, Map<Object,Object> context)`
Returns whether the modeled values for this detail entry's corresponding feature are valid.
`protected boolean`
`validateReferenceDetailLiteralValue(Annotation annotation, ModelElement modelElement, Map.Entry<String,String> entry, EReference reference, List<Object> referenceValues, DiagnosticChain diagnostics, Map<Object,Object> context)`
Returns whether the literal value of this detail entry for the corresponding reference is valid.
`protected boolean`
`validateReferenceDetailValueLiteral(Annotation annotation, ModelElement modelElement, Map.Entry<String,String> entry, EReference reference, String literalValue, List<Object> referenceValues, DiagnosticChain diagnostics, Map<Object,Object> context)`
Returns whether the given literal value is valid with respect to this detail entry's corresponding reference's `class`.
`protected boolean`
`validateReferences(Annotation annotation, ModelElement modelElement, DiagnosticChain diagnostics, Map<Object,Object> context)`
Returns whether this annotation's `references` are valid.

### Von Klasse geerbte Methoden java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Felddetails

### INVALID_LOCATION

public static final int INVALID_LOCATION

Siehe auch:
  - `reportInvalidLocation(Annotation, DiagnosticChain, Map)`
  - Konstantenfeldwerte

### INVALID_DUPLICATE

public static final int INVALID_DUPLICATE

Siehe auch:
  - `reportDuplicate(Annotation, Annotation, ModelElement, DiagnosticChain, Map)`
  - Konstantenfeldwerte

### INVALID_REFERENCE_LITERAL

public static final int INVALID_REFERENCE_LITERAL

Siehe auch:
  - `reportInvalidReferenceLiteral(Annotation, ModelElement, Map.Entry, EReference, String, DiagnosticChain, Map)`
  - Konstantenfeldwerte

### INVALID_DETAIL_VALUE

public static final int INVALID_DETAIL_VALUE

Siehe auch:
  - `createValueDiagnostic(Annotation, ModelElement, Map.Entry, EStructuralFeature)`
  - Konstantenfeldwerte

### INVALID_VALUE_LITERAL

public static final int INVALID_VALUE_LITERAL

Siehe auch:
  - `reportInvalidValueLiteral(Annotation, ModelElement, Map.Entry, EAttribute, String, EDataType, DiagnosticChain, RuntimeException, Map)`
  - Konstantenfeldwerte

### IGNORED_ANNOTATIONS

public static final int IGNORED_ANNOTATIONS

Siehe auch:
  - `reportIgnoredAnnotations(Annotation, ModelElement, Collection, DiagnosticChain, Map)`
  - Konstantenfeldwerte

### IGNORED_CONTENTS

public static final int IGNORED_CONTENTS

Siehe auch:
  - `reportIgnoredContents(Annotation, ModelElement, Collection, DiagnosticChain, Map)`
  - Konstantenfeldwerte

### IGNORED_REFERENCES

public static final int IGNORED_REFERENCES

Siehe auch:
  - `reportIgnoredReferences(Annotation, ModelElement, Collection, DiagnosticChain, Map)`
  - Konstantenfeldwerte

### INVALID_REFERENCE

public static final int INVALID_REFERENCE

Siehe auch:
  - `reportInvalidReference(Annotation, ModelElement, EObject, DiagnosticChain, Map)`
  - Konstantenfeldwerte

### INVALID_ANNOTATION

public static final int INVALID_ANNOTATION

Siehe auch:
  - `reportInvalidAnnotation(Annotation, ModelElement, Annotation, DiagnosticChain, Map)`
  - Konstantenfeldwerte

### INVALID_CONTENT

public static final int INVALID_CONTENT

Siehe auch:
  - `reportInvalidContent(Annotation, ModelElement, EObject, DiagnosticChain, Map)`
  - Konstantenfeldwerte

### IGNORED_ENTRY

public static final int IGNORED_ENTRY

Siehe auch:
  - `reportIgnoredEntry(Annotation, ModelElement, Map.Entry, DiagnosticChain, Map)`
  - Konstantenfeldwerte

### MISSING_ENTRY

public static final int MISSING_ENTRY

Siehe auch:
  - `reportMissingEntry(Annotation, ModelElement, String, EStructuralFeature, DiagnosticChain, Map)`
  - Konstantenfeldwerte

### MISSING_REQUIRED_ENTRY_VALUE

public static final int MISSING_REQUIRED_ENTRY_VALUE

Siehe auch:
  - `reportMissingRequiredEntryValue(Annotation, ModelElement, EStructuralFeature, List, DiagnosticChain, Map)`
  - Konstantenfeldwerte

### TOO_FEW_VALUES

public static final int TOO_FEW_VALUES

Siehe auch:
  - `reportTooFewValues(Annotation, ModelElement, Map.Entry, EStructuralFeature, List, int, int, DiagnosticChain, Map)`
  - Konstantenfeldwerte

### TOO_MANY_VALUES

public static final int TOO_MANY_VALUES

Siehe auch:
  - `reportTooManyValues(Annotation, ModelElement, Map.Entry, EStructuralFeature, List, int, int, DiagnosticChain, Map)`
  - Konstantenfeldwerte

### annotationSource

protected final String annotationSource
The `annotation source` validated by this annotation validator.

### annotationName

protected final String annotationName
The name used in messages for this validator's annotations.

### diagnosticSource

protected final String diagnosticSource
The `source` used in this validator's diagnostics.

### assistant

protected final BasicAnnotationValidator.Assistant assistant
The `assistant` used by the framework to induce a user interface.

## Konstruktordetails

### BasicAnnotationValidator

public BasicAnnotationValidator(String annotationSource, String annotationName, String diagnosticSource)
Creates an instance for the given `annotation source` validated by this annotation validator.

Parameter:
  `annotationSource` - the annotation source validated by this annotation validator.
  `annotationName` - the name used in this validator's diagnostics
  `diagnosticSource` - the `diagnostic source` used in this validator's diagnostics.

## Methodendetails

### getAnnotationSource

public String getAnnotationSource()
Returns the `annotation source` of the annotations validated by this annotation validator.

Angegeben von:
  `getAnnotationSource` in Schnittstelle `AnnotationValidator`
Gibt zurück:
  the annotation source.

### getResourceLocator

protected abstract ResourceLocator getResourceLocator()
Returns the resource locator for fetching implementation-specific messages.

Gibt zurück:
  the resource locator for fetching model-specific messages.

### getPropertyClasses

protected abstract List<EClass> getPropertyClasses(ModelElement modelElement)
Returns the model classes used to represent annotations for the given model element.

Typically an annotation validator implementation will return a single class. An induced user interface will generally require the ability to `create instances` of the classes returned by this method. The annotation validator implementation itself does not require that ability.

Parameter:
  `modelElement` - the model element in question.
Gibt zurück:
  the model classes used to represent annotations for the given model element.

### getAssistant

public BasicAnnotationValidator.Assistant getAssistant()
Returns the assistant provided by this annotation validator which is generally useful to provide access to protected methods that are needed primarily for inducing a user interface that represents the annotations in a more structured form.

Gibt zurück:
  the assistant provided by this annotation validator.

### createAssistant

protected BasicAnnotationValidator.Assistant createAssistant()
Creates the assistant.

Generally derived classes will not need to specialize this method because all methods of the assistant delegate back to the annotation validator.

Gibt zurück:
  the assistant.

### isValidLocation

public boolean isValidLocation(Annotation annotation)
Returns whether this annotation with this annotation validator's `annotation source` is valid at its `current location`.

This implementation returns `false` if the containing `Annotation.getModelElement()` is `null`, if the `isValidLocation(Annotation, ModelElement)` returns `false` for the containing model element, or if this is not the first annotation with this annotation source in the model element and `isDuplicateValue` returns `false`.

Angegeben von:
  `isValidLocation` in Schnittstelle `AnnotationValidator`
Parameter:
  `annotation` - the annotation in question.
Gibt zurück:
  whether this annotation with this annotation validator's annotation source is valid at its current location.

### isValidLocation

protected boolean isValidLocation(Annotation annotation, ModelElement modelElement)
Returns whether this annotation `contained` by this model element is valid at this location.

This implementation returns `true`. It's typically the case that annotations on annotations aren't meaningful and valid.

Parameter:
  `annotation` - the annotation in question.
  `modelElement` - the annotation's `containing` model element.
Gibt zurück:
  whether this annotation contained by this model element is valid at this location.
Siehe auch:
  - `isValidLocation(Annotation)`
  - `validate(Annotation, DiagnosticChain, Map)`

### isDuplicateValid

protected boolean isDuplicateValid(ModelElement modelElement, Annotation primaryAnnotation, Annotation secondaryAnnotation)
Returns whether the given two annotations, both with the annotation validator's annotation source, both `contained` by the given model element, are valid.

This implementation returns `false` because it's typically the case that only the primary annotation is meaningful and valid.

Parameter:
  `modelElement` - the model element that contains both annotations in its `annotations` feature.
  `primaryAnnotation` - the first annotation in the model element's details.
  `secondaryAnnotation` - a subsequent annotation in the model element's details.
Gibt zurück:
  whether these two annotations, both of which have this annotation validator's annotation source, are valid.
Siehe auch:
  - `isValidLocation(Annotation)`
  - `validate(Annotation, DiagnosticChain, Map)`

### validate

public boolean validate(Annotation annotation, DiagnosticChain diagnostics, Map<Object,Object> context)
Returns whether this annotation is valid.

This implementation checks if the `location is valid` and `reports an invalid location` if it is not. Then checks for `invalid duplicates` and `reports a duplicate` if it is an invalid duplicate. Then it `validates the references` and `validates the details`.

Angegeben von:
  `validate` in Schnittstelle `AnnotationValidator`
Parameter:
  `annotation` - the annotation in question.
  `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.
Gibt zurück:
  whether this annotation is valid.
Siehe auch:
  - `EObjectValidator.validate(EObject, DiagnosticChain, Map)`

### validateReferences

protected boolean validateReferences(Annotation annotation, ModelElement modelElement, DiagnosticChain diagnostics, Map<Object,Object> context)
Returns whether this annotation's `references` are valid.

This implementation checks whether `references are supported`. If not, it checks whether the references are empty and if not `reports ignored references`. If references are supported, then for each reference, it tests whether that reference is among the `valid references`, passing in this annotation's references to determine the valid references, and `reports an invalid reference` for each not present in the valid references.

It's typically the case that annotations ignore references. If that's not the case, specialize `isReferencesSupported(Annotation, ModelElement)` and `getValidReferences(Annotation, ModelElement, Collection)`. An implementation may override this method to report missing required references.

Parameter:
  `annotation` - the annotation in question.
  `modelElement` - the annotation's `containing` model element.
  `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.
Gibt zurück:
  whether this annotation's references are valid.
Siehe auch:
  - `isReferencesSupported(Annotation, ModelElement)`

### isReferencesSupported

protected boolean isReferencesSupported(Annotation annotation, ModelElement modelElement)
Returns whether `references` are meaningful for this annotation.

This method used to determine how references should be `validated`. Also, an induced user interface should avoid providing the ability to specify references when this returns `false`. Implementations that override this to ever return `true` should also override `getValidReferences(Annotation, ModelElement, Collection)` to control the valid choices.

Parameter:
  `annotation` - the annotation in question.
  `modelElement` - the annotation's `containing` model element.
Gibt zurück:
  whether references are meaningful for this annotation.
Siehe auch:
  - `BasicAnnotationValidator.Assistant.isReferencesSupported(Annotation)`
  - `validateReferences(Annotation, ModelElement, DiagnosticChain, Map)`

### getValidReferences

protected Collection<?> getValidReferences(Annotation annotation, ModelElement modelElement, Collection<?> references)
Returns the filtered collection of references that are valid for this annotation.

An induced user interface should provide the ability to specify only the references returned by this method. The references argument may contain all reachable objects, some subset there of, or none at all; an implementation may choose to filter from this collection or to provide its own result, including objects not in this collection. This implementation returns the references argument if `references are supported`, or an empty list otherwise. It is also used to `determine` which references are valid. An implementation that overrides this should also override `isReferencesSupported(Annotation, ModelElement)`.

Parameter:
  `annotation` - the annotation in question.
  `modelElement` - the annotation's `containing` model element.
  `references` - all reachable objects, some subset there of, or none at all.
Gibt zurück:
  the objects that are valid as references for this annotation.
Siehe auch:
  - `BasicAnnotationValidator.Assistant.getValidReferences(Annotation, Collection)`

### validateContents

protected boolean validateContents(Annotation annotation, ModelElement modelElement, DiagnosticChain diagnostics, Map<Object,Object> context)
Returns whether this annotation's `contents` are valid.

This implementation checks whether `contents are supported`. If not, it checks whether the contents are empty and if not `reports ignored contents`. If contents are supported, then for each content, it tests whether that content is among the `valid contents`, passing in this annotation's contents to determine the valid contents, and `reports an invalid content` for each not present in the valid contents.

It's typically the case that annotations ignore contents. If that's not the case, specialize `isContentsSupported(Annotation, ModelElement)` and `getValidContents(Annotation, ModelElement, Collection)`. An implementation may override this method to report missing required contents.

Parameter:
  `annotation` - the annotation in question.
  `modelElement` - the annotation's `containing` model element.
  `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.
Gibt zurück:
  whether this annotation's contents are valid.
Siehe auch:
  - `isContentsSupported(Annotation, ModelElement)`
  - `getValidContents(Annotation, ModelElement, Collection)`

### isContentsSupported

protected boolean isContentsSupported(Annotation annotation, ModelElement modelElement)
Returns whether `contents` are meaningful for this annotation.

This method used to determine how contents should be `validated`. Also, an induced user interface should avoid providing the ability to specify contents when this returns `false`. Implementations that override this to ever return `true` should also override `getValidContents(Annotation, ModelElement, Collection)` to control the valid choices.

Parameter:
  `annotation` - the annotation in question.
  `modelElement` - the annotation's `containing` model element.
Gibt zurück:
  whether contents are meaningful for this annotation.
Siehe auch:
  - `BasicAnnotationValidator.Assistant.isContentsSupported(Annotation)`
  - `validateContents(Annotation, ModelElement, DiagnosticChain, Map)`

### getValidContents

protected Collection<? extends EObject> getValidContents(Annotation annotation, ModelElement modelElement, Collection<? extends EObject> contents)
Returns the filtered collection of contents that are valid for this annotation.

An induced user interface should provide the ability to specify only the contents returned by this method. The contents argument may contain nothing at all, or the `current contents` of the annotation; an implementation may choose to filter from this collection or to provide its own result, including objects not in this collection but it should not remove objects currently contained by the annotation that are valid. This implementation returns the contents argument if `contents are supported`, or an empty list otherwise. It is also used to `determine` which contents are valid and should therefore not remove values from the provided contents argument if they are valid. An implementation that overrides this should also override `isContentsSupported(Annotation, ModelElement)`.

Parameter:
  `annotation` - the annotation in question.
  `modelElement` - the annotation's `containing` model element.
  `contents` - nothing at all, or the `current or potential contents` of the annotation.
Gibt zurück:
  the objects that are valid as contents for this annotation.
Siehe auch:
  - `BasicAnnotationValidator.Assistant.getValidContents(Annotation, Collection)`

### validateAnnotations

protected boolean validateAnnotations(Annotation annotation, ModelElement modelElement, DiagnosticChain diagnostics, Map<Object,Object> context)
Returns whether this annotation's `nested annotations` are valid.

This implementation iterates over the nested annotations, and if there is at least one for which there is no `registered annotation validator` or for which the registered annotation validator does not consider this nested annotation `valid at this location`, it `reports ignored annotations`. It's typically the case that annotations ignore nested annotations. If that's not the case, you should override this method and specialize `isAnnotationsSupported(Annotation, ModelElement)` and consider specializing `getValidAnnotations(Annotation, ModelElement, Collection)`

This implementation checks whether `nested annotations are supported`. If not, it checks whether the `valid annotations`, passing in this annotation's nested annotations to determine the valid annotations, contain all the nested annotations; if not it `reports ignored annotations`. If nested annotations are supported, then for each nested annotation, it tests whether that annotation is among the `valid annotations` and `reports an invalid annotation` for each not present in the valid annotations.

It's typically the case that annotations ignore nested annotations. If that's not the case, specialize `isAnnotationsSupported(Annotation, ModelElement)` and `getValidAnnotations(Annotation, ModelElement, Collection)`. An implementation may override this method to report missing required nested annotations.

Parameter:
  `annotation` - the annotation in question.
  `modelElement` - the annotation's `containing` model element.
  `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.
Gibt zurück:
  whether this annotation's nested annotations are valid.
Siehe auch:
  - `isAnnotationsSupported(Annotation, ModelElement)`

### isAnnotationsSupported

protected boolean isAnnotationsSupported(Annotation annotation, ModelElement modelElement)
Returns whether `nested annotations` are meaningful for this annotation.

This method used to determine how nested annotations should be `validated`. Also, an induced user interface should avoid providing the ability to specify nested annotations when this returns `false`. Implementations that override this to ever return `true` should also override `getValidAnnotations(Annotation, ModelElement, Collection)` to control the valid choices.

Parameter:
  `annotation` - the annotation in question.
  `modelElement` - the annotation's `containing` model element.
Gibt zurück:
  whether nested annotations are meaningful for this annotation.
Siehe auch:
  - `BasicAnnotationValidator.Assistant.isAnnotationsSupported(Annotation)`
  - `validateAnnotations(Annotation, ModelElement, DiagnosticChain, Map)`

### getValidAnnotations

protected Collection<? extends Annotation> getValidAnnotations(Annotation annotation, ModelElement modelElement, Collection<? extends Annotation> annotations)
Returns the filtered collection of nested annotations that are valid for this annotation.

The annotations argument typically contains the `current nested annotations` of the specified annotation; an implementation may choose to filter from this collection, but it should not remove nested annotations currently contained by the annotation that are valid. This implementation takes into account the fact that annotations may be specifically designed to annotate other annotations, i.e., that the nested annotation source might correspond to a `registered annotation validator` that considers its annotations `valid` when contained by the specified annotation. As such, this implementation does not remove nested annotations for which there is a registered validator that considers its annotation valid in the specified annotation. Note that this method is used to `determine` which nested annotations are valid and that is why it should not remove values from the provided annotations argument if they are valid.

Parameter:
  `annotation` - the annotation in question.
  `modelElement` - the annotation's `containing` model element.
  `annotations` - typically the `current nested annotations` of the annotation.
Gibt zurück:
  the nested annotations that are valid as annotations for this annotation.
Siehe auch:
  - `BasicAnnotationValidator.Assistant.getValidAnnotations(Annotation, Collection)`

### getAllValidAnnotations

protected Collection<? extends Annotation> getAllValidAnnotations(Annotation annotation, ModelElement modelElement, Collection<? extends Annotation> annotations)
Returns the filtered collection of nested annotations that are valid for this annotation.

An induced user interface should provide the ability to specify only the nested annotations returned by this method. The annotations argument may contain nothing at all, or the `current nested annotations` of the specified annotation; an implementation may choose to filter from this collection or to provide its own result, including objects not in this collection, but it should not remove nested annotations currently contained by the annotation that are valid. This implementation takes into account the fact that annotations may be specifically designed to annotate other annotations, i.e., that the nested annotation source might correspond to a `registered annotation validator` that considers its annotations `valid` when contained by the specified annotation. As such, this implementation does not remove nested annotations for which there is a registered validator that considers its annotation valid in the specified annotation. Also, this implementation's result will include an additional annotation for each registered annotation validator that considers its annotations valid when nested in this annotation. In fact, an override should only add values to those returned by this implementation. An implementation that overrides this method should also override `isAnnotationsSupported(Annotation, ModelElement)`.

Parameter:
  `annotation` - the annotation in question.
  `modelElement` - the annotation's `containing` model element.
  `annotations` - nothing at all, or the `current or potential nested annotations` of the annotation.
Gibt zurück:
  the nested annotations that are valid as annotations for this annotation.
Siehe auch:
  - `BasicAnnotationValidator.Assistant.getValidAnnotations(Annotation, Collection)`

### validateDetails

protected boolean validateDetails(Annotation annotation, ModelElement modelElement, DiagnosticChain diagnostics, Map<Object,Object> context)
Returns whether this annotation's `details` are valid.

This implementation uses the `properties of the model element`. For each detail, it determines whether there is a corresponding feature in the properties. If not, it validates the detail `without a property feature`. If so, it validates the detail `with the property feature`. If all the details are valid, it will check whether any `required` property feature is absent from the details and `reports it missing`.

Parameter:
  `annotation` - the annotation in question.
  `modelElement` - the annotation's `containing` model element.
  `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.
Gibt zurück:
  whether this annotation's details are valid.

### getProperties

protected Map<String,EStructuralFeature> getProperties(ModelElement modelElement)
Returns a map from key to `feature`. These represents the keys that are considered valid and can be processed by this annotation validator.

This implementation uses `getPropertyClasses(ModelElement)`, iterating over each class and each feature of each class, adding to the map each `included` feature. If that method returns an empty list, then implementation returns an empty map. In that case, `validating the details` of any annotation will report all detail entries as being ignored. An annotation validator implement must override either this method, the `getPropertyClasses` method or the `validateDetails` method.

Parameter:
  `modelElement` - the model element that is being annotated.
Gibt zurück:
  a map from key to feature.
Siehe auch:
  - `validateDetails(Annotation, ModelElement, DiagnosticChain, Map)`
  - `getPropertyClasses(ModelElement)`

### isIncludedProperty

protected boolean isIncludedProperty(ModelElement modelElement, EClass eClass, EStructuralFeature eStructuralFeature)
Returns whether the given structural feature of the given class for the given model element is `included as a property`.

Parameter:
  `modelElement` - the model element.
  `eClass` - the class used to model the annotation for the model element.
  `eStructuralFeature` - a structural feature of the class.
Gibt zurück:
  whether the given structural feature of the given class for the given model element is included as a property.

### createInstance

protected EObject createInstance(EClass eClass, Annotation annotation)
Creates an instance of the modeled representation for the given annotation.

This implementation `creates` an instance and `initializes` it.

Parameter:
  `eClass` - the class to be instantiated.
  `annotation` - the annotation with the information that needs to be represented.
Gibt zurück:
  creates an instance of the modeled representation for the given annotation.

### initialize

protected EObject initialize(EObject eObject, Annotation annotation)
Returns an initialized instance of the given object for the given annotation.

This implementation handles only the case of modeled attributes. For each `detail entry`, it looks up the corresponding `property` via the key. If it's not an `EAttribute` it will throw an `UnsupportedOperationException`. If the attribute property is `multi-valued`, it `splits` the detail entry value, and `converts` each literal item into a value of the `attribute's data type`. If it's single-valued, the literal value is directly converted to the attributes data type. The resulting list value or single value is `reflectively set` into the instance. If the model representation includes references, an annotation validator implementation must specialize this method for the `assistant` to function correctly.

Parameter:
  `eObject` - the object to initialize.
  `annotation` - the annotation used to initialize the object.
Gibt zurück:
  an initialized instance.

### convertPropertyValueToLiteral

protected String convertPropertyValueToLiteral(EObject eObject, EStructuralFeature eStructuralFeature, Object value)
Returns the value of the feature of the modeled object converted to a literal representation as used in `detail entry`.

This implementation handles both `EAttribute` and `EReference`. For a `multi-valued` feature, it `converts` for each item in the list, and `joins` them into a single string. For a single-valued feature, it returns the `converted` value. This method is not used by the validator but is useful for specializing the `BasicAnnotationValidator.Assistant.convertPropertyValueToLiteral(EObject, EStructuralFeature, Object)`.

Parameter:
  `eObject` - the modeled object.
  `eStructuralFeature` - a feature of that object.
  `value` - the value to converted to a literal representation.
Gibt zurück:
  the value of the feature of the modeled object converted to a literal representation.
Siehe auch:
  - `convertPropertyValueToLiteralItem(EObject, EStructuralFeature, Object)`

### convertPropertyValueToLiteralItem

protected String convertPropertyValueToLiteralItem(EObject eObject, EStructuralFeature eStructuralFeature, Object value)
Returns the single value of the feature's `type` for the modeled object converted to a literal representation as used in `detail entry`.

This implementation delegates to `convertPropertyAttributeValueToLiteralItem(EObject, EAttribute, Object)` or `convertPropertyReferenceValueToLiteralItem(EObject, EReference, Object)` as appropriate.

Parameter:
  `eObject` - the modeled object.
  `eStructuralFeature` - a feature of that object.
  `value` - the value of the feature's type to converted to a literal representation.
Gibt zurück:
  a value of the feature's type converted to a literal representation.
Siehe auch:
  - `convertPropertyValueToLiteral(EObject, EStructuralFeature, Object)`

### convertPropertyAttributeValueToLiteralItem

protected String convertPropertyAttributeValueToLiteralItem(EObject eObject, EAttribute eAttribute, Object value)
Returns the single value of the attribute's `type` for the modeled object converted to a literal representation as used in `detail entry`.

This implementation simple uses `EcoreUtil.convertToString(EDataType, Object)`.

Parameter:
  `eObject` - the modeled object.
  `eAttribute` - an attribute feature of that object.
  `value` - the value of the feature's type to converted to a literal representation.
Gibt zurück:
  a value of the feature's type converted to a literal representation.
Siehe auch:
  - `convertPropertyValueToLiteral(EObject, EStructuralFeature, Object)`

### convertPropertyReferenceValueToLiteralItem

protected String convertPropertyReferenceValueToLiteralItem(EObject eObject, EReference eReference, Object value)
Returns the single value of the references's `type` for the modeled object converted to a literal representation as used in `detail entry`.

This implementation is incomplete. It can't generally be known how to represent a reference to an object. This implementation looks for a feature called "name", `gets` the value, and if it's a string returns it. Failing that, it throws an `UnsupportedOperationException`.

Parameter:
  `eObject` - the modeled object.
  `eReference` - a reference feature of that object.
  `value` - the value of the reference's type to converted to a literal representation.
Gibt zurück:
  a value of the references's type converted to a literal representation.
Siehe auch:
  - `convertPropertyValueToLiteral(EObject, EStructuralFeature, Object)`

### join

protected String join(EObject eObject, EStructuralFeature eStructuralFeature, List<String> literalValues)
Returns the joined list of values of this modeled object's feature.

This implementation simply separates the individual literal value items with a " ".

Parameter:
  `eObject` - the modeled object.
  `eStructuralFeature` - a feature of that object.
  `literalValues` - the literal value to join into a single value.

### isApplicable

protected boolean isApplicable(EObject eObject, EStructuralFeature eStructuralFeature)
Returns whether the given feature of the given modeled representation is meaningful for the current state of the model.

This method is used to induce the `applicable properties` by the assistant. It is not directly used by the annotation validator itself. This implementation always returns `true`.

Parameter:
  `eObject` - the modeled object in question.
  `eStructuralFeature` - a feature of that object.
Gibt zurück:
  whether the given feature of the given modeled representation is meaningful for the current state of the model.

### validateDetail

protected boolean validateDetail(Annotation annotation, ModelElement modelElement, Map.Entry<String,String> entry, DiagnosticChain diagnostics, Map<Object,Object> context)
Returns whether this detail entry is valid.

This method is only called when there is no `property` associated with this entry's `key`. This implementation always `reports an ignored entry`. An annotation validator implementation may choose to support validation by specializing this method, rather than `providing a modeled representation`, but the `assistant` will not provide any useful support.

Parameter:
  `annotation` - the annotation in question.
  `modelElement` - the annotation's `containing` model element.
  `entry` - the annotation `detail` in question.
  `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.
Gibt zurück:
  whether this detail entry is valid.

### validateFeatureDetail

protected boolean validateFeatureDetail(Annotation annotation, ModelElement modelElement, Map.Entry<String,String> entry, EStructuralFeature feature, DiagnosticChain diagnostics, Map<Object,Object> context)
Returns whether the value of this detail entry for the corresponding feature is valid.

This implementation delegates to `validateAttributeDetail` or to `validateReferenceDetail` depending on whether the feature is an `EAttribute` or an `EReference`. It `creates` a place holder diagnostic that it passed to those methods, so all diagnostics gathered by those methods are grouped as `children` of the placeholder. Both those methods build the corresponding modeled values as a side-effect. If the detail entry is otherwise valid, the modeled value `is validated`.

Parameter:
  `annotation` - the annotation in question.
  `modelElement` - the annotation's `containing` model element.
  `entry` - the annotation `detail` in question.
  `feature` - the `property` associated with entry.
  `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.
Gibt zurück:
  whether the value of this detail entry for the corresponding feature is valid.

### validateFeatureDetailValue

protected boolean validateFeatureDetailValue(Annotation annotation, ModelElement modelElement, Map.Entry<String,String> entry, EStructuralFeature feature, List<Object> values, DiagnosticChain diagnostics, Map<Object,Object> context)
Returns whether the modeled values for this detail entry's corresponding feature are valid.

For a `many-valued` feature, it validates that the `lower` and `upper` bounds are respected. For a singled valued feature that is `required`, it validates that the value is present; in the single-valued case, the values list should contain a single value.

Parameter:
  `annotation` - the annotation in question.
  `modelElement` - the annotation's `containing` model element.
  `entry` - the annotation `detail` in question.
  `feature` - the `property` associated with entry.
  `values` - the list of instance values for this entry.
  `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.
Gibt zurück:
  whether the modeled values for this detail entry's corresponding feature are valid.

### validateAttributeDetailLiteralValue

protected boolean validateAttributeDetailLiteralValue(Annotation annotation, ModelElement modelElement, Map.Entry<String,String> entry, EAttribute attribute, List<Object> dataValues, DiagnosticChain diagnostics, Map<Object,Object> context)
Returns whether the literal value of this detail entry for the corresponding attribute is valid.

This implementation, for a `many-valued` attribute, `splits` the detail value, if present, into a list of literal values and `validates each literal value`. For a single-valued attribute, it `directly validates` the literal value. As a side-effect, each literal value of a many-valued attribute, or the literal value of a single-valued attribute, is converted to an instance of the attribute's `data type` and is added to the data values list.

Parameter:
  `annotation` - the annotation in question.
  `modelElement` - the annotation's `containing` model element.
  `entry` - the annotation `detail` in question.
  `attribute` - feature the `attribute` `property` associated with entry.
  `dataValues` - the list in which to accumulate valid instance values.
  `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.
Gibt zurück:
  whether the literal value of this detail entry for the corresponding attribute is valid.
Siehe auch:
  - `validateAttributeDetailValueLiteral(Annotation, ModelElement, Map.Entry, EAttribute, String, List, DiagnosticChain, Map)`

### validateAttributeDetailValueLiteral

protected boolean validateAttributeDetailValueLiteral(Annotation annotation, ModelElement modelElement, Map.Entry<String,String> entry, EAttribute attribute, String literalValue, List<Object> dataValues, DiagnosticChain diagnostics, Map<Object,Object> context)
Returns whether the given literal value is valid with respect to this detail entry's corresponding attribute's `data type`. As a side-effect, if the literal value can be converted to an instance value, the corresponding instance value is added to the list of data values.

This implementation first tries to `convert` the literal value to an instance value of the data type. If that fails, it creates a diagnostic that includes the exception `message`. Otherwise, it adds the instance value to the list of values and `validates` the instance value.

Parameter:
  `annotation` - the annotation in question.
  `modelElement` - the annotation's `containing` model element.
  `entry` - the annotation `detail` in question.
  `attribute` - feature the `attribute` `property` associated with entry.
  `literalValue` - the literal value of the data type.
  `dataValues` - the list in which to accumulate a valid instance value.
  `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.
Gibt zurück:
  whether the given literal value is valid with respect to this detail entry's corresponding attribute's data type.

### validateReferenceDetailLiteralValue

protected boolean validateReferenceDetailLiteralValue(Annotation annotation, ModelElement modelElement, Map.Entry<String,String> entry, EReference reference, List<Object> referenceValues, DiagnosticChain diagnostics, Map<Object,Object> context)
Returns whether the literal value of this detail entry for the corresponding reference is valid.

This implementation, for a `many-valued` reference, `splits` the detail value, if present, into a list of literal values and `validates each literal value`. For a single-valued attribute, it `directly validates` the literal value. As a side-effect, each literal value of a many-valued reference, or the literal value of a single-valued reference, is converted to an instance of the references's `class` and added to the reference values list.

Parameter:
  `annotation` - the annotation in question.
  `modelElement` - the annotation's `containing` model element.
  `entry` - the annotation `detail` in question.
  `reference` - the `reference` `property` associated with entry.
  `referenceValues` - the list in which to accumulate valid instance values.
  `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.
Gibt zurück:
  whether the literal value of this detail entry for the corresponding reference is valid.

### validateReferenceDetailValueLiteral

protected boolean validateReferenceDetailValueLiteral(Annotation annotation, ModelElement modelElement, Map.Entry<String,String> entry, EReference reference, String literalValue, List<Object> referenceValues, DiagnosticChain diagnostics, Map<Object,Object> context)
Returns whether the given literal value is valid with respect to this detail entry's corresponding reference's `class`. As a side-effect, if the literal value can be converted to an instance value, the corresponding instance value is added to the list of reference values.

This implementation always returns `false` and `reports an invalid reference literal`. An annotation validator implementation that supports reference literals must specialize this method.

Parameter:
  `annotation` - the annotation in question.
  `modelElement` - the annotation's `containing` model element.
  `entry` - the annotation `detail` in question.
  `reference` - the `reference` `property` associated with entry.
  `literalValue` - the literal value of the class.
  `referenceValues` - the list in which to accumulate valid instance values.
  `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.
Gibt zurück:
  whether the given literal value is valid with respect to this detail entry's corresponding references's class.

### split

protected List<String> split(Annotation annotation, ModelElement modelElement, Map.Entry<String,String> entry, String literalValue, EStructuralFeature feature, DiagnosticChain diagnostics, Map<Object,Object> context)
Splits the literal value into a list of literal values as appropriate for this feature.

This implementation splits the values at whitespace boundaries for all features..

Parameter:
  `annotation` - the annotation in question.
  `modelElement` - the annotation's `containing` model element.
  `entry` - the annotation `detail` in question.
  `literalValue` - a literal value of this feature's `type`.
  `feature` - the `property` associated with entry.
  `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.
Gibt zurück:
  splits the literal value into a list of literal values as appropriate for this feature.
Siehe auch:
  - `validateAttributeDetailValueLiteral(Annotation, ModelElement, Map.Entry, EAttribute, String, List, DiagnosticChain, Map)`
  - `validateReferenceDetailValueLiteral(Annotation, ModelElement, Map.Entry, EReference, String, List, DiagnosticChain, Map)`

### reportInvalidReferenceLiteral

protected void reportInvalidReferenceLiteral(Annotation annotation, ModelElement modelElement, Map.Entry<String,String> entry, EReference reference, String literalValue, DiagnosticChain diagnostics, Map<Object,Object> context)

Siehe auch:
  - `INVALID_REFERENCE_LITERAL`

### reportInvalidValueLiteral

protected void reportInvalidValueLiteral(Annotation annotation, ModelElement modelElement, Map.Entry<String,String> entry, EAttribute attribute, String literalValue, EDataType dataType, DiagnosticChain diagnostics, RuntimeException exception, Map<Object,Object> context)

Siehe auch:
  - `INVALID_VALUE_LITERAL`

### reportMissingRequiredEntryValue

protected void reportMissingRequiredEntryValue(Annotation annotation, ModelElement modelElement, EStructuralFeature feature, List<Object> values, DiagnosticChain diagnostics, Map<Object,Object> context)

Siehe auch:
  - `MISSING_REQUIRED_ENTRY_VALUE`

### reportTooFewValues

protected void reportTooFewValues(Annotation annotation, ModelElement modelElement, Map.Entry<String,String> entry, EStructuralFeature feature, List<Object> values, int size, int lowerBound, DiagnosticChain diagnostics, Map<Object,Object> context)

Siehe auch:
  - `TOO_FEW_VALUES`

### reportTooManyValues

protected void reportTooManyValues(Annotation annotation, ModelElement modelElement, Map.Entry<String,String> entry, EStructuralFeature feature, List<Object> values, int size, int upperBound, DiagnosticChain diagnostics, Map<Object,Object> context)

Siehe auch:
  - `TOO_MANY_VALUES`

### reportInvalidLocation

protected void reportInvalidLocation(Annotation annotation, DiagnosticChain diagnostics, Map<Object,Object> context)

Siehe auch:
  - `INVALID_LOCATION`

### reportDuplicate

protected void reportDuplicate(Annotation primaryAnnotation, Annotation secondaryAnnotation, ModelElement modelElement, DiagnosticChain diagnostics, Map<Object,Object> context)

Siehe auch:
  - `INVALID_DUPLICATE`

### reportIgnoredEntry

protected void reportIgnoredEntry(Annotation annotation, ModelElement modelElement, Map.Entry<String,String> entry, DiagnosticChain diagnostics, Map<Object,Object> context)

Siehe auch:
  - `IGNORED_ENTRY`

### reportMissingEntry

protected void reportMissingEntry(Annotation annotation, ModelElement modelElement, String key, EStructuralFeature property, DiagnosticChain diagnostics, Map<Object,Object> context)

Siehe auch:
  - `MISSING_ENTRY`

### reportIgnoredReferences

protected void reportIgnoredReferences(Annotation annotation, ModelElement modelElement, Collection<? extends EObject> ignoredReferences, DiagnosticChain diagnostics, Map<Object,Object> context)

Siehe auch:
  - `IGNORED_REFERENCES`

### reportInvalidReference

protected void reportInvalidReference(Annotation annotation, ModelElement modelElement, EObject reference, DiagnosticChain diagnostics, Map<Object,Object> context)

Siehe auch:
  - `INVALID_REFERENCE`

### reportIgnoredContents

protected void reportIgnoredContents(Annotation annotation, ModelElement modelElement, Collection<? extends EObject> ignoredContents, DiagnosticChain diagnostics, Map<Object,Object> context)

Siehe auch:
  - `INVALID_REFERENCE`

### reportInvalidContent

protected void reportInvalidContent(Annotation annotation, ModelElement modelElement, EObject content, DiagnosticChain diagnostics, Map<Object,Object> context)

Siehe auch:
  - `INVALID_CONTENT`

### reportIgnoredAnnotations

protected void reportIgnoredAnnotations(Annotation annotation, ModelElement modelElement, Collection<? extends Annotation> ignoredAnnotations, DiagnosticChain diagnostics, Map<Object,Object> context)

Siehe auch:
  - `IGNORED_ANNOTATIONS`

### reportInvalidAnnotation

protected void reportInvalidAnnotation(Annotation annotation, ModelElement modelElement, Annotation nestedAnnotation, DiagnosticChain diagnostics, Map<Object,Object> context)

Siehe auch:
  - `INVALID_ANNOTATION`

### getValidLocationDescription

protected String getValidLocationDescription()
Returns a description of the valid locations supported for annotations of this annotation validator.

A annotation validator implementation must provide the key `"_UI_Valid" + `annotationName` + "AnnotationLocation_substitution"` in its `resource locator` with a very short description of the valid locations of annotations.

Gibt zurück:
  a description of the valid locations supported for annotations of this annotation validator.
Siehe auch:
  - `reportInvalidLocation(Annotation, DiagnosticChain, Map)`

### createValueDiagnostic

protected BasicDiagnostic createValueDiagnostic(Annotation annotation, ModelElement modelElement, Map.Entry<String,String> entry, EStructuralFeature feature)
Creates the placeholder diagnostic used by `validateFeatureDetail`. Diagnostics about problems with the value of a `detail entry` will be nested as `children` of this annotation.

Parameter:
  `annotation` - the annotation.
  `modelElement` - the model element of that annotation.
  `entry` - the entry.
  `feature` - the feature.
Gibt zurück:
  Creates a placeholder diagnostic.

### getEcoreResourceLocator

protected ResourceLocator getEcoreResourceLocator()
Returns the resource locator for fetching messages supported directly by the base implementation.

Gibt zurück:
  the resource locator for fetching messages supported directly by the base implementation.

### createDiagnostic

protected BasicDiagnostic createDiagnostic(int severity, int code, String message, Object... data)
Creates a diagnostic using the given parameters and the `annotationSource`.

Parameter:
  `severity` -
  `code` -
  `message` -
  `data` -
Gibt zurück:
  a diagnostic.

### getString

protected String getString(ResourceLocator resourceLocator, String key, Object... substitutions)
Fetches a translated string from the resource locator using the message key and the give substitutions, if any.

Parameter:
  `resourceLocator` -
  `key` -
  `substitutions` -
Gibt zurück:
  the translated string for the message key.

### getRootEValidator

protected EValidator getRootEValidator(Map<Object,Object> context)
Returns the root validator of the context.

Parameter:
  `context` - the context.
Gibt zurück:
  the root validator

### loadEPackage

protected static EPackage loadEPackage(String uri)
Returns the package loaded from the location specified by the given URI. If the resource loads successfully---the org.eclipse.ecore.xmi jar must be on the class---and it contains an `EPackage`, that package is registered in the `EPackage.Registry.INSTANCE`.

Parameter:
  `uri` - the location of a resource containing an EPackage.
Gibt zurück:
  the loaded package registered package.