Extensions:GSN Access

From SensorDataLab

Jump to: navigation, search

Contents

Introduction

This is a Loc:Help page which explains the GSN Access Extension Version 0.3 by User:Andreas Wombacher.

There is currently three parser functions defined:

  • gsn_status
  • gsn_query_button
  • gsn_query_display
  • gsn_query_content

and a special page SpecialGsnQuery

Functions

gsn_status

{{#gsn_status:virtual sensor name|gsn server URL}}

This function returns a HTML representation of the current values of the specified virtual sensor in case it is available. Otherwise the it is displayed that the virtual sensor is not available.

The first parameter specifies the virtual sensor name as used in the GSN configuration files. The second parameter is the URL of the GSN installation where the virtual sensor is hosted. Adding to the URL "/gsn" should return the XML result of the GSN server.


gsn_query_button

{{#gsn_query_button:virtual sensor name|gsn server URL|Namespace name}}

This function returns a HTML representation of a button to call the query interface for the specified GSN virtual sensor. The query interface is specified in the special page SpecialGsnQuery also contained in this extension. The query created by the special page is stored as a wiki article in the wiki. To assign the query into the correct namespace, the namespace name must be provided.

The first parameter specifies the virtual sensor name as used in the GSN configuration files. The second parameter is the URL of the GSN installation where the virtual sensor is hosted. Adding to the URL "/gsn" should return the XML result of the GSN server. The third parameter is the namespace name where the query wiki article should be stored. In case no namespace name is provided the namespace of the wiki page where the gsn_query_button function is added is used.


gsn_query_display

{{#gsn_query_display:query url|gsn server URL}}

This function is created by the special page SpecialGsnQuery when a query is saved. It is not supposed to be specified by a user by hand. Therefore the details about the URL are not explained here. More information about this url can be found in the GSN documentation. The function displays a web based user dialog to determine in which way the data should be displayed. Possible options are in the same window, in an extra window, or to download the data as a kind of text file. The second parameter is the URL of the GSN installation where the virtual sensor is hosted. Adding to the URL "/gsn" should return the XML result of the GSN server.


gs_query_content

{{#gsn_query_content:query wiki page}}

This function adds the content specified in the query contained in the query wiki page inside the wiki page. The query wiki page is created by the Special page Special:GsnQuery. In particular, this parser function makes use of the semantic property Property:query request in this page to derive and visualize the content specified by the query.

example:

{{#gsn_query_content:Loc:Data for ewi1135bluetoothhttpgetvs with query named Test query615459125}}


SpecialGsnQuery

The special page provides a query interface for a GSN virtual sensor. Further, if the query is saved at the end, a wiki article is created containing the information about the specified query. In this wiki page the gsn_query_display function is used. In addition the wiki page contains semantic annotations of the query parameters. Finally the created wiki page contains a call of the Template:GSN Query Statement wiki template. The export of this template is part of the distribution.

Download

The file is available

Installation

Disclaimer

GSN Access is a new extension, and there is no guarantee that any of it will work on your system. However, it does not make any modifications to the database, so it should be a low-risk installation.

For a proper legal disclaimer, see the file "COPYING".

Requirements

The extension requires an install of Semantic MediaWiki 1.0 or greater. For more details, see Semantic MediaWiki's own installation requirements. In addition the Extensions:Add Article extension is used.

Installation

(1) Extract the archive to obtain the directory "GsnAccess"
   that contains all relevant files. Copy this directory (or
   extract/download it) to "[wikipath]/extensions/".
(2) Insert the following line into the file "[wikipath]/LocalSettings.php":
     include_once('extensions/GsnAccess/includes/GSN_Settings.php');


Contact

If you have any issues or questions, please send them to a.wombacher AT utwente dot nl.


Acknowledgment

This extension is based on the structure and the code layout of an extension from Yaron Koren.