com.supermap.services.providers

Class AbstractDocumentGetRequest

  • java.lang.Object
    • com.supermap.services.providers.AbstractDocumentGetRequest
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      protected java.lang.String password
      Visit the serviceURL required password.
      protected java.lang.String serviceURL
      can get the URI address of the XML document.
      static java.lang.String URL_CHARSET
      Edit the the URI address (serviceURL) by character set.
      protected java.lang.String userName
      Access the user name required for serviceURL.
    • Constructor Summary

      Constructors 
      Modifier Constructor and Description
      protected AbstractDocumentGetRequest(java.lang.String serviceURL, java.lang.String userName, java.lang.String password)
      Constructs an object AbstractDocumentGetRequest through the URI address, user name, and password.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      protected void appendKVP(java.lang.StringBuffer sbToAdd, java.lang.String key, java.lang.String value)
      Add a keyword-value pair after specifying the string buffer, formatted like "& key = value", where key is the keyword and value is the value.
      protected void appendKVP(java.lang.StringBuffer sbToAdd, java.lang.String key, java.lang.String[] values)
      @return statistics rusult.
      protected org.w3c.dom.Document getDocument(java.lang.String url, java.lang.String userName, java.lang.String psd)
      @return statistics rusult.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • serviceURL

        protected final java.lang.String serviceURL
        

        can get the URI address of the XML document.

      • userName

        protected final java.lang.String userName
        

        Access the user name required for serviceURL.

      • password

        protected final java.lang.String password
        

        Visit the serviceURL required password.

      • URL_CHARSET

        public static final java.lang.String URL_CHARSET
        

        Edit the the URI address (serviceURL) by character set.

    • Constructor Detail

      • AbstractDocumentGetRequest

        protected AbstractDocumentGetRequest(java.lang.String serviceURL,
                                  java.lang.String userName,
                                  java.lang.String password)
        

        Constructs an object AbstractDocumentGetRequest through the URI address, user name, and password.

        Parameters:
        serviceURL - can get the URI address of the XML document.
        userName - username.
        password - password.
    • Method Detail

      • appendKVP

        protected void appendKVP(java.lang.StringBuffer sbToAdd,
                     java.lang.String key,
                     java.lang.String value)
        

        Add a keyword-value pair after specifying the string buffer, formatted like "& key = value", where key is the keyword and value is the value.

        Used to add the request parameter after the URI, where key is the parameter name, value is the parameter value, value will encode using the URLEncoder object, with the character set URL_CHARSET, and if the encoding fails, add the original value.

        Parameters:
        sbToAdd - save the string buffer for the URI.
        key - parameter name.
        value - parameter value.
      • appendKVP

        protected void appendKVP(java.lang.StringBuffer sbToAdd,
                     java.lang.String key,
                     java.lang.String[] values)
        

        @return statistics rusult. Add a keyword-value pair after specifying the string buffer, formatted like "& key = value", where key is the keyword and value is the value.

        Used to add the request parameter after the URI, where key is the parameter name, value is the parameter value, value will encode using the URLEncoder object, with the character set URL_CHARSET, and if the encoding fails, add the original value.

        Parameters:
        sbToAdd - save the string buffer for the URI.
        key - parameter name.
        value - parameter value.
      • getDocument

        protected org.w3c.dom.Document getDocument(java.lang.String url,
                                       java.lang.String userName,
                                       java.lang.String psd)
                                            throws HttpException,
                                                   java.io.IOException
        

        @return statistics rusult. Retrieve the XML document from the specified URI via the HTTP GET request method.

        Parameters:
        url - The address of the document URL.
        userName - The user name, if not needed, can be empty (null or "").
        psd - The password, if not needed, can be empty (null or "").
        Returns:
        XML document.
        Throws:
        HttpException - HTTP request exception.
        java.io.IOException - Input / output exception.