//TODO cache this sampleset
Graph gg = server.graphService.getGraph(surf.routerId);
SampleSet samples = pset.getSampleSet( gg );
final ResultFeature indicator = new ResultFeature(samples, surf);
if (indicator == null) return badServer("Could not compute indicator as requested.");
return Response.ok().entity(new StreamingOutput() {
@Override
public void write(OutputStream output) throws IOException, WebApplicationException {
indicator.writeJson(output);
}
}).build();
}