org.archive.wayback.requestparser
Class OpenSearchRequestParser
java.lang.Object
org.archive.wayback.requestparser.BaseRequestParser
org.archive.wayback.requestparser.WrappedRequestParser
org.archive.wayback.requestparser.OpenSearchRequestParser
- All Implemented Interfaces:
- RequestParser
public class OpenSearchRequestParser
- extends WrappedRequestParser
RequestParser which attempts to extract data from an HTML form, that is, from
HTTP GET request arguments containing a query, an optional count (results
per page), and an optional current page argument. All other reqeust fields
are expected to be encoded within the query ("q") field.
- Version:
- $Date: 2010-09-29 05:28:38 +0700 (Wed, 29 Sep 2010) $, $Revision: 3262 $
- Author:
- brad
|
Method Summary |
WaybackRequest |
parse(javax.servlet.http.HttpServletRequest httpRequest,
AccessPoint wbContext)
attempt to transform an incoming HttpServletRequest into a
WaybackRequest object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SEARCH_QUERY
public static final String SEARCH_QUERY
- CGI argument name for query arguments
- See Also:
- Constant Field Values
SEARCH_RESULTS
public static final String SEARCH_RESULTS
- CGI argument name for number of results per page, 1 based
- See Also:
- Constant Field Values
START_PAGE
public static final String START_PAGE
- CGI argument name for page number of results, 1 based
- See Also:
- Constant Field Values
OpenSearchRequestParser
public OpenSearchRequestParser(BaseRequestParser wrapped)
- Parameters:
wrapped - the BaseRequestParser being wrapped
parse
public WaybackRequest parse(javax.servlet.http.HttpServletRequest httpRequest,
AccessPoint wbContext)
throws BadQueryException
- Description copied from interface:
RequestParser
- attempt to transform an incoming HttpServletRequest into a
WaybackRequest object. returns null if there is missing information.
- Specified by:
parse in interface RequestParser- Specified by:
parse in class BaseRequestParser
- Parameters:
httpRequest - ServletHttpRequest being handledwbContext - AccessPoint which is attempting to parse the request
- Returns:
- populated WaybackRequest object if successful, null otherwise.
- Throws:
BadQueryException - if the request could match this AccessPoint,
but is malformed: invalid datespec, URL, or flags
Copyright © 2005-2011 Internet Archive. All Rights Reserved.