Package org.archive.wayback.archivalurl.requestparser

Examples of org.archive.wayback.archivalurl.requestparser.ReplayRequestParser


* @version $Date$, $Revision$
*/
public class ArchivalUrlRequestParser extends CompositeRequestParser {
  protected RequestParser[] getRequestParsers() {
    RequestParser[] theParsers = {
        new ReplayRequestParser(),
        new ReplayIdRequestParser(), /* BUG wayback 0000155 */
        new PathDatePrefixQueryRequestParser(),
        new PathDateRangeQueryRequestParser(),
        new PathPrefixDatePrefixQueryRequestParser(),
        new PathPrefixDateRangeQueryRequestParser(),
View Full Code Here


   */
  public final static String CHARSET_MODE = "cm";

  protected RequestParser[] getRequestParsers() {
    RequestParser[] theParsers = {
        new ReplayRequestParser(this),
        new TimeMapRequestParser(this),     
        new PathDatePrefixQueryRequestParser(this),
        new PathDateRangeQueryRequestParser(this),
        new PathPrefixDatePrefixQueryRequestParser(this),
        new PathPrefixDateRangeQueryRequestParser(this),
View Full Code Here

        prrp,
        new PathDatePrefixQueryRequestParser(this),
        new PathDateRangeQueryRequestParser(this),
        new PathPrefixDatePrefixQueryRequestParser(this),
        new PathPrefixDateRangeQueryRequestParser(this),
        new ReplayRequestParser(this),
        new OpenSearchRequestParser(this),
        new FormRequestParser(this)
        };
    return theParsers;
  }
View Full Code Here

                "20010101235959im_/http://www.yahoo.com/",
                "20010101im_/www.yahoo.com:80/");
    }

    public void testReplayRequestParser() throws Exception {
        ReplayRequestParser parser = new ReplayRequestParser(brp);
        // note AccessPoint arg is unused
        {
            WaybackRequest wbr = parser.parse("20100101000000/http://www.yahoo.com/", null);
            assertEquals("replayTimestamp", "20100101000000", wbr.getReplayTimestamp());
            assertNull("startTimestamp", wbr.getStartTimestamp());
            // endTimestamp is current timestamp
            assertNotNull("endTimestamp", wbr.getEndTimestamp());
        }
        // old Alexa ARCs has 12-digits dates - padded with "00" -> same as prev case
        {
            WaybackRequest wbr = parser.parse("201001010000/http://www.yahoo.com/", null);
            assertEquals("replayTimestamp", "20100101000000", wbr.getReplayTimestamp());
            assertNull("startTimestamp", wbr.getStartTimestamp());
            // endTimestamp is current timestamp
            assertNotNull("endTimestamp", wbr.getEndTimestamp());
        }
        {
            WaybackRequest wbr = parser.parse("20100101/http://www.yahoo.com/", null);
            assertEquals("replayTimestamp", "20100101235959", wbr.getReplayTimestamp());
            assertEquals("startTimestamp", "20100101000000", wbr.getStartTimestamp());
            assertEquals("endTimestamp", "20100101235959", wbr.getEndTimestamp());
        }
       
View Full Code Here

TOP

Related Classes of org.archive.wayback.archivalurl.requestparser.ReplayRequestParser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.