Search in sources :

Example 1 with StandardCrawlerContainer

use of org.codelibs.fess.crawler.container.StandardCrawlerContainer in project fess-crawler by codelibs.

the class SitemapsRuleTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    StandardCrawlerContainer container = new StandardCrawlerContainer().singleton("sitemapsHelper", // 
    SitemapsHelper.class).singleton("sitemapsRule", SitemapsRule.class);
    sitemapsRule = container.getComponent("sitemapsRule");
}
Also used : StandardCrawlerContainer(org.codelibs.fess.crawler.container.StandardCrawlerContainer) SitemapsHelper(org.codelibs.fess.crawler.helper.SitemapsHelper)

Example 2 with StandardCrawlerContainer

use of org.codelibs.fess.crawler.container.StandardCrawlerContainer in project fess-crawler by codelibs.

the class DataServiceImplTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    StandardCrawlerContainer container = new StandardCrawlerContainer().singleton("dataHelper", // 
    MemoryDataHelper.class).singleton("dataService", DataServiceImpl.class);
    dataService = container.getComponent("dataService");
}
Also used : StandardCrawlerContainer(org.codelibs.fess.crawler.container.StandardCrawlerContainer) MemoryDataHelper(org.codelibs.fess.crawler.helper.MemoryDataHelper)

Example 3 with StandardCrawlerContainer

use of org.codelibs.fess.crawler.container.StandardCrawlerContainer in project fess-crawler by codelibs.

the class CrawlerClientFactoryTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    StandardCrawlerContainer container = new StandardCrawlerContainer().singleton("mimeTypeHelper", // 
    MimeTypeHelperImpl.class).singleton("httpClient", // 
    FaultTolerantClient.class).singleton("fsClient", // 
    FileSystemClient.class).singleton("smbClient", // 
    SmbClient.class).singleton("clientFactory", CrawlerClientFactory.class);
    clientFactory = container.getComponent("clientFactory");
    FaultTolerantClient httpClient = container.getComponent("httpClient");
    httpClient.setCrawlerClient(new HcHttpClient());
    clientFactory.addClient("http:.*", httpClient);
    clientFactory.addClient("https:.*", httpClient);
    clientFactory.addClient("file:.*", container.getComponent("fsClient"));
    clientFactory.addClient("smb:.*", container.getComponent("smbClient"));
}
Also used : HcHttpClient(org.codelibs.fess.crawler.client.http.HcHttpClient) SmbClient(org.codelibs.fess.crawler.client.smb.SmbClient) StandardCrawlerContainer(org.codelibs.fess.crawler.container.StandardCrawlerContainer)

Example 4 with StandardCrawlerContainer

use of org.codelibs.fess.crawler.container.StandardCrawlerContainer in project fess-crawler by codelibs.

the class FileSystemClientTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    StandardCrawlerContainer container = new StandardCrawlerContainer().singleton("mimeTypeHelper", // 
    MimeTypeHelperImpl.class).singleton("fsClient", FileSystemClient.class);
    fsClient = container.getComponent("fsClient");
}
Also used : StandardCrawlerContainer(org.codelibs.fess.crawler.container.StandardCrawlerContainer) MimeTypeHelperImpl(org.codelibs.fess.crawler.helper.impl.MimeTypeHelperImpl)

Example 5 with StandardCrawlerContainer

use of org.codelibs.fess.crawler.container.StandardCrawlerContainer in project fess-crawler by codelibs.

the class FtpClientTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    StandardCrawlerContainer container = new StandardCrawlerContainer().singleton("mimeTypeHelper", // 
    MimeTypeHelperImpl.class).singleton("ftpClient", FtpClient.class);
    ftpClient = container.getComponent("ftpClient");
}
Also used : StandardCrawlerContainer(org.codelibs.fess.crawler.container.StandardCrawlerContainer) MimeTypeHelperImpl(org.codelibs.fess.crawler.helper.impl.MimeTypeHelperImpl)

Aggregations

StandardCrawlerContainer (org.codelibs.fess.crawler.container.StandardCrawlerContainer)32 MimeTypeHelperImpl (org.codelibs.fess.crawler.helper.impl.MimeTypeHelperImpl)9 ExtractorFactory (org.codelibs.fess.crawler.extractor.ExtractorFactory)7 TikaExtractor (org.codelibs.fess.crawler.extractor.impl.TikaExtractor)3 MemoryDataHelper (org.codelibs.fess.crawler.helper.MemoryDataHelper)3 SitemapsHelper (org.codelibs.fess.crawler.helper.SitemapsHelper)3 UrlFilterServiceImpl (org.codelibs.fess.crawler.service.impl.UrlFilterServiceImpl)3 File (java.io.File)2 ArchiveStreamFactory (org.apache.commons.compress.archivers.ArchiveStreamFactory)2 ResourceUtil (org.codelibs.core.io.ResourceUtil)2 HcHttpClient (org.codelibs.fess.crawler.client.http.HcHttpClient)2 RobotsTxtHelper (org.codelibs.fess.crawler.helper.RobotsTxtHelper)2 CrawlerWebServer (org.codelibs.fess.crawler.util.CrawlerWebServer)2 PlainTestCase (org.dbflute.utflute.core.PlainTestCase)2 Iterator (java.util.Iterator)1 Map (java.util.Map)1 Set (java.util.Set)1 TimeUnit (java.util.concurrent.TimeUnit)1 Resource (javax.annotation.Resource)1 GenericObjectPool (org.apache.commons.pool2.impl.GenericObjectPool)1