-
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
0f6fc5b
commit 278c2c1
Showing
13 changed files
with
191 additions
and
56 deletions.
There are no files selected for viewing
94 changes: 86 additions & 8 deletions
94
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,22 +1,100 @@ | ||
package org.orcid.core.model; | ||
|
||
import java.io.Serializable; | ||
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.record.AffiliationType; | ||
import org.orcid.jaxb.model.v3.release.common.FuzzyDate; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
|
||
@XmlAccessorType(XmlAccessType.FIELD) | ||
@XmlType(propOrder = { "putCode", "endDate", "organizationName", "validated" }) | ||
@XmlType(propOrder = { "putCode", "organizationName", "role", "url", "startDate", "endDate", "validated" }) | ||
@XmlRootElement(name = "employment", namespace = "http://www.orcid.org/ns/summary") | ||
@Schema(description = "Employment") | ||
public class Employment extends ProfessionalActivity { | ||
@XmlTransient | ||
private String type = AffiliationType.EMPLOYMENT.name(); | ||
|
||
|
||
public class Employment implements Serializable { | ||
/** | ||
* | ||
*/ | ||
private static final long serialVersionUID = 1L; | ||
@XmlElement(name = "put-code", namespace = "http://www.orcid.org/ns/summary") | ||
protected Long putCode; | ||
@XmlElement(name = "start-date", namespace = "http://www.orcid.org/ns/common") | ||
protected FuzzyDate startDate; | ||
@XmlElement(name = "end-date", namespace = "http://www.orcid.org/ns/common") | ||
protected FuzzyDate endDate; | ||
@XmlElement(name = "organization-name", namespace = "http://www.orcid.org/ns/summary") | ||
protected String organizationName; | ||
@XmlElement(name = "role", namespace = "http://www.orcid.org/ns/summary") | ||
protected String role; | ||
@XmlElement(name = "url", namespace = "http://www.orcid.org/ns/summary") | ||
protected String url; | ||
@XmlElement(name = "validated", namespace = "http://www.orcid.org/ns/summary") | ||
protected 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 String getRole() { | ||
return role; | ||
} | ||
public void setRole(String role) { | ||
this.role = role; | ||
} | ||
public String getUrl() { | ||
return url; | ||
} | ||
public void setUrl(String url) { | ||
this.url = url; | ||
} | ||
public boolean isValidated() { | ||
return validated; | ||
} | ||
public void setValidated(boolean validated) { | ||
this.validated = validated; | ||
} | ||
public static long getSerialversionuid() { | ||
return serialVersionUID; | ||
} | ||
@Override | ||
public int hashCode() { | ||
return Objects.hash(endDate, organizationName, putCode, role, startDate, url, 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(role, other.role) && Objects.equals(startDate, other.startDate) && Objects.equals(url, other.url) && validated == other.validated; | ||
} | ||
} |
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
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
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
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,11 +1,18 @@ | ||
package org.orcid.core.model; | ||
|
||
import java.io.Serializable; | ||
|
||
import javax.xml.bind.annotation.XmlRootElement; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
|
||
@XmlRootElement(name = "fundings", namespace = "http://www.orcid.org/ns/summary") | ||
@Schema(description = "Fundings") | ||
public class Fundings extends ItemsCount { | ||
public class Fundings extends ItemsCount implements Serializable { | ||
|
||
/** | ||
* | ||
*/ | ||
private static final long serialVersionUID = 1L; | ||
|
||
} |
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
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
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
17 changes: 10 additions & 7 deletions
17
orcid-core/src/main/java/org/orcid/core/model/RecordSummary.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
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,11 +1,18 @@ | ||
package org.orcid.core.model; | ||
|
||
import java.io.Serializable; | ||
|
||
import javax.xml.bind.annotation.XmlRootElement; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
|
||
@XmlRootElement(name = "works", namespace = "http://www.orcid.org/ns/summary") | ||
@Schema(description = "Works") | ||
public class Works extends ItemsCount { | ||
public class Works extends ItemsCount implements Serializable { | ||
|
||
/** | ||
* | ||
*/ | ||
private static final long serialVersionUID = 1L; | ||
|
||
} |
7 changes: 7 additions & 0 deletions
7
orcid-core/src/main/java/org/orcid/core/model/package-info.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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.orcid.org/ns/record", xmlns = { | ||
@javax.xml.bind.annotation.XmlNs(prefix = "activities", namespaceURI = "http://www.orcid.org/ns/activities"), | ||
@javax.xml.bind.annotation.XmlNs(prefix = "common", namespaceURI = "http://www.orcid.org/ns/common"), | ||
@javax.xml.bind.annotation.XmlNs(prefix = "summary", namespaceURI = "http://www.orcid.org/ns/summary")}, | ||
elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) | ||
package org.orcid.core.model; | ||
|
Oops, something went wrong.