Search in sources :

Example 1 with ShortBaseAnalysisDTO

use of com.odysseusinc.arachne.portal.api.v1.dto.ShortBaseAnalysisDTO in project ArachneCentralAPI by OHDSI.

the class AnalysisToShortBaseAnalysisDTOConverter method convert.

@Override
public ShortBaseAnalysisDTO convert(Analysis source) {
    ShortBaseAnalysisDTO analysisDTO = new ShortBaseAnalysisDTO();
    analysisDTO.setId(source.getId());
    analysisDTO.setCreated(source.getCreated());
    analysisDTO.setType(new OptionDTO(source.getType().name(), source.getType().getTitle()));
    return analysisDTO;
}
Also used : ShortBaseAnalysisDTO(com.odysseusinc.arachne.portal.api.v1.dto.ShortBaseAnalysisDTO) OptionDTO(com.odysseusinc.arachne.commons.api.v1.dto.OptionDTO)

Example 2 with ShortBaseAnalysisDTO

use of com.odysseusinc.arachne.portal.api.v1.dto.ShortBaseAnalysisDTO 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)

Aggregations

ShortBaseAnalysisDTO (com.odysseusinc.arachne.portal.api.v1.dto.ShortBaseAnalysisDTO)2 OptionDTO (com.odysseusinc.arachne.commons.api.v1.dto.OptionDTO)1 BaseAnalysisDTO (com.odysseusinc.arachne.portal.api.v1.dto.BaseAnalysisDTO)1 PermissionsDTO (com.odysseusinc.arachne.portal.api.v1.dto.PermissionsDTO)1 StudyShortDTO (com.odysseusinc.arachne.portal.api.v1.dto.StudyShortDTO)1 UserInfoDTO (com.odysseusinc.arachne.portal.api.v1.dto.UserInfoDTO)1