com.senseidb.servlet
Class DefaultSenseiJSONServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.senseidb.servlet.ZookeeperConfigurableServlet
              extended by com.senseidb.servlet.AbstractSenseiClientServlet
                  extended by com.senseidb.servlet.AbstractSenseiRestServlet
                      extended by com.senseidb.servlet.DefaultSenseiJSONServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class DefaultSenseiJSONServlet
extends AbstractSenseiRestServlet

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.senseidb.servlet.AbstractSenseiClientServlet
BQL_PARSING_ERROR
 
Fields inherited from class com.senseidb.servlet.ZookeeperConfigurableServlet
clusterClientName, clusterName, connectTimeoutMillis, loadBalancerFactory, maxConnectionsPerNode, staleRequestCleanupFrequencyMins, staleRequestTimeoutMins, versionComparator, writeTimeoutMillis, zkTimeout, zkurl
 
Constructor Summary
DefaultSenseiJSONServlet()
           
 
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 com.senseidb.servlet.AbstractSenseiRestServlet
buildSenseiRequest, convertResult, convertResult
 
Methods inherited from class com.senseidb.servlet.AbstractSenseiClientServlet
destroy, doGet, doOptions, doPost, getParameters, init
 
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
 

Constructor Detail

DefaultSenseiJSONServlet

public DefaultSenseiJSONServlet()
Method Detail

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.