public static void calculateLastModified(PersonalDetails personalDetails) { if (personalDetails != null) { calculateLastModified(personalDetails.getOtherNames()); LastModifiedDate l1 = personalDetails.getBiography() == null ? null : personalDetails.getBiography().getLastModifiedDate(); LastModifiedDate l2 = personalDetails.getName() == null ? null : personalDetails.getName().getLastModifiedDate(); LastModifiedDate l3 = personalDetails.getOtherNames() == null ? null : personalDetails.getOtherNames().getLastModifiedDate(); LastModifiedDate globalLatest = calculateLatest(l1, l2, l3); personalDetails.setLastModifiedDate(globalLatest); } }
@Override public void checkAndFilter(String orcid, PersonalDetails personalDetails) { if (personalDetails == null) { return; } // Check the token isMyToken(orcid); if (personalDetails.getOtherNames() != null) { checkAndFilter(orcid, personalDetails.getOtherNames().getOtherNames(), READ_BIO_REQUIRED_SCOPE, true); } if (personalDetails.getBiography() != null) { try { checkAndFilter(orcid, personalDetails.getBiography(), READ_BIO_REQUIRED_SCOPE, true); } catch (Exception e) { personalDetails.setBiography(null); } } if (personalDetails.getName() != null) { try { checkAndFilter(orcid, personalDetails.getName(), READ_BIO_REQUIRED_SCOPE, true); } catch (Exception e) { personalDetails.setName(null); } } }
@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-04-24T11:17:38-05:00", comments = "JAXB RI v2.2.11") public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { { LastModifiedDate theLastModifiedDate; theLastModifiedDate = this.getLastModifiedDate(); strategy.appendField(locator, this, "lastModifiedDate", buffer, theLastModifiedDate); } { NameType theName; theName = this.getName(); strategy.appendField(locator, this, "name", buffer, theName); } { OtherNames theOtherNames; theOtherNames = this.getOtherNames(); strategy.appendField(locator, this, "otherNames", buffer, theOtherNames); } { BiographyType theBiography; theBiography = this.getBiography(); strategy.appendField(locator, this, "biography", buffer, theBiography); } { String thePath; thePath = this.getPath(); strategy.appendField(locator, this, "path", buffer, thePath); } return buffer; }