Guide for Extensions

3 Implementation of Testbed to FIESTA-IoT annotators

After having defined all the mappings between your platform’s assets (both in terms of resource descriptions and observations), including the possible modifications that may be brought about on the ontology, it is time to talk about the implementation of the annotator that would convert your datasets to that compliant with FIESTA-IoT ontology (data model).

For that, you can choose among a number of different RDF serialization the ones listed below (annotated according to the “Content-type” field of the HTTP header):

  • application/ld+json
  • application/n-quads
  • application/n-triples
  • application/n3
  • application/rdf+json
  • application/rdf+thrift
  • application/rdf+xml
  • application/trig
  • application/trix
  • application/trix+xml
  • application/turtle
  • application/x-trig
  • application/x-turtle
  • null/rdf
  • text/csv
  • text/n-quads
  • text/n3
  • text/nquads
  • text/plain
  • text/rdf+n3
  • text/trig
  • text/turtle

In order to show you an example of how to annotate a resource or an observation, we have included Appendix II where an illustrative example of one of the SmartSantander’s resources using json-ld as the serialization format is provided. Besides, you can dynamically query another Content-Type by means of the IoT-Registry API (FIESTA-IoT Consortium, 2016).

https://platform.fiesta-iot.eu/annotator/api/testbed

Method

Description

Request Body (example)

POST

Service to generate a semantically annotated testbed document (with or without subjacent resources)

{

"id": <Testbed IRI (string)>,
"devices": [
{
"id": <Device 1 unique ID (string)>,
"location": {
"lat": <Latitude (double)>,
"lon": <Longitude (double)>
},
"sensing_devices": [
{
"id": <Device 1 Sensor 1 unique ID (string)>,
"qk": <m3-lite’s QuantityKind (string)>,
"uom": <m3-lite’s Unit (string)>
},
{
"id": <Device 1 Sensor 2 unique ID (string)>,
"qk": <m3-lite’s QuantityKind (string)>,
"uom": <m3-lite’s Unit (string)> }
]
},
{
"id": <Device 2 Sensor 1 unique ID (string)>,
"location": {
"lat": <Latitude (double)>,
"lon": <Longitude (double)>
},
"type": "AirThermometer",
"qk": "TemperatureAmbient",
"uom": "DegreeCelsius"
}
]
}



In case case you want to check whether your annotations are compliant with our ontology, you can use the FIESTA-IoT Ontology Validator to receive a real-time validation report. Moreover, in case your annotated document is not a 100% match with the correct format, this report will not only return the binary correct/error output, but will also provide a detailed explanation of the actual source(s) of the error(s).