Difference between revisions of "PrF UG slots editing slot properties"
(→Value Type) |
(→Value Type) |
||
Line 87: | Line 87: | ||
as follows: | as follows: | ||
+ | <div class='b'> | ||
{| summary="value types and panes" | {| summary="value types and panes" | ||
! width="75" | Value Type | ! width="75" | Value Type | ||
Line 115: | Line 116: | ||
for information on how to add and remove allowed values. | for information on how to add and remove allowed values. | ||
|} | |} | ||
+ | </div> | ||
=== Cardinality === | === Cardinality === |
Revision as of 16:11, October 29, 2008
Editing Slot Properties
You can edit the properties of a newly created or existing slot using the Slot Editor.
Slot Name
To change the name of a slot, edit the text in the Name field. Slot names are case sensitive. To distinguish slot names from class names, a recommended convention is to make slot names lowercase.
Value Type
To change the value type of the slot, select a different type from the Value Type menu. The available types are summarized in the following table:
Type | Description | Examples |
---|---|---|
Any | Any of the types below (logical Union) | |
Boolean | Logical Value | True, False |
Class | Class in the knowledge base | Organization |
Float | Number with a decimal point | 1.0, 3.4e10, -0.3e-3 |
Instance | Instance of a class in the knowledge base | instance_00010 |
Integer | Whole number | 1, 2, -4 |
String | List of alphanumeric characters, possibly including spaces | "John Doe" |
Symbol | Enumerated list of values, which may not include spaces | red, blue, and green |
Note: If you are editing the slot from a specific class, and the slot is inherited, the following restrictions apply:
For an inherited slot of type Any, you can select any one of the other types.
For an inherited slot of a value type other than Any, you cannot change the type of the slot. However, for slots of type Class, Instance, or Symbol, you can change the choices in the associated Allowed menu.
When a value type of Class, Instance, or Symbol is selected, an additional pane appears below the Value Type menu, as follows:
Value Type | Associated Pane |
---|---|
The Allowed Superclasses pane. See Setting the Value Type to Class in the Value Type Class for information on how to add and remove allowed superclasses. | |
The Allowed Classes pane. See Setting the Value Type for information on how to add and remove allowed classes. | |
The Allowed Values pane. See The Symbol Value Type for information on how to add and remove allowed values. |
Cardinality
To change whether or not a slot can be composed of more than one item, select a different option for the Cardinality.
The default configuration allows the slot to have at most one value; that is, it can have one value or no value. You can change the default by entering a positive whole number in the at least and/or at most options, or by selecting the multiple option with no at most value.
To require a minimum number of values for the slot, enter a positive whole number in the at least entry bar. Setting at least equal to one requires a value for the slot. Setting at least equal to 1 and at most equal to 1 means that the slot must have exactly one value. If you enter a value for at least, required is automatically selected. If you set at least greater than one, multiple is automatically selected.
To allow the slot to have multiple values, select multiple.
To allow the slot to have multiple values, but to limit the number of values allowed, enter the maximum number of values in the at most entry var. If you set at most greater than one, multiple is automatically selected.
Note: If you are editing the slot for a specific class, and the slot is inherited, you cannot change the cardinality from single to multiple. The at least field must be greater than or equal to any inherited at least. The at most field must be less than or equal to any inherited at most.
Minimum (optional)
For a slot of type Integer or Float, you can change the minimum value by typing the new value in the Minimum field. If you are editing the slot for a specific class, and the slot is inherited, the new minimum value must be greater than or equal to the inherited minimum.
Maximum (optional)
For a slot of type Integer or Float, you can change the maximum value by typing the new value in the Maximum field. If you are editing the slot for a specific class, and the slot is inherited, the new maximum value must be less than or equal to the inherited maximum.
Defaults (optional)
Allows you to specify the default value(s) for a slot. When an instance is created for a class that has a slot with a defined default, the default value is automatically entered as the value of the slot. The default value can then be changed or overwritten.
For a slot with Single cardinality, Defaults must be a single value or no value; for a slot with Multiple cardinality, Defaults can be more than one item.
When present, any Defaults are displayed in the second-to-last column of the Template Slots pane in the Classes tab.
Documentation (optional)
You can change the text description of the slot directly in the documentation field.