diff --git a/orcid-core/src/main/java/org/orcid/core/common/manager/impl/SummaryManagerImpl.java b/orcid-core/src/main/java/org/orcid/core/common/manager/impl/SummaryManagerImpl.java index c63fca85d77..c4a02169387 100644 --- a/orcid-core/src/main/java/org/orcid/core/common/manager/impl/SummaryManagerImpl.java +++ b/orcid-core/src/main/java/org/orcid/core/common/manager/impl/SummaryManagerImpl.java @@ -296,13 +296,13 @@ public void generateAffiliationsSummary(RecordSummary recordSummary, String orci p.setEndDate(t.getEndDate()); p.setRole(t.getRoleTitle()); if(t instanceof DistinctionSummary) { - p.setType(AffiliationType.DISTINCTION.name()); + p.setType(AffiliationType.DISTINCTION.value()); } else if (t instanceof InvitedPositionSummary) { - p.setType(AffiliationType.INVITED_POSITION.name()); + p.setType(AffiliationType.INVITED_POSITION.value()); } else if (t instanceof MembershipSummary) { - p.setType(AffiliationType.MEMBERSHIP.name()); + p.setType(AffiliationType.MEMBERSHIP.value()); } else if (t instanceof ServiceSummary) { - p.setType(AffiliationType.SERVICE.name()); + p.setType(AffiliationType.SERVICE.value()); } p.setUrl((t.getUrl() == null || StringUtils.isBlank(t.getUrl().getValue())) ? null : t.getUrl().getValue()); p.setValidated(!SourceUtils.isSelfAsserted(t.getSource(), orcid)); diff --git a/orcid-core/src/main/java/org/orcid/core/model/Employment.java b/orcid-core/src/main/java/org/orcid/core/model/Employment.java index 0f5579a6600..554211d8bce 100644 --- a/orcid-core/src/main/java/org/orcid/core/model/Employment.java +++ b/orcid-core/src/main/java/org/orcid/core/model/Employment.java @@ -14,7 +14,7 @@ import io.swagger.v3.oas.annotations.media.Schema; @XmlAccessorType(XmlAccessType.FIELD) -@XmlType(propOrder = { "putCode", "organizationName", "role", "url", "startDate", "endDate", "validated" }) +@XmlType(propOrder = { "putCode", "type", "organizationName", "role", "url", "startDate", "endDate", "validated" }) @XmlRootElement(name = "employment", namespace = "http://www.orcid.org/ns/summary") @Schema(description = "Employment") public class Employment implements Serializable { @@ -28,6 +28,8 @@ public class Employment implements Serializable { protected FuzzyDate startDate; @XmlElement(name = "end-date", namespace = "http://www.orcid.org/ns/common") protected FuzzyDate endDate; + @XmlElement(name = "type", namespace = "http://www.orcid.org/ns/summary") + protected String type; @XmlElement(name = "organization-name", namespace = "http://www.orcid.org/ns/summary") protected String organizationName; @XmlElement(name = "role", namespace = "http://www.orcid.org/ns/summary")