org.eclipse.ocl.examples.pivot.validation
Class LoadableConstraintDescriptor<T>
java.lang.Object
org.eclipse.emf.validation.service.AbstractConstraintDescriptor
org.eclipse.ocl.examples.pivot.validation.LoadableConstraintDescriptor<T>
- All Implemented Interfaces:
- org.eclipse.emf.validation.model.IModelConstraint, org.eclipse.emf.validation.service.IConstraintDescriptor
- Direct Known Subclasses:
- LoadableConstraintDescriptor.Ecore, LoadableConstraintDescriptor.UML
public abstract class LoadableConstraintDescriptor<T>
- extends org.eclipse.emf.validation.service.AbstractConstraintDescriptor
- implements org.eclipse.emf.validation.model.IModelConstraint
A LoadableConstraintDescriptor realizes both an IConstraintDescriptor and IModelConstraint
to support a Constraint derived from loading some model source. The resulting desciptor
is suitable for use with the EMF.Valitation framework.
Fields inherited from interface org.eclipse.emf.validation.model.IModelConstraint |
STATUS_CODE_SUCCESS |
Methods inherited from class org.eclipse.emf.validation.service.AbstractConstraintDescriptor |
addCategory, equals, getCategories, getDescriptor, getException, hashCode, isBatch, isEnabled, isError, isLive, removeCategory, setEnabled, setError, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.emf.validation.model.IModelConstraint |
getDescriptor |
Methods inherited from interface org.eclipse.emf.validation.service.IConstraintDescriptor |
targetsTypeOf |
targetType
@NonNull
protected final T targetType
LoadableConstraintDescriptor
public LoadableConstraintDescriptor(@NonNull
T targetType,
@NonNull
Constraint constraint,
java.lang.String targetNamespace,
java.lang.String targetName,
int code)
getBody
public java.lang.String getBody()
- Specified by:
getBody
in interface org.eclipse.emf.validation.service.IConstraintDescriptor
getDescription
public java.lang.String getDescription()
- Specified by:
getDescription
in interface org.eclipse.emf.validation.service.IConstraintDescriptor
getEvaluationMode
public org.eclipse.emf.validation.model.EvaluationMode<?> getEvaluationMode()
- Specified by:
getEvaluationMode
in interface org.eclipse.emf.validation.service.IConstraintDescriptor
getId
public java.lang.String getId()
- Specified by:
getId
in interface org.eclipse.emf.validation.service.IConstraintDescriptor
getMessagePattern
public java.lang.String getMessagePattern()
- Specified by:
getMessagePattern
in interface org.eclipse.emf.validation.service.IConstraintDescriptor
getName
public java.lang.String getName()
- Specified by:
getName
in interface org.eclipse.emf.validation.service.IConstraintDescriptor
getPluginId
public java.lang.String getPluginId()
- Specified by:
getPluginId
in interface org.eclipse.emf.validation.service.IConstraintDescriptor
getSeverity
public org.eclipse.emf.validation.model.ConstraintSeverity getSeverity()
- Specified by:
getSeverity
in interface org.eclipse.emf.validation.service.IConstraintDescriptor
getStatusCode
public int getStatusCode()
- Specified by:
getStatusCode
in interface org.eclipse.emf.validation.service.IConstraintDescriptor
targetsEvent
public boolean targetsEvent(org.eclipse.emf.common.notify.Notification notification)
- Specified by:
targetsEvent
in interface org.eclipse.emf.validation.service.IConstraintDescriptor
validate
public org.eclipse.core.runtime.IStatus validate(org.eclipse.emf.validation.IValidationContext ctx)
- Specified by:
validate
in interface org.eclipse.emf.validation.model.IModelConstraint