private static void populateContributors(Work work, WorkForm workForm) { List<Contributor> contributorsList = new ArrayList<Contributor>(); if(work.getWorkContributors() != null) { org.orcid.jaxb.model.v3.rc2.record.WorkContributors contributors = work.getWorkContributors(); if (contributors != null) { for (org.orcid.jaxb.model.v3.rc2.common.Contributor contributor : contributors.getContributor()) { contributorsList.add(Contributor.valueOf(contributor)); } } } workForm.setContributors(contributorsList); }
public void filterContributorPrivateData(Work work) { if (work.getWorkContributors() != null && work.getWorkContributors().getContributor() != null) { List<Contributor> contributorList = work.getWorkContributors().getContributor(); List<Contributor> contributorsToPopulateName = new ArrayList<Contributor>(); Set<String> idsToPopulateName = new HashSet<String>();
if (work.getWorkContributors() != null && work.getWorkContributors().getContributor() != null) { for (Contributor c : work.getWorkContributors().getContributor()) { if (c.getCreditName() != null && c.getCreditName().getContent() != null) { names.add(c.getCreditName().getContent());
public static void cleanEmptyFields(Work work) { if (work != null) { if (work.getWorkCitation() != null) { if (PojoUtil.isEmpty(work.getWorkCitation().getCitation())) { work.setWorkCitation(null); } } if (work.getWorkTitle() != null) { if (work.getWorkTitle().getTranslatedTitle() != null) { if (PojoUtil.isEmpty(work.getWorkTitle().getTranslatedTitle().getContent())) { work.getWorkTitle().setTranslatedTitle(null); } } } if (work.getWorkContributors() != null && work.getWorkContributors().getContributor() != null) { for (Contributor c : work.getWorkContributors().getContributor()) { if (c.getCreditName() != null && PojoUtil.isEmpty(c.getCreditName().getContent())) { c.setCreditName(null); } } } } }
if (work.getWorkContributors() != null) { WorkContributors contributors = work.getWorkContributors(); if (!contributors.getContributor().isEmpty()) { for (Contributor contributor : contributors.getContributor()) {
if (work.getWorkContributors() != null && work.getWorkContributors().getContributor() != null) { for (Contributor c : work.getWorkContributors().getContributor()) { if (c.getCreditName() != null && c.getCreditName().getContent() != null) { names.add(StringUtils.stripAccents(c.getCreditName().getContent()));