use of org.polymap.core.data.feature.GetFeaturesRequest in project polymap4-core by Polymap4.
the class PipelineFeatureSource method fetchFeatures.
/**
* Called by {@link SyncPipelineFeatureCollection} to fetch feature chunks.
*/
@SuppressWarnings("hiding")
protected void fetchFeatures(Query query, final FeatureResponseHandler handler) throws Exception {
try {
log.debug("fetchFeatures(): maxFeatures= " + query.getMaxFeatures());
GetFeaturesRequest request = new GetFeaturesRequest(query);
newExecutor().execute(pipeline, request, new ResponseHandler() {
public void handle(ProcessorResponse r) throws Exception {
GetFeaturesResponse response = (GetFeaturesResponse) r;
handler.handle(response.getFeatures());
}
});
} finally {
handler.endOfResponse();
}
}
use of org.polymap.core.data.feature.GetFeaturesRequest in project polymap4-core by Polymap4.
the class FeatureRenameProcessor method featuresRequest.
@Produces(GetFeaturesRequest.class)
public void featuresRequest(GetFeaturesRequest request, ProcessorContext context) throws Exception {
Query transformed = transformQuery(request.getQuery(), context);
context.sendRequest(new GetFeaturesRequest(transformed));
}
Aggregations