Search in sources :

Example 56 with Visibility

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

the class PublicAPISecurityManagerV2Test method getKeywordsElement.

private Keywords getKeywordsElement(Visibility... vs) {
    Keywords elements = new Keywords();
    for (Visibility v : vs) {
        Keyword element = new Keyword();
        element.setVisibility(v);
        if (elements.getKeywords() == null) {
            elements.setKeywords(new ArrayList<Keyword>());
        }
        elements.getKeywords().add(element);
    }
    return elements;
}
Also used : Keywords(org.orcid.jaxb.model.record_v2.Keywords) Keyword(org.orcid.jaxb.model.record_v2.Keyword) Visibility(org.orcid.jaxb.model.common_v2.Visibility)

Example 57 with Visibility

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

the class PublicAPISecurityManagerV2Test method getActivitiesSummaryElement.

private ActivitiesSummary getActivitiesSummaryElement() {
    Visibility[] vs = { Visibility.PUBLIC, Visibility.PUBLIC, Visibility.PUBLIC };
    ActivitiesSummary s = new ActivitiesSummary();
    s.setEducations(getEducations(vs));
    s.setEmployments(getEmployments(vs));
    s.setFundings(getFundings(vs));
    s.setPeerReviews(getPeerReviews(vs));
    s.setWorks(getWorks(vs));
    return s;
}
Also used : Visibility(org.orcid.jaxb.model.common_v2.Visibility) ActivitiesSummary(org.orcid.jaxb.model.record.summary_v2.ActivitiesSummary)

Example 58 with Visibility

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

the class PublicAPISecurityManagerV2Test method getPersonExternalIdentifiersElement.

private PersonExternalIdentifiers getPersonExternalIdentifiersElement(Visibility... vs) {
    PersonExternalIdentifiers elements = new PersonExternalIdentifiers();
    for (Visibility v : vs) {
        PersonExternalIdentifier element = new PersonExternalIdentifier();
        element.setVisibility(v);
        if (elements.getExternalIdentifiers() == null) {
            elements.setExternalIdentifiers(new ArrayList<PersonExternalIdentifier>());
        }
        elements.getExternalIdentifiers().add(element);
    }
    return elements;
}
Also used : PersonExternalIdentifiers(org.orcid.jaxb.model.record_v2.PersonExternalIdentifiers) Visibility(org.orcid.jaxb.model.common_v2.Visibility) PersonExternalIdentifier(org.orcid.jaxb.model.record_v2.PersonExternalIdentifier)

Example 59 with Visibility

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

the class PublicAPISecurityManagerV2Test method getPeerReviews.

private PeerReviews getPeerReviews(Visibility... vs) {
    PeerReviews peerReviews = new PeerReviews();
    for (Visibility v : vs) {
        PeerReviewGroup g = new PeerReviewGroup();
        PeerReviewSummary s = new PeerReviewSummary();
        s.setVisibility(v);
        g.getPeerReviewSummary().add(s);
        peerReviews.getPeerReviewGroup().add(g);
    }
    return peerReviews;
}
Also used : PeerReviewGroup(org.orcid.jaxb.model.record.summary_v2.PeerReviewGroup) PeerReviewSummary(org.orcid.jaxb.model.record.summary_v2.PeerReviewSummary) PeerReviews(org.orcid.jaxb.model.record.summary_v2.PeerReviews) Visibility(org.orcid.jaxb.model.common_v2.Visibility)

Example 60 with Visibility

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

the class PublicAPISecurityManagerV2Test method getEducations.

private Educations getEducations(Visibility... vs) {
    Educations e = new Educations();
    for (Visibility v : vs) {
        EducationSummary s = new EducationSummary();
        s.setVisibility(v);
        e.getSummaries().add(s);
    }
    return e;
}
Also used : EducationSummary(org.orcid.jaxb.model.record.summary_v2.EducationSummary) Educations(org.orcid.jaxb.model.record.summary_v2.Educations) Visibility(org.orcid.jaxb.model.common_v2.Visibility)

Aggregations

Visibility (org.orcid.jaxb.model.common_v2.Visibility)55 Test (org.junit.Test)37 ClientResponse (com.sun.jersey.api.client.ClientResponse)35 Url (org.orcid.jaxb.model.common_v2.Url)12 ExternalID (org.orcid.jaxb.model.record_v2.ExternalID)12 SourceEntity (org.orcid.persistence.jpa.entities.SourceEntity)12 HashMap (java.util.HashMap)10 OrcidError (org.orcid.jaxb.model.error_v2.OrcidError)10 OrcidError (org.orcid.jaxb.model.error_rc1.OrcidError)9 Visibility (org.orcid.jaxb.model.common_rc2.Visibility)8 ProfileEntity (org.orcid.persistence.jpa.entities.ProfileEntity)8 Date (java.util.Date)7 Visibility (org.orcid.jaxb.model.common_rc1.Visibility)7 ExternalIDs (org.orcid.jaxb.model.record_v2.ExternalIDs)7 Visibility (org.orcid.jaxb.model.common_rc3.Visibility)6 Funding (org.orcid.jaxb.model.record_v2.Funding)6 PeerReview (org.orcid.jaxb.model.record_v2.PeerReview)6 Work (org.orcid.jaxb.model.record_v2.Work)6 Education (org.orcid.jaxb.model.record_v2.Education)5 OrcidDuplicatedElementException (org.orcid.core.exception.OrcidDuplicatedElementException)4