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

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

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

origin: iipc/openwayback

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

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

private int remember(CaptureSearchResult o) {
  memory.put(o.getDigest(),o);
  return FILTER_INCLUDE;
}
origin: org.netpreserve.openwayback/openwayback-core

private int remember(CaptureSearchResult o) {
  memory.put(o.getDigest(),o);
  return FILTER_INCLUDE;
}
origin: iipc/openwayback

public int filterObject(CaptureSearchResult o) {
  if(o.getFile().equals(EMPTY_VALUE)) {
    if(o.getDigest().equals(EMPTY_SHA1)) {
      return annotate(o);
    }
    return FILTER_INCLUDE;
  }
  return remember(o);
}
origin: org.netpreserve.openwayback/openwayback-core

public int filterObject(CaptureSearchResult o) {
  if(o.getFile().equals(EMPTY_VALUE)) {
    if(o.getDigest().equals(EMPTY_SHA1)) {
      return annotate(o);
    }
    return FILTER_INCLUDE;
  }
  return remember(o);
}
origin: org.netpreserve.openwayback/openwayback-core

private int annotate(CaptureSearchResult o) {
  o.flagDuplicateDigest();
  
  String thisDigest = o.getDigest();
  CaptureSearchResult last = memory.get(thisDigest);
  if (last == null) {
    if (LOGGER.isLoggable(Level.FINER)) {
      LOGGER.finer("did not find matching digest in previous fetch of url, hopefully it's a new-style revisit - "
          + o.getCaptureTimestamp() + " " + o.getOriginalUrl());
    }
    return FILTER_INCLUDE;
  }
  
  o.flagDuplicateDigest(last);
  
  return FILTER_INCLUDE;
}
origin: iipc/openwayback

private int annotate(CaptureSearchResult o) {
  o.flagDuplicateDigest();
  
  String thisDigest = o.getDigest();
  CaptureSearchResult last = memory.get(thisDigest);
  if (last == null) {
    if (LOGGER.isLoggable(Level.FINER)) {
      LOGGER.finer("did not find matching digest in previous fetch of url, hopefully it's a new-style revisit - "
          + o.getCaptureTimestamp() + " " + o.getOriginalUrl());
    }
    return FILTER_INCLUDE;
  }
  
  o.flagDuplicateDigest(last);
  
  return FILTER_INCLUDE;
}
origin: iipc/openwayback

sb.append(result.getHttpCode());
sb.append(DELIMITER);
sb.append(result.getDigest());
sb.append(DELIMITER);
sb.append(result.getRedirectUrl());
origin: iipc/openwayback

String currHash = currentClosest.getDigest();
String prevHash = prev.getDigest();
String nextHash = next.getDigest();
boolean prevSameHash = (prevHash.equals(currHash));
boolean nextSameHash = (nextHash.equals(currHash));
origin: org.netpreserve.openwayback/openwayback-core

sb.append(result.getHttpCode());
sb.append(DELIMITER);
sb.append(result.getDigest());
sb.append(DELIMITER);
sb.append(result.getRedirectUrl());
origin: org.netpreserve.openwayback/openwayback-core

String currHash = currentClosest.getDigest();
String prevHash = prev.getDigest();
String nextHash = next.getDigest();
boolean prevSameHash = (prevHash.equals(currHash));
boolean nextSameHash = (nextHash.equals(currHash));
origin: iipc/openwayback

valSB.append(result.getHttpCode());
valSB.append(DELIMITER);
valSB.append(result.getDigest());
valSB.append(DELIMITER);
valSB.append(result.getRedirectUrl());
origin: org.netpreserve.openwayback/openwayback-core

valSB.append(result.getHttpCode());
valSB.append(DELIMITER);
valSB.append(result.getDigest());
valSB.append(DELIMITER);
valSB.append(result.getRedirectUrl());
origin: iipc/openwayback

@Override
public int filterObject(CaptureSearchResult o) {
  String thisHash = o.getDigest();
  int result = FILTER_INCLUDE;
  
  // Only start filtering after minThreshold captures
  if (++numCaptures <= minThreshold) {
    return result;
  }
      
  Integer count = cache.remove(thisHash);
  
  if (count == null) {
    cache.put(thisHash, 1);
  } else {
    if (count >= maxDupeHashes) {
      result = FILTER_EXCLUDE;
      cache.put(thisHash, count);
    } else {
      cache.put(thisHash, count + 1);
    }
  }
  
  return result;
}
origin: org.netpreserve.openwayback/openwayback-core

@Override
public int filterObject(CaptureSearchResult o) {
  String thisHash = o.getDigest();
  int result = FILTER_INCLUDE;
  
  // Only start filtering after minThreshold captures
  if (++numCaptures <= minThreshold) {
    return result;
  }
      
  Integer count = cache.remove(thisHash);
  
  if (count == null) {
    cache.put(thisHash, 1);
  } else {
    if (count >= maxDupeHashes) {
      result = FILTER_EXCLUDE;
      cache.put(thisHash, count);
    } else {
      cache.put(thisHash, count + 1);
    }
  }
  
  return result;
}
origin: iipc/openwayback

String lastCapture = firstCapture;
HashMap<String,Object> digests = new HashMap<String,Object>();
digests.put(captureResult.getDigest(),null);
int numCaptures = 1;
    digests.put(captureResult.getDigest(), null);
origin: iipc/openwayback

private int annotate(CaptureSearchResult o) {
  if(lastSeen == null) {
    // TODO: log missing record digest reference
    return FILTER_EXCLUDE;
  }
  o.setFile(lastSeen.getFile());
  o.setOffset(lastSeen.getOffset());
  o.setDigest(lastSeen.getDigest());
  o.setHttpCode(lastSeen.getHttpCode());
  o.setMimeType(lastSeen.getMimeType());
  o.setRedirectUrl(lastSeen.getRedirectUrl());
  o.flagDuplicateHTTP(lastSeen.getCaptureTimestamp());
  return FILTER_INCLUDE;
}
origin: org.netpreserve.openwayback/openwayback-core

private int annotate(CaptureSearchResult o) {
  if(lastSeen == null) {
    // TODO: log missing record digest reference
    return FILTER_EXCLUDE;
  }
  o.setFile(lastSeen.getFile());
  o.setOffset(lastSeen.getOffset());
  o.setDigest(lastSeen.getDigest());
  o.setHttpCode(lastSeen.getHttpCode());
  o.setMimeType(lastSeen.getMimeType());
  o.setRedirectUrl(lastSeen.getRedirectUrl());
  o.flagDuplicateHTTP(lastSeen.getCaptureTimestamp());
  return FILTER_INCLUDE;
}
origin: iipc/openwayback

assertEquals("http://foo.com",c.getOriginalUrl());
assertEquals(12,c.getOffset());
assertEquals("10",c.getDigest());
assertEquals("http://foo.com",c.getOriginalUrl());
assertEquals(12,c.getOffset());
assertEquals("10",c.getDigest());
assertEquals("10",c.getDigest());
org.archive.wayback.coreCaptureSearchResultgetDigest

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
  • getDuplicatePayload
  • getCaptureTimestamp,
  • 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
  • 14 Best Plugins for Eclipse
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