sparql.pl
- sparql_query(+Request)[private]
- HTTP handler for SPARQL requests. Mounted the http-path
sparql(.)
(by default/sparql/
, see library(http/http_path)).As part of a SPARQL request the user may specify the following things:
query
The contents of the SPARQL query. Exactly one must occur in every SPARQL query request.default-graph
The default graph as specified by the SPARQL dataset structure, against which the query is evaluated. Zero or more default graphs may be specified.- `named-graph'
The named graphs as specified by the SPARQL dataset structure,
against which the query is evaluated.
Zero or more named graphs may be specified.
There are three ways of posing a SPARQL query:
- An HTTP GET request where
query
,default-graph
andnamed-graph
appear in the IRI's search string and are all subject to IRI-encoding. Example: `curl http://localhost:3020/sparql/?query=select%20*%20where%20%7B%20%3Fs%20%3Fp%20%3Fo%20%7D` No Content-Type needs to be specified. - An HTTP POST request where
query
,default-graph
andnamed-graph
appear in the POST body using IRI search string syntax and subject to IRI-encoding. Example: `curl --data "query=select * where { ?s ?p ?o }" http://localhost:3020/sparql/` The Content-Type must beapplication/x-www-form-urlencoded
. - An HTTP POST request where
default-graph
andnamed-graph
appear in the IRI's search string and are subject to IRI-encoding and where the query appears as-is in the POST body. Example: `curl -X POST -H "Content-Type: application/sparql-query" -d @query.sparql http://localhost:3020/sparql/` The Content-Type must beapplication/sparql-query
.
- empty_get_request(+Request) is semidet[private]
- True if Request is an HTTP GET request without any parameters.
- sparql_update(+Request)[private]
- HTTP handler for SPARQL update requests. This is the same as
query requests, but the takes the query in the
update
field rather than in thequery
field. - sparql_reply(+Request, +Query, +_Graphs, +ReqFormat, +Entailment)[private]
- HTTP handler for SPARQL requests. Mounted the http-path
sparql(.)
(by default/sparql/
, see library(http/http_path)). - sparql_decl(+OptionName, -Options)[private]
- Default options for specified attribute names. See http_parameters/3.