PrF UG meta metaslot create

From Protege Wiki
Jump to: navigation, search

Creating a Slot Metaclass

Protege-Frames User's Guide
Understanding Metaclasses
Example: Creating and Using a Metaclass
Creating a Metaclass
Creating a Class Using a Metaclass
Changing the Metaclass of a Class
Changing the Metaclass of Subclasses
Setting the Default Metaclass
Customizing the Class or Slot Editor
Understanding Slot Metaclasses
Creating a Slot Metaclass
Changing the Slot Metaclass of a Slot
Creating a Subslot Using a Slot Metaclass
Changing the Slot Metaclass of Subslots
Setting the Default Slot Metaclass
Glossary, Editing Help

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

Creating a slot metaclass is almost identical to creating a metaclass. You simply have to make sure the class is created subordinate to :SLOT. Usually, it is desirable to create a slot metaclass subordinate to :STANDARD-SLOT, so that the slot created using the slot metaclass will have the various properties defined by :STANDARD-SLOT.

To create a new slot metaclass:

  1. Click on the desired superclass in the Class Browser. The selected superclass must itself be a slot metaclass. As mentioned above, this will be true only if the selected superclass is subordinate to :SLOT.

    Class Browser, ":SLOT" selected
  2. Click the Create Class (classes_class.create) button at the right of the Class Browser, or click the right mouse button and select Create subclass from the Class menu. The new class will be added under the highlighted class. It will inherit the properties of the selected metaclass.

    Class Browser, "newspaper_Class_0" selected
  3. Use the Class Editor to name the slot metaclass, create constraints, and create and edit template slots. For example, click the Create Slot (slots_slot.create) button at the right of the Template Slots pane to create a new slot. This slot will show up as an entry field in the Slot Editor for any slot that uses the slot metaclass.