Class MatchesRegexDecideRule

All Implemented Interfaces:
Serializable, org.archive.spring.HasKeyedProperties
Direct Known Subclasses:
ContentTypeMatchesRegexDecideRule, FetchStatusMatchesRegexDecideRule, HopsPathMatchesRegexDecideRule, MatchesFilePatternDecideRule, NotMatchesRegexDecideRule

public class MatchesRegexDecideRule
extends PredicatedDecideRule
Rule applies configured decision to any CrawlURIs whose String URI matches the supplied regex.
Author:
gojomo
See Also:
Serialized Form
  • Constructor Details

    • MatchesRegexDecideRule

      public MatchesRegexDecideRule()
      Usual constructor.
  • Method Details

    • getRegex

      public Pattern getRegex()
    • setRegex

      public void setRegex​(Pattern regex)
    • evaluate

      protected boolean evaluate​(CrawlURI uri)
      Evaluate whether given object's string version matches configured regex
      Specified by:
      evaluate in class PredicatedDecideRule
      Parameters:
      uri -
      Returns:
      true if regex is matched
    • getString

      protected String getString​(CrawlURI uri)