use of org.openforis.collect.manager.dataexport.samplingdesign.SamplingDesignExportProcess in project collect by openforis.
the class SamplingPointsController method exportWorkSamplingDesign.
@RequestMapping(value = "api/survey/{surveyId}/sampling_point_data.csv", method = GET)
@ResponseBody
public String exportWorkSamplingDesign(HttpServletResponse response, @PathVariable("surveyId") Integer surveyId) throws IOException {
SamplingDesignExportProcess process = new SamplingDesignExportProcess(samplingDesignManager);
ServletOutputStream out = response.getOutputStream();
CollectSurvey survey = surveyManager.loadSurvey(surveyId);
Controllers.setOutputContent(response, SAMPLING_DESIGN_CSV_FILE_NAME, CSV_CONTENT_TYPE);
process.exportToCSV(out, survey);
return "ok";
}
Aggregations