Guide for Extensions

1 Getting aligned with FIESTA-IoT’s semantic data models

1.6 Annotator as a Service (iot-registry utils)

Aside the option of designing and developing the whole annotator module on your own and deploy it at the tested level, we have come up with another alternative, based on the usage of an annotator-as-a-service-like operation. This way, through one of the set of tools included in the iot-registry API (FIESTA-IoT Consortium, 2016), you could straightforwardly pass from your legacy documents to FIESTA-IoT’s.

In a nutshell, you can generate annotated documents just by sending simple JSON objects to the corresponding endpoints that are resumed in following tables. However, bear in mind that the nature between these web services is to provide a generic way to annotate resources, so complex descriptions might not be suited through this approach. It goes without saying that for these cases, you would have to carry out the annotator on your own.

Testbed description generation through the annotator service:

https://platform.fiesta-iot.eu/utils/annotator/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"

    }

  ]

}

Resource description generation through the annotator service:

https://platform.fiesta-iot.eu/utils/annotator/device

Method

Description

Request Body (example)

POST

Service to generate a semantically annotated resource document 

{

  "id": <Device i unique ID (string)>,

  "location": {

    "lat": <Latitude (double)>,

    "lon": <Longitude (double)>

  },

  "sensing_devices": [

    {

      "id": <Device i Sensor 1 unique ID (string)>,

      "qk": <m3-lite’s QuantityKind (string)>,

      "uom": <m3-lite’s Unit (string)>

    },

    {

      "id": <Device i Sensor 2 unique ID (string)>,

      "qk": <m3-lite’s QuantityKind (string)>,

      "uom": <m3-lite’s Unit (string)>

    }

  ]

}

Observation description generation through the annotator service:

https://platform.fiesta-iot.eu/utils/annotator/observation

Method

Description

Request Body (example)

POST

Service to generate a semantically annotated observation document 

{

  "observed_by": <Sensor unique ID (string)>,

  "location": {

    "lat": <Latitude (double)>,

    "lon": <Longitude (double)>

  },

  "quantity_kind": "TemperatureAmbient",

  "value": <Value>,

  "format": <Type (integer, float, etc.)>,

  "unit": <m3-lite’s Unit (string)>,

  "timestamp": <Date>

}

As for the responses, the iot-registry module can return them in the same formats as the ones enumerated in Section 1.5.

The Testbed Registration UI can be found at the FIESTA-IoT portal under the Testbed Provider Menu (see 1st Figure below) item named the “Register Testbed”. 

Register Testbed page (see 2nd Figure below) will show the list of registered testbeds and enable user to Register a new testbed. The admin user can view all the registered testbeds, whereas the testbed providers only see their own testbeds that they have registered.

The use can register a new testbed by clicking “Register new testbed” button, a register testbed page (see 3rd Figure)  will be shown where the user inputs testbed related information:

  • Input IRI this is unique for each registered testbed.
  • Input Annotated Resource Observation, Annotated Resource Description user must specify data format by selecting a format from combo-box list.
  • User can validate resource observation and resource description by click validate button.
  • User must input latitude, longitude
  • Other remain textbox are optional

When the user clicks save button, if the registration process is successful the register testbed page will disappear and a success message is displayed along with the identifier of the registered testbed.