use of com.odysseusinc.arachne.portal.api.v1.dto.BaseAnalysisDTO in project ArachneCentralAPI by OHDSI.
the class AnalysisToBaseAnalysisDTOConverter method convert.
@Override
public BaseAnalysisDTO convert(Analysis source) {
ShortBaseAnalysisDTO baseDTO = conversionService.convert(source, ShortBaseAnalysisDTO.class);
BaseAnalysisDTO analysisDTO = new BaseAnalysisDTO(baseDTO);
analysisDTO.setAuthor(conversionService.convert(source.getAuthor(), UserInfoDTO.class));
analysisDTO.setTitle(source.getTitle());
analysisDTO.setDescription(source.getDescription());
analysisDTO.setUpdated(source.getUpdated());
analysisDTO.setStudy(conversionService.convert(source.getStudy(), StudyShortDTO.class));
analysisDTO.setPermissions(conversionService.convert(source, PermissionsDTO.class));
return analysisDTO;
}
use of com.odysseusinc.arachne.portal.api.v1.dto.BaseAnalysisDTO in project ArachneCentralAPI by OHDSI.
the class BaseAnalysisToAnalysisDTOConverter method convert.
@Override
public AD convert(A source) {
BaseAnalysisDTO baseAnalysisDTO = conversionService.convert(source, BaseAnalysisDTO.class);
AD analysisDTO = createResultObject();
converterUtils.shallowCopy(analysisDTO, baseAnalysisDTO);
analysisDTO.setStudy(conversionService.convert(source.getStudy(), StudyShortDTO.class));
if (source.getFiles() != null) {
for (AnalysisFile analysisFile : source.getFiles()) {
analysisDTO.getFiles().add(conversionService.convert(analysisFile, AnalysisFileDTO.class));
}
}
analysisDTO.setPermissions(conversionService.convert(source, PermissionsDTO.class));
analysisDTO.setLocked(source.getLocked());
return analysisDTO;
}
Aggregations