Skip to content

Commit

Permalink
Ready to go
Browse files Browse the repository at this point in the history
  • Loading branch information
amontenegro committed Apr 28, 2024
1 parent 68ff80d commit 8a45d19
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,13 @@ public RecordSummaryPojo getRecordSummaryPojo(String orcid) {
if(recordSummary.getEmployments() != null && recordSummary.getEmployments().getEmployments() != null) {
List<AffiliationSummary> affiliations = new ArrayList<>();
for(Employment e : recordSummary.getEmployments().getEmployments()) {
AffiliationSummary as = new AffiliationSummary();
AffiliationSummary as = new AffiliationSummary();
as.setStartDate(e.getStartDate() == null ? null : e.getStartDate().toString());
as.setEndDate(e.getEndDate() == null ? null : e.getEndDate().toString());
as.setOrganizationName(e.getOrganizationName());
as.setRole(e.getRole());
as.setType(e.getType());
as.setUrl(e.getUrl());
as.setPutCode(e.getPutCode());
as.setValidated(e.isValidated());
affiliations.add(as);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import javax.xml.bind.annotation.XmlType;

import org.orcid.jaxb.model.v3.release.common.FuzzyDate;
import org.orcid.jaxb.model.v3.release.record.AffiliationType;

import io.swagger.v3.oas.annotations.media.Schema;

Expand All @@ -29,7 +30,7 @@ public class Employment implements Serializable {
@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;
protected final String type = AffiliationType.EMPLOYMENT.value();
@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 Expand Up @@ -79,6 +80,9 @@ public boolean isValidated() {
}
public void setValidated(boolean validated) {
this.validated = validated;
}
public String getType() {
return type;
}
public static long getSerialversionuid() {
return serialVersionUID;
Expand Down

0 comments on commit 8a45d19

Please sign in to comment.