com.gisgraphy.servlet
Class FulltextServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.gisgraphy.servlet.GisgraphyServlet
              extended by com.gisgraphy.servlet.FulltextServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class FulltextServlet
extends GisgraphyServlet

Provides a servlet Wrapper around The Gisgraphy fulltext Service

Author:
David Masclet
See Also:
GeolocServlet, Serialized Form

Field Summary
static java.lang.String COUNTRY_PARAMETER
           
static int DEFAULT_MAX_RESULTS
           
static java.lang.String LANG_PARAMETER
           
protected static org.slf4j.Logger logger
          The logger
static java.lang.String PLACETYPE_PARAMETER
           
static java.lang.String QUERY_PARAMETER
           
static java.lang.String SPELLCHECKING_PARAMETER
           
static java.lang.String STYLE_PARAMETER
           
 
Fields inherited from class com.gisgraphy.servlet.GisgraphyServlet
debugMode, FORMAT_PARAMETER, FROM_PARAMETER, INDENT_PARAMETER, TO_PARAMETER
 
Constructor Summary
FulltextServlet()
           
 
Method Summary
protected  void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
           
 IoutputFormatVisitor getErrorVisitor(java.lang.String errorMessage)
           
 GisgraphyServiceType getGisgraphyServiceType()
           
 void init()
           
 void setFullTextSearchEngine(IFullTextSearchEngine fullTextSearchEngine)
           
 
Methods inherited from class com.gisgraphy.servlet.GisgraphyServlet
doDelete, doHead, doOptions, doPost, doPut, doTrace, isDebugMode, sendCustomError, setDebugMode, setResponseContentType
 
Methods inherited from class javax.servlet.http.HttpServlet
getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, 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
 

Field Detail

COUNTRY_PARAMETER

public static final java.lang.String COUNTRY_PARAMETER
See Also:
Constant Field Values

LANG_PARAMETER

public static final java.lang.String LANG_PARAMETER
See Also:
Constant Field Values

STYLE_PARAMETER

public static final java.lang.String STYLE_PARAMETER
See Also:
Constant Field Values

PLACETYPE_PARAMETER

public static final java.lang.String PLACETYPE_PARAMETER
See Also:
Constant Field Values

QUERY_PARAMETER

public static final java.lang.String QUERY_PARAMETER
See Also:
Constant Field Values

DEFAULT_MAX_RESULTS

public static final int DEFAULT_MAX_RESULTS
See Also:
Constant Field Values

SPELLCHECKING_PARAMETER

public static final java.lang.String SPELLCHECKING_PARAMETER
See Also:
Constant Field Values

logger

protected static org.slf4j.Logger logger
The logger

Constructor Detail

FulltextServlet

public FulltextServlet()
Method Detail

init

public void init()
          throws javax.servlet.ServletException
Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException

doGet

protected void doGet(javax.servlet.http.HttpServletRequest req,
                     javax.servlet.http.HttpServletResponse resp)
              throws javax.servlet.ServletException,
                     java.io.IOException
Overrides:
doGet in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
java.io.IOException

setFullTextSearchEngine

public void setFullTextSearchEngine(IFullTextSearchEngine fullTextSearchEngine)
Parameters:
fullTextSearchEngine - the fullTextSearchEngine to set

getGisgraphyServiceType

public GisgraphyServiceType getGisgraphyServiceType()
Specified by:
getGisgraphyServiceType in class GisgraphyServlet
Returns:
the GisgraphyServiceType that the servlet handle

getErrorVisitor

public IoutputFormatVisitor getErrorVisitor(java.lang.String errorMessage)
Specified by:
getErrorVisitor in class GisgraphyServlet
Parameters:
errorMessage - the error message to be treated by the visitor
Returns:
an instance of the outputFormatVisitor for the servlet


Copyright © 2010. All Rights Reserved.