PrF UG slots value type class

From Protege Wiki

Jump to: navigation, search

The Class Value Type

Protege-Frames User's Guide
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.


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

Personal tools