org.dspace.app.webui.search
Class LuceneSearchRequestProcessor

java.lang.Object
  extended by org.dspace.app.webui.search.LuceneSearchRequestProcessor
All Implemented Interfaces:
SearchRequestProcessor

public class LuceneSearchRequestProcessor
extends Object
implements SearchRequestProcessor


Constructor Summary
LuceneSearchRequestProcessor()
           
 
Method Summary
 void doAdvancedSearch(Context context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Method for constructing the advanced search form author: gam
 void doOpenSearch(Context context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Method for producing OpenSearch-compliant search results, and the OpenSearch description document.
 void doSimpleSearch(Context context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           All metadata is search for the value contained in the "query" parameter.
protected  void exportMetadata(Context context, javax.servlet.http.HttpServletResponse response, Item[] items)
          Export the search results as a csv file
 void init()
           
protected  void logSearch(Context context, javax.servlet.http.HttpServletRequest request, String query, int start, DSpaceObject scope)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LuceneSearchRequestProcessor

public LuceneSearchRequestProcessor()
Method Detail

init

public void init()

doSimpleSearch

public void doSimpleSearch(Context context,
                           javax.servlet.http.HttpServletRequest request,
                           javax.servlet.http.HttpServletResponse response)
                    throws SearchProcessorException,
                           IOException,
                           javax.servlet.ServletException

All metadata is search for the value contained in the "query" parameter. If the "location" parameter is present, the user's location is switched to that location using a redirect. Otherwise, the user's current location is used to constrain the query; i.e., if the user is "in" a collection, only results from the collection will be returned.

The value of the "location" parameter should be ALL (which means no location), a the ID of a community (e.g. "123"), or a community ID, then a slash, then a collection ID, e.g. "123/456". author: Robert Tansley

Specified by:
doSimpleSearch in interface SearchRequestProcessor
Throws:
SearchProcessorException
IOException
javax.servlet.ServletException

logSearch

protected void logSearch(Context context,
                         javax.servlet.http.HttpServletRequest request,
                         String query,
                         int start,
                         DSpaceObject scope)

doAdvancedSearch

public void doAdvancedSearch(Context context,
                             javax.servlet.http.HttpServletRequest request,
                             javax.servlet.http.HttpServletResponse response)
                      throws SearchProcessorException,
                             javax.servlet.ServletException,
                             IOException
Method for constructing the advanced search form author: gam

Specified by:
doAdvancedSearch in interface SearchRequestProcessor
Throws:
SearchProcessorException
javax.servlet.ServletException
IOException

doOpenSearch

public void doOpenSearch(Context context,
                         javax.servlet.http.HttpServletRequest request,
                         javax.servlet.http.HttpServletResponse response)
                  throws SearchProcessorException,
                         IOException,
                         javax.servlet.ServletException
Method for producing OpenSearch-compliant search results, and the OpenSearch description document.

The value of the "scope" parameter should be absent (which means no scope restriction), or the handle of a community or collection, otherwise parameters exactly match those of the SearchServlet.

author: Richard Rodgers

Specified by:
doOpenSearch in interface SearchRequestProcessor
Throws:
SearchProcessorException
IOException
javax.servlet.ServletException

exportMetadata

protected void exportMetadata(Context context,
                              javax.servlet.http.HttpServletResponse response,
                              Item[] items)
                       throws IOException,
                              javax.servlet.ServletException
Export the search results as a csv file

Parameters:
context - The DSpace context
response - The request object
items - The result items
Throws:
IOException
javax.servlet.ServletException


Copyright © 2013 DuraSpace. All Rights Reserved.