Back to top
Vastuu Group

How to use Standard Data Models

Last updated: July 7, 2020
Reading time: 4 min

Tags: Data Model, Ontology, V1 APIs

Data integrators most likely will need to understand Data Models used in Platform of Trust thoroughly. This would aid them to build translation rules between source data and Platform of Trust with Translator component or integration platform tools.

Purpose and benefits

Unification of data models enables easy integration without the need to build connectors for each specific case. Platform of Trust data models are available in machine-readable JSON-LD encoding and utilizes RDF and OWL standards. Other encodings might be available at later stages. The data model can be easily extended by third parties. The exact process is specified in Ontology extension guide.

Data example

Each data file of identity should reference its associated context file. All properties excluding name should be nested under data object. Here is an example of Building:

    "@context": "",
    "@id": "<identity id>",
    "@type": "Building",
    "name": "Huomenta",
    "data": {
        "lifeCycleInaugurationMomentYear": 1943,
        "lifecycleInspectionYear": 2017,
        "physicalAreaSquareMeterNet": 5200,
        "physicalVolumeCubic": 40000

In this example, @context defines a reference to the Context file where the definition of the JSON structure is located. In this definition, there is a reference to the Ontology file with term definitions. JSON-LD playground can be used to extract a machine-readable definition of data. Just copypaste above example there to receive terms links.

Please reference sections below to get more information about Ontology and Context terms.

Data model

The data model includes real-life objects and their properties. We have a set of classes, arranged in a multiple inheritance hierarchy where each class may be a sub-class of multiple classes. We also have a set of properties:

each property may have one or more classes as its domains. The property may be used for instances of any of these classes. Each property may have one or more classes as its ranges. The value(s) of the property should be instances of at least one of these classes. They can be arranged in the hierarchy as same as classes.

The decision to allow multiple domains and ranges was purely pragmatic. While the computational properties of systems with a single domain and range are easier to understand, in practice, this forces the creation of a lot of artificial classes, which are there to purely to act as the domain/range of some properties.

All classes and properties can be investigated in Platform of Trust Data Model structure documentation.

Data model source code

Data model source code is organized in the following way:

The core ontology file is named pot.jsonld and is located under the ontologies folder. It contains all classes and properties used in ontology. Context files are located in contexts folder and contain one file per identity. This file describes the JSON document structure of a specific identity. Vocab files are located in the vocabularies folder and describe properties metadata like labels on forms and requirements

Core ontology should be understood as core terms vocabulary including all classes and properties. Context files define the JSON document structure and are connected to ontology. Vocab files should be used to build UI and other application-level representations of data structure and also to understand some technical level properties of attributes.

If you want to extend ontology, please read this Ontology extension guide.

Links and additional information

All classes and properties can be investigated in Platform of Trust Ontology Viewer.

All JSON-LD source files are available under GitHub Repository.

If you want to add your classes or properties to ontology use Ontology extension guide.

If you are an application developer, it might be a good idea to read Application Development Guide first.

If you are integrating data and creating data products, take a look at the Data Product 101 guide

Open sandbox is your friend! Isolated environment for testing applications and data product integrations, read more from Sandbox guide.

Ready to explore more?

Try Platform Sandbox

Improvement Suggestions? or a New Guide?

Tell us in GitHub