getTypes: Query meta-data of a SPARQL database

Description Usage Arguments Details Author(s) See Also Examples

Description

These functions implement generic SPARQL queries to obtain information about the structure of a SPARQL database in terms of its classes, types, predicates. This allows a user to get an understanding of the structure of the RDF triples and relationships in the database.

Usage

1
2
3
4
5
getTypes(..., fun = SPARQL, asIs = FALSE)
getPredicates(..., fun = SPARQL, asIs = FALSE)
getPredicatesByClass(..., classes = getClasses(..., fun = fun, asIs = TRUE),
                      fun = SPARQL, asIs = FALSE)
getClasses(owl = TRUE, ..., fun = SPARQL, asIs = FALSE)

Arguments

owl

a logical value indicating whether to get the OWL and RDFS classes, or to query the RDF types. If FALSE, this is really the same as the getTypes function.

...

any additional arguments to be passed to fun which makes the SPARQL request and query. These are arguments such as the URL of the SPARQL endpoint, curl options or a curl handle to customize the HTTP request, and so on.

fun

a function that will send the SPARQL query. The default of SPARQL works well, but the caller has to provide the URL of the endpoint. For an endpoint that requires authentication (e.g. a username and password), it is convenient to write a simple function that passes these and the URL to SPARQL and then use this function as the value of fun.

asIs

a logical value that controls whether the class/type values returned are left as URIs or broken into their name and namespaces.

Details

These functions implement generic SPARQL queries to discover aspects of the structure of the SPARQL database.

Author(s)

Duncan Temple Lang

See Also

SPARQL.

Examples

1
2
U = "http://dbpedia.org/sparql"
getTypes(url = U)

dsidavis/RSPARQL documentation built on May 15, 2019, 4:20 p.m.