MOF diagrams are Class diagrams that are contained in packages with a metamodel stereotype. To create a MOF diagram, follow the steps below.
- Create a package to contain your MOF elements.
- Double-click on the package name to display the Properties dialog.
- In the Stereotype field type the value metamodel.
- Click on the OK button.
- Right-click on the package in the Project Browser and select the Add | Add Diagram context menu option. Create a Class diagram (the default diagram).
- Give your MOF Class diagram an appropriate name.
- In the Toolbox, select the More tools | Metamodel menu option and add the required Metamodel elements to the diagram.
The following is an example of a MOF diagram. A MOF diagram can typically contain Package, Class, Enumeration and Primitive elements, and Generalization, Association, Compose and Aggregate relationships.