Esri Geoportal Server
1.0

com.esri.gpt.server.csw.provider
Class CswServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.esri.gpt.framework.context.BaseServlet
              extended by com.esri.gpt.server.csw.provider.CswServlet
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class CswServlet
extends BaseServlet

CSW provider servlet.

See Also:
Serialized Form

Constructor Summary
CswServlet()
           
 
Method Summary
protected  void execute(HttpServletRequest request, HttpServletResponse response, RequestContext context)
          Executes a request.
protected  void executeCSW(HttpServletRequest request, HttpServletResponse response, RequestContext context)
          Executes a CSW request.
protected  String handleException(Exception e)
          Creation an ExceptionReport response when an exception is encountered.
 void init(ServletConfig config)
          Initializes the servlet.
protected  RequestHandler makeRequestHandler(HttpServletRequest request, HttpServletResponse response, RequestContext context)
          Makes a handler for the CSW request.
protected  String readFullXml(HttpServletRequest request, HttpServletResponse response, RequestContext context, String id)
          Reads the full XML associated with a document UUID.
 
Methods inherited from class com.esri.gpt.framework.context.BaseServlet
authenticate, doGet, doPost, getCredentials, getLogger, getParameterValue, getRealm, readInputCharacters, writeCharacterResponse, writeHtmlResponse, writeXmlResponse
 
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
 

Constructor Detail

CswServlet

public CswServlet()
Method Detail

init

public void init(ServletConfig config)
          throws ServletException
Initializes the servlet.
Reads the "cswSubContextPath" and "resourceFilePrefix". init params from the servlet configuration.

Specified by:
init in interface Servlet
Overrides:
init in class GenericServlet
Parameters:
config - the servlet configuration
Throws:
ServletException - if an initialization exception occurs

execute

protected void execute(HttpServletRequest request,
                       HttpServletResponse response,
                       RequestContext context)
                throws Exception
Executes a request.

Specified by:
execute in class BaseServlet
Parameters:
request - the HTTP servlet request
response - the HTTP servlet response
context - the request context
Throws:
Exception - if a processing exception occurs

executeCSW

protected void executeCSW(HttpServletRequest request,
                          HttpServletResponse response,
                          RequestContext context)
                   throws Exception
Executes a CSW request.

Parameters:
request - the HTTP servlet request
response - the HTTP servlet response
context - the request context
Throws:
Exception - if a processing exception occurs

handleException

protected String handleException(Exception e)
                          throws Exception
Creation an ExceptionReport response when an exception is encountered.

Parameters:
e - the exception
Returns:
the exception report string
Throws:
throws - Exception if an authorization related exception occurs
Exception

makeRequestHandler

protected RequestHandler makeRequestHandler(HttpServletRequest request,
                                            HttpServletResponse response,
                                            RequestContext context)
Makes a handler for the CSW request.

Parameters:
request - the HTTP servlet request
response - the HTTP servlet response
context - the request context
Returns:
the request handler

readFullXml

protected String readFullXml(HttpServletRequest request,
                             HttpServletResponse response,
                             RequestContext context,
                             String id)
                      throws Exception
Reads the full XML associated with a document UUID.

Parameters:
request - the HTTP servlet request
response - the HTTP servlet response
context - the request context
id - the document id
Returns:
the document XML
Throws:
Exception - if an exception occurs

Esri Geoportal Server
1.0

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.