use of org.polymap.core.data.pipeline.Produces 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));
}
use of org.polymap.core.data.pipeline.Produces in project polymap4-core by Polymap4.
the class FeatureRenameProcessor method boundsRequest.
@Produces(GetBoundsRequest.class)
public void boundsRequest(GetBoundsRequest request, ProcessorContext context) throws Exception {
Query transformed = transformQuery(request.query.get(), context);
context.sendRequest(new GetBoundsRequest(transformed));
}
use of org.polymap.core.data.pipeline.Produces in project polymap4-core by Polymap4.
the class FeatureRenameProcessor method featureTypeResponse.
@Produces(GetFeatureTypeResponse.class)
public void featureTypeResponse(GetFeatureTypeResponse response, ProcessorContext context) throws Exception {
assert this.srcSchema == null;
this.srcSchema = response.getFeatureType();
SimpleFeatureTypeBuilder builder = new SimpleFeatureTypeBuilder();
builder.init((SimpleFeatureType) srcSchema);
builder.setName(name);
schema = builder.buildFeatureType();
context.sendResponse(new GetFeatureTypeResponse(schema));
}
use of org.polymap.core.data.pipeline.Produces in project polymap4-core by Polymap4.
the class ImageDecodeProcessor method decodeImageResponse.
/**
* Collect enoded image chunks.
*/
@Produces(ImageResponse.class)
@Consumes(EncodedImageResponse.class)
public void decodeImageResponse(EncodedImageResponse response, ProcessorContext context) throws Exception {
ByteArrayOutputStream data = (ByteArrayOutputStream) context.get("data");
if (data == null) {
data = new ByteArrayOutputStream(64 * 1024);
context.put("data", data);
}
data.write(response.getChunk(), 0, response.getChunkSize());
}
use of org.polymap.core.data.pipeline.Produces in project polymap4-core by Polymap4.
the class FeatureRenameProcessor method featureTypeRequest.
@Produces(GetFeatureTypeRequest.class)
public void featureTypeRequest(GetFeatureTypeRequest request, ProcessorContext context) throws Exception {
// and init target schema on response
if (schema == null) {
context.sendRequest(request);
} else {
context.sendResponse(new GetFeatureTypeResponse(schema));
context.sendResponse(ProcessorResponse.EOP);
}
}
Aggregations