Class BasicURLNormalizer
java.lang.Object
org.apache.nutch.net.urlnormalizer.basic.BasicURLNormalizer
- All Implemented Interfaces:
Configurable,URLNormalizer
Converts URLs to a normal form:
- remove dot segments in path:
/./or/../ - remove default ports, e.g. 80 for protocol
http:// - normalize percent-encoding in URL paths
- normalize the host name if it is an Internationalized Domain Name (IDN)
to ASCII or Unicode, depending on the configuration properties
urlnormalizer.basic.host.idnandurlnormalizer.basic.host.idna2008 - remove a trailing dot in the host name (if the property
urlnormalizer.basic.host.trim-trailing-dotis true)
-
Field Summary
FieldsFields inherited from interface org.apache.nutch.net.URLNormalizer
X_POINT_ID -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
NORM_HOST_IDN
- See Also:
-
NORM_HOST_IDNA_2008
- See Also:
-
NORM_HOST_TRIM_TRAILING_DOT
- See Also:
-
-
Constructor Details
-
BasicURLNormalizer
public BasicURLNormalizer()
-
-
Method Details
-
getConf
- Specified by:
getConfin interfaceConfigurable
-
setConf
- Specified by:
setConfin interfaceConfigurable
-
normalize
- Specified by:
normalizein interfaceURLNormalizer- Throws:
MalformedURLException
-
main
- Throws:
IOException
-