PrF UG classes edit template slots

From Protege Wiki
Jump to: navigation, search

Editing Template Slots


Protege-Frames User's Guide
Classes
Classes Tab
Class Browser
Class Buttons
Class Hierarchy Window
Class Icons
Class Menu
Class Search Bar
Superclasses Pane
Class Editor
Constraints
Template Slots Pane
Template Slot Buttons
References Window
Creating a New Class
Creating Multiple Subclasses
Deleting a Class
Displaying the Class Editor
Editing a Class
Editing Template Slots
Finding a Class
Hiding a Class
Replacing a Superclass
Adding a Superclass
Jumping to A Superclass
Removing a Superclass
Viewing Class Relations
Classes & Instances Tab
Viewing References
Glossary, Editing Help

The Template Slots pane in the Class Editor allows you to add, clear, create, edit, override, and remove slots.

Editing a Top-level Slot

To edit a slot at the top level:

  1. Highlight the slot name in the Template Slots pane.

  2. Click the View Top-level Slot (slots_slot.view_top_level) button at the top right of the pane. The Slot Editor will be displayed.

  3. Use the Slot Editor to edit slot properties such as Name, Type, and Cardinality, and to add notes. See Viewing a Slot for more information on how to edit a slot.

Overriding a Slot at a Class

To override a slot at the class:

  1. Highlight the slot name in the Template Slots pane.

  2. Click the View Slot Overrides (slots_slot.view_overrides) button at the top right of the pane. The Slot Editor will be displayed.

  3. Use the Slot Editor to edit slot properties such as Name, Type, and Cardinality, and to add notes. See Viewing a Slot and Overriding Slot Properties at a Class for more information.

Your class can have slots that were inherited (slots_slot.inherited) from a superclass. If the slot is inherited, there are limitations on the edits that can be performed. Direct slots, which were created or added at the level of the slot, have no editing restrictions.

If you edit a slot at the class level, the slot is displayed with an override (slots_slot.overridden) icon.

Creating a New Slot

You can define a new slot for your class.

  1. Make sure the correct class is highlighted in the Class Browser.

  2. Click the Create Slot (slots_slot.create) button at the top right of the pane. The Slot Editor will be displayed.

  3. Use the Slot Editor to edit slot properties such as Name, Type, and Cardinality, and to add notes. See Creating a Slot for more information on how to create a slot.

A direct slot is displayed with a blue (slots_slot) icon.

Clearing Slot Overrides

If you have overridden a slot at the class, you can remove your overrides and use the top-level definition of the slot:

  1. Highlight the slot name in the Template Slots pane.

  2. Click the Remove Slot Overrides (slots_slot.remove_overrides) button at the top right of the pane. Any changes you made at the class level are removed and the top-level definition of the slot is used. See Removing Overrides From a Slot for more information.

Adding an Existing Slot to a Class

Once slots have been created, you can add them to more than one class. For example, the Prototype_Newspaper class has a Weekday slot, which can be used to choose among the days of the week. If you were creating a new type of employee who wrote a weekly feature, you might want to reuse this slot.

To choose a pre-existing slot to add to your class:

  1. Make sure the correct class is highlighted in the Class Browser.

  2. Click the Add Slot (slots_slot.add) button at the top right of the pane. The Select Slots dialog box displays all the slots that you can add to the class.

  3. Highlight the slot that you wish to add to your class.

  4. Click OK.

The new slot is added to the Template Slots pane. It is a directly-attached slot and is displayed with a blue (slots_slot) icon. You do not need to name the slot; however, you may need to override its facets. If you wish to override the facets on the slot, you may click the View Top-level Slot (slots_slot.view_top_level) or View Slot Overrides (slots_slot.view_overrides) button to display the Slot Editor. See Viewing a Slot for more information.

Removing a Slot

You can remove any direct slot that appears in the Template Slots pane. To remove a slot:

  1. Highlight the slot

  2. Click the Remove Slot (slots_slot.remove) button. The slot will be removed from the class.

Note that the slot has not been deleted from the knowledge base. It will still appear in the Select Slots dialog box (see

      Adding an Existing Slot to a Class, above)

and the Slots tab. See Deleting a Slot for more information.