Auto-Inverse Relational Properties

By Sandra Schloen, February 2019; Updated April 2021; Updated March 2022

Auto-inverse relational properties reflect a new option available when using Relational Properties. Be sure you have read and understood Variables of Type "Relational" before proceeding here.

Auto-inverse property

An auto-inverse property is based on a Link-Type Variable where the option to "Build inverse property" has been turned on. For such a property, the adding of the relationship to an item automatically triggers the creation of the inverse relationship in the opposite direction on the related item. Just to be clear, if you add this type of property to Item A, OCHRE will automatically add the inverse property to the item you identify as Item B.

For example, If it is said that:

Lot A ... Lot is under ... Lot B

Then, by definition:

Lot B ... Lot is over ... Lot A

The inverse property is created on the relational (link) target item when you Save the relation on the source item.

Benefits

The benefits of this feature are probably obvious. The bidirectional property is applied and exposed by a single variable in both directions, automatically staying in sync as it is added and deleted. This will help ensure that the properties are properly represented on both the source and target items, resulting in a richer, more accurate dataset.

Symmetric vs. Asymmetric

An auto-inverse relation might be symmetric or asymmetric.

A symmetric relation has the same semantic meaning in both directions. For example, Lot A ...Equals... Lot B, implies Lot B ...Equals... Lot A.

Or, for Person items, Person A ...Is Married to... Person B is a symmetric relation, reading the same in both the related and the inverse directions.

An asymmetric relation is assigned a Name of inverse relationship which causes the property to read differently in the inverse direction, for example:

Person A ...Sells to... Person B <==> Person B ...Buys from... Person A

Note that an asymmetric relation displays both its Name and its Name of inverse relationship in the Taxonomy hierarchy (shown in the figure above). This is a visual reminder that this single property effectively represents the relationship, naturally, in both directions.

Property entry

Asymmetric auto-inverse properties can be entered from either direction. Both the related and the inverse forms will appear in the Variable pick-list.

Predefinitions

Auto-inverse variables can be used in Predefinitions along with the default initial value for the Category for which they have been defined.

Queries

Auto-inverse variables can be used in queries in the natural way, from either direction. If you want all uses of an asymmetric, ask for both directions

Cross-Category Relations

In the examples above, items being linked were from the same Category: a location linked to another location or a person linked to another person. OCHRE allows cross-category relations but it requires some additional information. In particular, OCHRE needs to know the Category and Scope of the Inverse relation in addition to that of the original Related item. This enables OCHRE to ensure that items of the appropriate type are being related.

The following example shows a relational property that describes a Feature of a "Declaration" from the Catasto -- the tax survey of Florence in 1427 where Florentine citizens were required to provide a written declaration of their wealth. A "declaration," represented in OCHRE as a Concept item indicates that it "Has declared owner" -- this links a Person item declared as the owner of a piece of real estate to the "Declaration." The Person item, in return, "Is declared owner of" that piece of real estate, linking back in the inverse direction to that same "Declaration." That is, a Concept links to a Person; in return the Person links back to that Concept.

Settings for the Related property in the forward direction.

Settings for the Inverse property in the opposite direction.

"Feature" can be shared by both Concept and Person items.

In the case where items being linked are from different categories, it is less likely that they share an appropriate taxonomic context for the respective related and inverse properties.

As such, it is helpful to put the related property in a taxonomic context near the top of the taxonomy hierarchy using some generic option (here "Feature") that is not too highly constrained.

Implications for Table View

Auto-inverse properties work like any other in Table View. However, asymmetric properties occupy 2 columns in the table: one for the related direction, and another for the inverse direction. They appear as if they are 2 separate properties; but remember, it is a single property, with dependencies, applied in 2 directions.

Symmetric auto-inverse properties collect the relations in a single column regardless of whether they were applied in the related or inverse direction.

Restrictions

