Understanding Inverse Slots

The Inverse Slot widget in the The Slot Form allows you to create a reciprocal relationships between two slots, so that as one slot is filled in at one instance, its inverse slot is automatically filled in at another instance, according to the relationship you specified.

This section gives an overview of how to analyze a project and design inverse slots. For information on how to use the user interface, see Creating an Inverse Slot Relationship.

For example, suppose you want to keep track of which editor(s) edit which section(s). There is already a slot sections at the class Editor which takes as values instances in the class Section. You could create an inverse slot editor at the class Section which takes as values instances in the class Editor. Now, at the instance Mr. Science you assign the value Science to the slot sections. Then, at the instance Science, Mr. Science automatically appears as a value for the slot editor.

This section considers the most common relationship, an inverse slot relationship between two instances. 

To design and create inverse slots:

  1. First identify the inverse relationship.  
  2. Second, analyze the Protégé components of the relationship.
  3. Finally create or assign the slots to the appropriate classes and create the inverse slot relationship between them.

Identify the Relationship

This is a reciprocal relationship that always occurs: for example, if Mr. Science edits the Science section, the Science section is edited by Mr. Science. Different types of inverse relationships are possible. Take the following criteria into consideration: 

  1. You can restrict the relationship to a one-to-one correspondence OR you can allow one or both of the slots to have multiple values. For example, Chief Honcho edits a number of sections. 
  2. The relationship can be between instances in different classes OR instances in the same class. For example, likes and is_liked_by would be a relationship where the slot and its inverse slot are both attached to Person.
  3. A slot can be its own inverse. shares_ an_ office_ with would be a candidate for an inverse relationship where the inverse slot was identical with the original slot. This is a stronger tie than simply having instances in the same class.
  4. The relationship must be reciprocal. 

Analyze the Relationship in Protégé

Once you have identified the relationship in your ontology, you need to analyze it in terms of your Protégé project. For an inverse slot relationship between Instance slots, determine the following:

Based on this information, here is what you need to do in your Protégé project:

  1. Create a slot of type Instance which takes values in Class_List_A. We'll call this original_slot.
  2. Create another slot of type Instance which takes values in Class_List_B. We'll call this inverse_slot.
    If the information is important in your ontology, it is likely that one or both of these slots already exist in the project.
  3. Assign your Protégé slots to the appropriate classes. First, assign original_slot to every class in Class_List_B
    Recall that the target values of original_slot are in Class_List_A. Assigning the slot to Class_List_B is what creates the cross-connection between the classes.
  4. Similarly, assign inverse_slot to every class in Class_List_A.
  5. Make inverse_slot the inverse of original_slot. You can actually do this as soon as both slots are created.

Note that if you create an inverse slot relationship after some instances have been created, existing instances will not display the inverse slot information.

Create the Inverse Slot Relationship

For information on how to use the Protégé interface to make an inverse slot, see Creating an Inverse Slot Relationship.

Next: Creating an Inverse Slot Relationship

Slots Table of Contents