/** * Create an instance of {@link PersonalDetails } * */ public PersonalDetails createPersonalDetails() { return new PersonalDetails(); }
@Override public PersonalDetails getPersonalDetails(String orcid) { Date lastModified = getLastModifiedDate(orcid); long lastModifiedTime = lastModified.getTime(); PersonalDetails personalDetails = new PersonalDetails(); Name name = recordNameManager.getRecordName(orcid); if (name != null) { personalDetails.setName(name); } Biography bio = biographyManager.getBiography(orcid); if (bio != null) { personalDetails.setBiography(bio); } OtherNames otherNames = otherNameManager.getOtherNames(orcid); OtherNames filteredOtherNames = new OtherNames(); personalDetails.setOtherNames(filteredOtherNames); if (otherNames != null && otherNames.getOtherNames() != null && !otherNames.getOtherNames().isEmpty()) { // Lets copy the list so we don't modify the cached collection List<OtherName> filteredList = new ArrayList<OtherName>(otherNames.getOtherNames()); filteredOtherNames.setOtherNames(filteredList); } if (personalDetails.getLastModifiedDate() == null || personalDetails.getLastModifiedDate().getValue() == null) { personalDetails.setLastModifiedDate(new LastModifiedDate(DateUtils.convertToXMLGregorianCalendar(lastModified))); } return personalDetails; }
@Override public PersonalDetails getPublicPersonalDetails(String orcid) { Date lastModified = getLastModifiedDate(orcid); PersonalDetails personalDetails = new PersonalDetails();