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;
}
Aggregations