metamodels

org.topcased.validation.ocl.metamodels

0.8.0

This extension point extends the OCL validator. With this extension point OCL rules files can be added to a metamodel. Then when the validation is called on a model the OCl validator validates this model using all the OCL files referenced for the associated metamodel. Validation problems are added as errors or warnings depending of the extension.

<!ELEMENT extension (rules+)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED>


<!ELEMENT rules EMPTY>

<!ATTLIST rules

file  CDATA #REQUIRED

uri   CDATA #REQUIRED

level (WARNING|ERROR) "ERROR"

id    CDATA #REQUIRED>

Add a set of OCL rules on a metamodel.



This example shows how a simple OCL file is added to the SAM metamodel (for example to check that there is only ONE initial state in an automaton) :
  

<extension point=

"org.topcased.validation.ocl.metamodels"

>

<rules file=

"model/SAM.ocl"

id=

"org.topcased.sam.BasicRules"

level=

"ERROR"

uri=

"http://www.topcased.org/SAM/1.0"

/>

</extension>

None

None