Templates as ontologies

latest update: 2019-11--03    


Introduction

In this topic the role of templates as ontologies is discussed.

Definitions of Ontology

The following two definitions seem applicable here:

Definition #1
In the context of computer and information sciences, an ontology defines a set of representational primitives with which to model a domain of knowledge or discourse. The representational primitives are typically classes (or sets), attributes (or properties), and relationships (or relations among class members). The definitions of the representational primitives include information about their meaning and constraints on their logically consistent application. In the context of database systems, ontology can be viewed as a level of abstraction of data models, analogous to hierarchical and relational models, but intended for modeling knowledge about individuals, their attributes, and their relationships to other individuals. Ontologies are typically specified in languages that allow abstraction away from data structures and implementation strategies; in practice, the languages of ontologies are closer in expressive power to first-order logic than languages used to model databases. [Gruber, 2007]

Definition #2
An ontology is a formal description of knowledge as a set of concepts within a domain and the relationships that hold between them. To enable such a description, we need to formally specify components such as individuals (instances of objects), classes, attributes and relations as well as restrictions, rules and axioms. As a result, ontologies do not only introduce a sharable and reusable knowledge representation but can also add new knowledge about the domain. [Ontotext USA, Web Home Page, Sept, 2019]

Application of definitions

Definition #1
The Upper Ontology of ISO 15926-2 actually defines that "
set of representational primitives" used to model the domain of discourse of a template. Furthermore the language of the "lifted" templates is indeed first-order logic. The link between that abstraction of the " lifted" templates and the implementation strategy of using "lowered" templates is implemented by defining a "signature" for each lowered template in which only the variables are listed, whilst maintaining the link to that abstraction.

Definition #2
In the Template Specifications and the OWL representation of the "lowered templates" those "
individuals (instances of objects), classes, attributes and relations as well as restrictions, rules and axioms" are formally specified for each template.

Instantiation

ISO 15926-7  templates are about ISO 15926-2 Classes and, others, about PossibleIndividual's, where the latters actually are classes that have real world individuals as members (see here for a further explanation).

An instance of a template has an instance of its signature with declared instances of the objects listed there. For example the template IndividualHasPropertyWithValue:

The graph, built from above "set of representational primitives", is:

This template has a FOL listing that builds on the entity types of ISO 15926-2 to define the semantics of this template/ontology:
IndividualHasPropertyWithValue(x1, x2, x3, x4) <->
PossibleIndividual(x1) Ʌ
ClassOfProperty(x2) Ʌ
ExpressReal(x3) Ʌ
Scale(x4) Ʌ
exists u1 exists u2 exists u3 exists u4 exists u5 exists u6(
PossibleIndividual(u1) Ʌ
TemporalWholePartTemplate(u1, x1) Ʌ
Property(u2) Ʌ
ClassificationTemplate(u2, u1) Ʌ
ClassificationTemplate(u2, x2) Ʌ
PropertyQuantificationTriple(u3, u2, u4) Ʌ
ClassificationTemplate(u3, x4) Ʌ
RealNumber(u4) Ʌ
ClassOfIdentificationTemplate(x3, u4) Ʌ
PointInTime(u5) Ʌ
BeginningTemplate(u5, u1) Ʌ
ClassOfIdentificationTemplate(u6, u5) Ʌ
RepresentationOfGregorianDateAndUtcTime(u6)) .
and of the signature of its " lowered" template:


or in RDF:

tpl:IndividualHasPropertyWithValue
          rdf:type owl:Class ;
          rdfs:subClassOf tpl:
TemplateForPropertyAndStatusOfIndividual ;
          tpl:hasPropertyPossessor dm:PossibleIndividual ;
          tpl:hasPropertyType dm:ClassOfProperty ;
          tpl:valPropertyValue dm:ExpressReal ;
          tpl:hasScale dm:Scale


An instance of this template could have the following semantics, as indicated in above graph: "V-101 has a Mass of 30.57 metric tons". This requires the following instances of the template type and its Role Object Types:

:9c88e964-f7ac-4056-ac16-c4dc68b80212 rdf:type tpl:IndividualHasPropertyWithValue ;
          tpl:hasPropertyPossessor :e8802675-6153-4e0e-9584-4fa2060efe05 ; # UUID of vessel V-101
          tpl:hasPropertyType rdl:RDS353339 ; # MASS
          tpl:valPropertyValue "30.57"^^xsd:decimal ;
          tpl:hasScale dm:Scale rdl:RDS2229868 . # METRIC TON

The contents then are being validated with SHACL, to see whether these Role Objects are indeed instances of the Role Object Types of the template signature.

Note that this information can be, from a technical point of view, total nonsense. This is because of the following statement in ISO 15926-2 subclause 4.1 applies:
"To enable integration of life-cycle process plant information the model excludes all information constraints that are appropriate only to particular applications within the scope."
This means that the source applications, from which data elements are being mapped to ISO 15926-7/8 templates, are assumed to deliver semantically and technically correct information.

Implementation

Templates, with their signatures, are still cryptic for most users. To alleviate this Specialized Templates, called TIPs (Template of Information Pattern), have been designed. In these TIPs one or more Role Object Types are being instantiated pre-emptively, in certain cases by means of a selection from a pick-list of applicable/allowable class instances.

A TIP signature is being populated with label values because those are recognized by the users, and the mapping software sees to it that in cases where the labeled object has already been declared a duplication is avoided. If not declared, the software allows for automatic declaration or user-controlled declaration (the latter is safer).

