Inverse properties for inheritance and performance

Latest update: 2014-10-13    


Introduction

In this publication the advantages of adding InverseProperties are being discussed. These are, in the context of the ISO 15926 implementation, essential for inheritance, and advantageous for the performance of SPARQL queries.

Picture

A picture says more than a thousand words:

Adding Inverse Properties

The inverse properties shown are instances of owl:ObjectProperty.

Without these added inverse properties any SPARQL query has to dig through the rdf:objects of all properties of all template instances. With those inverse properties there is in fact a kind of picklist of all templates in which a particular object plays a role, the OIM (Object Information Model).

With respect to inheritance the inverse properties are helpful for determining inheritance.

The addition of such an inverse Object Property goes as follows:

In the TPL ontology:

:isPossessorTypeIn rdf:type owl:ObjectProperty ;

    owl:inverseOf :hasPossessorType .

In the project data:

:S01 tpl:isPossessorTypeIn :T02 .

 

The automatic addition of these triples is done with SPARQL CONSTRUCT like this:

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>

PREFIX tpl:  <http://15926.org/templates-test/templates#>

CONSTRUCT { ?object tpl:isUrClassOfLocatedIn ?template }

WHERE {

 ?template rdf:type tpl:ClassOfContainmentDefinition .

 ?template tpl:hasUrClassOfLocated ?object .

 FILTER NOT EXISTS { ?object tpl:isUrClassOfLocatedIn ?template } .

}

resulting in (when using Virtuoso):

which must be converted to triples.

Inheritance

As shown in above diagram, inverse properties will make inheritance possible, but not automatically, because this kind of object-oriented inheritance is alien to RDF or OWL. It has to be programmed into a tool.