Package org.apache.nutch.net

# Class URLFilters

java.lang.Object
org.apache.nutch.net.URLFilters

public class URLFilters extends Object
Creates and caches plugins implementing `URLFilter`. Filters URLs using the active filters defined by the properties "plugin.includes", "plugin.excludes" and "urlfilter.order".

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `URLFILTER_ORDER`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `URLFilters(Configuration conf)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `filter(String urlString)`
  Run all defined filters.
  `URLFilter[]`
  `getFilters()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### URLFILTER_ORDER

    public static final String URLFILTER_ORDER
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### URLFilters

    public URLFilters(Configuration conf)

- ## Method Details

  - ### getFilters

    public URLFilter[] getFilters()

  - ### filter

    public String filter(String urlString) throws URLFilterException
    Run all defined filters. Assume logical AND. To control performance, the ULFilter classes can be ordered by the property "urlfilter.order".
    Parameters:
      `urlString` - to execute filters on
    Returns:
      filtered result
    Throws:
      `URLFilterException` - if there is an issue executing any URLFilter implementations.