org.archive.wayback.archivalurl
Class ArchivalUrlSAXRewriteReplayRenderer

java.lang.Object
  extended by org.archive.wayback.archivalurl.ArchivalUrlSAXRewriteReplayRenderer
All Implemented Interfaces:
ReplayRenderer

public class ArchivalUrlSAXRewriteReplayRenderer
extends Object
implements ReplayRenderer

ReplayRenderer which attempts to rewrite text/html documents so URLs references within the document load from the correct ArchivalURL AccessPoint.

Author:
brad

Constructor Summary
ArchivalUrlSAXRewriteReplayRenderer(HttpHeaderProcessor httpHeaderProcessor)
           
 
Method Summary
 CharsetDetector getCharsetDetector()
           
 ParseEventHandler getDelegator()
           
 void renderResource(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse, WaybackRequest wbRequest, CaptureSearchResult result, Resource resource, ResultURIConverter uriConverter, CaptureSearchResults results)
          return a resource to the user.
 void setCharsetDetector(CharsetDetector charsetDetector)
           
 void setDelegator(ParseEventHandler delegator)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArchivalUrlSAXRewriteReplayRenderer

public ArchivalUrlSAXRewriteReplayRenderer(HttpHeaderProcessor httpHeaderProcessor)
Parameters:
httpHeaderProcessor - which should process HTTP headers
Method Detail

renderResource

public void renderResource(javax.servlet.http.HttpServletRequest httpRequest,
                           javax.servlet.http.HttpServletResponse httpResponse,
                           WaybackRequest wbRequest,
                           CaptureSearchResult result,
                           Resource resource,
                           ResultURIConverter uriConverter,
                           CaptureSearchResults results)
                    throws javax.servlet.ServletException,
                           IOException,
                           WaybackException
Description copied from interface: ReplayRenderer
return a resource to the user.

Specified by:
renderResource in interface ReplayRenderer
Parameters:
httpRequest - the HttpServletRequest
httpResponse - the HttpServletResponse
wbRequest - the WaybackRequest that returned the results
result - actual CaptureSearchResult that maps to resource to replay
resource - resource to replay
uriConverter - the URI converter to use to translate matching results into replayable URLs
results - all CaptureSearchResults that were returned from the ResourceIndex, probably including other capture dates of the same URL.
Throws:
javax.servlet.ServletException - per usual
IOException - per usual
WaybackException - if Wayback data specific, anticipated exceptions occur

getCharsetDetector

public CharsetDetector getCharsetDetector()
Returns:
the charsetDetector

setCharsetDetector

public void setCharsetDetector(CharsetDetector charsetDetector)
Parameters:
charsetDetector - the charsetDetector to set

getDelegator

public ParseEventHandler getDelegator()
Returns:
the delegator

setDelegator

public void setDelegator(ParseEventHandler delegator)
Parameters:
delegator - the delegator to set


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