Search in sources :

Example 6 with Month

use of org.orcid.jaxb.model.common_v2.Month in project ORCID-Source by ORCID.

the class MapperFacadeFactory method mapFuzzyDateToStartDateEntityAndEndDateEntity.

private void mapFuzzyDateToStartDateEntityAndEndDateEntity(MapperFactory mapperFactory) {
    mapperFactory.classMap(FuzzyDate.class, StartDateEntity.class).customize(new CustomMapper<FuzzyDate, StartDateEntity>() {

        @Override
        public void mapAtoB(FuzzyDate fuzzyDate, StartDateEntity entity, MappingContext context) {
            if (fuzzyDate.getYear() != null) {
                entity.setYear(Integer.valueOf(fuzzyDate.getYear().getValue()));
            } else {
                entity.setYear(null);
            }
            if (fuzzyDate.getMonth() != null) {
                entity.setMonth(Integer.valueOf(fuzzyDate.getMonth().getValue()));
            } else {
                entity.setMonth(null);
            }
            if (fuzzyDate.getDay() != null) {
                entity.setDay(Integer.valueOf(fuzzyDate.getDay().getValue()));
            } else {
                entity.setDay(null);
            }
        }

        @Override
        public void mapBtoA(StartDateEntity entity, FuzzyDate fuzzyDate, MappingContext context) {
            if (entity.getYear() != null) {
                fuzzyDate.setYear(new Year(entity.getYear()));
            } else {
                fuzzyDate.setYear(null);
            }
            if (entity.getMonth() != null) {
                fuzzyDate.setMonth(new Month(entity.getMonth()));
            } else {
                fuzzyDate.setMonth(null);
            }
            if (entity.getDay() != null) {
                fuzzyDate.setDay(new Day(entity.getDay()));
            } else {
                fuzzyDate.setDay(null);
            }
        }
    }).register();
    mapperFactory.classMap(FuzzyDate.class, EndDateEntity.class).customize(new CustomMapper<FuzzyDate, EndDateEntity>() {

        @Override
        public void mapAtoB(FuzzyDate fuzzyDate, EndDateEntity entity, MappingContext context) {
            if (fuzzyDate.getYear() != null) {
                entity.setYear(Integer.valueOf(fuzzyDate.getYear().getValue()));
            } else {
                entity.setYear(null);
            }
            if (fuzzyDate.getMonth() != null) {
                entity.setMonth(Integer.valueOf(fuzzyDate.getMonth().getValue()));
            } else {
                entity.setMonth(null);
            }
            if (fuzzyDate.getDay() != null) {
                entity.setDay(Integer.valueOf(fuzzyDate.getDay().getValue()));
            } else {
                entity.setDay(null);
            }
        }

        @Override
        public void mapBtoA(EndDateEntity entity, FuzzyDate fuzzyDate, MappingContext context) {
            if (entity.getYear() != null) {
                fuzzyDate.setYear(new Year(entity.getYear()));
            } else {
                fuzzyDate.setYear(null);
            }
            if (entity.getMonth() != null) {
                fuzzyDate.setMonth(new Month(entity.getMonth()));
            } else {
                fuzzyDate.setMonth(null);
            }
            if (entity.getDay() != null) {
                fuzzyDate.setDay(new Day(entity.getDay()));
            } else {
                fuzzyDate.setDay(null);
            }
        }
    }).register();
}
Also used : MappingContext(ma.glasnost.orika.MappingContext) EndDateEntity(org.orcid.persistence.jpa.entities.EndDateEntity) Month(org.orcid.jaxb.model.common_v2.Month) Year(org.orcid.jaxb.model.common_v2.Year) StartDateEntity(org.orcid.persistence.jpa.entities.StartDateEntity) FuzzyDate(org.orcid.jaxb.model.common_v2.FuzzyDate) CustomMapper(ma.glasnost.orika.CustomMapper) Day(org.orcid.jaxb.model.common_v2.Day)

