Class AbstractFDSNQuerier

    • Field Detail

      • connectionUri

        protected java.net.URI connectionUri
      • connectTimeout

        protected int connectTimeout
      • readTimeout

        protected int readTimeout
      • validate

        protected boolean validate
      • DEFAULT_CONNECT_TIMEOUT

        public static int DEFAULT_CONNECT_TIMEOUT
      • DEFAULT_READ_TIMEOUT

        public static int DEFAULT_READ_TIMEOUT
    • Constructor Detail

      • AbstractFDSNQuerier

        public AbstractFDSNQuerier()
    • Method Detail

      • formURI

        public abstract java.net.URI formURI()
                                      throws java.net.URISyntaxException
        Throws:
        java.net.URISyntaxException
      • getSchemaURL

        public abstract java.net.URL getSchemaURL()
      • processConnection

        protected void processConnection​(org.apache.http.client.methods.CloseableHttpResponse response)
                                  throws java.io.IOException,
                                         FDSNWSException
        Throws:
        java.io.IOException
        FDSNWSException
      • validate

        public static void validate​(javax.xml.stream.XMLStreamReader reader,
                                    java.net.URL schemaURL)
                             throws org.xml.sax.SAXException,
                                    java.io.IOException
        Throws:
        org.xml.sax.SAXException
        java.io.IOException
      • outputRaw

        public void outputRaw​(java.io.OutputStream out)
                       throws java.net.MalformedURLException,
                              java.io.IOException,
                              java.net.URISyntaxException,
                              FDSNWSException
        Throws:
        java.net.MalformedURLException
        java.io.IOException
        java.net.URISyntaxException
        FDSNWSException
      • outputRaw

        public void outputRaw​(java.io.InputStream in,
                              java.io.OutputStream out)
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • getRawXML

        public java.lang.String getRawXML()
                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • isError

        public boolean isError()
      • getErrorMessage

        public java.lang.String getErrorMessage()
      • isEmpty

        public boolean isEmpty()
      • getInputStream

        public java.io.InputStream getInputStream()
      • getConnectionUri

        public java.net.URI getConnectionUri()
        returns the URI that was used to open the connection. This may be null if connect() has not yet been called. formUri() can be used to get the URI without connecting.
        Returns:
      • isConnectionInitiated

        public boolean isConnectionInitiated()
      • checkConnectionInitiated

        public void checkConnectionInitiated()
      • getReader

        public javax.xml.stream.XMLEventReader getReader()
                                                  throws javax.xml.stream.XMLStreamException,
                                                         java.net.URISyntaxException
        Throws:
        javax.xml.stream.XMLStreamException
        java.net.URISyntaxException
      • extractErrorMessage

        public static java.lang.String extractErrorMessage​(org.apache.http.HttpResponse response)
      • getAcceptHeader

        public java.lang.String getAcceptHeader()
      • setAcceptHeader

        public void setAcceptHeader​(java.lang.String acceptHeader)
        set the Accept: html header, default is application/xml.
      • setUserAgent

        public void setUserAgent​(java.lang.String userAgent)
      • getUserAgent

        public java.lang.String getUserAgent()
      • getResponseCode

        public int getResponseCode()
      • setConnectTimeout

        public void setConnectTimeout​(int milliseconds)
        set the HttpConnection connectionTimeout in milliseconds.
      • setReadTimeout

        public void setReadTimeout​(int milliseconds)
        set the HttpConnection readTimeout in milliseconds.
      • getConnectTimeout

        public int getConnectTimeout()
      • getReadTimeout

        public int getReadTimeout()
      • extractRootCause

        public static java.lang.Throwable extractRootCause​(java.lang.Throwable t)
      • isValidate

        public boolean isValidate()
      • setValidate

        public void setValidate​(boolean validate)
      • finalize

        public void finalize()
        Overrides:
        finalize in class java.lang.Object
      • close

        public void close()