The OWL Class Expression is a Graph

The tremendous capability of the class expression is the core of the OTTER Project. The first important concept to understand is that a class expression is a graph.

The class expression of OWL has considerable depth in defining a specific subset of individuals. It includes:

  • Predefined and Named Classes
  • Boolean Connective and Enumeration of Individuals
  • Object Property Restrictions
  • Data Property Restrictions
  • Restrictions Using n-ary Data Range

This is defined in the W3C document, “OWL 2 Web Ontology Language, Quick Reference Guide (Second Edition)”.

Consider the business model used in the OTTER Project:

where the nodes are classes and edges are object properties. The following OWL class expression is in the Manchester OWL syntax:

EABusinessModel:Person and (EABusinessModel:hasUserID value “EA1”) and (EABusinessModel:inOrganization some (EABusinessModel:Organization and (EABusinessModel:hasOrgID some xsd:string)))

This statement describes a graph. It contains two class expressions with data properties:

  1. EABusinessModel:Person and (EABusinessModel:hasUserID value “EA1”)
  2. EABusinessModel:Organization and (EABusinessModel:hasOrgID some xsd:string)))

These expressions are linked by an one object property, “EABusinessModel:inOrganization”.

The graph for this class expression is:

where the “Root” node and “Node:1” are class expressions and the edge is the object property. Each node shows the data properties included in the class expression.

Here is another example this one from the OTTER Project implementation of SCA. This expression contains multiple class expressions linked by object properties:

EABusinessModel:Software and (EABusinessModel:hasAppID value “InternetServer”) and EABusinessModel:modelledBy some (EASCAlite:Component and (EASCAlite:hasEntityMap some xsd:string) and ((EASCAlite:providesService some EASCAlite:Service) or (EASCAlite:makesReference some EASCAlite:Reference)) and (EASCAlite:hasAppTemplate some EASCAlite:App))

This expression contains five class expressions with two having a data property:

  1. EABusinessModel:Software and (EABusinessModel:hasAppID value “InternetServer”)
  2. EASCAlite:Component and (EASCAlite:hasEntityMap some xsd:string)
  3. EASCAlite:Service
  4. ASCAlite:Reference
  5. EASCAlite:App

These expressions are linked by four object properties:

  1. EABusinessModel:modelledBy
  2. EASCAlite:providesService
  3. EASCAlite:makesReference
  4. EASCAlite:hasAppTemplate

This expression has the following graph:

This graph contains multiple nodes where object properties are the edges. Edges that have only one arrowhead are defined as functional. In other words, there can only be one individual within the range of the object property.

Here is another more complex example:

EASCAlite:ConnectLink and EASCAlite:connectReference some ((EASCAlite:Reference and (EASCAlite:isReferenceOfComponent some EASCAlite:Component) and EASCAlite:hasSendDatagraph some xsd:string) or (EASCAlite:SendReceive and EASCAlite:hasReceiveDatagraph some xsd:string) or (EASCAlite:promotedFromRefLink some (EASCAlite:PromoteRefLink and EASCAlite:promoteReference some EASCAlite:Reference))) and EASCAlite:connectToService some ((EASCAlite:Service and EASCAlite:isProvidedByComponent some (EASCAlite:Component or (EASCAlite:hasEntityMap some xsd:string) and ((EASCAlite:hasSocketTemplate some EASCAlite:Socket) or (EASCAlite:hasAppTemplate some EASCAlite:App) and (EABusinessModel:modelOf some (EABusinessModel:Software and EABusinessModel:hasAppID some xsd:string))))) or (EASCAlite:promotedFromSvcLink some (EASCAlite:PromoteSvcLink and EASCAlite:promoteService some ((EASCAlite:Service and EASCAlite:hasRequestDatagraph some xsd:string) or (EASCAlite:RequestResponse and EASCAlite:hasResponseDatagraph some xsd:string)))))

This expression contains eleven class expressions and some with data properties:

  1. EASCAlite:ConnectLink
  2. EASCAlite:Reference and (EASCAlite:hasSendDatagraph some xsd:string)
  3. EASCAlite:Component and (EASCAlite:hasEntityMap some xsd:string)
  4. EASCAlite:PromoteRefLink
  5. EASCAlite:RequestResponse and (EASCAlite:hasRequestDatagraph some xsd:string) and (EASCAlite:hasResponseDatagraph some xsd:string)
  6. EASCAlite:Service and (EASCAlite:hasRequestDatagraph some xsd:string)
  7. EASCAlite:Socket
  8. EASCAlite:App
  9. EABusinessModel:Software and (EABusinessModel:hasAppID some xsd:string)
  10. EASCAlite:PromoteSvcLink
  11. EASCAlite:SendReceive and (EASCAlite:hasSendDatagraph some xsd:string) and (EASCAlite:hasReceiveDatagraph some xsd:string)

It also contains eleven object properties. In this example, some of the links are applied more than once as indicated by the count in parentheses:

  1. EASCAlite:connectReference (2)
  2. EASCAlite:isReferenceOfComponent (2)
  3. EASCAlite:promotedFromRefLink (2)
  4. EASCAlite:promoteReference (2)
  5. EASCAlite:connectToService (2)
  6. EASCAlite:isProvidedByComponent (2)
  7. EASCAlite:hasSocketTemplate (1)
  8. EASCAlite:hasAppTemplate (1)
  9. EABusinessModel:modelOf (1)
  10. EASCAlite:promotedFromSvcLink (2)
  11. EASCAlite:promoteService (2)

This class expression is represented in the following graph:

Class expression graphs as shown in these examples are directed graphs. As such there will be at least one root node. In the diagrams, these nodes are labelled “root”.

The class expression:

EASCAlite:Component and ((EASCAlite:providesService some (EASCAlite:Service and ((EASCAlite:connectServiceByLink some EASCAlite:ConnectLink) or (EASCAlite:promotedBySvcLink some (EASCAlite:PromoteSvcLink and EASCAlite:promoteToService some EASCAlite:Service))))) or (EASCAlite:makesReference some (EASCAlite:Reference and ((EASCAlite:connectReferenceByLink some EASCAlite:ConnectLink) or (EASCAlite:promotedByRefLink some (EASCAlite:PromoteRefLink and EASCAlite:promoteToReference some EASCAlite:Reference))))))

contains six class expressions:

  1. EASCAlite:Component
  2. EASCAlite:Service
  3. EASCAlite:ConnectLink
  4. EASCAlite:PromoteSvcLink
  5. EASCAlite:Reference
  6. EASCAlite:PromoteRefLink

and eight object properties linking the class expressions:

  1. EASCAlite:providesService
  2. EASCAlite:connectServiceByLink
  3. EASCAlite:promotedBySvcLink
  4. EASCAlite:promoteToService
  5. EASCAlite:makesReference
  6. EASCAlite:connectReferenceByLink
  7. EASCAlite:promotedByRefLink
  8. EASCAlite:promoteToReference

This class expression is shown by the following graph:

Each of the examples are quite different in content, yet each is a graph.

Understanding that an OWL class expression is a graph is the key. This is the basic concept which leads to using a class expression to query a repository of OWL individuals.