Class HttpQuery
- java.lang.Object
-
- org.apache.jena.sparql.exec.http.Params
-
- org.apache.jena.sparql.engine.http.Params
-
- org.apache.jena.sparql.engine.http.HttpQuery
-
@Deprecated public class HttpQuery extends Params
Deprecated.Use the QueryExecutionHTTP builder.QueryExecutionHTTP.create()....execute()
Create an execution object for performing a query on a model over HTTP. This is the main protocol engine for HTTP query. There are higher level classes for doing a query and presenting the results in an API fashion. If the query string is large, then HTTP POST is used.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.jena.sparql.exec.http.Params
Params.Param
-
-
Field Summary
Fields Modifier and Type Field Description static int
urlLimit
Deprecated.The definition of "large" queries
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.io.InputStream
exec()
Deprecated.Execute the operationorg.apache.http.client.HttpClient
getClient()
Deprecated.Gets the HTTP client that is being used, may be null if no request has yet been madeint
getConnectTimeout()
Deprecated.Gets the HTTP Connection timeoutjava.lang.String
getContentType()
Deprecated.Gets the Content Typeorg.apache.http.protocol.HttpContext
getContext()
Deprecated.Gets the HTTP context that is being used, or sets and returns a defaultint
getReadTimeout()
Deprecated.Gets the HTTP Read timeoutint
getResponseCode()
Deprecated.Gets the HTTP Response Code returned by the request (returns 0 if request has yet to be made)java.lang.String
getResponseMessage()
Deprecated.Gets the HTTP Response Message returned by the request (returns null if request has yet to be made)void
setAccept(java.lang.String contentType)
Deprecated.Set the content type (Accept header) for the resultsvoid
setAllowCompression(boolean allow)
Deprecated.Sets whether the HTTP request will include compressed encoding headervoid
setClient(org.apache.http.client.HttpClient client)
Deprecated.Sets the client to usevoid
setConnectTimeout(int timeout)
Deprecated.Sets HTTP Connection timeout, any value <= 0 is taken to mean no timeoutvoid
setContext(org.apache.http.protocol.HttpContext context)
Deprecated.Sets the context to usevoid
setForcePOST()
Deprecated.Force the use of HTTP POST for the query operationvoid
setReadTimeout(int timeout)
Deprecated.Sets HTTP Read timeout, any value <= 0 is taken to mean no timeoutjava.lang.String
toString()
Deprecated.boolean
usesPOST()
Deprecated.Return whether this request will go by GET or POST
-
-
-
Constructor Detail
-
HttpQuery
public HttpQuery(java.lang.String serviceURL)
Deprecated.Create a execution object for a whole model GET- Parameters:
serviceURL
- The model
-
HttpQuery
public HttpQuery(java.net.URL url)
Deprecated.Create a execution object for a whole model GET- Parameters:
url
- The model
-
-
Method Detail
-
setAccept
public void setAccept(java.lang.String contentType)
Deprecated.Set the content type (Accept header) for the results- Parameters:
contentType
- Accept content type
-
getContentType
public java.lang.String getContentType()
Deprecated.Gets the Content TypeIf the query has been made this reflects the Content-Type header returns, if it has not been made this reflects only the Accept header that will be sent (as set via the
setAccept(String)
method)- Returns:
- Content Type
-
getResponseCode
public int getResponseCode()
Deprecated.Gets the HTTP Response Code returned by the request (returns 0 if request has yet to be made)- Returns:
- Response Code
-
getResponseMessage
public java.lang.String getResponseMessage()
Deprecated.Gets the HTTP Response Message returned by the request (returns null if request has yet to be made)- Returns:
- Response Message
-
setAllowCompression
public void setAllowCompression(boolean allow)
Deprecated.Sets whether the HTTP request will include compressed encoding header- Parameters:
allow
- Whether to allow compressed encoding
-
setClient
public void setClient(org.apache.http.client.HttpClient client)
Deprecated.Sets the client to use- Parameters:
client
- Client
-
setContext
public void setContext(org.apache.http.protocol.HttpContext context)
Deprecated.Sets the context to use- Parameters:
context
- HTTP context
-
getClient
public org.apache.http.client.HttpClient getClient()
Deprecated.Gets the HTTP client that is being used, may be null if no request has yet been made- Returns:
- HTTP Client or null
-
getContext
public org.apache.http.protocol.HttpContext getContext()
Deprecated.Gets the HTTP context that is being used, or sets and returns a default- Returns:
- the
HttpContext
in scope
-
usesPOST
public boolean usesPOST()
Deprecated.Return whether this request will go by GET or POST- Returns:
- boolean
-
setForcePOST
public void setForcePOST()
Deprecated.Force the use of HTTP POST for the query operation
-
setConnectTimeout
public void setConnectTimeout(int timeout)
Deprecated.Sets HTTP Connection timeout, any value <= 0 is taken to mean no timeout- Parameters:
timeout
- Connection Timeout
-
getConnectTimeout
public int getConnectTimeout()
Deprecated.Gets the HTTP Connection timeout- Returns:
- Connection Timeout
-
setReadTimeout
public void setReadTimeout(int timeout)
Deprecated.Sets HTTP Read timeout, any value <= 0 is taken to mean no timeout- Parameters:
timeout
- Read Timeout
-
getReadTimeout
public int getReadTimeout()
Deprecated.Gets the HTTP Read timeout- Returns:
- Read Timeout
-
exec
public java.io.InputStream exec() throws QueryExceptionHTTP
Deprecated.Execute the operation- Returns:
- Model The resulting model
- Throws:
QueryExceptionHTTP
-
-