com.senseidb.servlet
Class DefaultSenseiJSONServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.senseidb.servlet.ZookeeperConfigurableServlet
com.senseidb.servlet.AbstractSenseiClientServlet
com.senseidb.servlet.AbstractSenseiRestServlet
com.senseidb.servlet.DefaultSenseiJSONServlet
- All Implemented Interfaces:
- Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
public class DefaultSenseiJSONServlet
- extends AbstractSenseiRestServlet
- See Also:
- Serialized Form
Fields inherited from class com.senseidb.servlet.ZookeeperConfigurableServlet |
clusterClientName, clusterName, connectTimeoutMillis, loadBalancerFactory, maxConnectionsPerNode, staleRequestCleanupFrequencyMins, staleRequestTimeoutMins, versionComparator, writeTimeoutMillis, zkTimeout, zkurl |
Method Summary |
static org.json.JSONArray |
buildJSONHits(SenseiRequest req,
SenseiHit[] hits)
|
static org.json.JSONObject |
buildJSONResult(SenseiRequest req,
SenseiResult res)
|
static String |
buildJSONResultString(SenseiRequest req,
SenseiResult res)
|
protected String |
buildResultString(SenseiRequest req,
SenseiResult res)
|
protected String |
buildResultString(SenseiSystemInfo info)
|
protected SenseiRequest |
buildSenseiRequest(org.apache.commons.configuration.DataConfiguration params)
|
static org.json.JSONObject |
convert(Map<String,com.browseengine.bobo.api.FacetAccessible> facetValueMap,
SenseiRequest req)
|
static org.json.JSONObject |
convertExpl(org.apache.lucene.search.Explanation expl)
|
static void |
convertFacetParam(SenseiRequest senseiReq,
org.apache.commons.configuration.DataConfiguration params)
|
static void |
convertInitParams(SenseiRequest senseiReq,
org.apache.commons.configuration.DataConfiguration params)
|
static void |
convertPartitionParams(SenseiRequest senseiReq,
org.apache.commons.configuration.DataConfiguration params)
|
static void |
convertScalarParams(SenseiRequest senseiReq,
org.apache.commons.configuration.DataConfiguration params)
|
static void |
convertSelectParam(SenseiRequest senseiReq,
org.apache.commons.configuration.DataConfiguration params)
|
static void |
convertSenseiQuery(SenseiRequest senseiReq,
org.apache.commons.configuration.DataConfiguration params)
|
static SenseiRequest |
convertSenseiRequest(org.apache.commons.configuration.DataConfiguration params)
|
static void |
convertSortParam(SenseiRequest senseiReq,
org.apache.commons.configuration.DataConfiguration params)
|
Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doHead, doPut, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultSenseiJSONServlet
public DefaultSenseiJSONServlet()
convertExpl
public static org.json.JSONObject convertExpl(org.apache.lucene.search.Explanation expl)
throws org.json.JSONException
- Throws:
org.json.JSONException
convert
public static org.json.JSONObject convert(Map<String,com.browseengine.bobo.api.FacetAccessible> facetValueMap,
SenseiRequest req)
throws org.json.JSONException
- Throws:
org.json.JSONException
buildResultString
protected String buildResultString(SenseiRequest req,
SenseiResult res)
throws Exception
- Specified by:
buildResultString
in class AbstractSenseiRestServlet
- Throws:
Exception
buildJSONResultString
public static String buildJSONResultString(SenseiRequest req,
SenseiResult res)
throws Exception
- Throws:
Exception
buildJSONHits
public static org.json.JSONArray buildJSONHits(SenseiRequest req,
SenseiHit[] hits)
throws Exception
- Throws:
Exception
buildJSONResult
public static org.json.JSONObject buildJSONResult(SenseiRequest req,
SenseiResult res)
throws Exception
- Throws:
Exception
buildSenseiRequest
protected SenseiRequest buildSenseiRequest(org.apache.commons.configuration.DataConfiguration params)
throws Exception
- Specified by:
buildSenseiRequest
in class AbstractSenseiRestServlet
- Throws:
Exception
convertSenseiRequest
public static SenseiRequest convertSenseiRequest(org.apache.commons.configuration.DataConfiguration params)
convertSenseiQuery
public static void convertSenseiQuery(SenseiRequest senseiReq,
org.apache.commons.configuration.DataConfiguration params)
convertScalarParams
public static void convertScalarParams(SenseiRequest senseiReq,
org.apache.commons.configuration.DataConfiguration params)
convertPartitionParams
public static void convertPartitionParams(SenseiRequest senseiReq,
org.apache.commons.configuration.DataConfiguration params)
convertInitParams
public static void convertInitParams(SenseiRequest senseiReq,
org.apache.commons.configuration.DataConfiguration params)
convertSortParam
public static void convertSortParam(SenseiRequest senseiReq,
org.apache.commons.configuration.DataConfiguration params)
convertFacetParam
public static void convertFacetParam(SenseiRequest senseiReq,
org.apache.commons.configuration.DataConfiguration params)
convertSelectParam
public static void convertSelectParam(SenseiRequest senseiReq,
org.apache.commons.configuration.DataConfiguration params)
buildResultString
protected String buildResultString(SenseiSystemInfo info)
throws Exception
- Specified by:
buildResultString
in class AbstractSenseiRestServlet
- Throws:
Exception
Copyright © 2010-2012. All Rights Reserved.