congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
CaptureSearchResult.getRobotFlags
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: iipc/openwayback

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

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

/**
 * test if {@code robotflags} field has flag {@code flag} set.
 * @param flag one flag to test
 * @return {@code true} if {@code flag} is set.
 */
public boolean isRobotFlagSet(char flag) {
  String flags = getRobotFlags();
  return flags != null && flags.indexOf(flag) >= 0;
}
origin: iipc/openwayback

/**
 * test if {@code robotflags} field has flag {@code flag} set.
 * @param flag one flag to test
 * @return {@code true} if {@code flag} is set.
 */
public boolean isRobotFlagSet(char flag) {
  String flags = getRobotFlags();
  return flags != null && flags.indexOf(flag) >= 0;
}
origin: iipc/openwayback

/**
 * test if {@code robotflags} field has flag {@code flag} set.
 * <p>
 * Caveat: if {@code flag} has more than once character,
 * {@code robotflags} must have {@code flag} as its substring
 * for this method to return {@code true} (not really useful).
 * </p>
 * @param flag flag to test
 * @return {@code true} if {@code flag} is set.
 */
public boolean isRobotFlagSet(String flag) {
  String flags = getRobotFlags();
  if (flags == null) {
    return false;
  }
  return flags.contains(flag);
}
origin: org.netpreserve.openwayback/openwayback-core

/**
 * test if {@code robotflags} field has flag {@code flag} set.
 * <p>
 * Caveat: if {@code flag} has more than once character,
 * {@code robotflags} must have {@code flag} as its substring
 * for this method to return {@code true} (not really useful).
 * </p>
 * @param flag flag to test
 * @return {@code true} if {@code flag} is set.
 */
public boolean isRobotFlagSet(String flag) {
  String flags = getRobotFlags();
  if (flags == null) {
    return false;
  }
  return flags.contains(flag);
}
origin: org.netpreserve.openwayback/openwayback-core

protected static boolean hasAnyRobotFlags(CaptureSearchResult capture, String flags) {
  // most capture have no robot flag - do a shortcut.
  if (capture.getRobotFlags() != null) {
    for (int i = 0; i < flags.length(); i++) {
      if (capture.isRobotFlagSet(flags.charAt(i)))
        return true;
    }
  }
  return false;
}
origin: iipc/openwayback

protected static boolean hasAnyRobotFlags(CaptureSearchResult capture, String flags) {
  // most capture have no robot flag - do a shortcut.
  if (capture.getRobotFlags() != null) {
    for (int i = 0; i < flags.length(); i++) {
      if (capture.isRobotFlagSet(flags.charAt(i)))
        return true;
    }
  }
  return false;
}
origin: org.netpreserve.openwayback/openwayback-core

/**
 * Add a flag to {@code robotflags} field.
 * If {@code flag} is already set, this is a no-op.
 * @param flag a flag to add (don't put multiple flags).
 */
public void setRobotFlag(String flag) {
  String flags = getRobotFlags();
  if (flags == null) {
    flags = "";
  }
  if (!flags.contains(flag)) {
    flags = flags + flag;
  }
  setRobotFlags(flags);
}
origin: iipc/openwayback

/**
 * Add a flag to {@code robotflags} field.
 * If {@code flag} is already set, this is a no-op.
 * @param flag a flag to add (don't put multiple flags).
 */
public void setRobotFlag(String flag) {
  String flags = getRobotFlags();
  if (flags == null) {
    flags = "";
  }
  if (!flags.contains(flag)) {
    flags = flags + flag;
  }
  setRobotFlags(flags);
}
origin: iipc/openwayback

/**
 * Add a flag to {@code robotflags} field.
 * If {@code flag} is already set, this is a no-op.
 * @param flag a flag to add
 */
public void setRobotFlag(char flag) {
  String flags = getRobotFlags();
  if (flags == null) {
    setRobotFlags(Character.toString(flag));
  } else {
    if (flags.indexOf(flag) < 0) {
      setRobotFlags(flags + flag);
    }
  }
}
origin: org.netpreserve.openwayback/openwayback-core

/**
 * Add a flag to {@code robotflags} field.
 * If {@code flag} is already set, this is a no-op.
 * @param flag a flag to add
 */
public void setRobotFlag(char flag) {
  String flags = getRobotFlags();
  if (flags == null) {
    setRobotFlags(Character.toString(flag));
  } else {
    if (flags.indexOf(flag) < 0) {
      setRobotFlags(flags + flag);
    }
  }
}
origin: iipc/openwayback

sb.append(DELIMITER);
if(outputRobot) {
  String robotFlags = result.getRobotFlags();
  if(robotFlags == null || robotFlags.equals("")) {
    robotFlags = "-";
origin: org.netpreserve.openwayback/openwayback-core

sb.append(DELIMITER);
if(outputRobot) {
  String robotFlags = result.getRobotFlags();
  if(robotFlags == null || robotFlags.equals("")) {
    robotFlags = "-";
origin: iipc/openwayback

public void testBlock() {
  acClient.policyToReturn = "block";
  // object properties are not really used except for originalUrl.
  CaptureSearchResult capture = new FastCaptureSearchResult();
  capture.setOriginalUrl("http://www.example.com/");
  int rv = cut.filterObject(capture);
  // Now "block" returns FILTER_INCLUDE, "X" flag in robotflags.
  assertEquals(CustomPolicyOracleFilter.FILTER_INCLUDE, rv);
  assertEquals(
    Character.toString(CaptureSearchResult.CAPTURE_ROBOT_BLOCKED),
    capture.getRobotFlags());
}
origin: iipc/openwayback

assertEquals("X", captureX.getRobotFlags());
org.archive.wayback.coreCaptureSearchResultgetRobotFlags

Javadoc

return robot flags field value.

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,
  • getUrlKey

Popular in Java

  • Updating database using SQL prepared statement
  • requestLocationUpdates (LocationManager)
  • getSystemService (Context)
  • setScale (BigDecimal)
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Notification (javax.management)
  • JComboBox (javax.swing)
  • JFileChooser (javax.swing)
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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