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()));