PrF UG classes view relations

From Protege Wiki
Jump to: navigation, search

Viewing Class Relations


Protege-Frames User's Guide
Classes
Classes Tab
Class Browser
Class Buttons
Class Hierarchy Window
Class Icons
Class Menu
Class Search Bar
Superclasses Pane
Class Editor
Constraints
Template Slots Pane
Template Slot Buttons
References Window
Creating a New Class
Creating Multiple Subclasses
Deleting a Class
Displaying the Class Editor
Editing a Class
Editing Template Slots
Finding a Class
Hiding a Class
Replacing a Superclass
Adding a Superclass
Jumping to A Superclass
Removing a Superclass
Viewing Class Relations
Classes & Instances Tab
Viewing References
Glossary, Editing Help

If Class_A has a direct slot of type Class or an Instance that includes Class_B in the allowed class(es) of the slot, we say that Class_B is related to Class_A. The Relations menu, available by clicking on the arrow to the right of the class buttons, allows you to choose which relation between classes to show in the Class Browser. This help topic describes the choices on the Relations menu.

Class Relations icon

Example

For example, the responsible_for slot at the Editor class is a class of type Instance that has Employee as an allowed class; this means that Employee is related to Editor.

Relations Menu for Editor

The picture below shows the Class Relationship menu for the class Editor in the Newspaper example. Editor has two Instance slots, responsible_for and sections.

Class Relationship menu, "Show Relation responsible_for" selected

Note: If the highlighted class does not have any related classes, the menu only displays Show Class Hierarchy and Show all Relations.

Selecting Show Relations responsible_for changes the Class Hierarchy window to display only the classes that are related to Editor through the responsible_for slot.

Class Browser, "Editor" selected

The Relations Menu

Show Class Hierarchy

The default Show Class Hierarchy displays the subclass-superclass hierarchy of your knowledge base. All the classes in the knowledge base appear in the displayed tree. (Some classes may be hidden. You can choose whether or not hidden classes are displayed in the Class Browser by choosing Configure from the Project menu, going to the Display tab, and toggling the Display Hidden Classes option.)

Show All Relations

Show All Relations displays a hierarchy of classes that are related to the selected class via its slots, as follows:

  • The root is the class (Class_A) that was highlighted when Show All Relations was selected.

  • The next level (direct children) consists of any classes (Class_B1, Class_B2, etc.) that are related to Class_A through one or more of its slots.

  • The next level consists of any classes (Class_C1, Class_C2, etc.) that are related to one of the classes on the previous level (Class_B1, Class_B2, etc.), through one of the slots of Class_A. Note the following:

    • A class Class_C1 is shown as a child of the class it is related to.

    • If a class is related to more than one class on the previous level, it is shown everywhere it occurs (multiple superclasses).

    • Only classes related through the slots of Class_A are shown; if Class_X is related to Class_B through a slot that is not attached to Class_A, it will not appear.

  • Subsequent levels continue the tree of classes that are related to the higher classes via the slots of Class_A.

It is possible (and sometimes useful) to have a recursive relation: Class_A appears somewhere subordinate to Class_A on the tree. This can happen, for example, if Class_B is related to Class_A, which in turn is related to Class_B through a different slot. In this case, all the levels are shown from Class_A to Class_A and the second instance is labeled (recursive).

Show Relation slot

Selecting a slot from the menu will show the hierarchy of classes, starting at the selected class, that are related to each other only through the slot selected on the menu. The slot-specific view can be read as "parent-relation-child", where "relation" is the slot selected on the Relations menu. For example, in the responsible_for view, Editor - is responsible for - Employee.

This view is not necessarily a subset of the Show All Relations view. If Show All Relations has recursion, the view restricted to a single slot can be quite different and possibly more extensive. Consider the following situation:

  • Class_A and Class_B both have slot_a and slot_b.

  • Class_B is related to Class_A through slot_a.

  • Class_A is related to Class_B through slot_b.

  • There are a number of additional classes that are related to Class_B through slot_a.

In this case:

  • Show All Relations will display Class_A and Class_B in a two-level recursion; the class relations from slot_a at Class_B are not shown.

  • Show Relation slot_a will show the classes that are related to Class_B through slot_a and any children of those classes.

It is also possible to view a list of all the frames that reference a highlighted class, using the References Class (classes_class.view_references) button. See Viewing References for more information.