Interface ValidationUtils.IModelValidationCallback<R,T>
-
- Type Parameters:
R- the model root typeT- the transformation result type
- Enclosing class:
- ValidationUtils
public static interface ValidationUtils.IModelValidationCallback<R,T>Defines a validation callback to provide the information required for validation.- Author:
- Holger Eichelberger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TranslationResult<T>createModel(R root, java.net.URI uri)Creates a model for validation.booleanisValidationEnabled(java.net.URI uri)Returns whether (interactive) validation is enabled.voidmessage(ValidationUtils.MessageType type, java.lang.String message, org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature feature, int identifier)Handles a message.voidprint(TranslationResult<T> result, java.io.Writer out)Prints out the translation result.
-
-
-
Method Detail
-
isValidationEnabled
boolean isValidationEnabled(java.net.URI uri)
Returns whether (interactive) validation is enabled. Typically, all model files in a project are considered. However, some build processes such as Maven may copy a model for packaging it. Then the copy of the model may not be valid, as it is not in a model location.- Parameters:
uri- the URI- Returns:
trueif validation is enabled,falseelse
-
createModel
TranslationResult<T> createModel(R root, java.net.URI uri)
Creates a model for validation.- Parameters:
root- the model rooturi- the model URI- Returns:
- the model translation result
-
message
void message(ValidationUtils.MessageType type, java.lang.String message, org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature feature, int identifier)
Handles a message.- Parameters:
type- the message typemessage- the message textsource- the message sourcefeature- the feature withinsourceidentifier- an numerical identifier for the message / for testing
-
print
void print(TranslationResult<T> result, java.io.Writer out)
Prints out the translation result.- Parameters:
result- the translation result obtained fromcreateModel(Object, java.net.URI)out- the output writer
-
-