Example 7 with Month

use of org.orcid.jaxb.model.common_v2.Month in project ORCID-Source by ORCID.

the class PublicV2Test method createActivities.

private void createActivities() throws JSONException, InterruptedException, URISyntaxException {
    String accessToken = getAccessToken();
    long time = System.currentTimeMillis();
    Work workToCreate = (Work) unmarshallFromPath("/record_2.0_rc1/samples/work-2.0_rc1.xml", Work.class);
    for (int i = 0; i < 4; i++) {
        workToCreate.setPutCode(null);
        workToCreate.getWorkTitle().getTitle().setContent("Work # " + i);
        workToCreate.getExternalIdentifiers().getExternalIdentifier().clear();
        WorkExternalIdentifier wExtId = new WorkExternalIdentifier();
        wExtId.setWorkExternalIdentifierId(new WorkExternalIdentifierId(time + " Work Id " + i));
        wExtId.setWorkExternalIdentifierType(WorkExternalIdentifierType.AGR);
        wExtId.setRelationship(Relationship.SELF);
        workToCreate.getExternalIdentifiers().getExternalIdentifier().add(wExtId);
        if (i == 0 || i == 3)
            workToCreate.setVisibility(org.orcid.jaxb.model.common_rc1.Visibility.PUBLIC);
        else if (i == 1)
            workToCreate.setVisibility(org.orcid.jaxb.model.common_rc1.Visibility.LIMITED);
        else
            workToCreate.setVisibility(org.orcid.jaxb.model.common_rc1.Visibility.PRIVATE);
        ClientResponse postResponse = memberV2ApiClient.createWorkXml(getUser1OrcidId(), workToCreate, accessToken);
        assertNotNull(postResponse);
        assertEquals(Response.Status.CREATED.getStatusCode(), postResponse.getStatus());
    }
    Funding fundingToCreate = (Funding) unmarshallFromPath("/record_2.0_rc1/samples/funding-2.0_rc1.xml", Funding.class);
    for (int i = 0; i < 4; i++) {
        fundingToCreate.setPutCode(null);
        fundingToCreate.getTitle().getTitle().setContent("Funding # " + i);
        fundingToCreate.getExternalIdentifiers().getExternalIdentifier().clear();
        FundingExternalIdentifier fExtId = new FundingExternalIdentifier();
        fExtId.setType(FundingExternalIdentifierType.GRANT_NUMBER);
        fExtId.setValue(time + " funding Id " + i);
        fExtId.setRelationship(Relationship.SELF);
        fundingToCreate.getExternalIdentifiers().getExternalIdentifier().add(fExtId);
        if (i == 0 || i == 3)
            fundingToCreate.setVisibility(org.orcid.jaxb.model.common_rc1.Visibility.PUBLIC);
        else if (i == 1)
            fundingToCreate.setVisibility(org.orcid.jaxb.model.common_rc1.Visibility.LIMITED);
        else
            fundingToCreate.setVisibility(org.orcid.jaxb.model.common_rc1.Visibility.PRIVATE);
        ClientResponse postResponse = memberV2ApiClient.createFundingXml(getUser1OrcidId(), fundingToCreate, accessToken);
        assertNotNull(postResponse);
        assertEquals(Response.Status.CREATED.getStatusCode(), postResponse.getStatus());
    }
    Employment employmentToCreate = (Employment) unmarshallFromPath("/record_2.0_rc1/samples/employment-2.0_rc1.xml", Employment.class);
    for (int i = 0; i < 4; i++) {
        employmentToCreate.setPutCode(null);
        employmentToCreate.setRoleTitle("Employment # " + i);
        if (i == 0 || i == 3)
            employmentToCreate.setVisibility(org.orcid.jaxb.model.common_rc1.Visibility.PUBLIC);
        else if (i == 1)
            employmentToCreate.setVisibility(org.orcid.jaxb.model.common_rc1.Visibility.LIMITED);
        else
            employmentToCreate.setVisibility(org.orcid.jaxb.model.common_rc1.Visibility.PRIVATE);
        ClientResponse postResponse = memberV2ApiClient.createEmploymentXml(getUser1OrcidId(), employmentToCreate, accessToken);
        assertNotNull(postResponse);
        assertEquals(Response.Status.CREATED.getStatusCode(), postResponse.getStatus());
    }
    Education educationToCreate = (Education) unmarshallFromPath("/record_2.0_rc1/samples/education-2.0_rc1.xml", Education.class);
    for (int i = 0; i < 4; i++) {
        educationToCreate.setPutCode(null);
        educationToCreate.setRoleTitle("Education # " + i);
        if (i == 0 || i == 3)
            educationToCreate.setVisibility(org.orcid.jaxb.model.common_rc1.Visibility.PUBLIC);
        else if (i == 1)
            educationToCreate.setVisibility(org.orcid.jaxb.model.common_rc1.Visibility.LIMITED);
        else
            educationToCreate.setVisibility(org.orcid.jaxb.model.common_rc1.Visibility.PRIVATE);
        ClientResponse postResponse = memberV2ApiClient.createEducationXml(getUser1OrcidId(), educationToCreate, accessToken);
        assertNotNull(postResponse);
        assertEquals(Response.Status.CREATED.getStatusCode(), postResponse.getStatus());
    }
    PeerReview peerReviewToCreate = (PeerReview) unmarshallFromPath("/record_2.0_rc1/samples/peer-review-2.0_rc1.xml", PeerReview.class);
    for (int i = 0; i < 4; i++) {
        peerReviewToCreate.setPutCode(null);
        peerReviewToCreate.setGroupId(groupRecords.get(0).getGroupId());
        peerReviewToCreate.getSubjectName().getTitle().setContent("PeerReview # " + i);
        peerReviewToCreate.getCompletionDate().setDay(new Day(i + 1));
        peerReviewToCreate.getCompletionDate().setMonth(new Month(i + 1));
        peerReviewToCreate.getCompletionDate().setYear(new Year((i + 1) * 1000));
        peerReviewToCreate.getExternalIdentifiers().getExternalIdentifier().get(0).getWorkExternalIdentifierId().setContent("extId-" + (i + 1));
        if (i == 0 || i == 3) {
            peerReviewToCreate.setVisibility(org.orcid.jaxb.model.common_rc1.Visibility.PUBLIC);
        } else if (i == 1) {
            peerReviewToCreate.setVisibility(org.orcid.jaxb.model.common_rc1.Visibility.LIMITED);
        } else {
            peerReviewToCreate.setVisibility(org.orcid.jaxb.model.common_rc1.Visibility.PRIVATE);
        }
        ClientResponse postResponse = memberV2ApiClient.createPeerReviewXml(getUser1OrcidId(), peerReviewToCreate, accessToken);
        assertNotNull(postResponse);
        assertEquals(Response.Status.CREATED.getStatusCode(), postResponse.getStatus());
    }
}
Also used : ClientResponse(com.sun.jersey.api.client.ClientResponse) Funding(org.orcid.jaxb.model.record_rc1.Funding) WorkExternalIdentifierId(org.orcid.jaxb.model.record_rc1.WorkExternalIdentifierId) FundingExternalIdentifier(org.orcid.jaxb.model.record_rc1.FundingExternalIdentifier) Month(org.orcid.jaxb.model.common_rc1.Month) Year(org.orcid.jaxb.model.common_rc1.Year) Employment(org.orcid.jaxb.model.record_rc1.Employment) Education(org.orcid.jaxb.model.record_rc1.Education) Work(org.orcid.jaxb.model.record_rc1.Work) WorkExternalIdentifier(org.orcid.jaxb.model.record_rc1.WorkExternalIdentifier) Day(org.orcid.jaxb.model.common_rc1.Day) PeerReview(org.orcid.jaxb.model.record_rc1.PeerReview)

