Search in sources :

Example 71 with Employment

use of org.orcid.jaxb.model.v3.dev1.record.Employment in project ORCID-Source by ORCID.

the class ActivityValidatorTest method validateEmploymentWithoutOrg.

@Test(expected = InvalidOrgException.class)
public void validateEmploymentWithoutOrg() {
    Employment e = getEmployment();
    e.setOrganization(null);
    activityValidator.validateAffiliation(e, null, false, true, Visibility.PUBLIC);
}
Also used : Employment(org.orcid.jaxb.model.v3.dev1.record.Employment) Test(org.junit.Test)

Example 72 with Employment

use of org.orcid.jaxb.model.v3.dev1.record.Employment in project ORCID-Source by ORCID.

the class ActivityValidatorTest method getEmployment.

public Employment getEmployment() {
    Employment employment = new Employment();
    employment.setDepartmentName("department name");
    employment.setEndDate(getFuzzyDate());
    employment.setOrganization(getOrganization());
    employment.setRoleTitle("role");
    employment.setStartDate(getFuzzyDate());
    employment.setVisibility(Visibility.PUBLIC);
    return employment;
}
Also used : Employment(org.orcid.jaxb.model.v3.dev1.record.Employment)

Example 73 with Employment

use of org.orcid.jaxb.model.v3.dev1.record.Employment in project ORCID-Source by ORCID.

the class MemberV3ApiServiceDelegatorImpl method viewEmployment.

@Override
public Response viewEmployment(String orcid, Long putCode) {
    Employment e = affiliationsManagerReadOnly.getEmploymentAffiliation(orcid, putCode);
    orcidSecurityManager.checkAndFilter(orcid, e, ScopePathType.AFFILIATIONS_READ_LIMITED);
    ActivityUtils.setPathToActivity(e, orcid);
    sourceUtils.setSourceName(e);
    return Response.ok(e).build();
}
Also used : Employment(org.orcid.jaxb.model.v3.dev1.record.Employment)

Aggregations

Employment (org.orcid.jaxb.model.v3.dev1.record.Employment)61 Test (org.junit.Test)53 DBUnitTest (org.orcid.test.DBUnitTest)21 Response (javax.ws.rs.core.Response)20 Affiliation (org.orcid.jaxb.model.v3.dev1.record.Affiliation)18 Education (org.orcid.jaxb.model.v3.dev1.record.Education)13 Distinction (org.orcid.jaxb.model.v3.dev1.record.Distinction)11 Membership (org.orcid.jaxb.model.v3.dev1.record.Membership)11 Service (org.orcid.jaxb.model.v3.dev1.record.Service)11 FuzzyDate (org.orcid.jaxb.model.v3.dev1.common.FuzzyDate)10 InvitedPosition (org.orcid.jaxb.model.v3.dev1.record.InvitedPosition)10 Qualification (org.orcid.jaxb.model.v3.dev1.record.Qualification)10 Day (org.orcid.jaxb.model.v3.dev1.common.Day)8 Month (org.orcid.jaxb.model.v3.dev1.common.Month)8 Year (org.orcid.jaxb.model.v3.dev1.common.Year)8 ResearcherUrl (org.orcid.jaxb.model.v3.dev1.record.ResearcherUrl)8 EmploymentSummary (org.orcid.jaxb.model.v3.dev1.record.summary.EmploymentSummary)8 ActivitiesSummary (org.orcid.jaxb.model.v3.dev1.record.summary.ActivitiesSummary)7 Funding (org.orcid.jaxb.model.v3.dev1.record.Funding)6 Work (org.orcid.jaxb.model.v3.dev1.record.Work)6