congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
CaptureSearchResult.getCaptureTimestamp
Code IndexAdd Tabnine to your IDE (free)

How to use
getCaptureTimestamp
method
in
org.archive.wayback.core.CaptureSearchResult

Best Java code snippets using org.archive.wayback.core.CaptureSearchResult.getCaptureTimestamp (Showing top 20 results out of 315)

origin: iipc/openwayback

  public int filterObject(CaptureSearchResult r) {
    String captureDate = r.getCaptureTimestamp();
    return ((first.compareTo(captureDate) > 0) ||
        (last.compareTo(captureDate) < 0)) ? 
            FILTER_EXCLUDE : FILTER_INCLUDE;
  }
}
origin: org.netpreserve.openwayback/openwayback-core

  public int filterObject(CaptureSearchResult r) {
    String captureDate = r.getCaptureTimestamp();
    return ((first.compareTo(captureDate) > 0) ||
        (last.compareTo(captureDate) < 0)) ? 
            FILTER_EXCLUDE : FILTER_INCLUDE;
  }
}
origin: org.netpreserve.openwayback/openwayback-core

  public int filterObject(CaptureSearchResult r) {
    String captureDate = r.getCaptureTimestamp();
    
    int captureDateLength = Math.min(captureDate.length(), endDate.length());

    return (endDate.substring(0, captureDateLength).compareTo(
        captureDate) < 0) ? 
        FILTER_ABORT : FILTER_INCLUDE; 
  }
}
origin: iipc/openwayback

/**
 * Initializes with {@code originalUrl} and {@code captureTimestamp} from {@link CaptureSearchResult}.
 * @param capture Capture to redirect to.
 * @param captures Other captures for targetURI.
 */
public BetterReplayRequestException(CaptureSearchResult capture, CaptureSearchResults captures) {
  this(capture.getOriginalUrl(), capture.getCaptureTimestamp(), captures);
}
origin: iipc/openwayback

public Date getCaptureDate() {
  if (cachedDate == -1) {
    cachedDate = tsToDate(getCaptureTimestamp()).getTime();
  }
  return new Date(cachedDate);
}
origin: iipc/openwayback

  public int filterObject(CaptureSearchResult r) {
    recordsScanned++;
    if(recordsScanned > maxRecordsToScan) {
      LOGGER.warning("Hit max results on " + r.getUrlKey() + " " 
          + r.getCaptureTimestamp());
      return FILTER_ABORT;
    }
    return FILTER_INCLUDE;
  }
}
origin: iipc/openwayback

private String objectToKey(CaptureSearchResult r) {
  String urlKey = r.getUrlKey();
  String captureDate = r.getCaptureTimestamp();
  return urlKey + " " + captureDate;
}
/* (non-Javadoc)
origin: iipc/openwayback

@Override
public void renderResource(HttpServletRequest httpRequest,
    HttpServletResponse httpResponse, WaybackRequest wbRequest,
    CaptureSearchResult result, Resource resource,
    ResultURIConverter uriConverter, CaptureSearchResults results)
        throws ServletException, IOException {
  // redirect to the better version:
  String url = result.getOriginalUrl();
  String captureDate = result.getCaptureTimestamp();
  String betterURI = uriConverter.makeReplayURI(captureDate,url);
  httpResponse.sendRedirect(betterURI);
}
origin: org.netpreserve.openwayback/openwayback-core

@Override
public void renderResource(HttpServletRequest httpRequest,
    HttpServletResponse httpResponse, WaybackRequest wbRequest,
    CaptureSearchResult result, Resource resource,
    ResultURIConverter uriConverter, CaptureSearchResults results)
        throws ServletException, IOException {
  // redirect to the better version:
  String url = result.getOriginalUrl();
  String captureDate = result.getCaptureTimestamp();
  String betterURI = uriConverter.makeReplayURI(captureDate,url);
  httpResponse.sendRedirect(betterURI);
}
origin: iipc/openwayback

public void resolveCSSUrls() {
  // TODO: get url from Resource instead of SearchResult?
  String pageUrl = result.getOriginalUrl();
  String captureDate = result.getCaptureTimestamp();
  TagMagix.markupCSSImports(sb,uriConverter, captureDate, pageUrl);
}
origin: org.netpreserve.openwayback/openwayback-core

  public int filterObject(CaptureSearchResult r) {
    String captureDate = r.getCaptureTimestamp();
    String url = r.getOriginalUrl();
    return isBlocked(url,captureDate) ?	FILTER_EXCLUDE : FILTER_INCLUDE;
  }
}
origin: org.netpreserve.openwayback/openwayback-core

/**
 * @param result Restul to draw replay URL for
 * @return String absolute URL that will replay result
 */
public String makeReplayURL(CaptureSearchResult result) {
  return StringEscapeUtils.escapeHtml(uiResults.getURIConverter().makeReplayURI(
      result.getCaptureTimestamp(), result.getOriginalUrl()));
}

