use of com.odysseusinc.arachne.portal.model.SubmissionGroup in project ArachneCentralAPI by OHDSI.
the class SubmissionGroupToSubmissionGroupDTOConverter method convert.
@Override
public SubmissionGroupDTO convert(SubmissionGroup submissionGroup) {
SubmissionGroupDTO dto = new SubmissionGroupDTO();
dto.setId(submissionGroup.getId());
dto.setCreated(submissionGroup.getCreated());
if (conversionService.canConvert(Submission.class, SubmissionDTO.class)) {
List<SubmissionDTO> submissions = submissionGroup.getSubmissions().stream().map(s -> conversionService.convert(s, SubmissionDTO.class)).collect(Collectors.toList());
dto.setSubmissions(submissions);
}
dto.setQueryFilesCount(submissionGroup.getFiles().size());
dto.setChecksum(submissionGroup.getChecksum());
dto.setAnalysisType(submissionGroup.getAnalysisType());
return dto;
}
use of com.odysseusinc.arachne.portal.model.SubmissionGroup in project ArachneCentralAPI by OHDSI.
the class AnalysisHelperTest method cleanup.
private void cleanup(List<Submission> submissions, Analysis analysis, Study study) {
SubmissionGroup group = submissions.iterator().next().getSubmissionGroup();
group.getFiles().forEach(file -> FileUtils.deleteQuietly(analysisHelper.getSubmissionFile(file).toFile()));
analysis.getFiles().forEach(analysisFile -> FileUtils.deleteQuietly(analysisHelper.getAnalysisFolder(analysis).resolve(analysisFile.getUuid()).toFile()));
analysisFileRepository.deleteAll();
submissionFileRepository.deleteAll();
studyRepository.delete(study);
}
Aggregations