congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
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

  • Reading from database using SQL prepared statement
  • getContentResolver (Context)
  • getApplicationContext (Context)
  • findViewById (Activity)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Top 12 Jupyter Notebook Extensions
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