org.oclc.da.gdfr.registryprototype.atom
Class IWSAAtomServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.oclc.da.gdfr.registryprototype.atom.IWSAAtomServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class IWSAAtomServlet
extends javax.servlet.http.HttpServlet

Atom Servlet implements Atom protocol by calling an org.oclc.da.gdfr.registryprototype.atom.IWSAAtomHandler implementation. This servlet was inspired by the Apache implementation because the ROME Atom handling was simply too inefficient and performed highly redundant parsing. This implementation uses simple XSL stylesheets and little Java code to translate Atom requests into IWSA deposit records.

See Also:
Serialized Form

Field Summary
static java.lang.String FEED_TYPE
          Get feed type support by Servlet, "atom_1.0"
 
Constructor Summary
IWSAAtomServlet()
           
 
Method Summary
protected  void doDelete(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Handle Atom DELETE by calling appropriate handler.
protected  void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Handles an Atom GET by calling handler and writing results to response.
protected  void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Handles an Atom POST by calling handler to identify URI, reading/parsing data, calling handler and writing results to response.
protected  void doPut(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Handles an Atom PUT by calling handler to identify URI, reading/parsing data, calling handler and writing results to response.
static java.lang.String getContextDirPath()
          Get absolute path to Servlet context directory.
protected  java.lang.String[] getPathInfo(javax.servlet.http.HttpServletRequest request)
          Convenience method to return the PathInfo from the request.
 void init(javax.servlet.ServletConfig config)
          Initialize servlet.
 
Methods inherited from class javax.servlet.http.HttpServlet
doHead, doOptions, 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

FEED_TYPE

public static final java.lang.String FEED_TYPE
Get feed type support by Servlet, "atom_1.0"

See Also:
Constant Field Values
Constructor Detail

IWSAAtomServlet

public IWSAAtomServlet()
Method Detail

doGet

protected void doGet(javax.servlet.http.HttpServletRequest req,
                     javax.servlet.http.HttpServletResponse res)
              throws javax.servlet.ServletException,
                     java.io.IOException
Handles an Atom GET by calling handler and writing results to response.

Overrides:
doGet in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
java.io.IOException

doPost

protected void doPost(javax.servlet.http.HttpServletRequest req,
                      javax.servlet.http.HttpServletResponse res)
               throws javax.servlet.ServletException,
                      java.io.IOException
Handles an Atom POST by calling handler to identify URI, reading/parsing data, calling handler and writing results to response.

Overrides:
doPost in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
java.io.IOException

doPut

protected void doPut(javax.servlet.http.HttpServletRequest req,
                     javax.servlet.http.HttpServletResponse res)
              throws javax.servlet.ServletException,
                     java.io.IOException
Handles an Atom PUT by calling handler to identify URI, reading/parsing data, calling handler and writing results to response.

Overrides:
doPut in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
java.io.IOException

doDelete

protected void doDelete(javax.servlet.http.HttpServletRequest req,
                        javax.servlet.http.HttpServletResponse res)
                 throws javax.servlet.ServletException,
                        java.io.IOException
Handle Atom DELETE by calling appropriate handler.

Overrides:
doDelete in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
java.io.IOException

getPathInfo

protected java.lang.String[] getPathInfo(javax.servlet.http.HttpServletRequest request)
Convenience method to return the PathInfo from the request.


init

public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
Initialize servlet.

Specified by:
init in interface javax.servlet.Servlet
Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException

getContextDirPath

public static java.lang.String getContextDirPath()
Get absolute path to Servlet context directory.



Copyright © 2008 OCLC Online Computer Library Center, Inc.. All Rights Reserved.