public class CrossQuery extends TextServlet
Modifier and Type | Field and Description |
---|---|
protected CrossQueryConfig |
config
Holds global servlet configuration info
|
protected static DecimalFormat |
decimalFormat
Used to format decimal numbers
|
protected TimeProfilingListener |
profListener
Used for stylesheet profiling, if enabled
|
stylesheetCache
Constructor and Description |
---|
CrossQuery() |
Modifier and Type | Method and Description |
---|---|
protected void |
apply(AttribList attribs,
HttpServletRequest req,
HttpServletResponse res)
Creates the query request, processes it, and formats the results.
|
void |
doGet(HttpServletRequest req,
HttpServletResponse res)
Handles the HTTP 'get' method.
|
protected void |
formatHits(String mainTagName,
HttpServletRequest req,
HttpServletResponse res,
AttribList attribs,
QueryRequest queryRequest,
QueryResult queryResult,
long startTime)
Formats a list of hits using the resultFormatter stylesheet.
|
TextConfig |
getConfig()
Retrieves the current configuration information (that was read in by
readConfig()).
|
String |
getConfigName()
Called by the superclass to find out the name of our specific config
file.
|
String |
getServletInfo()
Informational method required by Servlet interface.
|
protected TextConfig |
readConfig(String configPath)
Loads the specific configuration file for crossQuery.
|
protected QueryRequest |
runQueryParser(HttpServletRequest req,
HttpServletResponse res,
QueryRoute route,
AttribList attribs)
Creates a query request using the queryParser stylesheet and the given
attributes.
|
protected QueryRoute |
runQueryRouter(HttpServletRequest req,
HttpServletResponse res,
AttribList attribs)
Creates a query request using the queryParser stylesheet and the given
attributes.
|
protected boolean |
shuntQueryReq(HttpServletRequest req,
HttpServletResponse res,
Source queryReqDoc)
Called right after the raw query request has been generated, but
before it is parsed.
|
protected String |
stepSetup(HttpServletRequest req,
HttpServletResponse res)
Checks if step mode is active and in the setup phase.
|
addParam, addToken, addTokens, buildParamBlock, calcMimeType, convertUTF8inURL, cqlTokenize, createFilteredReceiver, createQueryProcessor, decodeURL, defaultTokenize, destroy, doPost, genErrorPage, getCurRequest, getCurResponse, getCurServlet, getRealPath, getRequestURL, getRequestURL, getText, isEmpty, isSessionTrackingEnabled, makeAttribList, makeHtmlString, makeHtmlString, rawTokenize, readBranding, requireOrElse, restoreWildcards, saveWildcards, service, setErrorGenSheet, setupTrace, stuffAttribs, stuffAttribs, stuffSpecialAttribs
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service
protected CrossQueryConfig config
protected static DecimalFormat decimalFormat
protected TimeProfilingListener profListener
public String getConfigName()
getConfigName
in class TextServlet
protected TextConfig readConfig(String configPath)
readConfig
in class TextServlet
configPath
- Path to the configuration filepublic TextConfig getConfig()
getConfig
in class TextServlet
public void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException
doGet
in class TextServlet
req
- The HTTP request (in)res
- The HTTP response (out)IOException
- If unable to read an index or data file, or
if unable to write the output stream.public String getServletInfo()
getServletInfo
in interface Servlet
getServletInfo
in class GenericServlet
protected void apply(AttribList attribs, HttpServletRequest req, HttpServletResponse res) throws Exception
attribs
- Attributes to pass to the stylesheets.req
- The original HTTP requestres
- Where to send the responseException
- Passes on various errors that might occur.protected QueryRoute runQueryRouter(HttpServletRequest req, HttpServletResponse res, AttribList attribs) throws Exception
req
- The original HTTP requestres
- The HTTP response (used for step mode only)attribs
- Attributes to pass to the stylesheet.Exception
protected QueryRequest runQueryParser(HttpServletRequest req, HttpServletResponse res, QueryRoute route, AttribList attribs) throws Exception
req
- The original HTTP requestres
- The HTTP response (used for step mode only)route
- Route to the query parserattribs
- Attributes to pass to the stylesheet.Exception
protected boolean shuntQueryReq(HttpServletRequest req, HttpServletResponse res, Source queryReqDoc) throws IOException
IOException
protected void formatHits(String mainTagName, HttpServletRequest req, HttpServletResponse res, AttribList attribs, QueryRequest queryRequest, QueryResult queryResult, long startTime) throws Exception
mainTagName
- Name of the top-level tag to generate (e.g.
"crossQueryResult", etc.)req
- The original HTTP requestres
- Where to send the HTML responseattribs
- Parameters to pass to the stylesheetqueryRequest
- Query request that produced the hitsqueryResult
- Hits resulting from the query requeststartTime
- Time (in milliseconds) request beganException
protected String stepSetup(HttpServletRequest req, HttpServletResponse res) throws IOException
req
- The HTTP request (in)res
- The HTTP response (out)IOException