org.archive.wayback.requestparser
Class PathRequestParser

java.lang.Object
  extended by org.archive.wayback.requestparser.BaseRequestParser
      extended by org.archive.wayback.requestparser.PathRequestParser
All Implemented Interfaces:
RequestParser
Direct Known Subclasses:
PathDatePrefixQueryRequestParser, PathDateRangeQueryRequestParser, PathPrefixDatePrefixQueryRequestParser, PathPrefixDateRangeQueryRequestParser, ReplayRequestParser

public abstract class PathRequestParser
extends BaseRequestParser

Subclass of RequestParser that acquires key request information from the path component following the wayback context.

Version:
$Date$, $Revision$
Author:
brad

Field Summary
 
Fields inherited from class org.archive.wayback.requestparser.BaseRequestParser
DEFAULT_MAX_RECORDS, earliestTimestamp, latestTimestamp, maxRecords, QUERY_BASE, REPLAY_BASE, XQUERY_BASE
 
Constructor Summary
PathRequestParser()
           
 
Method Summary
 WaybackRequest parse(javax.servlet.http.HttpServletRequest httpRequest, AccessPoint wbContext)
          attempt to transform an incoming HttpServletRequest into a WaybackRequest object.
abstract  WaybackRequest parse(java.lang.String requestPath)
           
 
Methods inherited from class org.archive.wayback.requestparser.BaseRequestParser
getEarliestTimestamp, getLatestTimestamp, getMapParam, getMapParamOrEmpty, getMaxRecords, getRequiredMapParam, setEarliestTimestamp, setLatestTimestamp, setMaxRecords
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PathRequestParser

public PathRequestParser()
Method Detail

parse

public abstract WaybackRequest parse(java.lang.String requestPath)
Parameters:
requestPath -
Returns:
WaybackRequest with information parsed from the requestPath, or null if information could not be extracted.

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
Returns:
populated WaybackRequest object if successful, null otherwise.
Throws:
BadQueryException


Copyright © 2005-2009 Internet Archive. All Rights Reserved.