Skip to contents

Generates a valid RDF/Turtle (.ttl) file describing a sensor instance following the SOSA/SSN ontology. The instance is typed (rdf:type) according to the given sensor type, includes FOAF contact metadata, and provenance information (dct:creator, dct:created). Optionally validates the output RDF file.

Usage

sensors_instance_ttl(
  sensor_type_uri = NULL,
  owner_name = NULL,
  owner_surname = NULL,
  owner_orcid = NULL,
  serial_number = NULL,
  validate = TRUE,
  output_dir = getwd()
)

Arguments

sensor_type_uri

Character. URI of the sensor type (e.g. "https://rdfdata.lteritalia.it/sensors/systemsType/UUIDTYPE").

owner_name

Character. First name of the sensor owner.

owner_surname

Character. Last name of the sensor owner.

owner_orcid

Character. ORCID of the sensor owner (e.g. "0000-0002-1825-0097").

serial_number

Character. Serial number of the physical sensor instance (optional).

validate

Logical. If TRUE, validates the generated TTL file (default TRUE).

output_dir

Character. Directory where to save the TTL file (default = current working directory).

Value

Invisibly returns the path to the generated .ttl file.

Details

When validate = TRUE, the resulting TTL file is parsed and checked for the presence of key predicates: rdf:type, dct:creator, dct:created, and dcat:contactPoint.

Author

Alessandro Oggioni, PhD (2023) alessandro.oggioni@cnr.it

Examples

if (FALSE) { # \dontrun{
sensors_instance_ttl(
  sensor_type_uri = "https://rdfdata.lteritalia.it/sensors/systemsType/33559394-24ae-42e6-9b63-cf56b8b52b30",
  owner_name = "John",
  owner_surname = "Doe",
  owner_orcid = "0000-0002-1234-5678",
  serial_number = "SN-ABC-123"
)
} # }