Codota Logo
CaptureSearchResult.getUrlKey
Code IndexAdd Codota to your IDE (free)

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

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

  • Common ways to obtain CaptureSearchResult
private void myMethod () {
CaptureSearchResult c =
  • Codota Iconnew CaptureSearchResult()
  • Smart code suggestions by Codota
}
origin: iipc/openwayback

  public String serialize(CaptureSearchResult result) {
    String r = result.getUrlKey();
    return r == null ? DEFAULT_VALUE : r;
  }
}
origin: org.netpreserve.openwayback/openwayback-core

  public String serialize(CaptureSearchResult result) {
    String r = result.getUrlKey();
    return r == null ? DEFAULT_VALUE : r;
  }
}
origin: iipc/openwayback

  public int filterObject(CaptureSearchResult r) {
    String resultUrl = r.getUrlKey();
    return resultUrl.startsWith(prefix)	? FILTER_INCLUDE : FILTER_ABORT;
  }
}
origin: org.netpreserve.openwayback/openwayback-core

  public int filterObject(CaptureSearchResult r) {
    String resultUrl = r.getUrlKey();
    return resultUrl.startsWith(prefix)	? FILTER_INCLUDE : FILTER_ABORT;
  }
}
origin: iipc/openwayback

  public int filterObject(CaptureSearchResult r) {
    String resultUrl = r.getUrlKey();
    return url.equals(resultUrl) ? 
        FILTER_INCLUDE : FILTER_ABORT;
  }
}
origin: org.netpreserve.openwayback/openwayback-core

  public int filterObject(CaptureSearchResult r) {
    String resultUrl = r.getUrlKey();
    return url.equals(resultUrl) ? 
        FILTER_INCLUDE : FILTER_ABORT;
  }
}
origin: org.netpreserve.openwayback/openwayback-core

  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

  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: org.netpreserve.openwayback/openwayback-core

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

@Override
public CaptureSearchResult adapt(String line) {
  CaptureSearchResult result = CDXFlexFormat.parseCDXLineFlexFast(line);
  
  if (ignoreRobotPaths != null) {
    for (String path : ignoreRobotPaths) {
      if (result.getUrlKey().startsWith(path)) {
        result.setRobotIgnore();
        break;
      }
    }
  }
  
  return result;
}
origin: iipc/openwayback

@Override
public CaptureSearchResult adapt(String line) {
  CaptureSearchResult result = CDXFlexFormat.parseCDXLineFlexFast(line);
  
  if (ignoreRobotPaths != null) {
    for (String path : ignoreRobotPaths) {
      if (result.getUrlKey().startsWith(path)) {
        result.setRobotIgnore();
        break;
      }
    }
  }
  
  return result;
}
origin: iipc/openwayback

@Override
public String getOriginalUrl() {
  String url = get(CAPTURE_ORIGINAL_URL);
  if (url == null) {
    // convert from ORIG_HOST to ORIG_URL here:
    url = getUrlKey();
    String host = get(CAPTURE_ORIGINAL_HOST);
    if (url != null && host != null) {
      StringBuilder sb = new StringBuilder(url.length());
      sb.append(UrlOperations.DEFAULT_SCHEME);
      sb.append(host);
      sb.append(UrlOperations.getURLPath(url));
      url = sb.toString();
      // cache it for next time...?
      setOriginalUrl(url);
    }
  }
  return url;
}
origin: org.netpreserve.openwayback/openwayback-core

@Override
public String getOriginalUrl() {
  String url = get(CAPTURE_ORIGINAL_URL);
  if (url == null) {
    // convert from ORIG_HOST to ORIG_URL here:
    url = getUrlKey();
    String host = get(CAPTURE_ORIGINAL_HOST);
    if (url != null && host != null) {
      StringBuilder sb = new StringBuilder(url.length());
      sb.append(UrlOperations.DEFAULT_SCHEME);
      sb.append(host);
      sb.append(UrlOperations.getURLPath(url));
      url = sb.toString();
      // cache it for next time...?
      setOriginalUrl(url);
    }
  }
  return url;
}
origin: iipc/openwayback

sb.append(result.getUrlKey());
sb.append(DELIMITER);
sb.append(result.getCaptureTimestamp());
origin: iipc/openwayback

public String transform(ReplayParseContext context, String input) {
  if (getName() != null) {
    String policy = context.getOraclePolicy();
    // TODO: move this mechanism to MultiRegexReplaceStringTransformer
    if (policy != null &&
        policy.contains("disable-rewrite-" + getName())) {
      return input;
    }
  }
  // being removed
  if (urlScope != null) {
    CaptureSearchResult result = context.getCaptureSearchResult();
    if (result != null && !result.getUrlKey().contains(urlScope)) {
      return input;
    }
  }
  if (pattern == null) {
    return input;
  }
  Matcher m = pattern.matcher(input);
  return m.replaceAll(replacement);
}
origin: org.netpreserve.openwayback/openwayback-core

sb.append(result.getUrlKey());
sb.append(DELIMITER);
sb.append(result.getCaptureTimestamp());
origin: org.netpreserve.openwayback/openwayback-core

public String transform(ReplayParseContext context, String input) {
  if (getName() != null) {
    String policy = context.getOraclePolicy();
    // TODO: move this mechanism to MultiRegexReplaceStringTransformer
    if (policy != null &&
        policy.contains("disable-rewrite-" + getName())) {
      return input;
    }
  }
  // being removed
  if (urlScope != null) {
    CaptureSearchResult result = context.getCaptureSearchResult();
    if (result != null && !result.getUrlKey().contains(urlScope)) {
      return input;
    }
  }
  if (pattern == null) {
    return input;
  }
  Matcher m = pattern.matcher(input);
  return m.replaceAll(replacement);
}
origin: iipc/openwayback

String redirect = r.getRedirectUrl();
if(redirect.compareTo("-") != 0) {
  String urlKey = r.getUrlKey();
  try {
    String redirectKey = canonicalizer.urlStringToKey(redirect);
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.coreCaptureSearchResultgetUrlKey

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
  • getCaptureTimestamp
  • getDigest
  • getCaptureTimestamp,
  • getDigest,
  • getDuplicatePayload,
  • getDuplicatePayloadCompressedLength,
  • getDuplicatePayloadFile,
  • getDuplicatePayloadOffset,
  • getFile,
  • getOffset,
  • getRobotFlags

Popular in Java

  • Updating database using SQL prepared statement
  • putExtra (Intent)
  • getSystemService (Context)
  • orElseThrow (Optional)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • Kernel (java.awt.image)
  • InetAddress (java.net)
    This class represents an Internet Protocol (IP) address. An IP address is either a 32-bit or 128-bit
  • Permission (java.security)
    Abstract class for representing access to a system resource. All permissions have a name (whose inte
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • DecimalFormat (java.text)
    DecimalFormat is a concrete subclass ofNumberFormat that formats decimal numbers. It has a variety o
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now