Difference between revisions of "PrF UG slots value type class"
Line 5: | Line 5: | ||
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 has a | ||
Line 18: | 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, |
− | + | or [[PrF_UG_slots_editing_a_slot|view]] | |
− | or | + | the [[PrF_UG_slots_slot_editor|Slot Editor]] for an existing slot. |
− | |||
− | the | ||
− | |||
− | |||
</p> | </p> | ||
<li><p> | <li><p> | ||
− | Select <b>Class</b> from the | + | Select <b>Class</b> |
− | + | 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> | ||
<li><p> | <li><p> | ||
− | To add one or more allowed superclasses, | + | To add one or more allowed superclasses, 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]] | ||
− | |||
</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. |
− | + | 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. |
− | + | When an instance is created, the only values that can appear | |
− | When an instance is created, | + | in the entry field corresponding to this slot |
− | + | will be the listed classes and their subclasses. | |
− | |||
− | |||
</p> | </p> | ||
+ | <div>[[Image:PrF_UG_slots_allowed_superclass_all.png| | ||
+ | slots_allowed_superclass_all]]</div> | ||
<li><p> | <li><p> | ||
Line 66: | Line 58: | ||
<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. |
− | + | To highlight a range of classes, use the <b>Shift</b> key. | |
− | To highlight a range of classes, | ||
− | |||
</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 |
− | + | at the top of the <b>Allowed Superclasses</b> pane. | |
</p> | </p> | ||
</ol> | </ol> | ||
Line 81: | Line 71: | ||
=== 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 |
− | |||
</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. |
− | + | For example, <b>Wine region</b> has the subclass <b>French region</b>, | |
− | For example, | ||
− | |||
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>, |
− | + | 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> | ||
Line 109: | Line 95: | ||
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|slots_select_class_winery_region]]</div> | <div>[[Image:PrF_UG_slots_select_class_winery_region.png|slots_select_class_winery_region]]</div> |
Revision as of 17:02, October 16, 2008
The Class Value Type
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:
Create the slot, or view the Slot Editor for an existing slot.
Select Class from the Value Type menu. The Allowed Superclasses pane will be displayed.
To add one or more allowed superclasses, click the Add Class button.
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.
Click OK.
Removing an Allowed Superclass
To remove a class from the list of allowed superclasses for a slot of type Class:
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.
Click the Remove Class 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.
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.