Skip to contents

The function queries a Fuseki SPARQL endpoint to verify if a given manufacturer (organization) exists in the RDF dataset. It performs a SPARQL query against the foaf:name field of all foaf:Organization resources and returns any matches that contain the given manufacturer name (case-insensitive).

Usage

sensors_check_man_exist(
  manufacturer_name,
  endpoint = "http://fuseki1.get-it.it/manufacturers",
  verbose = FALSE
)

Arguments

manufacturer_name

Character string. The (partial or full) name of the manufacturer to check. If NULL, the function will return NULL.

Value

A character vector with the names (foaf:name) of the matching manufacturers, or NULL if no matches are found.

Details

The function sends a SPARQL query via httr2 to the endpoint http://fuseki1.get-it.it/manufacturers. It uses a case-insensitive regular expression to match manufacturer names. The returned list is parsed from JSON and converted into a tibble.

Author

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

Examples

if (FALSE) { # \dontrun{
sensors_check_man_exist(manufacturer_name = "CO.L.MAR.")
sensors_check_man_exist(manufacturer_name = "a")
sensors_check_man_exist(manufacturer_name = "ADM Elektronik")
} # }