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);
}
}
}