Package net.sf.jpluck.spider

Source Code of net.sf.jpluck.spider.FeedParser

package net.sf.jpluck.spider;

import net.sf.jpluck.handlers.ContentHandler;
import net.sf.jpluck.handlers.ContentHandlerFactory;
import net.sf.jpluck.handlers.FeedHandler;


class FeedParser extends Parser {
  public FeedParser(Spider spider, Resource resource) {
    super(spider, resource);
  }

  protected ContentHandler getContentHandler() {
    if ((resource.getLevel() == 0) && !resource.getMimeType().startsWith("image/")) {
      return new FeedHandler(spider.pluckerDocument, spider.jxlDocument, resource);
    } else {
      return ContentHandlerFactory.createHandler(spider.pluckerDocument, spider.jxlDocument, resource);
    }
  }
}
TOP

Related Classes of net.sf.jpluck.spider.FeedParser

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.