org.dspace.app.webui.servlet
Class SimpleSearchServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.dspace.app.webui.servlet.DSpaceServlet
              extended by org.dspace.app.webui.servlet.SimpleSearchServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class SimpleSearchServlet
extends DSpaceServlet

Servlet for handling a simple search.

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".

Version:
$Id: SimpleSearchServlet.java,v 1.17 2004/12/15 15:21:10 jimdowning Exp $
Author:
Robert Tansley
See Also:
Serialized Form

Constructor Summary
SimpleSearchServlet()
           
 
Method Summary
protected  void doDSGet(Context context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Process an incoming HTTP GET.
protected  void exportMetadata(Context context, javax.servlet.http.HttpServletResponse response, Item[] items)
          Export the search results as a csv file
 
Methods inherited from class org.dspace.app.webui.servlet.DSpaceServlet
doDSPost, doGet, doPost
 
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, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleSearchServlet

public SimpleSearchServlet()
Method Detail

doDSGet

protected void doDSGet(Context context,
                       javax.servlet.http.HttpServletRequest request,
                       javax.servlet.http.HttpServletResponse response)
                throws javax.servlet.ServletException,
                       java.io.IOException,
                       java.sql.SQLException,
                       AuthorizeException
Description copied from class: DSpaceServlet
Process an incoming HTTP GET. If an exception is thrown, or for some other reason the passed in context is not completed, it will be aborted and any changes made by this method discarded when this method returns.

Overrides:
doDSGet in class DSpaceServlet
Parameters:
context - a DSpace Context object
request - the HTTP request
response - the HTTP response
Throws:
java.sql.SQLException - if a database error occurs
AuthorizeException - if some authorization error occurs
javax.servlet.ServletException
java.io.IOException

exportMetadata

protected void exportMetadata(Context context,
                              javax.servlet.http.HttpServletResponse response,
                              Item[] items)
                       throws java.io.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:
java.io.IOException
javax.servlet.ServletException


Copyright © 2010 DuraSpace. All Rights Reserved.