public class SMILASearchServlet
extends HttpServlet
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_PIPELINE
default pipeline name.
|
static java.lang.String |
DEFAULT_STYLESHEET
default stylesheet name.
|
static java.lang.String |
ELEMENT_INDEX_NAME
Element name for a index names list entry.
|
static java.lang.String |
ELEMENT_INDEX_NAMES
Element name for the index names list.
|
Constructor and Description |
---|
SMILASearchServlet() |
Modifier and Type | Method and Description |
---|---|
protected void |
appendIndexList(org.w3c.dom.Document doc)
Appends a list of index names to the document.
|
protected void |
doGet(HttpServletRequest request,
HttpServletResponse response) |
protected void |
doPost(HttpServletRequest request,
HttpServletResponse response) |
protected void |
doPut(HttpServletRequest request,
HttpServletResponse response) |
protected ResultDocumentBuilder |
getErrorBuilder()
ensure and return a ResultDocumentBuilder.
|
protected ServletFileUpload |
getFileUploadParser()
ensure and return a file upload parser.
|
protected javax.xml.transform.Transformer |
getXSLTransformer(org.w3c.dom.Document xslDoc)
create XSL transformer for stylesheet.
|
protected void |
processRequest(HttpServletRequest request,
HttpServletResponse response)
extract query parameters from request, create SMILA Query record and send it to a SearchService, transform the DOM
result to HTML using an XSLT stylesheet.
|
protected byte[] |
transform(org.w3c.dom.Document doc,
java.lang.String stylesheet)
transform DOM documment using stylesheet.
|
public static final java.lang.String DEFAULT_PIPELINE
public static final java.lang.String DEFAULT_STYLESHEET
public static final java.lang.String ELEMENT_INDEX_NAMES
public static final java.lang.String ELEMENT_INDEX_NAME
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException
ServletException
java.io.IOException
javax.servlet.http.HttpServlet#doGet(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException
ServletException
java.io.IOException
javax.servlet.http.HttpServlet#doPost(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)
protected void doPut(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException
ServletException
java.io.IOException
javax.servlet.http.HttpServlet#doPut(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)
protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException
request
- HTTP requestresponse
- HTTP responseServletException
- error during processingjava.io.IOException
- error writing result to response streamprotected byte[] transform(org.w3c.dom.Document doc, java.lang.String stylesheet) throws ServletException
doc
- DOM search result documentstylesheet
- stylesheet name (without .xsl suffix)ServletException
- error during transformationprotected javax.xml.transform.Transformer getXSLTransformer(org.w3c.dom.Document xslDoc) throws ServletException
xslDoc
- XSL DOM documentServletException
- error.protected void appendIndexList(org.w3c.dom.Document doc)
doc
- the document to append the list toprotected ServletFileUpload getFileUploadParser()
protected ResultDocumentBuilder getErrorBuilder()