degu.client.web.simple
Class SearchServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.apache.velocity.servlet.VelocityServlet
              extended by degu.client.web.simple.SearchServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class SearchServlet
extends org.apache.velocity.servlet.VelocityServlet

Servlet Class

See Also:
Serialized Form

Field Summary
private static java.lang.String BASE_URL
          base url used by all html pages in forms and in anchor tags
private static int DOC_PAGE_SIZE
          hits per document pages
private static int DOCHIT_PAGING_SIZE
           
private  DeguDocStorage docStorage
           
private  DeguDocStorageHome docStorageHome
           
private  FileStorageHome fileStorageHome
           
private static org.apache.log4j.Logger logger
           
private static int PAGE_SIZE
          hits per page
private static int PAGEHIT_PAGING_SIZE
           
private  PageSearcher pageSearcher
           
private  PageSearcherHome pageSearcherHome
           
private static java.lang.String PDF_DOCRETRIEVER_BASE_URL
           
private  Searcher searcher
           
private  SearcherHome searcherHome
           
(package private)  org.apache.velocity.Template searchTemplate
           
 
Fields inherited from class org.apache.velocity.servlet.VelocityServlet
CONTENT_TYPE, DEFAULT_CONTENT_TYPE, DEFAULT_OUTPUT_ENCODING, INIT_PROPS_KEY, REQUEST, RESPONSE
 
Constructor Summary
SearchServlet()
           
 
Method Summary
 org.apache.velocity.Template handleRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.apache.velocity.context.Context ctx)
           
 void init(javax.servlet.ServletConfig config)
           
protected  java.util.Properties loadConfiguration(javax.servlet.ServletConfig config)
           
private  void transformToc2Html(java.lang.StringBuffer buffer, org.jdom.Element e, java.lang.String qStr, java.lang.String docId, java.util.HashMap<java.lang.Integer,java.lang.Boolean> pageNrHitsMap, java.util.HashMap<java.lang.String,java.lang.String> tocsQueryMap, java.util.HashMap<java.lang.String,java.lang.Integer> tocsPruneMap, java.lang.String target)
          Transformes the DeguDocument XML TOC into an html li
 
Methods inherited from class org.apache.velocity.servlet.VelocityServlet
chooseCharacterEncoding, createContext, doGet, doPost, doRequest, error, getTemplate, getTemplate, handleRequest, initVelocity, mergeTemplate, requestCleanup, setContentType
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, 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

PAGE_SIZE

private static final int PAGE_SIZE
hits per page

See Also:
Constant Field Values

DOC_PAGE_SIZE

private static final int DOC_PAGE_SIZE
hits per document pages

See Also:
Constant Field Values

DOCHIT_PAGING_SIZE

private static final int DOCHIT_PAGING_SIZE
See Also:
Constant Field Values

PAGEHIT_PAGING_SIZE

private static final int PAGEHIT_PAGING_SIZE
See Also:
Constant Field Values

BASE_URL

private static final java.lang.String BASE_URL
base url used by all html pages in forms and in anchor tags

See Also:
Constant Field Values

PDF_DOCRETRIEVER_BASE_URL

private static final java.lang.String PDF_DOCRETRIEVER_BASE_URL
See Also:
Constant Field Values

logger

private static org.apache.log4j.Logger logger

searcherHome

private SearcherHome searcherHome

searcher

private Searcher searcher

pageSearcherHome

private PageSearcherHome pageSearcherHome

pageSearcher

private PageSearcher pageSearcher

docStorageHome

private DeguDocStorageHome docStorageHome

docStorage

private DeguDocStorage docStorage

fileStorageHome

private FileStorageHome fileStorageHome

searchTemplate

org.apache.velocity.Template searchTemplate
Constructor Detail

SearchServlet

public SearchServlet()
Method Detail

init

public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
Specified by:
init in interface javax.servlet.Servlet
Overrides:
init in class org.apache.velocity.servlet.VelocityServlet
Throws:
javax.servlet.ServletException

loadConfiguration

protected java.util.Properties loadConfiguration(javax.servlet.ServletConfig config)
                                          throws java.io.IOException,
                                                 java.io.FileNotFoundException
Overrides:
loadConfiguration in class org.apache.velocity.servlet.VelocityServlet
Throws:
java.io.IOException
java.io.FileNotFoundException

handleRequest

public org.apache.velocity.Template handleRequest(javax.servlet.http.HttpServletRequest request,
                                                  javax.servlet.http.HttpServletResponse response,
                                                  org.apache.velocity.context.Context ctx)
Overrides:
handleRequest in class org.apache.velocity.servlet.VelocityServlet

transformToc2Html

private void transformToc2Html(java.lang.StringBuffer buffer,
                               org.jdom.Element e,
                               java.lang.String qStr,
                               java.lang.String docId,
                               java.util.HashMap<java.lang.Integer,java.lang.Boolean> pageNrHitsMap,
                               java.util.HashMap<java.lang.String,java.lang.String> tocsQueryMap,
                               java.util.HashMap<java.lang.String,java.lang.Integer> tocsPruneMap,
                               java.lang.String target)
Transformes the DeguDocument XML TOC into an html li

Parameters:
buffer -
e -
pageNrHitsMap -
tocsPruneMap -
tocsQueryMap -
target -