Search in sources :

Example 1 with BaseAnalysisDTO

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;
}
Also used : ShortBaseAnalysisDTO(com.odysseusinc.arachne.portal.api.v1.dto.ShortBaseAnalysisDTO) BaseAnalysisDTO(com.odysseusinc.arachne.portal.api.v1.dto.BaseAnalysisDTO) ShortBaseAnalysisDTO(com.odysseusinc.arachne.portal.api.v1.dto.ShortBaseAnalysisDTO) StudyShortDTO(com.odysseusinc.arachne.portal.api.v1.dto.StudyShortDTO) PermissionsDTO(com.odysseusinc.arachne.portal.api.v1.dto.PermissionsDTO) UserInfoDTO(com.odysseusinc.arachne.portal.api.v1.dto.UserInfoDTO)

Example 2 with BaseAnalysisDTO

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;
}
Also used : BaseAnalysisDTO(com.odysseusinc.arachne.portal.api.v1.dto.BaseAnalysisDTO) StudyShortDTO(com.odysseusinc.arachne.portal.api.v1.dto.StudyShortDTO) PermissionsDTO(com.odysseusinc.arachne.portal.api.v1.dto.PermissionsDTO) AnalysisFile(com.odysseusinc.arachne.portal.model.AnalysisFile) AnalysisFileDTO(com.odysseusinc.arachne.portal.api.v1.dto.AnalysisFileDTO)

Aggregations

BaseAnalysisDTO (com.odysseusinc.arachne.portal.api.v1.dto.BaseAnalysisDTO)2 PermissionsDTO (com.odysseusinc.arachne.portal.api.v1.dto.PermissionsDTO)2 StudyShortDTO (com.odysseusinc.arachne.portal.api.v1.dto.StudyShortDTO)2 AnalysisFileDTO (com.odysseusinc.arachne.portal.api.v1.dto.AnalysisFileDTO)1 ShortBaseAnalysisDTO (com.odysseusinc.arachne.portal.api.v1.dto.ShortBaseAnalysisDTO)1 UserInfoDTO (com.odysseusinc.arachne.portal.api.v1.dto.UserInfoDTO)1 AnalysisFile (com.odysseusinc.arachne.portal.model.AnalysisFile)1