Search in sources :

Example 11 with GeoEntryExtractor

use of org.codice.ddf.spatial.geocoding.GeoEntryExtractor in project ddf by codice.

the class IndexInitializerTest method setUp.

@Before
public void setUp() throws Exception {
    GeoEntryExtractor extractor = mock(GeoEntryExtractor.class);
    indexer = mock(GeoEntryIndexer.class);
    executor = mock(ExecutorService.class);
    indexInitializer = new IndexInitializer(new Security());
    indexInitializer.setExecutor(executor);
    indexInitializer.setExtractor(extractor);
    indexInitializer.setIndexer(indexer);
    File dataDir = tempDir.newFolder("data");
    geonamesZip = new File(dataDir, "default_geonames_data.zip");
    geoIndexDir = new File(dataDir, "geonames-index");
    indexInitializer.setDefaultGeoNamesDataPath(geonamesZip.getAbsolutePath());
}
Also used : GeoEntryIndexer(org.codice.ddf.spatial.geocoding.GeoEntryIndexer) ExecutorService(java.util.concurrent.ExecutorService) Security(org.codice.ddf.security.impl.Security) File(java.io.File) GeoEntryExtractor(org.codice.ddf.spatial.geocoding.GeoEntryExtractor) Before(org.junit.Before)

Aggregations

GeoEntryExtractor (org.codice.ddf.spatial.geocoding.GeoEntryExtractor)11 GeoEntryIndexer (org.codice.ddf.spatial.geocoding.GeoEntryIndexer)8 ProgressCallback (org.codice.ddf.spatial.geocoding.ProgressCallback)8 GeoEntryExtractionException (org.codice.ddf.spatial.geocoding.GeoEntryExtractionException)7 Test (org.junit.Test)7 GeoEntryIndexingException (org.codice.ddf.spatial.geocoding.GeoEntryIndexingException)6 ArrayList (java.util.ArrayList)5 List (java.util.List)5 Matchers.containsString (org.hamcrest.Matchers.containsString)5 GeoEntry (org.codice.ddf.spatial.geocoding.GeoEntry)4 ExtractionCallback (org.codice.ddf.spatial.geocoding.GeoEntryExtractor.ExtractionCallback)4 GeoNamesRemoteDownloadException (org.codice.ddf.spatial.geocoding.GeoNamesRemoteDownloadException)3 Matchers.anyString (org.mockito.Matchers.anyString)3 Before (org.junit.Before)2 ArgumentMatchers.anyString (org.mockito.ArgumentMatchers.anyString)2 Metacard (ddf.catalog.data.Metacard)1 File (java.io.File)1 PrintStream (java.io.PrintStream)1 Locale (java.util.Locale)1 ExecutorService (java.util.concurrent.ExecutorService)1