# Examples

## Royal and Loyal Example Project

The RoyalAndLoyal example project provides a substantial example of a Complete OCL document complementing an independent Ecore meta-model.

This is the standard example used in many OCL texts and courses. It was first produced as part of the The Object Constraint Language Second Edition by Jos Warmer and Anneke Kleppe.

This example may be used to explore a wide variety of OCL syntaxes and their presentation in the Complete OCL editor.

You may install the example by selecting Example... from the New menu, then selecting Royal and Loyal Example under the OCL (Object Constraint Language) plugins.

Open RoyalAndLoyal.ecore with the OCLinEcore editor to explore the Ecore metamodel. Note how the Outline can be alphabeticized and so provide a useful overview. The outline very similar to the conventional Sample Ecore Editor tree view.

Open RoyalAndLoyal.ocl with the CompleteOCL editor to explore the OCL. Note how the full AST can be explored in the Outline.