Effectivity & Deprecation

latest update 2023-04-23  

Introduction

One of the key concepts of ISO 15926 is the use of "temporal parts" of PossibleIndividuals and similarly the use of "class of temporal parts" of Classes.

As such this concept is very elegant, but in an RDF + SPARQL implementation it has its drawbacks. This is discussed in this document and a change in the set-up of templates is explained.

Initial situation

NOTE - The next three templates do not exist anymore.

Any information about an instance of PossibleIndividual that is NOT a WholeLifeIndividual is attributed to a temporal part of that instance of PossibleIndividual. For example:

If, later, this description is no longer valid we have to "end" the temporal part PossibleIndividual (x2).

That has to be done with the template EndingOfTemporalPart:

This is proper modeling, but very elaborate for any SPARQL query, because no template instance can be trusted as is without checking whether or not it is still valid by searching for such an EndingOfTemporalPart template instance with the same x1 and x2.

For templates for classes a similar situation applies, with some differences. If we consider the similar template:

In case an instance of this template is no longer valid in this context we must deprecate x2.

For SPARQL queries the same problem occurs as that described for templates for temporal part. It is always required to validate whether or not x2 has been deprecated.

New situation

The validity of information is represented by using two owl:AnnotationProperties:

  1. meta:valEffectiveDate - the dateTime that the information represented by a template becomes effective;
  2. meta:valDeprecationDate - the dateTime that the information represented by a template is deprecated, i.e. no longer valid in this context.

The two templates now look like this:

and for ClassOfIndividual:

Effectivity and deprecation of template instances

A template for individual:

:e85b51e1-ca49-40da-b639-29f088f23e2e rdf:type tpl:ClassifiedDescriptionOfIndividual ;
    tpl:hasDescribed :76fc8062-7529-4d7d-9a9b-8aa00653a43f ;
    tpl:valDescriptor "Boiler Feedwater to E-103" ;
    tpl:hasDescriptionType rdl:RDS2229180 ; # DESCRIPTION WITH SERVICE DESCRIPTION
    meta:valEffectiveDate "2019-02-15T13:29:00Z"^^xsd:dateTime .

becomes, after deprecation:

:e85b51e1-ca49-40da-b639-29f088f23e2e rdf:type tpl:ClassifiedDescriptionOfIndividual ;
    tpl:hasDescribed :76fc8062-7529-4d7d-9a9b-8aa00653a43f ;
    tpl:valDescriptor "Boiler Feedwater to E-103" ;
    tpl:hasDescriptionType rdl:RDS2229180 ; # DESCRIPTION WITH SERVICE DESCRIPTION
    meta:valEffectiveDate "2019-02-15T13:29:00Z"^^xsd:dateTime ;
    meta:valDeprecationDate "2019-04-26T14:18:00Z"^^xsd:dateTime .

by simply adding one triple to the triple store that deprecates the information represented by the template:

:e85b51e1-ca49-40da-b639-29f088f23e2e  meta:valDeprecationDate  "2019-04-26T14:18:00Z"^^xsd:dateTime .

Effectivity and deprection of declared objects

See the topic Declaring an object.

SPARQL

This time stamping is required for finding objects and information valid at a given dateTime

The SPARQL query below is using the valEffectiveDate and valDeprecationDate to find the templates about above-mentioned instance of dm:PossibleIndividual, looks like this:

# Find all template UUIDs about a given object UUID that are valid at a given dateTime
PREFIX : <http://www.p1234.xyz-corp.com/>
PREFIX xsd:  <http://www.w3.org/2001/XMLSchema#>
PREFIX meta: <http://data.15926.org/meta>
SELECT ?object_UUID ?template_UUID ?effective_date
WHERE {
 ?template_UUID ?p ?object_UUID . 
 FILTER (?object_UUID = :76fc8062-7529-4d7d-9a9b-8aa00653a43f ) . # input, selecting all rdf:subjects where the rdf:object is :76fc8062-7529-4d7d-9a9b-8aa00653a43f
 ?template_UUID meta:valEffectiveDate ?effective_date .
 OPTIONAL { ?template_UUID meta:valDeprecationDate ?deprecation_date } . # include template_UUIDs that do not have a deprecation date
 FILTER ( xsd:dateTime(?effective_date) <= "2018-10-21T00:00:00Z"^^xsd:dateTime ) . # input, selecting all template_UUIDs that became effecive on or before
 FILTER ( xsd:dateTime(?deprecation_date) > "2019-04-26T14:18:00Z"^^xsd:dateTime || NOT EXISTS {?template_UUID meta:valDeprecationDate ?deprecation_date }) . # input, 
		selecting all template_UUIDs that have either no deprecation date or a deprecation data after 2019-04-26T14:18:00Z
}

In above case it will give as result:

object_UUID template_UUID effective_date
76fc8062-7529-4d7d-9a9b-8aa00653a43f e85b51e1-ca49-40da-b639-29f088f23e2e 2018-10-21T00:00:00Z

In case a date later than 2019-04-26T14:18:00Z would have been made input, the second column would have been empty because of deprecation of the single applicable template.