Skip to content

Commit

Permalink
Add type to professional activities
Browse files Browse the repository at this point in the history
  • Loading branch information
amontenegro committed Apr 28, 2024
1 parent 278c2c1 commit 68ff80d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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")
Expand Down

0 comments on commit 68ff80d

Please sign in to comment.