Skip to content

Virtual Sensor RDF Schema Editor Use

Nikos Kefalakis edited this page Mar 19, 2015 · 15 revisions

System requirements

All you need to run the Schema Editor is Java 7.0 (Java SDK 1.7), JBoss AS 7.1.X and a deployed version of OpenIoT LSM-Light and Security modules

Prerequisite

LSM-Light (client and server) OpenIoT CAS (Security Modules)

Deployment/Undeployment

JBoss AS 7.1.X

Deploy: To deploy the Schema Editor on JBoss AS 7.X, copy the ui.schemaeditor.war to the server's standalone/deployments directory. Undeploy: To undeploy the application, you need to remove the .deployed marker file that is generated upon successful deployment of the Schema Editor module.

You can find more detailed directions on deploying application on JBoss AS7 here.

Running the software

Please open the following link in your favourite web browser. http://localhost:8080/ui.schemaeditor/

This will re-direct to the OpenIoT security module. If you are using the VDK, you can trial the Schema Editor using the credentials openiot/openiot.

For more help w.r.t OpenIoT CAS, please refer to Security Module

Using the Schema Editor

The landing page is a navigator page for

  • Sensor Type Editor
  • Sensor Instance Editor

Sensor Type Editor

The sensor type editor is used to create new sensor classes which will be automatically stored as an extension to the OpenIoT ontology in LSM server. Below is a screenshot of the sensor type editor with a sample sensor description

Properties

  • Sensor Type Name: The name of the new sensor class the user wishes to create (E.g. WeatherStation, SoilMoistureSensor)

  • Add Observed Property: This will allow a observed property to be attached to the sensor. On click the icon, a add new property window will appear.

    • Property Name: Name of the observed property (e.g. http://services.openiot.eu/AirTemperature).
      Note: The Property Name must be a URL
    • Accuracy: The accuracy is a string value. The application is responsible to convert the accuracy value to corresponding domain specific knowledge
    • Frequency: The frequency is a string value. The application is responsible to convert the frequency value to corresponding domain specific knowledge

Usage

  1. Fill the corresponding value (using the above descriptions)
  2. Ensure the page does not report any errors e.g. incomplete field, incorrect data format etc
  3. Click the Generate Description button. Ensure a RDF description is displayed in the Generated RDF Output Section.
  4. Click on Register Sensor Type
  5. If no error occurred, you will see a success message

Sensor Instance Editor

The sensor instance editor is used to define new instances of a specific sensor type (either defined by the user or by other users). The screenshot below presents a sample of sensor instance editor.

Properties

  • Sensor Types Registered: This drop down will display the list of sensor types already registered with the OpenIoT system.
  • Sensor Name: Name of the sensor instance (e.g. openiot_demo_weatherstation).
    _Note: Use _ for text separation
  • Author/Owner: The owner of the sensor
    Note: The owner has to be a single string without any spaces or special character. This is currently a limitation which will be fixed in the next release
  • Description: Description of the sensor. This can be a freeform text.
  • Source URL: This is the URL of the data source. E.g. if it is GSN, it will be http://localhost:22001
  • Source Type: The type of the source which produces data. For e.g. when using GSN to push data into OpenIoT, the source type will be GSN
  • Feature of Interest: A relation between an observation and the entity whose quality was observed. For example, in an observation of the weight of a person, the feature of interest is the person and the quality is weight. (http://www.w3.org/2005/Incubator/ssn/ssnx/ssn#featureOfInterest)
  • Observed Properties: These fields will be auto generated and is dependent on the sensor type which was defined earlier.
    • Unit of Measurement: Defines the measurement unit for the property. E.g. C for temperature.
    • XGSN Field Name: This is a very important field as it maps the sensor observation to the XGSN fields defined in the XGSN *.xml file and the wrapper. Use the same field name when defining the XGSN XML file. A sample of the XML file is shown below

<output-structure> <field name="temp" type="double" /> <field name="humidity" type="double" /> </output-structure>

Usage: Create and Register a new Sensor Instance

  1. Select the sensor type for which an instance needs to be created
  2. Click the View Sensor Description Button
  3. Verify if the sensor instance you wish to create matches the sensor type definition
  4. If so click the Create Sensor Instance Button
  5. Fill all the necessary field
  6. Ensure the page does not display any errors e.g. invalid data format, empty field etc
  7. Click the Register Sensor Instance
  8. If the registration is successful, you will see a success message.
  9. A new "Download XGSN Metadata" Button will appear
  10. Click on this to download the sensorname.metatdata file.
  11. Save this file under the XGSN virtual director folder

On clicking the register button, the following operation occur

  1. The sensor instance input is verified for consistency
  2. A check if performed to see if a sensor with same name exists
  3. The sensor instance is registered with LSM
  4. A sensor ID from LSM is then stored locally in the metadata file along with the other user defined sensor instance descriptions

A sample .metadata file is shown below


sensorName=demo-weatherstation
source="http://localhost:22001"
sourceType=gsn
sensorType="http://openiot.eu/ontology/ns/WeatherStation"
information=Demo CSIRO Weather Station
author=csiro
feature="demoweather"
fields="humidity,temp"
field.humidity.propertyName="http://services.openiot.eu/Humidity"
field.humidity.unit="percent"
field.temp.propertyName="http://services.openiot.eu/AirTemperature"
field.temp.unit="C"
latitude="-35.28"
longitude="149.124"
sensorID="http://lsm.deri.ie/resource/8612012388363"

Security Configuration Service

For using the Schema Editor application a service must have been created for it. When the OpenIoT graph is initialized, a service is created for the Schema Editor with the following address, key and secret as defined in the openiot.properties:

security.initialize.schemaEditor.prefix=http://localhost:8080/ui.schemaeditor security.initialize.schemaEditor.secret=schemaEditor-secret security.initialize.schemaEditor.key=schemaEditor

Permissions

Currently, for using the application, the user will need the createSensor and createSensorInstance permissions. The user must also have permission to perform operations on LSM service.

Configuration

The security configuration for the Schema Editor application is located in security-config.ini in the JBoss configuration directory. The configuration content is delimited by @BEGIN-schemaEditor and @END-schemaEditor.

Clone this wiki locally