Example 8 with Month

use of org.orcid.jaxb.model.common_v2.Month in project ORCID-Source by ORCID.

the class PublicProfileVisibilityTest method peerReviewPrivacyTest.

@Test
public void peerReviewPrivacyTest() throws InterruptedException, JSONException, URISyntaxException {
    // Create peer review group
    String accessToken = getAccessToken(getScopes(ScopePathType.PERSON_READ_LIMITED, ScopePathType.PERSON_UPDATE, ScopePathType.ACTIVITIES_READ_LIMITED, ScopePathType.ACTIVITIES_UPDATE));
    List<GroupIdRecord> groups = createGroupIds();
    assertNotNull(groups);
    assertTrue(groups.size() > 0);
    GroupIdRecord g1 = groups.get(0);
    // Create peer review
    long time = System.currentTimeMillis();
    PeerReview peerReview = new PeerReview();
    peerReview.setGroupId(g1.getGroupId());
    ExternalIDs extIds = new ExternalIDs();
    peerReview.setExternalIdentifiers(extIds);
    peerReview.getExternalIdentifiers().getExternalIdentifier().clear();
    ExternalID wExtId = new ExternalID();
    wExtId.setValue("Work Id " + time);
    wExtId.setType(WorkExternalIdentifierType.AGR.value());
    wExtId.setRelationship(Relationship.SELF);
    peerReview.getExternalIdentifiers().getExternalIdentifier().add(wExtId);
    Organization organization = new Organization();
    organization.setName("My org name " + System.currentTimeMillis());
    OrganizationAddress address = new OrganizationAddress();
    address.setCity("Imagination city");
    address.setCountry(Iso3166Country.US);
    organization.setAddress(address);
    peerReview.setOrganization(organization);
    peerReview.setRole(Role.CHAIR);
    peerReview.setType(PeerReviewType.EVALUATION);
    peerReview.setCompletionDate(new FuzzyDate(new Year(2016), new Month(1), new Day(1)));
    ClientResponse postResponse = memberV2ApiClient.createPeerReviewXml(this.getUser1OrcidId(), peerReview, accessToken);
    assertNotNull(postResponse);
    assertEquals(Response.Status.CREATED.getStatusCode(), postResponse.getStatus());
    ClientResponse getResponse = memberV2ApiClient.viewLocationXml(postResponse.getLocation(), accessToken);
    assertEquals(Response.Status.OK.getStatusCode(), getResponse.getStatus());
    peerReview = getResponse.getEntity(PeerReview.class);
    showMyOrcidPage();
    changePeerReviewVisibility(g1.getName(), Visibility.PRIVATE.name());
    try {
        // Verify it doesn't appear in the public page
        showPublicProfilePage(getUser1OrcidId());
        peerReviewAppearsInPublicPage(g1.getName());
        fail();
    } catch (Exception e) {
    }
    showMyOrcidPage();
    changePeerReviewVisibility(g1.getName(), Visibility.LIMITED.name());
    try {
        // Verify it doesn't appear in the public page
        showPublicProfilePage(getUser1OrcidId());
        peerReviewAppearsInPublicPage(g1.getName());
        fail();
    } catch (Exception e) {
    }
    showMyOrcidPage();
    changePeerReviewVisibility(g1.getName(), Visibility.PUBLIC.name());
    showPublicProfilePage(getUser1OrcidId());
    peerReviewAppearsInPublicPage(g1.getName());
    // Rollback
    ClientResponse deleteResponse = memberV2ApiClient.deletePeerReviewXml(this.getUser1OrcidId(), peerReview.getPutCode(), accessToken);
    assertNotNull(deleteResponse);
    assertEquals(Response.Status.NO_CONTENT.getStatusCode(), deleteResponse.getStatus());
}
Also used : ClientResponse(com.sun.jersey.api.client.ClientResponse) ExternalIDs(org.orcid.jaxb.model.record_v2.ExternalIDs) Organization(org.orcid.jaxb.model.common_v2.Organization) GroupIdRecord(org.orcid.jaxb.model.groupid_v2.GroupIdRecord) ExternalID(org.orcid.jaxb.model.record_v2.ExternalID) OrganizationAddress(org.orcid.jaxb.model.common_v2.OrganizationAddress) FuzzyDate(org.orcid.jaxb.model.common_v2.FuzzyDate) URISyntaxException(java.net.URISyntaxException) JSONException(org.codehaus.jettison.json.JSONException) Month(org.orcid.jaxb.model.common_v2.Month) Year(org.orcid.jaxb.model.common_v2.Year) Day(org.orcid.jaxb.model.common_v2.Day) PeerReview(org.orcid.jaxb.model.record_v2.PeerReview) Test(org.junit.Test)

