View Javadoc

    1   /**
    2    *
    3    */
    4   package org.apache.any23.plugin.htmlscraper;
    5
    6   import java.util.Arrays;
    7
    8   import org.apache.any23.extractor.ExtractorDescription;
    9   import org.apache.any23.extractor.ExtractorFactory;
    10  import org.apache.any23.extractor.SimpleExtractorFactory;
    11  import org.apache.any23.rdf.Prefixes;
    12
    13  /**
    14   * @author Peter Ansell p_ansell@yahoo.com
    15   *
    16   */
    17  public class HTMLScraperExtractorFactory extends SimpleExtractorFactory<HTMLScraperExtractor> implements
    18          ExtractorFactory<HTMLScraperExtractor> {
    19
    20      public static final String NAME = "html-scraper";
    21
    22      public static final Prefixes PREFIXES = null;
    23
    24      private static final ExtractorDescription descriptionInstance = new HTMLScraperExtractorFactory();
    25
    26      public HTMLScraperExtractorFactory() {
    27          super(
    28                  HTMLScraperExtractorFactory.NAME,
    29                  HTMLScraperExtractorFactory.PREFIXES,
    30                  Arrays.asList("text/html;q=0.02", "application/xhtml+xml;q=0.02"),
    31                  null);
    32      }
    33
    34      @Override
    35      public HTMLScraperExtractor createExtractor() {
    36          return new HTMLScraperExtractor();
    37      }
    38
    39      public static ExtractorDescription getDescriptionInstance() {
    40          return descriptionInstance;
    41      }
    42  }