Package com.ontometrics.scraper.extraction

Source Code of com.ontometrics.scraper.extraction.SimpleSourceExtractor

package com.ontometrics.scraper.extraction;

import java.io.IOException;
import java.net.URL;

import net.htmlparser.jericho.Source;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class SimpleSourceExtractor implements SourceExtractor {

  private Logger log = LoggerFactory.getLogger(SimpleSourceExtractor.class);

  @Override
  public Source getSource(URL url) {
    Source source = null;
    try {
      source = new Source(url);
    } catch (IOException e) {
      log.error("Error extracting source: {}", e.toString());
    }
    return source;
  }

}
TOP

Related Classes of com.ontometrics.scraper.extraction.SimpleSourceExtractor

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.