Example 9 with Month

use of org.orcid.jaxb.model.common_v2.Month in project ORCID-Source by ORCID.

the class JpaJaxbEmploymentAdapterTest method getEmploymentWithDates.

private Employment getEmploymentWithDates() {
    Employment employment = new Employment();
    employment.setRoleTitle("role title");
    FuzzyDate startDate = new FuzzyDate(new Year(2017), new Month(1), new Day(1));
    FuzzyDate endDate = new FuzzyDate(new Year(2017), new Month(3), new Day(1));
    employment.setStartDate(startDate);
    employment.setEndDate(endDate);
    return employment;
}
Also used : Month(org.orcid.jaxb.model.common_v2.Month) Year(org.orcid.jaxb.model.common_v2.Year) Employment(org.orcid.jaxb.model.record_v2.Employment) FuzzyDate(org.orcid.jaxb.model.common_v2.FuzzyDate) Day(org.orcid.jaxb.model.common_v2.Day)

Example 10 with Month

use of org.orcid.jaxb.model.common_v2.Month in project ORCID-Source by ORCID.

the class ActivityValidator method validateWork.

public void validateWork(Work work, SourceEntity sourceEntity, boolean createFlag, boolean isApiRequest, Visibility originalVisibility) {
    WorkTitle title = work.getWorkTitle();
    if (title == null || title.getTitle() == null || PojoUtil.isEmpty(title.getTitle().getContent())) {
        throw new ActivityTitleValidationException();
    }
    if (work.getCountry() != null) {
        if (work.getCountry().getValue() == null) {
            Map<String, String> params = new HashMap<String, String>();
            String values = Arrays.stream(Iso3166Country.values()).map(element -> element.value()).collect(Collectors.joining(", "));
            params.put("type", "country");
            params.put("values", values);
            throw new ActivityTypeValidationException(params);
        }
    }
    // translated title language code
    if (title != null && title.getTranslatedTitle() != null) {
        String translatedTitle = title.getTranslatedTitle().getContent();
        String languageCode = title.getTranslatedTitle().getLanguageCode();
        if (PojoUtil.isEmpty(translatedTitle) && !PojoUtil.isEmpty(languageCode)) {
            throw new OrcidValidationException("Please specify a translated title or remove the language code");
        }
        // If translated title language code is null or invalid
        if (!PojoUtil.isEmpty(translatedTitle) && (PojoUtil.isEmpty(title.getTranslatedTitle().getLanguageCode()) || !Arrays.stream(SiteConstants.AVAILABLE_ISO_LANGUAGES).anyMatch(title.getTranslatedTitle().getLanguageCode()::equals))) {
            Map<String, String> params = new HashMap<String, String>();
            String values = Arrays.stream(SiteConstants.AVAILABLE_ISO_LANGUAGES).collect(Collectors.joining(", "));
            params.put("type", "translated title -> language code");
            params.put("values", values);
            throw new ActivityTypeValidationException(params);
        }
    }
    if (work.getWorkType() == null) {
        Map<String, String> params = new HashMap<String, String>();
        String values = Arrays.stream(WorkType.values()).map(element -> element.value()).collect(Collectors.joining(", "));
        params.put("type", "work type");
        params.put("values", values);
        throw new ActivityTypeValidationException(params);
    }
    if (!PojoUtil.isEmpty(work.getLanguageCode())) {
        if (!Arrays.stream(SiteConstants.AVAILABLE_ISO_LANGUAGES).anyMatch(work.getLanguageCode()::equals)) {
            Map<String, String> params = new HashMap<String, String>();
            String values = Arrays.stream(SiteConstants.AVAILABLE_ISO_LANGUAGES).collect(Collectors.joining(", "));
            params.put("type", "language code");
            params.put("values", values);
            throw new ActivityTypeValidationException(params);
        }
    }
    // publication date
    if (work.getPublicationDate() != null) {
        PublicationDate pd = work.getPublicationDate();
        Year year = pd.getYear();
        Month month = pd.getMonth();
        Day day = pd.getDay();
        if (year != null) {
            try {
                Integer.valueOf(year.getValue());
            } catch (NumberFormatException n) {
                Map<String, String> params = new HashMap<String, String>();
                params.put("type", "publication date -> year");
                params.put("values", "integers");
                throw new ActivityTypeValidationException(params);
            }
            if (year.getValue().length() != 4) {
                throw new OrcidValidationException("Invalid year " + year.getValue() + " please specify a four digits value");
            }
        }
        if (month != null) {
            try {
                Integer.valueOf(month.getValue());
            } catch (NumberFormatException n) {
                Map<String, String> params = new HashMap<String, String>();
                params.put("type", "publication date -> month");
                params.put("values", "integers");
                throw new ActivityTypeValidationException(params);
            }
            if (month.getValue().length() != 2) {
                throw new OrcidValidationException("Invalid month " + month.getValue() + " please specify a two digits value");
            }
        }
        if (day != null) {
            try {
                Integer.valueOf(day.getValue());
            } catch (NumberFormatException n) {
                Map<String, String> params = new HashMap<String, String>();
                params.put("type", "publication date -> day");
                params.put("values", "integers");
                throw new ActivityTypeValidationException(params);
            }
            if (day.getValue().length() != 2) {
                throw new OrcidValidationException("Invalid day " + day.getValue() + " please specify a two digits value");
            }
        }
        // Check the date is valid
        boolean isYearEmpty = (year == null || year.getValue() == null) ? true : false;
        boolean isMonthEmpty = (month == null || month.getValue() == null) ? true : false;
        boolean isDayEmpty = (day == null || day.getValue() == null) ? true : false;
        if (isYearEmpty && (!isMonthEmpty || !isDayEmpty)) {
            throw new OrcidValidationException("Invalid date, please specify a year element");
        } else if (!isYearEmpty && isMonthEmpty && !isDayEmpty) {
            throw new OrcidValidationException("Invalid date, please specify a month element");
        } else if (isYearEmpty && isMonthEmpty && !isDayEmpty) {
            throw new OrcidValidationException("Invalid date, please specify a year and month elements");
        }
    }
    // citation
    if (work.getWorkCitation() != null) {
        String citation = work.getWorkCitation().getCitation();
        CitationType type = work.getWorkCitation().getWorkCitationType();
        if (type == null) {
            Map<String, String> params = new HashMap<String, String>();
            String values = Arrays.stream(CitationType.values()).map(element -> element.value()).collect(Collectors.joining(", "));
            params.put("type", "citation type");
            params.put("values", values);
            throw new ActivityTypeValidationException(params);
        }
        if (PojoUtil.isEmpty(citation)) {
            throw new OrcidValidationException("Please specify a citation or remove the parent tag");
        }
    }
    if (work.getWorkExternalIdentifiers() == null || work.getWorkExternalIdentifiers().getExternalIdentifier() == null || work.getExternalIdentifiers().getExternalIdentifier().isEmpty()) {
        throw new ActivityIdentifierValidationException();
    }
    if (work.getWorkContributors() != null) {
        WorkContributors contributors = work.getWorkContributors();
        if (!contributors.getContributor().isEmpty()) {
            for (Contributor contributor : contributors.getContributor()) {
                if (contributor.getContributorOrcid() != null) {
                    ContributorOrcid contributorOrcid = contributor.getContributorOrcid();
                    if (!PojoUtil.isEmpty(contributorOrcid.getUri())) {
                        if (!OrcidStringUtils.isValidOrcidUri(contributorOrcid.getUri())) {
                            throw new OrcidValidationException("Invalid contributor URI");
                        }
                    }
                    if (!PojoUtil.isEmpty(contributorOrcid.getPath())) {
                        if (!OrcidStringUtils.isValidOrcid(contributorOrcid.getPath())) {
                            throw new OrcidValidationException("Invalid contributor ORCID");
                        }
                    }
                }
                if (contributor.getCreditName() != null) {
                    if (PojoUtil.isEmpty(contributor.getCreditName().getContent())) {
                        throw new OrcidValidationException("Please specify a contributor credit name or remove the empty tag");
                    }
                }
                if (contributor.getContributorEmail() != null) {
                    if (PojoUtil.isEmpty(contributor.getContributorEmail().getValue())) {
                        throw new OrcidValidationException("Please specify a contributor email or remove the empty tag");
                    }
                }
            }
        }
    }
    if (work.getPutCode() != null && createFlag) {
        Map<String, String> params = new HashMap<String, String>();
        if (sourceEntity != null) {
            params.put("clientName", sourceEntity.getSourceName());
        }
        throw new InvalidPutCodeException(params);
    }
    // Check that we are not changing the visibility
    if (isApiRequest && !createFlag) {
        Visibility updatedVisibility = work.getVisibility();
        validateVisibilityDoesntChange(updatedVisibility, originalVisibility);
    }
    externalIDValidator.validateWorkOrPeerReview(work.getExternalIdentifiers());
}
Also used : FundingTitle(org.orcid.jaxb.model.record_v2.FundingTitle) Arrays(java.util.Arrays) Year(org.orcid.jaxb.model.common_v2.Year) InvalidPutCodeException(org.orcid.core.exception.InvalidPutCodeException) WorkTitle(org.orcid.jaxb.model.record_v2.WorkTitle) OrcidStringUtils(org.orcid.utils.OrcidStringUtils) ActivityTitleValidationException(org.orcid.core.exception.ActivityTitleValidationException) OrcidDuplicatedActivityException(org.orcid.core.exception.OrcidDuplicatedActivityException) Contributor(org.orcid.jaxb.model.common_v2.Contributor) ContributorOrcid(org.orcid.jaxb.model.common_v2.ContributorOrcid) Amount(org.orcid.jaxb.model.common_v2.Amount) PojoUtil(org.orcid.pojo.ajaxForm.PojoUtil) HashMap(java.util.HashMap) GroupIdRecord(org.orcid.jaxb.model.groupid_v2.GroupIdRecord) StringUtils(org.apache.commons.lang3.StringUtils) OrcidValidationException(org.orcid.core.exception.OrcidValidationException) Day(org.orcid.jaxb.model.common_v2.Day) Matcher(java.util.regex.Matcher) ActivityTypeValidationException(org.orcid.core.exception.ActivityTypeValidationException) Source(org.orcid.jaxb.model.common_v2.Source) Map(java.util.Map) VisibilityMismatchException(org.orcid.core.exception.VisibilityMismatchException) CitationType(org.orcid.jaxb.model.record_v2.CitationType) Employment(org.orcid.jaxb.model.record_v2.Employment) Funding(org.orcid.jaxb.model.record_v2.Funding) SourceEntity(org.orcid.persistence.jpa.entities.SourceEntity) PublicationDate(org.orcid.jaxb.model.common_v2.PublicationDate) Resource(javax.annotation.Resource) Month(org.orcid.jaxb.model.common_v2.Month) Collectors(java.util.stream.Collectors) WorkContributors(org.orcid.jaxb.model.record_v2.WorkContributors) ActivityIdentifierValidationException(org.orcid.core.exception.ActivityIdentifierValidationException) WorkType(org.orcid.jaxb.model.record_v2.WorkType) Iso3166Country(org.orcid.jaxb.model.common_v2.Iso3166Country) Visibility(org.orcid.jaxb.model.common_v2.Visibility) Relationship(org.orcid.jaxb.model.record_v2.Relationship) Work(org.orcid.jaxb.model.record_v2.Work) ExternalID(org.orcid.jaxb.model.record_v2.ExternalID) Pattern(java.util.regex.Pattern) PeerReview(org.orcid.jaxb.model.record_v2.PeerReview) SiteConstants(org.orcid.persistence.constants.SiteConstants) Education(org.orcid.jaxb.model.record_v2.Education) ExternalIDs(org.orcid.jaxb.model.record_v2.ExternalIDs) PeerReviewType(org.orcid.jaxb.model.record_v2.PeerReviewType) PublicationDate(org.orcid.jaxb.model.common_v2.PublicationDate) HashMap(java.util.HashMap) WorkContributors(org.orcid.jaxb.model.record_v2.WorkContributors) OrcidValidationException(org.orcid.core.exception.OrcidValidationException) Contributor(org.orcid.jaxb.model.common_v2.Contributor) ActivityTypeValidationException(org.orcid.core.exception.ActivityTypeValidationException) ActivityIdentifierValidationException(org.orcid.core.exception.ActivityIdentifierValidationException) Month(org.orcid.jaxb.model.common_v2.Month) ActivityTitleValidationException(org.orcid.core.exception.ActivityTitleValidationException) Year(org.orcid.jaxb.model.common_v2.Year) WorkTitle(org.orcid.jaxb.model.record_v2.WorkTitle) InvalidPutCodeException(org.orcid.core.exception.InvalidPutCodeException) CitationType(org.orcid.jaxb.model.record_v2.CitationType) Visibility(org.orcid.jaxb.model.common_v2.Visibility) ContributorOrcid(org.orcid.jaxb.model.common_v2.ContributorOrcid) Day(org.orcid.jaxb.model.common_v2.Day) HashMap(java.util.HashMap) Map(java.util.Map)

