Changing the Metaclass of a Class

Note: Before you create and use metaclasses, you should be confident with the basic Protégé interface and be comfortable designing a project, and creating and modifying classes, slots, forms and instances.

For any existing class in your project, you can change the metaclass you use for that class. This gives the class and the Class Form the attributes defined by the new metaclass. New classes that you create as subclasses of the class will also use the new metaclass. However, existing subclasses will continue to use their previously assigned metaclass unless you specifically change it. 

This example uses the wines project, which includes a Wine template that supplies metaclass structure. 

To change the metaclass of an existing class:

  1. In the Class Relationship Pane, click on the class that you want to change. 
  2. Click the right mouse button and select "Change metaclass..." 
  3. A dialog box displays the Concrete metaclasses, which are the classes you can use. You cannot use the Abstract metaclasses in this way. Note that if the class currently uses a non-standard class, you can revert to :STANDARD-CLASS.
  4. Select the metaclass that has the properties that you want and click OK. 
    The highlighted class will now have the Class Form and properties determined by the selected metaclass. 

Next: Changing the Metaclass of Subclasses

Classes Table of Contents