Difference between revisions of "PrF UG inst showing subclass instances"

From Protege Wiki
Jump to: navigation, search
(Showing Direct Instances Only)
Line 4: Line 4:
 
{{PrF_UG_TOC_inst}}<div id='prf_ug'>
 
{{PrF_UG_TOC_inst}}<div id='prf_ug'>
  
The [[PrF_UG_inst_instance_menu|Instance Menu]] at the top
+
The [[PrF_UG_inst_instance_menu|Instance menu]], at the top
 
of the [[PrF_UG_inst_instance_browser|Instance Browser]]
 
of the [[PrF_UG_inst_instance_browser|Instance Browser]]
 
allows you to choose the level of instances -
 
allows you to choose the level of instances -
Line 37: Line 37:
 
=== Showing Subclass Instances ===
 
=== Showing Subclass Instances ===
  
By default, the Instance Window shows only the direct instances for a class.
+
By default, the Instance window shows only the direct instances for a class.
  
 
<div>[[Image:PrF_UG_inst_show_direct_instances.png|frame|none|
 
<div>[[Image:PrF_UG_inst_show_direct_instances.png|frame|none|
       Instance Window, "Jane" selected]]</div>
+
       Instance window, "Jane" selected]]</div>
  
 
You can change this, using the Instance Menu.
 
You can change this, using the Instance Menu.
Line 48: Line 48:
 
   <li><p>
 
   <li><p>
 
     Select <b>Show Subclass Instances</b>
 
     Select <b>Show Subclass Instances</b>
     from the [[PrF_UG_inst_instance_menu|Instance Menu]] at the top
+
     from the [[PrF_UG_inst_instance_menu|Instance menu]] at the top
 
     of the [[PrF_UG_inst_instance_browser|Instance Browser]],
 
     of the [[PrF_UG_inst_instance_browser|Instance Browser]],
 
     to the right of the instance buttons.
 
     to the right of the instance buttons.
Line 56: Line 56:
 
     </p>
 
     </p>
 
     <div>[[Image:PrF_UG_inst_show_subclass_instances.png|frame|none|
 
     <div>[[Image:PrF_UG_inst_show_subclass_instances.png|frame|none|
           Instance Window, showing subclass instances]]</div>
+
           Instance window, showing subclass instances]]</div>
 
</ol>
 
</ol>
  

Revision as of 15:14, October 29, 2008

Showing Subclass Instances


Protege-Frames User's Guide
Instances
Instances Tab
Class Browser at Instances Tab
Instance Browser
Instances Window
Instance Buttons
Instance Menu
Types Pane
Instance Editor
Standard Field Types
Fields with Multiple Cardinality
Boolean Fields
Class Fields
Float Fields
Instance Fields
Integer Fields
String Fields
Symbol Fields
Creating an Instance
Creating Multiple Instances
Displaying the Instance Editor
Setting the Display Slot
Showing Subclass Instances
Editing an Instance
Copying an Instance
Deleting an Instance
Finding an Instance
Changing an Instance's Class
Working with Instance Types
Instance Icons
Glossary, Editing Help

The Instance menu, at the top of the Instance Browser allows you to choose the level of instances - direct instances or subclass instances - you want to see for a selected class. These choices are also available when you are choosing instances in a dialog box.

About Subclass Instances

There are two types of instances subordinate to a class:

  • A direct instance is an instance that has been created directly under the class.

  • A subclass instance is any instance that is subordinate to the class. Because of inheritance, an instance of a class is also an instance of all of that class's superclasses. Therefore, an instance can be an instance of many classes of which it is not a direct instance.

In the newspaper example, the Manager class has three direct instances: Jane, Joe, and Mary. The Manager class also has a subclass, Director, which has a direct instance Tim. Tim is a subclass instance of Manager.

Showing Subclass Instances

By default, the Instance window shows only the direct instances for a class.

Instance window, "Jane" selected

You can change this, using the Instance Menu. To show all instances for a class, including subclass instances:

  1. Select Show Subclass Instances from the Instance menu at the top of the Instance Browser, to the right of the instance buttons. The display will change to show all instances subordinate to the class. The class for which the instance was created is shown in parentheses after the instance name.

    Instance window, showing subclass instances

Notes:

  1. It is possible to attach an instance to more than one class (see Adding a Class Type to an Instance), so that the instance appears directly under two or more classes. In this case, the class name displayed after the instance will be the class where the instance was first created.

  2. By definition, abstract classes cannot have direct instances, but they can have subclass instances. This selection allows you to see all the subclass instances for an abstract class.

Showing Direct Instances Only

If subclass instances are shown, you can choose to show only direct instances.

  1. Click on the the Instance menu at the top of the Instance Browser, to the right of the instance buttons. You will see that Show Subclass Instances is checked.

    Show Subclass Instances checkbox (checked)
  2. Select Show Subclass Instances from the menu to deselect this setting and show only direct instances.