Viewing a Class

You can edit an existing class using the Class Form. You can access the Class Form in one of two ways:

To edit a class from the Classes Tab:

  1. Select the class you want to edit in the Class Relationship pane in the Classes Tab. The current information for the highlighted class will be shown in the Class Form to the right.
  2. Enter the updated information directly in the Class Form to the right or click the View icon in the Class Relationship pane to show the same form as a free-standing window.

To edit a class from the Class pane at the Instances Tab:

  1. Select the class you want to edit in the Class pane at the Instances Tab
  2. Click the View icon at the upper right of the pane to open the Class Form.

Note: If the class appears as one of the Allowed Parents for a slot of type Class, you can also open the Class Form by going to an instance that has that slot and clicking on the View icon. See Standard Widgets for more information.

Note: If the class is included from another project, it cannot be edited. Included classes are shown with a pale class icon to the left. See Including a Project for more information.

Using the Class Form

Any changes you enter into the Class Form take effect immediately. To make the changes permanent, save the knowledge base by selecting Save from the Project menu. 

To revert to the last saved version, close Protégé-2000 without saving changes. If you have made extensive changes to your knowledge base during the current session, you may wish to save before editing classes. 

Changing the Name of a Class

To change the name of a class, edit the name in the Name field. The following rules apply to class names:

A recommended convention is to make the first character of each word in a class name uppercase and the rest lowercase, and to separate words by underscores. 

Changing the Role of a Class

Select the new role from the Role menu. Concrete classes may have direct instances, but do not have to; abstract classes cannot have direct instances. Protégé-2000 does not impose any restrictions on the role of your classes. 

Changing Constraints

Class constraints are defined programatically. See Constraints for more information.

Changing Class Documentation

To change the notes for a class, change the text directly in the Class Documentation pane. 

Working with Class Slots

The Template Slots pane allows you to edit, create, add, and remove slots from your class.

Editing Class Slots

You can edit the slot in one of two ways:

To edit a slot at the top level:

  1. Highlight the slot name in the Template Slots pane

  2. Click the top-level View button at the top right of the pane. The Slots Form is displayed. 

  3. Use the Slots Form to edit slot properties such as Name, Type, Cardinality, and to add notes. See Viewing a Slot for more information on how to edit a slot. 

To edit a slot at the class:

  1. Highlight the slot name in the Template Slots pane

  2. Click the Class-Level View button at the top right of the pane. The Slots Form is displayed. 

  3. Use the Slots Form to edit slot properties such as Name, Type, Cardinality, and to add notes. See Viewing a Slot for more information on how to edit a slot. 

Restrictions on Global and Inherited Classes

Your class can have slots that were inherited from a superclass. If the slot is defined globally or is inherited, only the following edits can be performed:

Direct slots, which were created or added at the level of the slot, have no editing restrictions. 

If you have edited a slot at the class level, the slot is displayed with an override icon.

Creating a New Slot

You can define a new slot for your class. 

  1. Make sure the correct class is highlighted in the Class Relationship pane.

  2. Click the Create button at the top right of the pane. The Slots Form is displayed. 

  3. Use the Slots Form to edit slot properties such as Name, Type, Cardinality, and to add notes. See Creating a Slot for more information on how to create a slot.

A direct slot is displayed with a blue icon.

Clearing Slot Overrides

If you have overriden a slot at the class, you can remove your overrides and use the top-level definition of the slot:

  1. Highlight the slot name in the Template Slots pane

  2. Click the Clear Overrides button at the top right of the pane. Any changes you made at the class level are removed and the top-level definition of the slot is used. 

Adding an Existing Slot to a Class

Once slots have been created, you can add them to more than one class. For example, the Prototype_Newspaper class has a Weekday slot, which can be used to choose among the days of the week. If you were creating a new type of employee who wrote a weekly feature, you might want to reuse this slot.

To choose a pre-existing slot to add to your class:

  1. Make sure the correct class is highlighted in the Class Relationship pane.

  2. Click the Add button at the top right of the pane. The Select Slots dialog box displays all the slots you can add to the class.

  3. Highlight the slot you wish to add to your class. 

  4. Click OK.

The new slot is added to the Template Slots pane. It is a directly attached slot and is displayed with a blue icon. You do not need to name the slot; however, you may need to override its facets. If you wish to override the facets on the slot, you may click the Top-Level View or Class-Level View   button to display the Slot Form. See Viewing a Slot for more information. 

Removing a Slot

You can remove any direct slot that appears in the Template Slots pane. To remove a slot:

  1. Highlight the slot
  2. Click the Remove button. The slot will be removed from the class. 

Note that the slot has not been deleted from the knowledge base. It will still appear in the Select Slots dialog box (see Adding a Slot, above) and the Slots Tab. See Deleting a Slot for more information.

Other Class Editing Operations

Viewing Multiple Classes

To view or edit the information for several classes at once, select the classes one by one and click the View   class button to open the Class Form for each class. Opening a new class form does not close the previous form. This allows you to compare the attributes for two or more classes. Edits can be made directly in any open Class Form.

Changing Superclasses

To change the superclasses of a class see: Adding a Superclass, Replacing a Superclass, and Removing a Superclass.


Next: Viewing Class Relationships

Classes Table of Contents