org.dspace.app.webui.servlet
Class BrowserServlet

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.AbstractBrowserServlet
                  extended by org.dspace.app.webui.servlet.BrowserServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class BrowserServlet
extends AbstractBrowserServlet

Servlet for browsing through indices, as they are defined in the configuration. This class can take a wide variety of inputs from the user interface: - type: the type of browse (index name) being performed - order: (ASC | DESC) the direction for result sorting - value: A specific value to find items around. For example the author name or subject - month: integer specification of the month of a date browse - year: integer specification of the year of a date browse - starts_with: string value at which to start browsing - vfocus: start browsing with a value of this string - focus: integer id of the item at which to start browsing - rpp: integer number of results per page to display - sort_by: integer specification of the field to search on - etal: integer number to limit multiple value items specified in config to

Version:
$Revision$
Author:
Richard Jones
See Also:
Serialized Form

Constructor Summary
BrowserServlet()
           
 
Method Summary
protected  void doDSGet(Context context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Do the usual DSpace GET method.
protected  void exportMetadata(Context context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, BrowserScope scope)
          Export the metadata from a browse
protected  void showError(Context context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Display the error page
protected  void showFullPage(Context context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Display a full item listing.
protected  void showNoResultsPage(Context context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Display the No Results page
protected  void showSinglePage(Context context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Display the single page.
 
Methods inherited from class org.dspace.app.webui.servlet.AbstractBrowserServlet
getBrowserScopeForRequest, processBrowse
 
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

BrowserServlet

public BrowserServlet()
Method Detail

doDSGet

protected void doDSGet(Context context,
                       javax.servlet.http.HttpServletRequest request,
                       javax.servlet.http.HttpServletResponse response)
                throws javax.servlet.ServletException,
                       IOException,
                       SQLException,
                       AuthorizeException
Do the usual DSpace GET method. You will notice that browse does not currently respond to POST requests.

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

showError

protected void showError(Context context,
                         javax.servlet.http.HttpServletRequest request,
                         javax.servlet.http.HttpServletResponse response)
                  throws javax.servlet.ServletException,
                         IOException,
                         SQLException,
                         AuthorizeException
Display the error page

Specified by:
showError in class AbstractBrowserServlet
Parameters:
context -
request -
response -
Throws:
javax.servlet.ServletException
IOException
SQLException
AuthorizeException

showNoResultsPage

protected void showNoResultsPage(Context context,
                                 javax.servlet.http.HttpServletRequest request,
                                 javax.servlet.http.HttpServletResponse response)
                          throws javax.servlet.ServletException,
                                 IOException,
                                 SQLException,
                                 AuthorizeException
Display the No Results page

Specified by:
showNoResultsPage in class AbstractBrowserServlet
Parameters:
context -
request -
response -
Throws:
javax.servlet.ServletException
IOException
SQLException
AuthorizeException

showSinglePage

protected void showSinglePage(Context context,
                              javax.servlet.http.HttpServletRequest request,
                              javax.servlet.http.HttpServletResponse response)
                       throws javax.servlet.ServletException,
                              IOException,
                              SQLException,
                              AuthorizeException
Display the single page. This is the page which lists just the single values of a metadata browse, not individual items. Single values are links through to all the items that match that metadata value

Specified by:
showSinglePage in class AbstractBrowserServlet
Parameters:
context -
request -
response -
Throws:
javax.servlet.ServletException
IOException
SQLException
AuthorizeException

showFullPage

protected void showFullPage(Context context,
                            javax.servlet.http.HttpServletRequest request,
                            javax.servlet.http.HttpServletResponse response)
                     throws javax.servlet.ServletException,
                            IOException,
                            SQLException,
                            AuthorizeException
Display a full item listing.

Specified by:
showFullPage in class AbstractBrowserServlet
Parameters:
context -
request -
response -
Throws:
javax.servlet.ServletException
IOException
SQLException
AuthorizeException

exportMetadata

protected void exportMetadata(Context context,
                              javax.servlet.http.HttpServletRequest request,
                              javax.servlet.http.HttpServletResponse response,
                              BrowserScope scope)
                       throws IOException,
                              javax.servlet.ServletException
Export the metadata from a browse

Parameters:
context - The DSpace context
request - The request object
response - The response object
scope - The browse scope
Throws:
IOException
javax.servlet.ServletException


Copyright © 2013 DuraSpace. All Rights Reserved.