Search in sources :

Example 1 with CommentableResultFileDTO

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

the class ResultFileToCommentableResultFileDTOConverter method convert.

@Override
public CommentableResultFileDTO convert(ResultFile source) {
    final CommentableResultFileDTO dto = new CommentableResultFileDTO();
    ArachneFileMeta arachneFileMeta = contentStorageService.getFileByPath(source.getPath());
    dto.setName(arachneFileMeta.getName());
    dto.setCreated(arachneFileMeta.getCreated());
    dto.setSubmissionId(source.getSubmission().getId());
    dto.setCommentTopicId(source.getCommentTopic().getId());
    dto.setCommentCount(source.getCommentTopic().getCount());
    dto.setDocType(arachneFileMeta.getContentType());
    dto.setFileId(source.getId());
    dto.setUuid(arachneFileMeta.getUuid());
    return dto;
}
Also used : CommentableResultFileDTO(com.odysseusinc.arachne.portal.api.v1.dto.CommentableResultFileDTO) ArachneFileMeta(com.odysseusinc.arachne.storage.model.ArachneFileMeta)

Aggregations

CommentableResultFileDTO (com.odysseusinc.arachne.portal.api.v1.dto.CommentableResultFileDTO)1 ArachneFileMeta (com.odysseusinc.arachne.storage.model.ArachneFileMeta)1