Search in sources :

Example 21 with AnalysisFile

use of com.odysseusinc.arachne.portal.model.AnalysisFile 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

AnalysisFile (com.odysseusinc.arachne.portal.model.AnalysisFile)21 Path (java.nio.file.Path)8 ApiOperation (io.swagger.annotations.ApiOperation)6 IOException (java.io.IOException)6 Date (java.util.Date)6 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)6 Analysis (com.odysseusinc.arachne.portal.model.Analysis)5 JsonResult (com.odysseusinc.arachne.commons.api.v1.dto.util.JsonResult)4 AnalysisFileDTO (com.odysseusinc.arachne.portal.api.v1.dto.AnalysisFileDTO)4 IORuntimeException (com.odysseusinc.arachne.portal.exception.IORuntimeException)4 Study (com.odysseusinc.arachne.portal.model.Study)4 IUser (com.odysseusinc.arachne.portal.model.IUser)3 LinkedList (java.util.LinkedList)3 SubmissionFile (com.odysseusinc.arachne.portal.model.SubmissionFile)2 SubmissionGroup (com.odysseusinc.arachne.portal.model.SubmissionGroup)2 ArachnePermission (com.odysseusinc.arachne.portal.security.ArachnePermission)2 ByteArrayInputStream (java.io.ByteArrayInputStream)2 InputStream (java.io.InputStream)2 HashSet (java.util.HashSet)2 List (java.util.List)2