use of org.codelibs.fess.crawler.container.StandardCrawlerContainer in project fess-crawler by codelibs.
the class HcHttpClientTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
StandardCrawlerContainer container = new StandardCrawlerContainer().singleton("mimeTypeHelper", //
MimeTypeHelperImpl.class).singleton("dataHelper", //
MemoryDataHelper.class).singleton("urlFilterService", //
UrlFilterServiceImpl.class).singleton("urlFilter", //
UrlFilterImpl.class).singleton("robotsTxtHelper", //
RobotsTxtHelper.class).singleton("httpClient", HcHttpClient.class);
httpClient = container.getComponent("httpClient");
urlFilter = container.getComponent("urlFilter");
}
use of org.codelibs.fess.crawler.container.StandardCrawlerContainer in project fess-crawler by codelibs.
the class ExtractorFactoryTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
StandardCrawlerContainer container = new StandardCrawlerContainer().singleton("tikaExtractor", //
TikaExtractor.class).singleton("pdfExtractor", //
PdfExtractor.class).singleton("lhaExtractor", //
LhaExtractor.class).singleton("extractorFactory", ExtractorFactory.class);
extractorFactory = container.getComponent("extractorFactory");
TikaExtractor tikaExtractor = container.getComponent("tikaExtractor");
LhaExtractor lhaExtractor = container.getComponent("lhaExtractor");
PasswordBasedExtractor pdfExtractor = container.getComponent("pdfExtractor");
extractorFactory.addExtractor("application/msword", tikaExtractor);
extractorFactory.addExtractor("application/vnd.ms-excel", tikaExtractor);
extractorFactory.addExtractor("application/vnd.ms-powerpoint", tikaExtractor);
extractorFactory.addExtractor("application/vnd.visio", tikaExtractor);
extractorFactory.addExtractor("application/pdf", pdfExtractor);
extractorFactory.addExtractor("application/x-lha", lhaExtractor);
extractorFactory.addExtractor("application/x-lharc", lhaExtractor);
}
use of org.codelibs.fess.crawler.container.StandardCrawlerContainer in project fess-crawler by codelibs.
the class HtmlXpathExtractorTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
StandardCrawlerContainer container = new StandardCrawlerContainer().singleton("htmlXpathExtractor", HtmlXpathExtractor.class);
htmlXpathExtractor = container.getComponent("htmlXpathExtractor");
}
use of org.codelibs.fess.crawler.container.StandardCrawlerContainer in project fess-crawler by codelibs.
the class JodExtractorTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
StandardCrawlerContainer container = new StandardCrawlerContainer().singleton("officeManagerConfiguration", //
DefaultOfficeManagerConfiguration.class).singleton("jodExtractor", JodExtractor.class);
jodExtractor = container.getComponent("jodExtractor");
DefaultOfficeManagerConfiguration officeManagerConfiguration = container.getComponent("officeManagerConfiguration");
jodExtractor.officeManager = officeManagerConfiguration.setPortNumber(12002).buildOfficeManager();
}
use of org.codelibs.fess.crawler.container.StandardCrawlerContainer in project fess-crawler by codelibs.
the class LhaExtractorTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
StandardCrawlerContainer container = new StandardCrawlerContainer();
container.singleton("mimeTypeHelper", MimeTypeHelperImpl.class).singleton("tikaExtractor", TikaExtractor.class).singleton("lhaExtractor", LhaExtractor.class).<ExtractorFactory>singleton("extractorFactory", ExtractorFactory.class, factory -> {
TikaExtractor tikaExtractor = container.getComponent("tikaExtractor");
LhaExtractor lhaExtractor = container.getComponent("lhaExtractor");
factory.addExtractor("text/plain", tikaExtractor);
factory.addExtractor("text/html", tikaExtractor);
factory.addExtractor("application/x-lha", lhaExtractor);
});
lhaExtractor = container.getComponent("lhaExtractor");
}
Aggregations