origin: iipc/openwayback

public static String getLastUrlMonth(Partition<CaptureSearchResult> month,
    ResultURIConverter c) {
  if(month.getTotal() > 0) {
    CaptureSearchResult last = month.list().get(month.list().size()-1);
    return c.makeReplayURI(last.getCaptureTimestamp(),
        last.getOriginalUrl());
  }
  return null;
}
origin: org.netpreserve.openwayback/openwayback-core

public static String getFirstUrlMonth(Partition<CaptureSearchResult> month,
    ResultURIConverter c) {
  if(month.getTotal() > 0) {
    CaptureSearchResult first = month.list().get(0);
    return c.makeReplayURI(first.getCaptureTimestamp(),
        first.getOriginalUrl());
  }
  return null;
}
origin: org.netpreserve.openwayback/openwayback-core

public void addBase() {
  // TODO: get url from Resource instead of SearchResult?
  String pageUrl = result.getOriginalUrl();
  String captureDate = result.getCaptureTimestamp();
  String existingBaseHref = TagMagix.getBaseHref(sb);
  if (existingBaseHref == null) {
    insertAtStartOfHead("<base href=\"" + pageUrl + "\" />");
  } else {
    pageUrl = existingBaseHref;
  }
}
origin: iipc/openwayback

public void renderResource(HttpServletRequest httpRequest,
    HttpServletResponse httpResponse, WaybackRequest wbRequest,
    CaptureSearchResult result, Resource resource,
    ResultURIConverter uriConverter, CaptureSearchResults results)
        throws ServletException, IOException {
  // redirect to the better version:
  String url = result.getOriginalUrl();
  ArchivalUrl aUrl = new ArchivalUrl(wbRequest);
  String dateSpec = aUrl.getDateSpec(result.getCaptureTimestamp());
  String betterURI = uriConverter.makeReplayURI(dateSpec,url);
  httpResponse.sendRedirect(betterURI);
}
origin: iipc/openwayback

public void addBase() {
  // TODO: get url from Resource instead of SearchResult?
  String pageUrl = result.getOriginalUrl();
  String captureDate = result.getCaptureTimestamp();
  String existingBaseHref = TagMagix.getBaseHref(sb);
  if (existingBaseHref == null) {
    insertAtStartOfHead("<base href=\"" + pageUrl + "\" />");
  } else {
    pageUrl = existingBaseHref;
  }
}
origin: org.netpreserve.openwayback/openwayback-core

public void renderResource(HttpServletRequest httpRequest,
    HttpServletResponse httpResponse, WaybackRequest wbRequest,
    CaptureSearchResult result, Resource resource,
    ResultURIConverter uriConverter, CaptureSearchResults results)
        throws ServletException, IOException {
  // redirect to the better version:
  String url = result.getOriginalUrl();
  ArchivalUrl aUrl = new ArchivalUrl(wbRequest);
  String dateSpec = aUrl.getDateSpec(result.getCaptureTimestamp());
  String betterURI = uriConverter.makeReplayURI(dateSpec,url);
  httpResponse.sendRedirect(betterURI);
}
origin: org.netpreserve.openwayback/openwayback-core

public void resolveASXRefUrls() {
  // TODO: get url from Resource instead of SearchResult?
  String pageUrl = result.getOriginalUrl();
  String captureDate = result.getCaptureTimestamp();
  ResultURIConverter ruc = new MMSToHTTPResultURIConverter(uriConverter);
  
  TagMagix.markupTagREURIC(sb, ruc, captureDate, pageUrl,
      "REF", "HREF");
}

origin: iipc/openwayback

  @Override
  public Integer answer() throws Throwable {
    CaptureSearchResult o = (CaptureSearchResult)EasyMock.getCurrentArguments()[0];
    assertEquals(url, o.getOriginalUrl());
    assertEquals(urlkey, o.getUrlKey());
    assertEquals(timestamp, o.getCaptureTimestamp());
    return ExclusionFilter.FILTER_INCLUDE;
  }
}
org.archive.wayback.coreCaptureSearchResultgetCaptureTimestamp

Popular methods of CaptureSearchResult

  • <init>
  • setUrlKey
  • getOriginalUrl
  • setFile
  • setHttpCode
  • setMimeType
  • setOffset
  • setOriginalUrl
  • flagDuplicateDigest
    Mark this capture as a revisit of previous capture payload, identified by content digest.Record loca
  • getCaptureDate
  • getDigest
  • getDuplicatePayload
  • getDigest,
  • getDuplicatePayload,
  • getDuplicatePayloadCompressedLength,
  • getDuplicatePayloadFile,
  • getDuplicatePayloadOffset,
  • getFile,
  • getOffset,
  • getRobotFlags,
  • getUrlKey

Popular in Java

  • Start an intent from android
  • compareTo (BigDecimal)
  • findViewById (Activity)
  • onCreateOptionsMenu (Activity)
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now