use of org.openforis.collect.datacleansing.DataCleansingStep in project collect by openforis.
the class DataCleansingChainController method copyFormIntoItem.
@Override
protected void copyFormIntoItem(DataCleansingChainForm form, DataCleansingChain item) {
super.copyFormIntoItem(form, item);
item.removeAllSteps();
for (Integer stepId : form.getStepIds()) {
DataCleansingStep step = new DataCleansingStep((CollectSurvey) item.getSurvey());
step.setId(stepId);
item.addStep(step);
}
}
use of org.openforis.collect.datacleansing.DataCleansingStep in project collect by openforis.
the class DataCleansingStepController method run.
@RequestMapping(value = "run.json", method = RequestMethod.POST)
@ResponseBody
public DataCleangingChainExecutorJobView run(@RequestParam int cleansingStepId, @RequestParam Step recordStep) {
CollectSurvey survey = sessionManager.getActiveSurvey();
DataCleansingStep cleansingStep = dataCleansingStepManager.loadById(survey, cleansingStepId);
DataCleansingChain chain = new DataCleansingChain(survey);
chain.addStep(cleansingStep);
DataCleansingChainExecutorJob job = collectJobManager.createJob(DataCleansingChainExecutorJob.class);
job.setSurvey(survey);
job.setChain(chain);
job.setRecordStep(recordStep);
collectJobManager.startSurveyJob(job);
return new DataCleangingChainExecutorJobView(job);
}
Aggregations