Class 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
    • Constructor Summary

      Constructors 
      Constructor Description
      HttpQuery​(java.lang.String serviceURL)
      Deprecated.
      Create a execution object for a whole model GET
      HttpQuery​(java.net.URL url)
      Deprecated.
      Create a execution object for a whole model GET
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      java.io.InputStream exec()
      Deprecated.
      Execute the operation
      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
      int getConnectTimeout()
      Deprecated.
      Gets the HTTP Connection timeout
      java.lang.String getContentType()
      Deprecated.
      Gets the Content Type
      org.apache.http.protocol.HttpContext getContext()
      Deprecated.
      Gets the HTTP context that is being used, or sets and returns a default
      int getReadTimeout()
      Deprecated.
      Gets the HTTP Read timeout
      int 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 results
      void setAllowCompression​(boolean allow)
      Deprecated.
      Sets whether the HTTP request will include compressed encoding header
      void setClient​(org.apache.http.client.HttpClient client)
      Deprecated.
      Sets the client to use
      void setConnectTimeout​(int timeout)
      Deprecated.
      Sets HTTP Connection timeout, any value <= 0 is taken to mean no timeout
      void setContext​(org.apache.http.protocol.HttpContext context)
      Deprecated.
      Sets the context to use
      void setForcePOST()
      Deprecated.
      Force the use of HTTP POST for the query operation
      void setReadTimeout​(int timeout)
      Deprecated.
      Sets HTTP Read timeout, any value <= 0 is taken to mean no timeout
      java.lang.String toString()
      Deprecated.
       
      boolean usesPOST()
      Deprecated.
      Return whether this request will go by GET or POST
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • urlLimit

        public static int urlLimit
        Deprecated.
        The definition of "large" queries
    • 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 Type

        If 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
      • toString

        public java.lang.String toString()
        Deprecated.
        Overrides:
        toString in class Params