-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ac0c523
commit 423cb84
Showing
4 changed files
with
160 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 6 additions & 61 deletions
67
orcid-core/src/main/java/org/orcid/core/model/Employment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,77 +1,22 @@ | ||
package org.orcid.core.model; | ||
|
||
import java.util.Objects; | ||
|
||
import javax.xml.bind.annotation.XmlAccessType; | ||
import javax.xml.bind.annotation.XmlAccessorType; | ||
import javax.xml.bind.annotation.XmlElement; | ||
import javax.xml.bind.annotation.XmlRootElement; | ||
import javax.xml.bind.annotation.XmlTransient; | ||
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; | ||
|
||
@XmlAccessorType(XmlAccessType.FIELD) | ||
@XmlType(propOrder = { "putCode", "endDate", "organizationName", "validated" }) | ||
@XmlRootElement(name = "employment", namespace = "http://www.orcid.org/ns/summary") | ||
@Schema(description = "Employment") | ||
public class Employment { | ||
@XmlElement(name = "put-code", namespace = "http://www.orcid.org/ns/summary") | ||
private Long putCode; | ||
@XmlElement(name = "start-date", namespace = "http://www.orcid.org/ns/common") | ||
private FuzzyDate startDate; | ||
@XmlElement(name = "end-date", namespace = "http://www.orcid.org/ns/common") | ||
private FuzzyDate endDate; | ||
@XmlElement(name = "organization-name", namespace = "http://www.orcid.org/ns/summary") | ||
private String organizationName; | ||
@XmlElement(name = "validated", namespace = "http://www.orcid.org/ns/summary") | ||
private boolean validated; | ||
public Long getPutCode() { | ||
return putCode; | ||
} | ||
public void setPutCode(Long putCode) { | ||
this.putCode = putCode; | ||
} | ||
public FuzzyDate getStartDate() { | ||
return startDate; | ||
} | ||
public void setStartDate(FuzzyDate startDate) { | ||
this.startDate = startDate; | ||
} | ||
public FuzzyDate getEndDate() { | ||
return endDate; | ||
} | ||
public void setEndDate(FuzzyDate endDate) { | ||
this.endDate = endDate; | ||
} | ||
public String getOrganizationName() { | ||
return organizationName; | ||
} | ||
public void setOrganizationName(String organizationName) { | ||
this.organizationName = organizationName; | ||
} | ||
public boolean isValidated() { | ||
return validated; | ||
} | ||
public void setValidated(boolean validated) { | ||
this.validated = validated; | ||
} | ||
@Override | ||
public int hashCode() { | ||
return Objects.hash(endDate, organizationName, putCode, startDate, validated); | ||
} | ||
@Override | ||
public boolean equals(Object obj) { | ||
if (this == obj) | ||
return true; | ||
if (obj == null) | ||
return false; | ||
if (getClass() != obj.getClass()) | ||
return false; | ||
Employment other = (Employment) obj; | ||
return Objects.equals(endDate, other.endDate) && Objects.equals(organizationName, other.organizationName) && Objects.equals(putCode, other.putCode) | ||
&& Objects.equals(startDate, other.startDate) && validated == other.validated; | ||
} | ||
public class Employment extends ProfessionalActivity { | ||
@XmlTransient | ||
private String type = AffiliationType.EMPLOYMENT.name(); | ||
|
||
|
||
} |
Oops, something went wrong.