use of org.codelibs.fess.crawler.container.StandardCrawlerContainer in project fess-crawler by codelibs.
the class MsWordExtractorTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
StandardCrawlerContainer container = new StandardCrawlerContainer().singleton("msWordExtractor", MsWordExtractor.class);
msWordExtractor = container.getComponent("msWordExtractor");
}
use of org.codelibs.fess.crawler.container.StandardCrawlerContainer in project fess-crawler by codelibs.
the class TarExtractorTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
StandardCrawlerContainer container = new StandardCrawlerContainer();
container.singleton("archiveStreamFactory", ArchiveStreamFactory.class).singleton("compressorStreamFactory", CompressorStreamFactory.class).singleton("mimeTypeHelper", MimeTypeHelperImpl.class).singleton("tikaExtractor", TikaExtractor.class).singleton("tarExtractor", TarExtractor.class).<ExtractorFactory>singleton("extractorFactory", ExtractorFactory.class, factory -> {
TikaExtractor tikaExtractor = container.getComponent("tikaExtractor");
TarExtractor tarExtractor = container.getComponent("tarExtractor");
factory.addExtractor("text/plain", tikaExtractor);
factory.addExtractor("text/html", tikaExtractor);
factory.addExtractor("application/tar", tarExtractor);
});
tarExtractor = container.getComponent("tarExtractor");
}
use of org.codelibs.fess.crawler.container.StandardCrawlerContainer in project fess-crawler by codelibs.
the class XmlExtractorTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
StandardCrawlerContainer container = new StandardCrawlerContainer().singleton("xmlExtractor", XmlExtractor.class);
xmlExtractor = container.getComponent("xmlExtractor");
}
use of org.codelibs.fess.crawler.container.StandardCrawlerContainer in project fess-crawler by codelibs.
the class ZipExtractorTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
StandardCrawlerContainer container = new StandardCrawlerContainer();
container.singleton("archiveStreamFactory", ArchiveStreamFactory.class).singleton("compressorStreamFactory", CompressorStreamFactory.class).singleton("mimeTypeHelper", MimeTypeHelperImpl.class).singleton("tikaExtractor", TikaExtractor.class).singleton("zipExtractor", ZipExtractor.class).<ExtractorFactory>singleton("extractorFactory", ExtractorFactory.class, factory -> {
TikaExtractor tikaExtractor = container.getComponent("tikaExtractor");
ZipExtractor zipExtractor = container.getComponent("zipExtractor");
factory.addExtractor("text/plain", tikaExtractor);
factory.addExtractor("text/html", tikaExtractor);
factory.addExtractor("application/zip", zipExtractor);
});
zipExtractor = container.getComponent("zipExtractor");
}
use of org.codelibs.fess.crawler.container.StandardCrawlerContainer in project fess-crawler by codelibs.
the class CustomUrlFilterImplTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
StandardCrawlerContainer container = new StandardCrawlerContainer().singleton("dataHelper", //
MemoryDataHelper.class).singleton("urlFilterService", //
UrlFilterServiceImpl.class).singleton("includeFilter", //
UrlFilterImpl.class).singleton("excludeFilter", //
UrlFilterImpl.class).singleton("domainFilter", //
UrlFilterImpl.class);
includeFilter = container.getComponent("includeFilter");
includeFilter.setIncludeFilteringPattern("$1$2$3.*");
excludeFilter = container.getComponent("excludeFilter");
excludeFilter.setExcludeFilteringPattern("$1$2$3.*");
domainFilter = container.getComponent("domainFilter");
domainFilter.setIncludeFilteringPattern("http://$2/.*");
domainFilter.setExcludeFilteringPattern("http://$2/.*");
}
Aggregations