Search in sources :

Example 1 with CommentableSubmissionFileDTO

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;
}
Also used : UserInfoDTO(com.odysseusinc.arachne.portal.api.v1.dto.UserInfoDTO) CommentableSubmissionFileDTO(com.odysseusinc.arachne.portal.api.v1.dto.CommentableSubmissionFileDTO) SubmissionInsightSubmissionFile(com.odysseusinc.arachne.portal.model.SubmissionInsightSubmissionFile) SubmissionFile(com.odysseusinc.arachne.portal.model.SubmissionFile)

Aggregations

CommentableSubmissionFileDTO (com.odysseusinc.arachne.portal.api.v1.dto.CommentableSubmissionFileDTO)1 UserInfoDTO (com.odysseusinc.arachne.portal.api.v1.dto.UserInfoDTO)1 SubmissionFile (com.odysseusinc.arachne.portal.model.SubmissionFile)1 SubmissionInsightSubmissionFile (com.odysseusinc.arachne.portal.model.SubmissionInsightSubmissionFile)1