DLESE Tools
v1.6.0

org.dlese.dpc.oai.harvester
Class OAIHarvesterServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.dlese.dpc.oai.harvester.OAIHarvesterServlet
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public final class OAIHarvesterServlet
extends HttpServlet

A servlet used to manage harvesting metadata via OAI-PMH.

Author:
John Weatherley
See Also:
Serialized Form

Constructor Summary
OAIHarvesterServlet()
           
 
Method Summary
 void destroy()
          Performs shutdown operations.
 void doDelete(HttpServletRequest req, HttpServletResponse resp)
          Handle DELETE requests.
 void doGet(HttpServletRequest req, HttpServletResponse resp)
          Handle GET requests.
 void doPost(HttpServletRequest req, HttpServletResponse resp)
          Handle POST requests.
 void doPut(HttpServletRequest req, HttpServletResponse resp)
          Handle PUT requests.
static String getDateStamp()
          Return a string for the current time and date, sutiable for display in log files and output to standout:
 void init(ServletConfig conf)
          Init method called by the web application server upon startup
 void log(String msg)
          Override the standard servlet logging to use our logger
 void setDebug(boolean db)
          Sets the debug attribute.
 
Methods inherited from class javax.servlet.http.HttpServlet
doHead, doOptions, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OAIHarvesterServlet

public OAIHarvesterServlet()
Method Detail

init

public void init(ServletConfig conf)
          throws ServletException
Init method called by the web application server upon startup

Specified by:
init in interface Servlet
Overrides:
init in class GenericServlet
Parameters:
conf - Servlet configuration
Throws:
ServletException - If error

destroy

public void destroy()
Performs shutdown operations.

Specified by:
destroy in interface Servlet
Overrides:
destroy in class GenericServlet

doPost

public void doPost(HttpServletRequest req,
                   HttpServletResponse resp)
            throws ServletException,
                   IOException
Handle POST requests.

Overrides:
doPost in class HttpServlet
Parameters:
req - DESCRIPTION
resp - DESCRIPTION
Throws:
ServletException - DESCRIPTION
IOException - DESCRIPTION

doPut

public void doPut(HttpServletRequest req,
                  HttpServletResponse resp)
           throws ServletException,
                  IOException
Handle PUT requests.

Overrides:
doPut in class HttpServlet
Parameters:
req - Input request.
resp - Resulting response.
Throws:
IOException - I/O error
ServletException - servlet error

doDelete

public void doDelete(HttpServletRequest req,
                     HttpServletResponse resp)
              throws ServletException,
                     IOException
Handle DELETE requests.

Overrides:
doDelete in class HttpServlet
Parameters:
req - Input request.
resp - Resulting response.
Throws:
IOException - I/O error
ServletException - servlet error

doGet

public void doGet(HttpServletRequest req,
                  HttpServletResponse resp)
           throws IOException,
                  ServletException
Handle GET requests.

Overrides:
doGet in class HttpServlet
Parameters:
req - Input request.
resp - Resulting response.
Throws:
IOException - I/O error
ServletException - servlet error

log

public final void log(String msg)
Override the standard servlet logging to use our logger

Overrides:
log in class GenericServlet
Parameters:
msg - DESCRIPTION

getDateStamp

public static String getDateStamp()
Return a string for the current time and date, sutiable for display in log files and output to standout:

Returns:
The dateStamp value

setDebug

public final void setDebug(boolean db)
Sets the debug attribute.

Parameters:
db - The new debug value

DLESE Tools
v1.6.0