org.nfis.gdas.v091
Class GdasServlet091

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.nfis.util.NfisServlet
              extended by org.nfis.gdas.v091.GdasServlet091
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class GdasServlet091
extends org.nfis.util.NfisServlet

This class is responsible for listening for GDAS 0.9.1 requests and replying with the appropriate return XML documents. The main task is to extract the correct parameters out of the request and get them in a format to send to DataHandler.getData(String, String, String, String, String, String, String, String, OutputStream)

Implementation follows the Open GIS Consortium Inc. Geolinked Data Access Service (GDAS) 0.9.1 specification. Specification is available at:

GDAS Specifications Document Version 0.9.1.

Version:
1.0 - Sep 15, 2004 - 2:08:34 PM
Author:
emurphy emurphy@pfc.cfs.nrcan.gc.ca
See Also:
Serialized Form

Field Summary
static java.lang.String TYPE_OF_XML_REQUEST
          The name of the request attribute that contains the string 'GetCapabilities' or 'GetData'.
static java.lang.String XML_REQUEST_DOC
          The name of a GetData XML request stored in the request.
 
Fields inherited from class org.nfis.util.NfisServlet
DEFAULT_MAX_IN_MEMORY, DEFAULT_MAX_SIZE, FILE_TO_LARGE_ERROR, FILE_UPOAD_ERROR, MAX_IN_MEMORY, MAX_SIZE, NULL_PARAM_ERROR, TEMP_DIRECTORY, UNKNOWN_SIZE_ERROR
 
Constructor Summary
GdasServlet091()
           
 
Method Summary
protected  void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          OGC specification requires the GDAS server to respond to an HTTP 'GET' call for its various services.
protected  void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Field requests as defined in the GDAS 0.9.1 specification.
 void init()
          Retrieve the GetCapabilities document and stuff it into a byte array for quick return to clients.
 
Methods inherited from class org.nfis.util.NfisServlet
forwardTo, getCommand, getFileItem, getFileItems, getLanguageFromSession, getParameter, setPropertyFile, writeOutXml
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XML_REQUEST_DOC

public static final java.lang.String XML_REQUEST_DOC
The name of a GetData XML request stored in the request.

See Also:
Constant Field Values

TYPE_OF_XML_REQUEST

public static final java.lang.String TYPE_OF_XML_REQUEST
The name of the request attribute that contains the string 'GetCapabilities' or 'GetData'.

See Also:
Constant Field Values
Constructor Detail

GdasServlet091

public GdasServlet091()
Method Detail

doGet

protected void doGet(javax.servlet.http.HttpServletRequest request,
                     javax.servlet.http.HttpServletResponse response)
              throws java.io.IOException
OGC specification requires the GDAS server to respond to an HTTP 'GET' call for its various services. Post implementation is optional.

Overrides:
doGet in class javax.servlet.http.HttpServlet
Throws:
java.io.IOException
See Also:
(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

init

public void init()
          throws javax.servlet.ServletException
Retrieve the GetCapabilities document and stuff it into a byte array for quick return to clients. Then instantiate the single instance of DataHandler used by all instances of this class.

Overrides:
init in class org.nfis.util.NfisServlet
Throws:
javax.servlet.ServletException

doPost

protected void doPost(javax.servlet.http.HttpServletRequest request,
                      javax.servlet.http.HttpServletResponse response)
               throws java.io.IOException
Field requests as defined in the GDAS 0.9.1 specification. This implementation returns only the 0.9.1 GetCapabilities.

Overrides:
doPost in class javax.servlet.http.HttpServlet
Throws:
java.io.IOException
See Also:
(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)