Class PatternURLFilter

All Implemented Interfaces:
Filter<URL>

public class PatternURLFilter extends AbstractPatternFilter<URL>
AbstractPatternFilter matching the string of URLs with to a set of Regular expressions.
Since:
2.0
  • Field Details

    • NORMALIZED_URL_CONVERTER

      public static final StringConverter<URL> NORMALIZED_URL_CONVERTER
      Converter returning each URL's toString() form, after normalizing it, using the algorithm toConvert.toURI().normalize().toURL().toString();
  • Constructor Details

    • PatternURLFilter

      public PatternURLFilter(List<String> patternStrings)
      Creates a new ExclusionRegularExpressionURLFilter using the supplied patternStrings which are matched against each full - normalized - URL. The NORMALIZED_URL_CONVERTER is used to convert URLs to strings.
      Parameters:
      patternStrings - The list of patternStrings to be used as regular expression matchers against the normalized URLs.
      See Also:
    • PatternURLFilter

      public PatternURLFilter(boolean processNullValues, String patternPrefix, List<String> patterns, StringConverter<URL> converter, boolean acceptCandidateOnPatternMatch)
      Compound constructor creating an ExclusionRegularExpressionURLFilter from the supplied parameters.
      Parameters:
      processNullValues - if true, this ExclusionRegularExpressionURLFilter process null candidate values.
      patternPrefix - a prefix to be prepended to any patterns submitted to this PatternURLFilter.
      patterns - The non-null list of Patters which should be applied within this ExclusionRegularExpressionURLFilter. A candidate of type T should only be accepted by this ExclusionRegularExpressionURLFilter if all supplied patterns matchAtLeastOnce the candidate.
      converter - The StringConverter used to convert T-type objects to Strings which should be matched by all supplied Patterns to T-object candidates.
      acceptCandidateOnPatternMatch - if true, this ExclusionRegularExpressionURLFilter will matchAtLeastOnce candidate objects that match at least one of the supplied patterns. if false, this ExclusionRegularExpressionURLFilter will noFilterMatches candidates that match at least one of the supplied patterns.