Search in sources :

Example 1 with PipelineDataStore

use of org.polymap.core.data.PipelineDataStore in project polymap4-core by Polymap4.

the class RStoreCacheReadTest method setUp.

@Before
public void setUp() throws Exception {
    origDs = _ds;
    origFs = origDs.getFeatureSource(_ds.getSchema().getName());
    SimplePipelineBuilder builder = new SimplePipelineBuilder();
    StoreCacheProcessor.SYNC_TYPE.set(builder, FullDataStoreSyncStrategy.class.getSimpleName());
    pipeline = builder.newFeaturePipeline(origFs, StoreCacheProcessor.class, DataSourceProcessor.class);
    pipeDs = new PipelineDataStore(pipeline);
    expected = _expected;
}
Also used : DataSourceProcessor(org.polymap.core.data.feature.DataSourceProcessor) SimplePipelineBuilder(org.polymap.core.data.pipeline.SimplePipelineBuilder) FullDataStoreSyncStrategy(org.polymap.core.data.feature.storecache.FullDataStoreSyncStrategy) StoreCacheProcessor(org.polymap.core.data.feature.storecache.StoreCacheProcessor) PipelineDataStore(org.polymap.core.data.PipelineDataStore) Before(org.junit.Before)

Example 2 with PipelineDataStore

use of org.polymap.core.data.PipelineDataStore in project polymap4-core by Polymap4.

the class ShapefilePipelineReadTest method setUp.

@Before
public void setUp() throws Exception {
    origDs = _ds;
    origFs = _ds.getFeatureSource();
    pipeline = new SimplePipelineBuilder().newFeaturePipeline(origFs, DataSourceProcessor.class);
    pipeDs = new PipelineDataStore(pipeline);
    expected = _expected;
}
Also used : DataSourceProcessor(org.polymap.core.data.feature.DataSourceProcessor) PipelineDataStore(org.polymap.core.data.PipelineDataStore) Before(org.junit.Before)

Example 3 with PipelineDataStore

use of org.polymap.core.data.PipelineDataStore in project polymap4-core by Polymap4.

the class FeatureRenderProcessor2 method init.

@Override
public void init(@SuppressWarnings("hiding") PipelineProcessorSite site) throws Exception {
    this.site = site;
    // styleSupplier
    style = STYLE_SUPPLIER.rawopt(site).orElseGet(() -> {
        log.warn("No style for resource: " + site.dsd.get().resourceName.get());
        return () -> DefaultStyles.findStyle(fs.get());
    });
    // pipeline
    this.pipeline = new CachedLazyInit(() -> {
        try {
            PipelineBuilder builder = site.builder.get();
            DataSourceDescriptor dsd = new DataSourceDescriptor(site.dsd.get());
            return builder.createPipeline(site.layerId.get(), FeaturesProducer.class, dsd).get();
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    });
    // fs
    this.fs = new CachedLazyInit(() -> {
        try {
            return new PipelineDataStore(pipeline.get()).getFeatureSource();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    });
}
Also used : CachedLazyInit(org.polymap.core.runtime.CachedLazyInit) IOException(java.io.IOException) PipelineBuilder(org.polymap.core.data.pipeline.PipelineBuilder) IOException(java.io.IOException) DataSourceDescriptor(org.polymap.core.data.pipeline.DataSourceDescriptor) PipelineDataStore(org.polymap.core.data.PipelineDataStore)

Example 4 with PipelineDataStore

use of org.polymap.core.data.PipelineDataStore in project polymap4-core by Polymap4.

the class ShapefileStoreCacheReadTest method setUp.

@Before
public void setUp() throws Exception {
    origDs = _ds;
    origFs = origDs.getFeatureSource(_ds.getSchema().getName());
    SimplePipelineBuilder builder = new SimplePipelineBuilder();
    StoreCacheProcessor.SYNC_TYPE.set(builder, NoSyncStrategy.class.getSimpleName());
    pipeline = builder.newFeaturePipeline(origFs, StoreCacheProcessor.class, DataSourceProcessor.class);
    pipeDs = new PipelineDataStore(pipeline);
    expected = _expected;
}
Also used : DataSourceProcessor(org.polymap.core.data.feature.DataSourceProcessor) NoSyncStrategy(org.polymap.core.data.feature.storecache.NoSyncStrategy) StoreCacheProcessor(org.polymap.core.data.feature.storecache.StoreCacheProcessor) PipelineDataStore(org.polymap.core.data.PipelineDataStore) Before(org.junit.Before)

Example 5 with PipelineDataStore

use of org.polymap.core.data.PipelineDataStore in project polymap4-core by Polymap4.

the class RPipelineReadTest method setUp.

public void setUp() throws Exception {
    origDs = _ds;
    origFs = _fs;
    pipeline = new SimplePipelineBuilder().newFeaturePipeline(origFs, DataSourceProcessor.class);
    pipeDs = new PipelineDataStore(pipeline);
    expected = _expected;
}
Also used : DataSourceProcessor(org.polymap.core.data.feature.DataSourceProcessor) SimplePipelineBuilder(org.polymap.core.data.pipeline.SimplePipelineBuilder) PipelineDataStore(org.polymap.core.data.PipelineDataStore)

Aggregations

PipelineDataStore (org.polymap.core.data.PipelineDataStore)6 DataSourceProcessor (org.polymap.core.data.feature.DataSourceProcessor)4 Before (org.junit.Before)3 StoreCacheProcessor (org.polymap.core.data.feature.storecache.StoreCacheProcessor)2 SimplePipelineBuilder (org.polymap.core.data.pipeline.SimplePipelineBuilder)2 IOException (java.io.IOException)1 NameImpl (org.geotools.feature.NameImpl)1 Name (org.opengis.feature.type.Name)1 PipelineFeatureSource (org.polymap.core.data.PipelineFeatureSource)1 FullDataStoreSyncStrategy (org.polymap.core.data.feature.storecache.FullDataStoreSyncStrategy)1 NoSyncStrategy (org.polymap.core.data.feature.storecache.NoSyncStrategy)1 DataSourceDescriptor (org.polymap.core.data.pipeline.DataSourceDescriptor)1 Pipeline (org.polymap.core.data.pipeline.Pipeline)1 PipelineBuilder (org.polymap.core.data.pipeline.PipelineBuilder)1 PipelineProcessorSite (org.polymap.core.data.pipeline.PipelineProcessorSite)1 Params (org.polymap.core.data.pipeline.PipelineProcessorSite.Params)1 ProcessorDescriptor (org.polymap.core.data.pipeline.ProcessorDescriptor)1 CachedLazyInit (org.polymap.core.runtime.CachedLazyInit)1 GeoServerServlet (org.polymap.service.geoserver.GeoServerServlet)1