Aggregations

Day (org.orcid.jaxb.model.common_v2.Day)9 Month (org.orcid.jaxb.model.common_v2.Month)9 Year (org.orcid.jaxb.model.common_v2.Year)9 ClientResponse (com.sun.jersey.api.client.ClientResponse)8 Test (org.junit.Test)8 ArrayList (java.util.ArrayList)7 FuzzyDate (org.orcid.jaxb.model.common_v2.FuzzyDate)5 Employment (org.orcid.jaxb.model.record_v2.Employment)5 Education (org.orcid.jaxb.model.record_v2.Education)4 ExternalID (org.orcid.jaxb.model.record_v2.ExternalID)3 PeerReview (org.orcid.jaxb.model.record_v2.PeerReview)3 Work (org.orcid.jaxb.model.record_v2.Work)3 ActivityTypeValidationException (org.orcid.core.exception.ActivityTypeValidationException)2 OrcidValidationException (org.orcid.core.exception.OrcidValidationException)2 Day (org.orcid.jaxb.model.common_rc1.Day)2 Month (org.orcid.jaxb.model.common_rc1.Month)2 Contributor (org.orcid.jaxb.model.common_v2.Contributor)2 Organization (org.orcid.jaxb.model.common_v2.Organization)2 OrganizationAddress (org.orcid.jaxb.model.common_v2.OrganizationAddress)2 PublicationDate (org.orcid.jaxb.model.common_v2.PublicationDate)2