Difference between revisions of "PrF UG slots value type class"

From Protege Wiki
Jump to: navigation, search
(Automated import of articles)
 
 
(6 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
== The Class Value Type ==
 
== The Class Value Type ==
  
{{PrF_UG_TOC_slots}}<div id='prf_ug'>
+
<noinclude>{{PrF_UG_TOC_slots}}<div id='prf_ug'></noinclude>
  
 
A slot of type <b>Class</b> has classes as values.
 
A slot of type <b>Class</b> has classes as values.
Specifically,
+
Specifically, when <b>Class</b> is selected as the value type,
when <b>Class</b> is selected as the value type,
 
 
you specify one or more <i>allowed superclasses</i>.
 
you specify one or more <i>allowed superclasses</i>.
An instance of this class then has a
+
An instance of this class then
[[PrF_UG_inst_entry_field_class|class entry field]]
+
has a [[PrF_UG_inst_entry_field_class|class entry field]]
 
that takes one of these classes or any of their subclasses as the value(s) of the slot.
 
that takes one of these classes or any of their subclasses as the value(s) of the slot.
This topic covers:
 
 
<ul class='a'>
 
  <li><p>
 
    [[#Setting_the_Value_Type_to_Class|setting the value type to Class]]
 
    </p>
 
 
  <li><p>
 
    [[#Removing_an_Allowed_Superclass|removing an allowed superclass]]
 
    </p>
 
 
  <li><p>
 
    [[#Example|example]]
 
    </p>
 
</ul>
 
  
 
=== Setting the Value Type to Class ===
 
=== Setting the Value Type to Class ===
Line 33: Line 17:
 
<ol class='a'>
 
<ol class='a'>
 
   <li><p>
 
   <li><p>
     [[PrF_UG_slots_create_slot|Create]]
+
     [[PrF_UG_slots_create_slot|Create]] the slot,
    the slot,
+
     or [[PrF_UG_slots_editing_a_slot|view]]
     or
+
     the [[PrF_UG_slots_slot_editor|Slot Editor]] for an existing slot.
    [[PrF_UG_slots_editing_a_slot|view]]
 
     the
 
    [[PrF_UG_slots_slot_editor|Slot Editor]]
 
    for an existing slot.
 
 
     </p>
 
     </p>
  
 
   <li><p>
 
   <li><p>
     Select <b>Class</b> from the
+
     Select <b>Class</b>
    [[PrF_UG_slots_value_type_menu|Value Type menu]].
+
    from the [[PrF_UG_slots_value_type_menu|Value Type menu]].
 
     The <b>Allowed Superclasses</b> pane will be displayed.
 
     The <b>Allowed Superclasses</b> pane will be displayed.
   
 
    </p><p> <div>[[Image:PrF_UG_slots_allowed_superclass.png|slots_allowed_superclass]]</div>
 
 
     </p>
 
     </p>
 +
    <div>[[Image:PrF_UG_slots_allowed_superclass.png|frame|none|
 +
          Allowed Superclasses pane]]</div>
  
 
   <li><p>
 
   <li><p>
     To add one or more allowed superclasses,
+
     To add one or more allowed superclasses, 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.
 
 
     </p>
 
     </p>
  
 
   <li><p>
 
   <li><p>
     Select the classes you want as allowed superclasses in the <b>Select Classes</b> dialog box.
+
     Select the classes you want as allowed superclasses
     To select multiple classes,
+
    in the <b>Select Classes</b> dialog box.
    use the <b>Ctrl</b> (<b>Cmd</b>) key;
+
     To select multiple classes, use the <b>Ctrl</b> (<b>Cmd</b>) key;
     to select a range,
+
     to select a range, use the <b>Shift</b> key.
    use the <b>Shift</b> key.
+
     When an instance is created, the only values that can appear
     When an instance is created,
+
    in the entry field corresponding to this slot
    the only values that can appear in the entry field corresponding to this slot will be the listed classes and their subclasses.
+
    will be the listed classes and their subclasses.
   
 
    </p><p> <div>[[Image:PrF_UG_slots_allowed_superclass_all.png|slots_allowed_superclass_all]]</div>
 
 
     </p>
 
     </p>
 +
    <div>[[Image:PrF_UG_slots_allowed_superclass_all.png|frame|none|
 +
          Select Classes dialog]]</div>
  
 
   <li><p>
 
   <li><p>
Line 80: Line 58:
 
<ol class='a'>
 
<ol class='a'>
 
   <li><p>
 
   <li><p>
     Select the classes to remove in the <b>Allowed Superclasses</b> Pane.
+
     Select the classes to remove in the <b>Allowed Superclasses</b> pane.
     To highlight multiple classes,
+
     To highlight multiple classes, use the <b>Ctrl</b> (<b>Cmd</b>) key.
    use the <b>Ctrl</b> (<b>Cmd</b>) key.
+
     To highlight a range of classes, use the <b>Shift</b> key.
     To highlight a range of classes,
 
    use the <b>Shift</b> key.
 
 
     </p>
 
     </p>
  
 
   <li><p>
 
   <li><p>
 
     Click the <b>Remove Class</b>
 
     Click the <b>Remove Class</b>
     [[Image:PrF_UG_classes_class.remove.gif|classes_class.remove]]
+
     ([[Image:PrF_UG_classes_class.remove.gif|classes_class.remove]]) button
     button at the top of the <b>Allowed Superclasses</b> pane.
+
     at the top of the <b>Allowed Superclasses</b> pane.
 
     </p>
 
     </p>
 
</ol>
 
</ol>
Line 96: Line 72:
 
=== Example ===
 
=== Example ===
  
For example,
+
For example, the Wines project is a knowledge base which includes,
the Wines project is a knowledge base which includes,
 
 
among other information:
 
among other information:
  
 
<ul class='a'>
 
<ul class='a'>
 
   <li><p>
 
   <li><p>
     the class <b>Winery</b>,
+
     the class <b>Winery</b>, which has wineries as instances
    which has wineries as instances
 
 
     </p>
 
     </p>
  
 
   <li><p>
 
   <li><p>
     the class <b>Wine region</b>,
+
     the class <b>Wine region</b>, which has a subclass hierarchy of regions.
    which has a subclass hierarchy of regions.
+
     For example, <b>Wine region</b> has the subclass <b>French region</b>,
     For example,
 
    <b>Wine region</b> has the subclass <b>French region</b>,
 
 
     which in turn has subclasses such as <b>Bordeaux region</b> and <b>Loire region</b>.
 
     which in turn has subclasses such as <b>Bordeaux region</b> and <b>Loire region</b>.
 
     </p>
 
     </p>
  
 
   <li><p>
 
   <li><p>
     The slot <i>location</i>,
+
     The slot <i>location</i>, which is of type <b>Class</b>,
    which is of type <b>Class</b>,
+
     with <b>Wine Region</b> as the <b>Allowed Superclasses</b>.
     with <b>Wine Region</b> as the <b>Allowed Superclasses</b>. <i>location</i> is attached to the <b>Winery</b> class.
+
    <i>location</i> is attached to the <b>Winery</b> class.
 
     </p>
 
     </p>
 
</ul>
 
</ul>
  
<div>[[Image:PrF_UG_slots_value_type_class.png|slots_value_type_class]]</div>
+
<div>[[Image:PrF_UG_slots_value_type_class.png|frame|none|
 +
      Slot Editor]]</div>
  
 
When a user creates an instance for <b>Winery</b>,
 
When a user creates an instance for <b>Winery</b>,
the entry field corresponding to the <i>location</i> slot is a
+
the entry field corresponding to the <i>location</i> slot
[[PrF_UG_inst_entry_field_class|Class Entry Field]].
+
is a [[PrF_UG_inst_entry_field_class|Class Entry field]].
A user can choose the region from the list of classes subordinate to and including <b>Wine region</b>.
+
A user can choose the region from the list of classes subordinate to
 +
and including <b>Wine region</b>.
 +
 
 +
<div>[[Image:PrF_UG_slots_select_class_winery_region.png|frame|none|
 +
      Select Class dialog, "Wine region" selected]]</div>
  
<div>[[Image:PrF_UG_slots_select_class_winery_region.png|slots_select_class_winery_region]]</div>
+
<div>[[Image:PrF_UG_slots_value_type_class_example.png|frame|none|
 +
      Instance Editor]]</div>
  
<div>[[Image:PrF_UG_slots_value_type_class_example.png|slots_value_type_class_example]]</div>
 
  
</div>
+
<noinclude></div></noinclude>

Latest revision as of 18:54, November 13, 2008

The Class Value Type


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

A slot of type Class has classes as values. Specifically, when Class is selected as the value type, you specify one or more allowed superclasses. An instance of this class then has a class entry field that takes one of these classes or any of their subclasses as the value(s) of the slot.

Setting the Value Type to Class

To set the value type of a slot to Class:

  1. Create the slot, or view the Slot Editor for an existing slot.

  2. Select Class from the Value Type menu. The Allowed Superclasses pane will be displayed.

    Allowed Superclasses pane
  3. To add one or more allowed superclasses, click the Add Class (classes_class.add) button.

  4. Select the classes you want as allowed superclasses in the Select Classes dialog box. To select multiple classes, use the Ctrl (Cmd) key; to select a range, use the Shift key. When an instance is created, the only values that can appear in the entry field corresponding to this slot will be the listed classes and their subclasses.

    Select Classes dialog
  5. Click OK.

Removing an Allowed Superclass

To remove a class from the list of allowed superclasses for a slot of type Class:

  1. Select the classes to remove in the Allowed Superclasses pane. To highlight multiple classes, use the Ctrl (Cmd) key. To highlight a range of classes, use the Shift key.

  2. Click the Remove Class (classes_class.remove) button at the top of the Allowed Superclasses pane.

Example

For example, the Wines project is a knowledge base which includes, among other information:

  • the class Winery, which has wineries as instances

  • the class Wine region, which has a subclass hierarchy of regions. For example, Wine region has the subclass French region, which in turn has subclasses such as Bordeaux region and Loire region.

  • The slot location, which is of type Class, with Wine Region as the Allowed Superclasses. location is attached to the Winery class.

Slot Editor

When a user creates an instance for Winery, the entry field corresponding to the location slot is a Class Entry field. A user can choose the region from the list of classes subordinate to and including Wine region.

Select Class dialog, "Wine region" selected
Instance Editor