public static void setPathToOtherNames(OtherNames otherNames, String orcid) { if (otherNames != null) { otherNames.setPath(OTHER_NAMES.replace("{orcid}", orcid)); if (otherNames.getOtherNames() != null && !otherNames.getOtherNames().isEmpty()) { for (OtherName otherName : otherNames.getOtherNames()) { setPathToOtherName(otherName, orcid); } } } }