use of org.polymap.core.data.feature.GetFeaturesSizeRequest in project polymap4-core by Polymap4.
the class PipelineFeatureSource method getCountInternal.
@Override
@SuppressWarnings("hiding")
protected int getCountInternal(Query query) throws IOException {
GetFeaturesSizeRequest request = new GetFeaturesSizeRequest(query);
try {
final int[] result = new int[1];
newExecutor().execute(pipeline, request, (ProcessorResponse r) -> {
GetFeaturesSizeResponse response = (GetFeaturesSizeResponse) r;
result[0] = response.getSize();
});
return result[0];
} catch (Exception e) {
Throwables.propagateIfInstanceOf(e, IOException.class);
throw Throwables.propagate(e);
}
}
use of org.polymap.core.data.feature.GetFeaturesSizeRequest in project polymap4-core by Polymap4.
the class FeatureRenameProcessor method featuresSizeRequest.
@Produces(GetFeaturesSizeRequest.class)
public void featuresSizeRequest(GetFeaturesSizeRequest request, ProcessorContext context) throws Exception {
Query transformed = transformQuery(request.getQuery(), context);
context.sendRequest(new GetFeaturesSizeRequest(transformed));
}
Aggregations