java.lang.Object
org.apache.jena.http.sys.ExecHTTPBuilder<X,Y>
- Direct Known Subclasses:
QueryExecHTTPBuilder
,QueryExecutionHTTPBuilder
Execution builder for remote queries.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionacceptHeader
(String acceptHeader) addDefaultGraphURI
(String uri) addNamedGraphURI
(String uri) final X
build()
Set theContext
.Set the URL of the query endpoint.httpClient
(HttpClient httpClient) httpHeader
(String headerName, String headerValue) httpHeaders
(Map<String, String> headers) Merge inParams
from another object.parseCheck
(boolean parseCheck) Whether to parse query strings passed toquery(String)
.Send the query request using POST with a Content-Type of as a "application/sparql-query"Set the query - the the string must be valid syntax.Set the query - this also sets the query string to agree with the query argument.queryString
(String queryString) Set the query string - this also clears any Query already set.sendMode
(QuerySendMode mode) Choose how to send the query string over HTTP.substitution
(String var, org.apache.jena.graph.Node value) substitution
(Var var, org.apache.jena.graph.Node value) substitution
(Binding binding) Set a timeout of the overall operation.urlGetLimit
(int urlLimit) Maximum length for a GET request URL, this includes the length of the service endpoint URL - longer than this and the request will use POST/Form.useGet()
Send the query using HTTP GET and the HTTP URL query string regardless of length.Send the query using HTTP GET and the HTTP URL query string, unless the request exceeds theurlGetLimit(int)
(system defaultHttpEnv.urlLimit
).
-
Constructor Details
-
ExecHTTPBuilder
public ExecHTTPBuilder()
-
-
Method Details
-
endpoint
Set the URL of the query endpoint. -
parseCheck
Whether to parse query strings passed toquery(String)
. -
query
Set the query - this also sets the query string to agree with the query argument. -
query
Set the query - the the string must be valid syntax. UsequeryString
to pass in a query with other syntax (e.g. the remote end has SPARQL syntax extensions). -
query
-
queryString
Set the query string - this also clears any Query already set. The queryString is not interpreted and it may contain SPARQL syntax extensions supported by the target triple store. -
addDefaultGraphURI
-
addNamedGraphURI
-
httpClient
-
sendMode
Choose how to send the query string over HTTP.The default is
QuerySendMode.systemDefault
which isQuerySendMode.asGetWithLimitBody
– send by HTTP GET and a query string unless too long (seeurlLimit
), when it switch to POST and application/sparql-query".- See Also:
-
useGetWithLimit
Send the query using HTTP GET and the HTTP URL query string, unless the request exceeds theurlGetLimit(int)
(system defaultHttpEnv.urlLimit
).If it exceeds the limit, switch to using a HTML form and POST request. By default, queries with a log URL are sent in an HTTP form with POST.
This is the default setting.
- See Also:
-
useGet
Send the query using HTTP GET and the HTTP URL query string regardless of length. By default, queries with a long URL are sent in an HTTP POST. -
postQuery
Send the query request using POST with a Content-Type of as a "application/sparql-query" -
urlGetLimit
Maximum length for a GET request URL, this includes the length of the service endpoint URL - longer than this and the request will use POST/Form.Long URLs can be silently truncated by intermediate systems and proxies. Use of the URL query string means that request are not cached.
See also
postQuery()
to send the request using HTTP POST with the query in the POST body usingContent-Type
"application/sparql-query"See also
sendMode
to choose a specific "send" policy. -
params
Merge inParams
from another object. -
param
-
param
-
substitution
-
substitution
-
substitution
-
acceptHeader
-
httpHeader
-
httpHeaders
-
context
Set theContext
. This defaults to the global settings ofARQ.getContext()
. If there was a previous call ofcontext
the multiple contexts are merged. -
set
-
set
-
timeout
Set a timeout of the overall operation. Time-to-connect can be set with a customHttpClient
- seeHttpClient.Builder.connectTimeout(java.time.Duration)
. -
build
-