Generate SensorML XML descriptions from a sensor catalogue Excel file
Source:R/sensor_catalogue.R
sensors_catalogue.Rd
This function reads an Excel file describing sensor systems and components,
validates manufacturer information against a reference triple store (Fuseki),
and generates corresponding SensorML 2.0 XML files for each system and its components.
If new manufacturers are listed in the Excel file, the function checks their presence
in the Fuseki manufacturers dataset and, if missing, automatically creates
RDF/Turtle (
.ttl) files describing them via the sensors_new_manufacturer() function.
In this case, the execution stops until the new TTL files are uploaded manually to Fuseki.
Usage
sensors_catalogue(
excel_path = NULL,
creator_name = NULL,
creator_surname = NULL,
creator_orcid = NULL
)Arguments
- excel_path
Character string. Path to the Excel file containing the sensor catalogue. Must include the sheet
"SensorInfo", and"new_manufacturer".- creator_name
Character. First name of the sensor owner.
- creator_surname
Character. Last name of the sensor owner.
- creator_orcid
Character. ORCID of the sensor owner (e.g.
"0000-0002-1825-0097").
Value
The function does not return an object in R.
It creates a directory for each system named Sensors_files_system_<UUID>/
containing:
/system/— XML file for the main system;/components/— XML files for all components (if any);/system_components_files_ttl/— generated RDF/Turtle files after runningsensors_type_rdf().
If missing manufacturers are detected, the function generates RDF/Turtle files
via sensors_new_manufacturer() and stops, prompting the user to upload these TTL files
into the Fuseki manufacturers dataset before resuming execution.
Details
The input Excel file must contain at least one sheet named "SensorInfo", listing metadata for sensors, systems, and components (e.g. manufacturer name, model, identifier, observed properties, capabilities, etc.). Optionally, a second sheet "new_manufacturer" may define metadata for new manufacturers to be added to the catalogue.
The workflow executed by this function includes the following steps:
Reads and cleans valid rows from the
"SensorInfo"sheet;If the
"new_manufacturer"sheet exists:Checks each manufacturer against the Fuseki manufacturers dataset (
sensors_check_man_exist());If missing, generates RDF/TTL records using
sensors_new_manufacturer()and stops execution;
If all manufacturers exist in Fuseki:
Groups entries by sensor name;
Generates unique UUIDs for each sensor and component;
Creates SensorML 2.0 XML files for each system and component via
sensors_sysTypeXML()andsensors_compTypeXML();
The XML files can later be converted into RDF/Turtle using the
sensors_type_rdf()function or uploaded to a Sensor Observation Service (SOS).
Author
Alessandro Oggioni, PhD (2023) alessandro.oggioni@cnr.it