use of org.polymap.core.data.feature.GetFeatureTypeRequest in project polymap4-core by Polymap4.
the class PipelineFeatureSource method buildFeatureType.
@Override
protected SimpleFeatureType buildFeatureType() throws IOException {
// FIXME caching schema is not allowed since the pipeline and/or processors
// may change; maybe we could add a listener API to the pipeline
// avoid synchronize; doing this in parallel is ok
GetFeatureTypeRequest request = new GetFeatureTypeRequest();
try {
final FeatureType[] type = new FeatureType[1];
newExecutor().execute(pipeline, request, (ProcessorResponse r) -> {
GetFeatureTypeResponse response = (GetFeatureTypeResponse) r;
type[0] = response.getFeatureType();
});
return (SimpleFeatureType) type[0];
} catch (Exception e) {
Throwables.propagateIfInstanceOf(e, IOException.class);
throw Throwables.propagate(e);
}
}
Aggregations