Difference between revisions of "PrF UG slots attach slot"

From Protege Wiki
Jump to: navigation, search
Line 23: Line 23:
 
   <li><p>
 
   <li><p>
 
     Click the <b>Add Slot</b>
 
     Click the <b>Add Slot</b>
     [[Image:PrF_UG_slots_slot.add.gif|slots_slot.add]] button
+
     ([[Image:PrF_UG_slots_slot.add.gif|slots_slot.add]]) button
 
     at the top right
 
     at the top right
 
     of the [[PrF_UG_classes_template_slot_pane|Template Slots pane]].
 
     of the [[PrF_UG_classes_template_slot_pane|Template Slots pane]].
 
     The <b>Select Slots</b> form will display all of the slots you can add to the class.
 
     The <b>Select Slots</b> form will display all of the slots you can add to the class.
 
     </p>
 
     </p>
     <div>[[Image:PrF_UG_slots_template_slots_select.png|
+
     <div>[[Image:PrF_UG_slots_template_slots_select.png|frame|none|
           slots_template_slots_select]]</div>
+
           Select Template Slots dialog]]</div>
  
 
   <li><p>
 
   <li><p>
Line 42: Line 42:
 
     The selected slot(s) are added to the <b>Template Slots</b> pane
 
     The selected slot(s) are added to the <b>Template Slots</b> pane
 
     as directly attached slot(s),
 
     as directly attached slot(s),
     displayed with a blue rectangle [[Image:PrF_UG_slots_slot.gif|slots_slot]] icon.
+
     displayed with a blue rectangle
 +
    ([[Image:PrF_UG_slots_slot.gif|slots_slot]]) icon.
 
     </p>
 
     </p>
 
</ol>
 
</ol>
Line 49: Line 50:
 
or [[PrF_UG_slots_override_slot|override]] a slot after adding it,
 
or [[PrF_UG_slots_override_slot|override]] a slot after adding it,
 
double-click it or click the <b>View Top-Level Slot</b>
 
double-click it or click the <b>View Top-Level Slot</b>
[[Image:PrF_UG_slots_slot.view_top_level.gif|slots_slot.view_top_level]]
+
([[Image:PrF_UG_slots_slot.view_top_level.gif|slots_slot.view_top_level]])
 
or the <b>View Slot at Class</b>
 
or the <b>View Slot at Class</b>
[[Image:PrF_UG_slots_slot.view_overrides.gif|slots_slot.view_overrides]] button
+
([[Image:PrF_UG_slots_slot.view_overrides.gif|slots_slot.view_overrides]]) button
 
to display the [[PrF_UG_slots_slot_editor|Slot Editor]].
 
to display the [[PrF_UG_slots_slot_editor|Slot Editor]].
 
See [[PrF_UG_slots_editing_a_slot|Viewing a Slot]]
 
See [[PrF_UG_slots_editing_a_slot|Viewing a Slot]]
Line 75: Line 76:
 
   <li><p>
 
   <li><p>
 
     Click the <b>Add Class</b>
 
     Click the <b>Add Class</b>
     [[Image:PrF_UG_classes_class.add.gif|classes_class.add]] button
+
     ([[Image:PrF_UG_classes_class.add.gif|classes_class.add]]) button
 
     at the top right of the Domain facet.
 
     at the top right of the Domain facet.
 
     </p>
 
     </p>
Line 85: Line 86:
 
     or use the <b>Shift</b> key to select a range of classes.
 
     or use the <b>Shift</b> key to select a range of classes.
 
     </p>
 
     </p>
     <div>[[Image:PrF_UG_classes_classes_select.png|
+
     <div>[[Image:PrF_UG_classes_classes_select.png|frame|none|
           classes_classes_select]]</div>
+
           Select Classes dialog]]</div>
  
 
   <li><p>
 
   <li><p>

Revision as of 13:07, October 25, 2008

Adding a Slot to a Class


Protege-Frames User's Guide
Slots
The Slots Tab
The Slot Browser
The Slot Buttons
The Slot Menu
The Slot Editor
The Value Type Menu
The Any Value Type
The Boolean Value Type
The Class Value Type
The Float Value Type
The Instance Value Type
The Integer Value Type
The String Value Type
The Symbol Value Type
Creating a New Slot
Viewing a Slot
Editing a Top-Level Slot
Overriding Slot Properties at a Class
Editing Slot Properties
Removing a Slot from a Class
Deleting a Slot from the Project
Adding a Slot to a Class
Removing Overrides From a Slot
Understanding Inverse Slots
Creating an Inverse Slot Relationship
Working with Subslots
Finding a Slot
The Slot Hierarchy Window
The Slot Icons
The Superslots Pane
Glossary, Editing Help

You can attach a slot to one or more classes. 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. You can create an association between a slot and a class in one of two ways: attaching the slot to a class or adding a class to the domain of the slot.

Attaching a Slot to a Class

To attach a slot to a class:

  1. Display the Class Editor for the desired class.

  2. Click the Add Slot (slots_slot.add) button at the top right of the Template Slots pane. The Select Slots form will display all of the slots you can add to the class.

    Select Template Slots dialog
  3. Select the slot(s) you wish to add to your class. To add more than one slot, hold down Ctrl (Cmd) while clicking, or use the Shift key to select a range of slots.

  4. Click OK. The selected slot(s) are added to the Template Slots pane as directly attached slot(s), displayed with a blue rectangle (slots_slot) icon.

If you wish to edit or override a slot after adding it, double-click it or click the View Top-Level Slot (slots_slot.view_top_level) or the View Slot at Class (slots_slot.view_overrides) button to display the Slot Editor. See Viewing a Slot and Editing Slot Properties for more information.

Adding a Class to the Domain of a Slot

The domain of a slot (i.e., the list of the classes to which the slot is attached) is shown in the Domain facet of the Slot Editor. You can associate a slot to a class by adding the class to the domain of the slot:

  1. Display the Slot Editor for the desired slot. The Domain is located at the bottom right of the Slot Editor.

  2. Click the Add Class (classes_class.add) button at the top right of the Domain facet.

  3. Select the class(es) you wish to add to your slot. To add more than one class, hold down Ctrl (Cmd) while clicking, or use the Shift key to select a range of classes.

    Select Classes dialog
  4. Click OK. The selected class(es) are added to the Domain for the slot. If you view the Class Editor for the class(es), you will see the slot in the Template Slots pane.