org.LexGrid.LexBIG.caCore.web.util
Class LexEVSHTTPQuery

java.lang.Object
  extended by HttpServlet
      extended by org.LexGrid.LexBIG.caCore.web.util.LexEVSHTTPQuery

public class LexEVSHTTPQuery
extends HttpServlet

The HTTPQuery servlet interpretes a query request and makes appropriate calls to the Application Service interface. The results are sent back to the user as an XML or HTML document based on the type of request made. XQuery like syntax is used to generate the query. Syntax: http://server:port/servlet/queryType?query=targetClassName&criteriaClassName[@attribute=value][association[@attribute=value]] Please refer to the cacore documentation for more information on generating a query request.


Constructor Summary
LexEVSHTTPQuery()
           
 
Method Summary
 void destroy()
          Unload servlet
 void doGet(HttpServletRequest request, HttpServletResponse response)
          Handles Get requests
 void doPost(HttpServletRequest request, HttpServletResponse response)
          Handls Post requests
 Document getHTMLDocument(Document doc, java.lang.String styleSheet)
          Generates an HTML Document for a given XML document with the given stylesheet specification
 void init(ServletConfig config)
          Initialize the servlet
 Document XSLTTransformer(Document xmlDoc, java.io.InputStream styleIn)
          Generates an XML or HTML document based on a given stylesheet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LexEVSHTTPQuery

public LexEVSHTTPQuery()
Method Detail

init

public void init(ServletConfig config)
          throws ServletException
Initialize the servlet

Throws:
ServletException

doPost

public void doPost(HttpServletRequest request,
                   HttpServletResponse response)
            throws ServletException,
                   java.io.IOException
Handls Post requests

Throws:
ServletException
java.io.IOException

destroy

public void destroy()
Unload servlet


doGet

public void doGet(HttpServletRequest request,
                  HttpServletResponse response)
           throws ServletException,
                  java.io.IOException
Handles Get requests

Throws:
ServletException
java.io.IOException

getHTMLDocument

public Document getHTMLDocument(Document doc,
                                java.lang.String styleSheet)
                         throws java.lang.Exception
Generates an HTML Document for a given XML document with the given stylesheet specification

Parameters:
doc - Specifies the XML document
styleSheet - Specifies the stylesheet
Returns:
Throws:
java.lang.Exception

XSLTTransformer

public Document XSLTTransformer(Document xmlDoc,
                                java.io.InputStream styleIn)
                         throws java.lang.Exception
Generates an XML or HTML document based on a given stylesheet

Parameters:
xmlDoc - Specifies the xml document
styleIn - specifies the stylesheet
Returns:
Throws:
java.lang.Exception