Package org.archive.wayback.core

Examples of org.archive.wayback.core.CaptureSearchResults


  public void annotateResults(SearchResults results)
      throws ResourceNotInArchiveException, BadQueryException,
      AccessControlException {
    if(closestTracker != null) {
      if(results instanceof CaptureSearchResults) {
        CaptureSearchResults cResults = (CaptureSearchResults) results;
        cResults.setClosest(closestTracker.getClosest());
      }
    }
  }
View Full Code Here


    }
  }

  @Override
    public void begin() {
    results = new CaptureSearchResults();
   
    if (resolveRevisits) {
      if (isReverse) {
        digestToRevisits = new HashMap<String, LinkedList<CaptureSearchResult>>();
      } else {
View Full Code Here

    p.queried();
   
    if(!(results instanceof CaptureSearchResults)) {
      throw new ResourceNotAvailableException("Bad results...");
    }
    CaptureSearchResults captureResults =
      (CaptureSearchResults) results;

   
    CaptureSearchResult closest = null;
   
View Full Code Here

      SearchResults results = queryIndex(wbr);
     
      if(!(results instanceof CaptureSearchResults)) {
        throw new ResourceNotAvailableException("Bad results looking up " + payloadTimestamp + " " + payloadUri);
      }
      CaptureSearchResults payloadCaptureResults = (CaptureSearchResults) results;
      payloadLocation = getReplay().getClosest(wbr, payloadCaptureResults);
    }
   
//    if (payloadLocation != null) {
//      return payloadLocation;
View Full Code Here

    SearchResults results = queryIndex(wbRequest);
   
    p.queried();
   
    if(results instanceof CaptureSearchResults) {
      CaptureSearchResults cResults = (CaptureSearchResults) results;
     
      // The Firefox proxy plugin maks an XML request to populate the
      // list of available captures, and needs the closest result to
      // the one being replayed to be flagged as such:
      CaptureSearchResult closest = cResults.getClosest();
      if(closest != null) {
        closest.setClosest(true);
      }
     
      getQuery().renderCaptureResults(httpRequest,httpResponse,wbRequest,
View Full Code Here

       
        public int filterObject(CaptureSearchResult o) {
          return ObjectFilter.FILTER_INCLUDE;
        }
      });
      CaptureSearchResults sr = (CaptureSearchResults) r.documentToSearchResults(document, filter);
      assertEquals(1,sr.getResults().size());
      assertEquals("20090204213443",sr.getResults().get(0).getCaptureTimestamp());
    } catch (Exception e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      fail(e.getLocalizedMessage());
    }
View Full Code Here

        // unused in TransparentReplayRenderer
        wbRequest = null; //new WaybackRequest();
        // use test fixture version as we want to focus on TransparentReplayRenderer behavior.
        uriConverter = EasyMock.createMock(ResultURIConverter.class);
        // result is only used in HttpHeaderOperation.processHeaders()
        results = new CaptureSearchResults();
       
        response = EasyMock.createMock(HttpServletResponse.class);
    }
View Full Code Here

TOP

Related Classes of org.archive.wayback.core.CaptureSearchResults

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.