Package org.apache.nutch.net.urlnormalizer.protocol

# Class ProtocolURLNormalizer

java.lang.Object
org.apache.nutch.net.urlnormalizer.protocol.ProtocolURLNormalizer

All Implemented Interfaces:
  `Configurable`, `URLNormalizer`

public class ProtocolURLNormalizer extends Object implements URLNormalizer
URL normalizer to normalize the protocol for all URLs of a given host or domain, e.g. normalize `http://nutch.apache.org/path/` to `https://www.apache.org/path/` if it's known that the host `nutch.apache.org` supports https and http-URLs either cause duplicate content or are redirected to https. See `org.apache.nutch.net.urlnormalizer.protocol` for details and configuration.

- ## Field Summary

  ### Fields inherited from interface org.apache.nutch.net.URLNormalizer

  `X_POINT_ID`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ProtocolURLNormalizer()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Configuration`
  `getConf()`
  `String`
  `normalize(String url, String scope)`
  `void`
  `setConf(Configuration conf)`

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

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

- ## Constructor Details

  - ### ProtocolURLNormalizer

    public ProtocolURLNormalizer()

- ## Method Details

  - ### getConf

    public Configuration getConf()
    Specified by:
      `getConf` in interface `Configurable`

  - ### setConf

    public void setConf(Configuration conf)
    Specified by:
      `setConf` in interface `Configurable`

  - ### normalize

    public String normalize(String url, String scope) throws MalformedURLException
    Specified by:
      `normalize` in interface `URLNormalizer`
    Throws:
      `MalformedURLException`