Tutorial: Getting Started with Protege-Frames
Protege Web site | Protege Wiki | About the Protege Team

Defining slot facets for salary
We can define some facets for the salary slot we created earlier.
  1. Select the Employee class in the Class Hierarchy pane.



  2. Double-click on the salary slot in the Template Slots pane to open the slot form. A dialog box asks you to select the Slot View. When you edit a slot, you can choose whether your edits will apply to the slot and all classes with that slot -- to the "top-level" slot -- or whether you just want them to apply to this class and all of its children.



  3. In this case, we want to view and edit the top-level slot. Make sure that the View top-level slot option is selected and click OK. This will change the definition of the slot everywhere it appears in the ontology.



  4. In the resulting slot form, select Float from the Value Type menu at the left. When you create instances, you will only be able to enter a valid floating point number for this slot.



  5. Enter 0 (zero) in the Minimum field at the lower left. This specifies that for each instance of Employee, the value that is entered for salary must be non-negative.



  6. Close the Edit Slot dialog box. You can see that the description of the slot has changed in the Template Slots pane. The type is now set to Float, and the minimum value of 0.0 appears in the Other Facets column.



    Note: Making edits at the top-level slot means that you are modifying the fundamental definition of the slot. It is the same as making changes at the Slots Tab. If you select the View slot at class option instead, any changes you make will only apply to this class and its children. For example, if you started a program that allowed people to pay to intern at the newspaper, you could create a new subclass of Employee, Paying_intern, open the salary slot, select View slot at class, and delete the minimum value. This would create a "slot override", which would only affect Paying_intern, while other employees would still be required to make a non-negative salary.