Difference between revisions of "PrF UG classes add superclass"
Line 35: | Line 35: | ||
below the [[PrF_UG_classes_class_browser|Class Browser]]). | below the [[PrF_UG_classes_class_browser|Class Browser]]). | ||
A <b>Select Classes</b> window will appear. | A <b>Select Classes</b> window will appear. | ||
− | + | </p> | |
− | </p> | + | <div>[[Image:PrF_UG_classes_superclass_pane.png|frame|none |
+ | Superclasses pane]]</div> | ||
</p> | </p> | ||
Revision as of 10:09, October 20, 2008
Adding a Superclass
Classes in Protege can have more than one superclass. Classes inherit the properties of every one of their superclasses, so by adding a superclass to a class, you are adding all of its slots as well.
Note: If you cannot see the Superclasses pane, your window may be too small. You can see the pane by enlarging your window or by dragging the slider bar at the bottom of the Class Browser. See Working With a Small Window for more information.
Adding a Superclass in the Superclasses Pane
To add a superclass using the Superclasses pane:
Select the subclass in the Class Browser.
Click the Add Superclass button in the Superclasses pane (located at the bottom left of the Classes Tab, below the Class Browser). A Select Classes window will appear.
</p>
Choose the additional superclass(es) you want from the Select Classes window. To highlight multiple classes, hold down the Ctrl (Cmd) key while clicking each class. To highlight a range of classes, click the first class, then hold down the Shift key and click the last class in the range.
</ol>
Note: If nothing happens when the class is dropped over a new superclass, the target class is not allowed to be a superclass of the dragged class. For example, descendants of the dragged class are excluded.
Adding a Superclass Using Drag-and-Drop
To add a superclass, using drag-and-drop in the Class Browser:
Select the subclass in the Class Browser.
Hold down the mouse button and drag the subclass over the additional superclass.
Hold down the Ctrl (Cmd) key and release the mouse button to drop the subclass. The system will add the new superclass to the subclass.
Note: If you do not hold down the Ctrl (Cmd) key when releasing the mouse, the operation is interpreted as Moving a Class.
Multiple Superclasses and Inheritance
Adding a superclass results in more than one superclass for a class, which then inherits the slots and facets of all of its superclasses. For example, the Columnist class in the Newspaper example has two occurrences in the Class Browser: one with the superclass Author, and one with the superclass Person; it inherits slots from both superclasses.
</div>