Difference between revisions of "PrF UG slots attach slot"

From Protege Wiki
Jump to: navigation, search
(Automated import of articles)
 
Line 11: Line 11:
 
you might want to reuse this slot.
 
you might want to reuse this slot.
 
You can create an association between a slot and a class in one of two ways:
 
You can create an association between a slot and a class in one of two ways:
 
+
attaching the slot to a class or
<ul class='a'>
+
adding a class to the domain of the slot.
  <li><p>
 
    [[#Attaching_a_Slot_to_a_Class|attaching the slot to a class]]
 
    </p>
 
 
 
  <li><p>
 
    [[#Adding_a_Class_to_the_Domain_of_a_Slot|adding a class to the domain of the slot]]
 
    </p>
 
</ul>
 
  
 
=== Attaching a Slot to a Class ===
 
=== Attaching a Slot to a Class ===

Revision as of 16:27, October 14, 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.

    slots_template_slots_select

  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.

    classes_classes_select

  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.