public void setSourceName(Employments employments) { if (employments != null) { for (EmploymentSummary summary : employments.getSummaries()) { setSourceName(summary); } } }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((educations == null) ? 0 : educations.hashCode()); result = prime * result + ((employments == null) ? 0 : employments.hashCode()); result = prime * result + ((fundings == null) ? 0 : fundings.hashCode()); result = prime * result + ((peerReviews == null) ? 0 : peerReviews.hashCode()); result = prime * result + ((works == null) ? 0 : works.hashCode()); return result; }
/** * Set the path attribute to every employment inside the Employments element. * * @param employments * The employments container * @param orcid * The activity owner * */ public static void setPathToEmployments(Employments employments, String orcid) { if(employments != null) { employments.setPath(OrcidApiConstants.EMPLOYMENTS.replace("{orcid}", orcid)); for(EmploymentSummary summary : employments.getSummaries()) { setPathToActivity(summary, orcid); } } }
Employments employments = new Employments(); for (EmploymentSummary summary : employmentList) { if (justPublic) { if (Visibility.PUBLIC.equals(summary.getVisibility())) { employments.getSummaries().add(summary); employments.getSummaries().add(summary);
if (other.employments != null) return false; } else if (!employments.equals(other.employments)) return false; if (fundings == null) {
public static void calculateLastModified(ActivitiesSummary activitiesSummary) { if(activitiesSummary != null) { calculateLastModified(activitiesSummary.getEducations()); calculateLastModified(activitiesSummary.getEmployments()); calculateLastModified(activitiesSummary.getFundings()); calculateLastModified(activitiesSummary.getPeerReviews()); calculateLastModified(activitiesSummary.getWorks()); LastModifiedDate l1 = activitiesSummary.getEducations() == null ? null : activitiesSummary.getEducations().getLastModifiedDate(); LastModifiedDate l2= activitiesSummary.getEmployments() == null ? null : activitiesSummary.getEmployments().getLastModifiedDate(); LastModifiedDate l3 = activitiesSummary.getFundings() == null ? null : activitiesSummary.getFundings().getLastModifiedDate(); LastModifiedDate l4 = activitiesSummary.getPeerReviews() == null ? null : activitiesSummary.getPeerReviews().getLastModifiedDate(); LastModifiedDate l5 = activitiesSummary.getWorks() == null ? null : activitiesSummary.getWorks().getLastModifiedDate(); LastModifiedDate globalLatest = calculateLatest(l1, l2, l3, l4, l5); activitiesSummary.setLastModifiedDate(globalLatest); } }
for (EmploymentSummary employment : employments.getSummaries()) { activities.put(employment.getPutCode(), employment);
checkAndFilter(orcid, activities.getEmployments().getSummaries(), READ_AFFILIATIONS_REQUIRED_SCOPE, true);
if (r.getActivitiesSummary().getEmployments() != null && r.getActivitiesSummary().getEmployments().getSummaries() != null) for (EmploymentSummary e : r.getActivitiesSummary().getEmployments().getSummaries()) { if (e.getOrganization() != null && e.getOrganization().getDisambiguatedOrganization() != null) doc.affiliation.add(createOrg(
List<EmploymentSummary> list = employments.getSummaries(); if (list != null) { for (EmploymentSummary summary : list) {