if (Visibility.PUBLIC.equals(orcidWork.getVisibility())) { definitivePublicWork = orcidWork; break; else if (Visibility.LIMITED.equals(orcidWork.getVisibility()) && definitiveLimitedWork == null) { definitiveLimitedWork = orcidWork;
private StringBuffer deriveOrcidData(String orcid, boolean definitive, List<OrcidWork> orcidWorks) { StringBuffer duplicationString = new StringBuffer(); String definitiveIdentifier = definitive ? "Definitive" : "Duplicate"; for (OrcidWork duplicate : orcidWorks) { String putCode = duplicate.getPutCode(); String title = duplicate.getWorkTitle() != null && duplicate.getWorkTitle().getTitle() != null && StringUtils.isNotBlank(duplicate.getWorkTitle().getTitle().getContent()) ? duplicate.getWorkTitle().getTitle().getContent() : MISSING_ENTRY; String visibility = duplicate.getVisibility() != null ? duplicate.getVisibility().value() : MISSING_ENTRY; duplicationString.append(orcid).append(SEPERATOR); duplicationString.append(definitiveIdentifier).append(SEPERATOR); duplicationString.append(putCode).append(SEPERATOR); duplicationString.append(title).append(SEPERATOR); duplicationString.append(visibility).append(SEPERATOR); duplicationString.append(NEW_LINE); } return duplicationString; }
orcidWorkSubset.setVisibility(fullOrcidWork.getVisibility()); orcidWorkSubset.setWorkTitle(fullOrcidWork.getWorkTitle()); orcidWorkSubset.setWorkExternalIdentifiers(fullOrcidWork.getWorkExternalIdentifiers());
orcidWorkSubset.setVisibility(fullOrcidWork.getVisibility()); orcidWorkSubset.setWorkTitle(fullOrcidWork.getWorkTitle()); orcidWorkSubset.setWorkExternalIdentifiers(fullOrcidWork.getWorkExternalIdentifiers());
if(orcidWork.getVisibility() != null) { workEntity.setVisibility(orcidWork.getVisibility().name()); } else { workEntity.setVisibility(org.orcid.jaxb.model.common_v2.Visibility.PRIVATE.name());