@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((biography == null) ? 0 : biography.hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode()); result = prime * result + ((otherNames == null) ? 0 : otherNames.hashCode()); return result; }
/** * Create an instance of {@link History } * */ public History createHistory() { return new History(); }
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); } }
private void addExternalIdsToExistingSet(Work work, Set<ExternalID> existingExternalIDs) { if(work != null && work.getExternalIdentifiers() != null && work.getExternalIdentifiers().getExternalIdentifier() != null) { for(ExternalID extId : work.getExternalIdentifiers().getExternalIdentifier()) { //Don't include PART_OF external ids if(!Relationship.PART_OF.equals(extId.getRelationship())) { existingExternalIDs.add(extId); } } } }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((addresses == null) ? 0 : addresses.hashCode()); result = prime * result + ((biography == null) ? 0 : biography.hashCode()); result = prime * result + ((emails == null) ? 0 : emails.hashCode()); result = prime * result + ((externalIdentifiers == null) ? 0 : externalIdentifiers.hashCode()); result = prime * result + ((keywords == null) ? 0 : keywords.hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode()); result = prime * result + ((otherNames == null) ? 0 : otherNames.hashCode()); result = prime * result + ((path == null) ? 0 : path.hashCode()); result = prime * result + ((researcherUrls == null) ? 0 : researcherUrls.hashCode()); return result; }
/** * Create an instance of {@link OtherNames } * */ public OtherNames createOtherNames() { return new OtherNames(); }
/** * Create an instance of {@link Person } * */ public Person createPerson() { return new Person(); }
/** * Create an instance of {@link Name } * */ public Name createName() { return new Name(); }
public ExternalIDs getIdentifiers() { if (identifiers == null) identifiers = new ExternalIDs(); return identifiers; }
/** * Create an instance of {@link EmploymentsType } * */ public EmploymentsType createEmploymentsType() { return new EmploymentsType(); }
/** * Create an instance of {@link Employments } * */ public Employments createEmployments() { return new Employments(); }
/** * Create an instance of {@link Works } * */ public Works createWorks() { return new Works(); }
/** * Create an instance of {@link WorkGroup } * */ public WorkGroup createWorkGroup() { return new WorkGroup(); }
/** * Create an instance of {@link Education } * */ public Education createEducation() { return new Education(); }
/** * Create an instance of {@link ContributorAttributes } * */ public ContributorAttributes createContributorAttributes() { return new ContributorAttributes(); }
/** * Create an instance of {@link SourceDate } * */ public SourceDate createSourceDate() { return new SourceDate(); }
/** * Create an instance of {@link Keyword } * */ public Keyword createKeyword() { return new Keyword(); }
/** * Create an instance of {@link ExternalIdentifier } * */ public ExternalIdentifier createExternalIdentifier() { return new ExternalIdentifier(); }
/** * Create an instance of {@link KeywordType } * */ public KeywordType createKeywordType() { return new KeywordType(); }