A TIP version of above template could be:
tip:IND-has-Mass
          rdf:type tip:TIP ;
          rdfs:subClassOf
tpl:IndividualHasPropertyWithValue ;
          tpl:hasPropertyPossessor dm:PossibleIndividual ;
          tpl:hasPropertyType  rdl:RDS353339 ; # MASS
          tpl:valPropertyValue dm:ExpressReal ;
          tpl:hasScale rdl:RDS9994337 . # pick-list for mass-related units of measure

where MASS is fixed, the scale is half-way fixed because it shall be selected from a pick-list, and the rest of the Role Object Types remains variable and is inherited from tpl:IndividualHasPropertyWithValue.

Note that further specialization is possible, such as:
tip:IND-has-Mass-in-metric-ton
          rdf:type tip:TIP ;
          rdfs:subClassOf
tip:IND-has-Mass ;
          tpl:hasPropertyPossessor dm:PossibleIndividual ;
          tpl:hasPropertyType  rdl:RDS353339 ; # MASS
          tpl:valPropertyValue dm:ExpressReal ;
          tpl:hasScale rdl:RDS2229868 . # METRIC TON
(again: the MASS is inherited here).

TIP Signature

TIP software works with TIP signatures where the Role Object Types are instantiated with their label.

The signature for an tip:IND-has-Mass-in-metric-ton is:

tip:IND-has-Mass-in-metric-ton-signature rdf:type dm:MultidimensionalObject ;
        :element1 :IND-has-Mass
-in-metric-ton_var_Label-1 ;
        :element2
"MASS" ;
        :element3 :I
ND-has-Mass-in-metric-ton_var_Value-1 ;
        :element4 "METRIC TON"
;
        :element5 :
IND-has-Mass-in-metric-ton_var_LifecycleActivity ;
        :element6 :
IND-has-Mass-in-metric-ton_var_EffectiveDate .

where, for the template instance this topic started with, the values are:

:9c88e964-f7ac-4056-ac16-c4dc68b80212 rdf:type tip:IND-has-Mass-in-metric-ton-signature ;
        :element1
"V-101" ;
        :element2
"MASS" ;
        :element3
"30.57" ;
        :element4 "METRIC TON"
;
        :element5
"VESSEL ENGINEERING" ; (selected from a pick-list of life-cycle activities)
        :element6 "2019-10-03T15:38:00Z" .

which is understandable for an engineer.

The mapping from data elements to ISO 15926-8 template instances can, for the most, be done with an ETL (Extract, Transform and Load
) tool, resulting in an instance of the base template:

:9c88e964-f7ac-4056-ac16-c4dc68b80212 rdf:type tpl:IndividualHasPropertyWithValue ;
          tpl:hasPropertyPossessor ::e8802675-6153-4e0e-9584-4fa2060efe05 ; # UUID of vessel V-101
          tpl:hasPropertyType rdl:RDS353339 ; # MASS
          tpl:valPropertyValue "30.57"^^xsd:decimal ;
          tpl:hasScale rdl:RDS2229868 . # METRIC TON
          meta:hasLifecycleActivity rdl:RDS2223141 ; # VESSEL ENGINEERING
          meta:valEffectiveDate "2019-10-03T15:38:00Z"^^xsd:dateTime .

Using the base template for the end result is done because the TIP information is dependent on the TIP software, but there are other ways to instantiate a template and using the base template for the end result guarantees a code that can be understood globally.

After conversion to N triples, this code is uploaded to the applicable triple store of (in this example) the XYZ Corp.Project P1234 as:

<http://www.p1234.xyz-corp.com/9c88e964-f7ac-4056-ac16-c4dc68b80212> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://data.15826.org/tpl/IndividualHasPropertyWithValue> .
<http://www.p1234.xyz-corp.com/9c88e964-f7ac-4056-ac16-c4dc68b80212> <http://data.15826.org/tpl/hasPropertyPossessor>       <http://www.p1234.xyz-corp.com/e8802675-6153-4e0e-9584-4fa2060efe05> .
<http://www.p1234.xyz-corp.com/9c88e964-f7ac-4056-ac16-c4dc68b80212> <http://data.15826.org/tpl/hasPropertyType>               <http://data.15826.org/rdl/RDS353339> .
<http://www.p1234.xyz-corp.com/9c88e964-f7ac-4056-ac16-c4dc68b80212> <http://data.15826.org/tpl/valPropertyValue>               "30.57"^^<http://www.w3.org/2001/XMLSchema#decimal> .
<http://www.p1234.xyz-corp.com/9c88e964-f7ac-4056-ac16-c4dc68b80212> <http://data.15826.org/tpl/hasScale>                             <http://data.15826.org/rdl/RDS2229868> .
<http://www.p1234.xyz-corp.com/9c88e964-f7ac-4056-ac16-c4dc68b80212> <http://data.15826.org/meta/hasLifecycleActivity>      <http://data.15826.org/rdl/RDS2223141> .
<http://www.p1234.xyz-corp.com/9c88e964-f7ac-4056-ac16-c4dc68b80212> <http://data.15826.org/meta/valEffectiveDate>            "2019-10-03T15:38:00+00:00"^^<http://www.w3.org/2001/XMLSchema#dateTime> .


Adapter

Once such a mapping has been defined for an application and coded in an adapter for that application, it will keep uploading templates following the rules for releasing and uploading as defined by the custodian of that application.
Read further about the concept of that adapter here.