Simple SPARQL utility
Simple SPARQL utility
(context-iri context iri-fn)Returns an IRI function that takes a string, and calls a 3-argument version of the iri-fn that accepts the original IRI, the detected namespace, and the local value. If no namespace is detected, then a 1 argument version will be called.
Returns an IRI function that takes a string, and calls a 3-argument version of the iri-fn that accepts the original IRI, the detected namespace, and the local value. If no namespace is detected, then a 1 argument version will be called.
The file containing SPARQL credentials
The file containing SPARQL credentials
(default-service)Returns the service endpoint to use when none have been specified. This allows users to set up
a default for easy access. Uses the SPARQL environment variable, if set, and otherwise falls
back on a properties file with the path ~/.sparql/default
Returns the service endpoint to use when none have been specified. This allows users to set up a default for easy access. Uses the `SPARQL` environment variable, if set, and otherwise falls back on a properties file with the path ~/.sparql/default
(get-auth* service credentials)Returns the authorization header for a service, if credentials are available.
Returns the authorization header for a service, if credentials are available.
(keyword3 s)(keyword3 _ nms n)A helper function for keyword being called with 3 args for a curie. Single arguments will return the argument (a string)
A helper function for keyword being called with 3 args for a curie. Single arguments will return the argument (a string)
(load-credentials path)When the provided filename exists, then reads it as a YAML file.
When the provided filename exists, then reads it as a YAML file.
(normalize-headers header)Ensure headers are consistent, and already set for use in http calls
Ensure headers are consistent, and already set for use in http calls
(param-str params)Converts a map into a set of URL encoded parameters
Converts a map into a set of URL encoded parameters
(process-args [f & r :as args])args are flexible, with the following options: service: Optional. The URL of the SPARQL service. This is first to allow for easy partial binding. q: The query to execute. named vars: Optional. :iri-fn The function to construct IRI values. Defaults to quoll.rdf/iri :context The context for IRI creation. Only useful when the iri-fn can accept both 1 and 3 arguments. A keyword map of prefixes or :default.
args are flexible, with the following options:
service: Optional. The URL of the SPARQL service. This is first to allow for easy partial binding.
q: The query to execute.
named vars: Optional.
:iri-fn The function to construct IRI values. Defaults to quoll.rdf/iri
:context The context for IRI creation. Only useful when the iri-fn can accept both 1 and 3 arguments.
A keyword map of prefixes or :default.(query & args)Issues a SPARQL query. See process-args for the argument values
Issues a SPARQL query. See process-args for the argument values
(query-table & args)Issues a SPARQL query, returning a seq of vectors. See process-args for the argument values
Issues a SPARQL query, returning a seq of vectors. See process-args for the argument values
(response-handler response)(response-handler {:keys [status body headers] :as response} iri-fn)Processes an HTTP response, throwing an exception of a non 2xx result
Processes an HTTP response, throwing an exception of a non 2xx result
The environment variable for the default SPARQL endpoint URL
The environment variable for the default SPARQL endpoint URL
The directory containing SPARQL configuration
The directory containing SPARQL configuration
(string3 s)(string3 _ nms n)A helper function for str being called with 3 args for a curie.
A helper function for str being called with 3 args for a curie.
(update! & args)Issues a SPARQL UPDATE. See process-args for the argument values. The result-decoding args
(:iri-fn, :context) are accepted for API consistency but unused, since UPDATE returns no
result data. Returns the query response.
Issues a SPARQL UPDATE. See process-args for the argument values. The result-decoding args (`:iri-fn`, `:context`) are accepted for API consistency but unused, since UPDATE returns no result data. Returns the query response.
(uri u)(url u)(url-encode v)cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |