Package org.archive.wayback

Examples of org.archive.wayback.ReplayRenderer


      HttpServletResponse httpResponse, WaybackRequest wbRequest,
      SearchResult result, Resource resource,
      ResultURIConverter uriConverter, SearchResults results)
      throws ServletException, IOException {
   
    ReplayRenderer renderer = getRenderer(wbRequest, result, resource);
    try {
      renderer.renderResource(httpRequest, httpResponse, wbRequest, result,
          resource, uriConverter, results);
    } catch (WaybackException e) {
      renderException(httpRequest, httpResponse, wbRequest, e);
    }
  }
View Full Code Here


  public void testMimeTypeFromIndex() throws Exception {
    WaybackRequest wbRequest = new WaybackRequest();
    CaptureSearchResult result = new CaptureSearchResult();
    result.setMimeType("text/javascript");
    Resource resource = createTestTextResource("text/javascript", "var i=1;".getBytes("UTF-8"));
    ReplayRenderer rr = cut.getRenderer(wbRequest, result, resource);

    assertEquals("js", ((TestReplayRenderer)rr).name);   
  }
View Full Code Here

    WaybackRequest wbRequest = new WaybackRequest();
    wbRequest.setJSContext(true);
    CaptureSearchResult result = new CaptureSearchResult();
    result.setMimeType("text/plain");
    Resource resource = createTestTextResource("text/plain", "a".getBytes("UTF-8"));
    ReplayRenderer rr = cut.getRenderer(wbRequest, result, resource);

    assertEquals("js", ((TestReplayRenderer)rr).name);
  }
View Full Code Here

          handleReplayRedirect(wbRequest, httpResponse, captureResults, closest);
        }
                 
        p.retrieved();
       
        ReplayRenderer renderer =
          getReplay().getRenderer(wbRequest, closest, httpHeadersResource, payloadResource);
       
        if (this.isEnableWarcFileHeader() && (warcFileHeader != null)) {
          if (isRevisit && (closest.getDuplicatePayloadFile() != null)) {
            httpResponse.addHeader(warcFileHeader, closest.getDuplicatePayloadFile());
          } else {
            httpResponse.addHeader(warcFileHeader, closest.getFile());
          }
        }
       
        // Memento URL-M response
        if (this.isEnableMemento()) {
          MementoUtils.addMementoHeaders(httpResponse, captureResults, closest, wbRequest);
        }
   
        renderer.renderResource(httpRequest, httpResponse, wbRequest,
            closest, httpHeadersResource, payloadResource, getUriConverter(), captureResults);
     
        p.rendered();
        p.write(wbRequest.getReplayTimestamp() + " " +
            wbRequest.getRequestUrl());
View Full Code Here

TOP

Related Classes of org.archive.wayback.ReplayRenderer

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.