Package org.dlese.dpc.oai.harvester
Class OAIHarvesterServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.dlese.dpc.oai.harvester.OAIHarvesterServlet
- All Implemented Interfaces:
Serializable,Servlet,ServletConfig
A servlet used to manage harvesting metadata via OAI-PMH.
- Author:
- John Weatherley
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Performs shutdown operations.voiddoDelete(HttpServletRequest req, HttpServletResponse resp) Handle DELETE requests.voiddoGet(HttpServletRequest req, HttpServletResponse resp) Handle GET requests.voiddoPost(HttpServletRequest req, HttpServletResponse resp) Handle POST requests.voiddoPut(HttpServletRequest req, HttpServletResponse resp) Handle PUT requests.static StringReturn a string for the current time and date, sutiable for display in log files and output to standout:voidinit(ServletConfig conf) Init method called by the web application server upon startupfinal voidOverride the standard servlet logging to use our loggerfinal voidsetDebug(boolean db) Sets the debug attribute.Methods inherited from class javax.servlet.http.HttpServlet
doHead, doOptions, doTrace, getLastModified, service, serviceMethods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log
-
Constructor Details
-
OAIHarvesterServlet
public OAIHarvesterServlet()
-
-
Method Details
-
init
Init method called by the web application server upon startup- Specified by:
initin interfaceServlet- Overrides:
initin classGenericServlet- Parameters:
conf- Servlet configuration- Throws:
ServletException- If error
-
destroy
public void destroy()Performs shutdown operations.- Specified by:
destroyin interfaceServlet- Overrides:
destroyin classGenericServlet
-
doPost
public void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException Handle POST requests.- Overrides:
doPostin classHttpServlet- Parameters:
req- DESCRIPTIONresp- DESCRIPTION- Throws:
ServletException- DESCRIPTIONIOException- DESCRIPTION
-
doPut
public void doPut(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException Handle PUT requests.- Overrides:
doPutin classHttpServlet- Parameters:
req- Input request.resp- Resulting response.- Throws:
IOException- I/O errorServletException- servlet error
-
doDelete
public void doDelete(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException Handle DELETE requests.- Overrides:
doDeletein classHttpServlet- Parameters:
req- Input request.resp- Resulting response.- Throws:
IOException- I/O errorServletException- servlet error
-
doGet
public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException Handle GET requests.- Overrides:
doGetin classHttpServlet- Parameters:
req- Input request.resp- Resulting response.- Throws:
IOException- I/O errorServletException- servlet error
-
log
Override the standard servlet logging to use our logger- Overrides:
login classGenericServlet- Parameters:
msg- DESCRIPTION
-
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
-