use of com.odysseusinc.arachne.portal.model.UserLink in project ArachneCentralAPI by OHDSI.
the class UserToUserProfileDTOConverter method convert.
@Override
public UserProfileDTO convert(IUser user) {
UserProfileDTO dto = new UserProfileDTO();
dto.setId(user.getUuid());
dto.setEnabled(user.getEnabled());
dto.setCreated(user.getCreated());
dto.setUpdated(user.getUpdated());
HashSet<SkillDTO> skills = new HashSet<>();
for (Skill skill : user.getSkills()) {
skills.add(conversionService.convert(skill, SkillDTO.class));
}
dto.setSkills(skills);
LinkedList<UserPublicationDTO> publications = new LinkedList<>();
for (UserPublication userPublication : user.getPublications()) {
publications.add(conversionService.convert(userPublication, UserPublicationDTO.class));
}
dto.setPublications(publications);
LinkedList<UserLinkDTO> links = new LinkedList<>();
for (UserLink userLink : user.getLinks()) {
links.add(conversionService.convert(userLink, UserLinkDTO.class));
}
dto.setLinks(links);
dto.setGeneral(conversionService.convert(user, UserProfileGeneralDTO.class));
return dto;
}
use of com.odysseusinc.arachne.portal.model.UserLink in project ArachneCentralAPI by OHDSI.
the class LinkDTOToUserLinkConverter method convert.
@Override
public UserLink convert(UserLinkDTO linkDTO) {
UserLink userLink = new UserLink();
userLink.setUrl(linkDTO.getUrl());
userLink.setId(linkDTO.getId());
userLink.setTitle(linkDTO.getTitle());
userLink.setDescription(linkDTO.getDescription());
return userLink;
}
Aggregations