Validators

org.topcased.validation.core.validators

0.8.0

This extension point is used to create a extensible validation framework. With this framework you can add Java validation, XPath validation... The validation can be runned from the validation action available in the toolbar when a graphical model editor is opened. The basic implementation is the EMF validation.

<!ELEMENT extension (validator+)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED>


<!ELEMENT validator (description?)>

<!ATTLIST validator

name  CDATA #REQUIRED

id    CDATA #REQUIRED

class CDATA #REQUIRED

uri   CDATA #IMPLIED>

Defines a new validator for the Topcased validation framework. A validator iterates on the objects from the model and check if the state of this object (properties, references to others objects...) is valid.



<!ELEMENT description (#PCDATA)>

A description of the kind of validation.



The validation framework includes a simple validation based on the EMF validation. This example shows you how this validator is added to the Topcased validation framework :
   

<extension point=

"org.topcased.validation.core.validators"

>

<validator class=

"org.topcased.validation.core.internal.emf.EMFValidator"

id=

"org.topcased.validation.core.internal.emf.EMFValidator"

name=

"EMF Validator"

>

<description>

Basic EMF validation

</description>

</validator>

</extension>

A validator must implement the interface org.topcased.validation.core.IValidator. The validator validates an EObject and add the warnings and the errors in a DiagnosticChain.

None