Overriding Slot Properties at a Class

You can override slot properties by editing the slot at the class level only. This creates overrides that appear at the selected class and its subclasses. The slot remains unchanged at the Slots Tab, any superclasses, and any unrelated classes. A slot with overrides is shown with an override icon in the Template Slots pane.

Overriding a slot at the class level allows you to be more restrictive about the slot facets relative to that class. For example, the slot employee_list is a slot of type Instance that takes the value Employee at the top level. By default, whenever you attach this slot to a class, it will range over the instances of Employee. Suppose, however, that for this class, you want to restrict the possible employees to salespeople. By overriding the slot, you can restrict the value range to the Salesperson subclass of Employee for the current class and its subclasses, without affecting the slot value range for any other class.

Similarly, suppose you had a class of articles which appeared only on work days, not Saturday or Sunday. You override the slot weekday at that class to remove Saturday and Sunday from the Symbol list for that class only, restricting the possibilities to working days. Once again, the top-level slot and its range at other classes will remain unchanged.

When you override a slot at a class, you can edit slot facets in the same way as you can at the top level. However, you cannot change the name of a slot with overrides. It must still inherit the name of the top-level slot. 

Note: Currently, when you override a slot, Protégé does not enforce the restrictive property. That is, you could theoretically expand or change the facets of a slot, rather than restricting them. However, it is not recommended that you do this, both because it is not good practice and because Protégé may enforce restriction in the future.

To edit the slot properties for a specific class:

  1. Select a class in the Class Relationship pane in the Classes tab.
  2. Select the slot you wish to edit in the Template Slots pane.
  3. Click the View Slot at Class Slot button at the upper right of the Template Slots pane or double-click the slot and make sure View slot at class is selected in the Select Slot View dialog box, then click OK. This opens the Slot Form for the selected slot. See Editing Slot Properties for more information. 

A slot that has been edited at a class is shown with an override icon in the Template Slots pane.

Of course, you can also edit the properties of a slot directly, instead of just overriding them at a class. See Editing a Top-Level Slot for more information.


Next: Removing a Slot From a Class

Slots Table of Contents