org.apache.nutch.tools

## Class DmozParser

- java.lang.Object
- - org.apache.nutch.tools.DmozParser

-     public class DmozParser
      extends java.lang.Object

  Utility that converts DMOZ RDF into a flat file of URLs to be injected.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DmozParser()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `main(java.lang.String[] argv)` Command-line access.
    `void` | `parseDmozFile(java.io.File dmozFile, int subsetDenom, boolean includeAdult, int skew, java.util.regex.Pattern topicPattern)` Iterate through all the items in this structured DMOZ file.

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

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

- - ### Constructor Detail

    - #### DmozParser

          public DmozParser()

  - ### Method Detail

    - #### parseDmozFile

          public void parseDmozFile(java.io.File dmozFile,
                                    int subsetDenom,
                                    boolean includeAdult,
                                    int skew,
                                    java.util.regex.Pattern topicPattern)
                             throws java.io.IOException,
                                    org.xml.sax.SAXException,
                                    javax.xml.parsers.ParserConfigurationException

      Iterate through all the items in this structured DMOZ file. Add each URL to the web db.
      Throws:
        `java.io.IOException`
        `org.xml.sax.SAXException`
        `javax.xml.parsers.ParserConfigurationException`

    - #### main

          public static void main(java.lang.String[] argv)
                           throws java.lang.Exception

      Command-line access. User may add URLs via a flat text file or the structured DMOZ file. By default, we ignore Adult material (as categorized by DMOZ).
      Throws:
        `java.lang.Exception`

Copyright © 2019 The Apache Software Foundation