Tags: Ontology, Ontology Viewer
This guide explains Ontology versioning approach, so Platform of Trust customers and other interested groups can utilize Ontology in a secure way to avoid having broken standards by Ontology versions update.
Use GitHub documentation if needed and particular Fork a repo guide. Windows or macOS users might also prefer using GitHub Desktop after creating a fork to simplify the process. Ontology GitHub repository can be accessed here.
Please use installation instructions to install the software.
Open /{Version}/Ontology/pot.owl
file with Protégé editor. Where {Version}
is the required version, for example v1
.
Please refer Adding DataContext section on adding data product contexts to ontology.
1. Add new subclass for DataContext class. Please use Pascal case (aka Upper Camel Case) for class names.
2. Add classes you want to use in your translator responses by adding annotation property supportedClass
with respective class as value.
3. Add ontologies URLs you want to support and abbreviate names for them using supportedOntology
annotation property.
First, add ontology IRI
As second step specify ontology abbreviation:
End result should look like this:
4. After you done with editing, push it to your fork and create PR request for review by PoT ontology team
In this section, we review an example of data context usage in actual responses. Let's assume we return data from a sensor
that provides different measures: air temperature, CO2 level, and also room presence/occupancy at the same time. Also, we use external Units of measurement ontology
{
"@context": "https://standards.oftrust.net/v1/DataContext/SampleDataContext/",
"items": [
{
"@id": "test",
"dataProductOutput": [
{
"@type": "MeasureAirTemperatureCelciusDegree",
"dateTimeOfMeasure": "2020-03-04T10:41:41",
"outputValue": "21",
"unitOfMeasure": "UO:0000027"
},
{
"@type": "MeasureAirCO2LevelPPM",
"dateTimeOfMeasure": "2020-03-03T10:41:41",
"outputValue": "21",
"unitOfMeasure": "UO:0000169"
},
{
"@type": "MeasurePresence",
"dateTimeOfMeasure": "2020-03-03T10:41:41",
"outputValue": "True"
},
{
"@type": "MeasureOccupancyCount",
"dateTimeOfMeasure": "2020-03-03T10:41:41",
"outputValue": "3",
"unitOfMeasure": "UO:0000189"
}
]
}
]
}
In this guide, we have shown how you can create Data Context using Protégé ontology editor and contribute to Platform of Trust Ontology incrementation process. We also have described the basic steps you need to follow for using Protégé for developing a new Data Context. Finally, we have demonstrated an example of data context usage in actual API Response.