PrF UG slots editing slot properties

From Protege Wiki
Jump to: navigation, search

Editing Slot Properties


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 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

Class

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.

Instance

The Allowed Classes pane. See Setting the Value Type for information on how to add and remove allowed classes.

Symbol

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.

Cardinality options

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.