Check if a manufacturer exists in the Fuseki manufacturer dataset
Source:R/check_man_exist.R
sensors_check_man_exist.RdThe 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
)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