Interface Request

    • Method Detail

      • addParameter

        void addParameter​(java.lang.String name,
                          java.lang.String value)
        Adds parameter.
        Parameters:
        name - parameter name
        value - parameter value
      • getParameterValues

        java.util.List<java.lang.String> getParameterValues​(java.lang.String name)
        Parameters:
        name - parameter name
        Returns:
        parameter values
      • getParameter

        java.lang.String getParameter​(java.lang.String name)
        Use only if you are sure, that the parameter has only one value else use getParameterValues method.
        Parameters:
        name - parameter name
        Returns:
        parameter value
      • getParameterNames

        java.util.Set<java.lang.String> getParameterNames()
        Returns:
        names of all parameters
      • setParameter

        void setParameter​(java.lang.String name,
                          java.lang.String value)
        Sets parameter
        Parameters:
        name - parameter name
        value - parameter value
      • setAuthToken

        void setAuthToken​(java.lang.String token)
        Set the authentication token for the request
        Parameters:
        token - the Authentication token for this request.
      • getServiceUrl

        java.lang.String getServiceUrl()
        Returns service URL. Service URL is the URL of service without service parameters. Example: http://www.flymine.org/service/query/results
        Returns:
        URL as a string
      • setUrl

        void setUrl​(java.lang.String url)
        Sets whole request URL. Must not be URL encoded.
        Parameters:
        url - URL
      • getUnencodedUrl

        java.lang.String getUnencodedUrl()
        Returns:
        Get the URL as an un-encoded (ie. human-readable) string.
      • getContentType

        ContentType getContentType()
        Returns:
        content type
      • setContentType

        void setContentType​(ContentType contentType)
        Parameters:
        contentType - content type
      • getParameterMap

        java.util.Map<java.lang.String,​java.util.List<java.lang.String>> getParameterMap()
        Returns all parameters as an unmodifiable map.
        Returns:
        map
      • setHeader

        void setHeader​(java.lang.String name,
                       java.lang.String value)
        Sets a request header.
        Parameters:
        name - the header name
        value - the header value
      • getHeader

        java.lang.String getHeader​(java.lang.String name)
        Returns the header value.
        Parameters:
        name - the header name
        Returns:
        the header value
      • getHeaders

        java.util.Map<java.lang.String,​java.lang.String> getHeaders()
        Returns request headers.
        Returns:
        headers
      • setPage

        void setPage​(Page page)
        Set the page for this request. The page delimits which subsection of the results you wish to receive.
        Parameters:
        page - The page