org.openscience.nmrshiftdb
Class NmrshiftdbServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.openscience.nmrshiftdb.NmrshiftdbServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class NmrshiftdbServlet
extends javax.servlet.http.HttpServlet

A servlet handling nmrshiftdb tasks outside of the jetspeed screen.

Author:
shk3
See Also:
Serialized Form

Constructor Summary
NmrshiftdbServlet()
           
 
Method Summary
 void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          The get method delegates to doPost.
 void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          The doPost Method.
private  void writeRSS(javax.servlet.http.HttpServletResponse res, java.lang.String query, int numbertoexport, javax.servlet.http.HttpServletRequest req)
          Writes a rss cml feed to res.
 
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, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NmrshiftdbServlet

public NmrshiftdbServlet()
Method Detail

doGet

public void doGet(javax.servlet.http.HttpServletRequest req,
                  javax.servlet.http.HttpServletResponse res)
           throws javax.servlet.ServletException,
                  java.io.IOException
The get method delegates to doPost.

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

doPost

public void doPost(javax.servlet.http.HttpServletRequest req,
                   javax.servlet.http.HttpServletResponse res)
            throws javax.servlet.ServletException,
                   java.io.IOException
The doPost Method.

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

writeRSS

private void writeRSS(javax.servlet.http.HttpServletResponse res,
                      java.lang.String query,
                      int numbertoexport,
                      javax.servlet.http.HttpServletRequest req)
               throws java.io.IOException,
                      org.openscience.cdk.exception.CDKException,
                      org.apache.torque.TorqueException,
                      org.xmlcml.cml.base.CMLException,
                      com.workingdogs.village.DataSetException
Writes a rss cml feed to res.

Parameters:
res - The response to write to.
query - The molecules to write (query must return a list of MoleculeIds).
numbertoexport - The number of mols to export.
req - The reqeust to answer.
Throws:
java.io.IOException
org.openscience.cdk.exception.CDKException
org.apache.torque.TorqueException
org.xmlcml.cml.base.CMLException
com.workingdogs.village.DataSetException