use of com.odysseusinc.arachne.portal.api.v1.dto.CommentableSubmissionFileDTO in project ArachneCentralAPI by OHDSI.
the class SubmissionInsightSubmissionFileToCommentableSubmissionFileDTOConverter method convert.
@Override
public CommentableSubmissionFileDTO convert(SubmissionInsightSubmissionFile submissionInsightSubmissionFile) {
final CommentableSubmissionFileDTO dto = new CommentableSubmissionFileDTO();
final SubmissionFile submissionFile = submissionInsightSubmissionFile.getSubmissionFile();
dto.setLabel(submissionFile.getLabel());
dto.setUuid(submissionFile.getUuid());
dto.setName(submissionFile.getRealName());
dto.setCreated(submissionFile.getCreated());
dto.setCommentTopicId(submissionInsightSubmissionFile.getCommentTopic().getId());
dto.setCommentCount(submissionInsightSubmissionFile.getCommentTopic().getCount());
dto.setAuthor(conversionService.convert(submissionFile.getAuthor(), UserInfoDTO.class));
dto.setDocType(submissionInsightSubmissionFile.getSubmissionFile().getContentType());
dto.setFileId(submissionFile.getId());
return dto;
}
Aggregations