} else { CreditName creditName = new CreditName(cachedName); contributor.setCreditName(creditName); String name = contributorNames.get(orcid); CreditName creditName = new CreditName(name); contributor.setCreditName(creditName);
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); } } } } }
org.orcid.jaxb.model.v3.rc2.common.CreditName creditName = new org.orcid.jaxb.model.v3.rc2.common.CreditName(); creditName.setContent(wfContributor.getCreditName().getValue()); workContributor.setCreditName(creditName);