The auto-inverse properties create a dependency between 2 properties: the related link on the source item, and the inverse link on the target item. To keep these from getting out of sync, OCHRE enforces several restrictions:

  • Due to the mutual dependency, if the property is deleted from one of the related items, the corresponding inverse property will be deleted on the opposite item. Deletion is allowed from either the related direction, or the inverse direction.

  • Once the user clicks the Save button, the relational property cannot be edited by changing the Variable and/or Value. It is displayed as read-only and colored slightly as a visual cue that it is a special property. The entire property must be deleted and re-entered if necessary. Because it is read-only, clicking on the target link pops up that item in a View window. Note that the Uncertain designation is bound to the property and becomes read-only too. The Comment, however, can be edited and is not bound to the property in the same way.

  • The target item receiving the automatic inverse property must have a compatible taxonomic context within which to contain it. That is, if the property Locus is under ... is within a Stratigraphic unit on the source item, then the target item must also be designated a Stratigraphic unit. The inverse relation could not be applied to a Pottery basket item instead. If you try to apply an auto-inverse property without appropriate taxonomic context, you will get an "Incompatible taxonomic context" error.

      • If, however, the relational property joins items in 2 different categories, taxonomic context will not be checked. It is up to the user to ensure that the natural context of the property and its inverse in the taxonomy is appropriate to items of both types.

  • OCHRE will not permit contradictory auto-inverse relationships. That is, if it is said that Lot A is under Lot B, then it will not be allowed for Lot B to be under Lot A, or for Lot A to be over Lot B. If the nature of the relationship is not strict in this sense, then you may want to use an ordinary relational (link) property instead.

  • OCHRE will not permit copying auto-inverse relationships. If an item is replicated (that is, copied using the insert-down-asterisk button), or if the clipboard option is used to copy/paste previously-saved Properties, any auto-inverse relationships will be neutralized. That is, the property will remain but the link will be set to the initial default value, represented as a link to the appropriate category.

  • Changing a Variable designated with the auto-inverse feature to a regular Link Variable is not allowed. Similarly, an existing Link Variable cannot be changed to an auto-inverse Variable. Upgrading old properties to use this feature will require assistance from the OCHRE Data Service. Please contact us for help if needed.

Additional Rules

  • Since the auto-inverse relationship creates a property on the related item, if you are working with Locations & Objects or Concepts, there must be an observation or interpretation on which the inverse property can be entered. If there is more than one observation or interpretation, you will be prompted to specify on which one the property should be applied.

  • If the target item has no properties yet, it will be given the minimal set of properties, based on the source item, that provide the necessary taxonomic context for the inverse property.

  • If the property is designated as Uncertain in the related direction, it will also be marked as Uncertain in the inverse direction.

  • Auto-inverse properties will work offline, within the usual constraints of the offline environment.

Turn on verification mode to check for invalid properties.

Safeguard

Despite OCHRE's best efforts, it may be possible to confound the process and end up with an auto-inverse relation that has lost its matching inverse property. This could happen due to offline posting issues, claim errors, or other yet unknown reasons.

Clicking the double-arrow button on the end of the property toolbar will activate a verification mode that will query to ensure that both the related and inverse properties are valid. If not, the invalid property will show as red.

If you find an invalid property, delete it. It is likely you will get a message indicating that OCHRE was not able to delete the opposite relation. Click the Save button, then try to add the property again. Chances are OCHRE will be able to rebuild the auto-inverse properly successfully.

You will notice a slight delay when loading an item's Properties if verification mode is ON while OCHRE checks the validity of the properties. It is set OFF by default, and should only be used if you suspect there is a problem with any of the posted relations.

Validation from Table View

(New, March 2022)

To validate the relationships of an auto-inverse property, link the auto-inverse Variable into the Table Columns/Tags tab of a Set's Specification, and check ON the option to Validate auto-inverse properties. When OCHRE prepares a table view of the items in the Set, it will check for both the related-value and the inverse-value of the auto-inverse property for each item. If it finds either relationship missing, it will highlight the value in the offending cell (bold, red) and will prepend the special characters "----" to the beginning of the cell's value to make invalid cells easy to find/filter. You will need to manually correct the values in any cells identified as invalid.