S7 class to contain a SPARQL query.
OWL-class.RdOWL is an S7 class to compose and manage SPARQL queries. OWL objects.
Have an attached environment, in which to keep track of the "non-SPARQL
query code" parts of the OWL object. This includes custom triple generating
functions (terms), but also the variables named in the query so far.
Usage
OWL(
.env = list(V = character(0L), prefixes = data.frame()),
C = list(),
P = list(),
prefix = "",
query = "SELECT * ",
where = ""
)Arguments
- .env
Named list. Contains additional information, for instance those generated frommap_endpoint()- C, P
OWL_envobjects containingtermfunctions, for instance generated bymap_endpoint().- prefix
Named list of character scalars, where values are long-form and names are the corresponding abbreviation.- query
Named listof character vectors, with first element indicating query form (SELECT, ASK, DESCRIBE), and the second indicating the content of the query itself.- where
Listof triples
Slots
.envNamed list. Contains additional envitonmental information besides convenience functions generated frommap_endpoint().sparqlNamed list. Contains SPARQL code in three sections:prefix,queryandwhere.to_SPARQLRetrieves the contained SPARQL query as a
Character scalar.