Search in sources :

Example 1 with DataCleansingReportForm

use of org.openforis.collect.datacleansing.form.DataCleansingReportForm in project collect by openforis.

the class DataCleansingChainController method loadReports.

@RequestMapping(value = "{chainId}/reports.json", method = RequestMethod.GET)
@ResponseBody
public List<DataCleansingReportForm> loadReports(@PathVariable int chainId) {
    CollectSurvey survey = sessionManager.getActiveSurvey();
    DataCleansingChain chain = itemManager.loadById(survey, chainId);
    List<DataCleansingReport> reports = reportManager.loadByCleansingChain(chain);
    List<DataCleansingReportForm> forms = Forms.toForms(reports, DataCleansingReportForm.class);
    return forms;
}
Also used : DataCleansingChain(org.openforis.collect.datacleansing.DataCleansingChain) DataCleansingReportForm(org.openforis.collect.datacleansing.form.DataCleansingReportForm) CollectSurvey(org.openforis.collect.model.CollectSurvey) DataCleansingReport(org.openforis.collect.datacleansing.DataCleansingReport) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Aggregations

DataCleansingChain (org.openforis.collect.datacleansing.DataCleansingChain)1 DataCleansingReport (org.openforis.collect.datacleansing.DataCleansingReport)1 DataCleansingReportForm (org.openforis.collect.datacleansing.form.DataCleansingReportForm)1 CollectSurvey (org.openforis.collect.model.CollectSurvey)1 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)1 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)1