org.apache.nutch.urlfilter.prefix

## Class PrefixURLFilter

- java.lang.Object
- - org.apache.nutch.urlfilter.prefix.PrefixURLFilter

- All Implemented Interfaces:
    Configurable, URLFilter, Pluggable

      public class PrefixURLFilter
      extends java.lang.Object
      implements URLFilter

  Filters URLs based on a file of URL prefixes. The file is named by (1) property "urlfilter.prefix.file" in ./conf/nutch-default.xml, and (2) attribute "file" in plugin.xml of this plugin Attribute "file" has higher precedence if defined.

  The format of this file is one URL prefix per line.

- - ### Field Summary

    - ### Fields inherited from interface org.apache.nutch.net.URLFilter

      `X_POINT_ID`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PrefixURLFilter()`
    `PrefixURLFilter(java.lang.String stringRules)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `filter(java.lang.String url)`
    `Configuration` | `getConf()`
    `static void` | `main(java.lang.String[] args)`
    `void` | `setConf(Configuration conf)`

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

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

- - ### Constructor Detail

    - #### PrefixURLFilter

          public PrefixURLFilter()
                          throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### PrefixURLFilter

          public PrefixURLFilter(java.lang.String stringRules)
                          throws java.io.IOException

      Throws:
        `java.io.IOException`

  - ### Method Detail

    - #### filter

          public java.lang.String filter(java.lang.String url)

      Specified by:
        `filter` in interface `URLFilter`

    - #### main

          public static void main(java.lang.String[] args)
                           throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### setConf

          public void setConf(Configuration conf)

      Specified by:
        `setConf` in interface `Configurable`

    - #### getConf

          public Configuration getConf()

      Specified by:
        `getConf` in interface `Configurable`

Copyright © 2019 The Apache Software Foundation