Search in sources :

Example 41 with Url

use of org.orcid.jaxb.model.v3.dev1.common.Url in project ORCID-Source by ORCID.

the class ActivityValidatorTest method getPeerReview.

public PeerReview getPeerReview() {
    PeerReview peerReview = new PeerReview();
    peerReview.setCompletionDate(getFuzzyDate());
    peerReview.setExternalIdentifiers(getExternalIDs());
    peerReview.setGroupId("group-id");
    peerReview.setOrganization(getOrganization());
    peerReview.setRole(Role.CHAIR);
    peerReview.setSubjectContainerName(new Title("subject-container-name"));
    peerReview.setSubjectExternalIdentifier(getExternalID());
    peerReview.setSubjectName(getWorkTitle());
    peerReview.setSubjectType(WorkType.ARTISTIC_PERFORMANCE);
    peerReview.setSubjectUrl(new Url("http://test.orcid.org"));
    peerReview.setType(PeerReviewType.EVALUATION);
    peerReview.setUrl(new Url("http://test.orcid.org"));
    peerReview.setVisibility(Visibility.PUBLIC);
    return peerReview;
}
Also used : Title(org.orcid.jaxb.model.v3.dev1.common.Title) TranslatedTitle(org.orcid.jaxb.model.v3.dev1.common.TranslatedTitle) FundingTitle(org.orcid.jaxb.model.v3.dev1.record.FundingTitle) WorkTitle(org.orcid.jaxb.model.v3.dev1.record.WorkTitle) PeerReview(org.orcid.jaxb.model.v3.dev1.record.PeerReview) Url(org.orcid.jaxb.model.v3.dev1.common.Url)

Example 42 with Url

use of org.orcid.jaxb.model.v3.dev1.common.Url in project ORCID-Source by ORCID.

the class ActivityValidatorTest method getWork.

public Work getWork() {
    Work work = new Work();
    work.setCountry(new Country(Iso3166Country.US));
    work.setJournalTitle(new Title("journal-title"));
    work.setLanguageCode("en");
    work.setPublicationDate(new PublicationDate(getFuzzyDate()));
    work.setShortDescription("short-description");
    work.setUrl(new Url("http://test.orcid.org"));
    work.setVisibility(Visibility.PUBLIC);
    work.setWorkCitation(new Citation("citation", CitationType.FORMATTED_HARVARD));
    ContributorAttributes attributes = new ContributorAttributes();
    attributes.setContributorRole(ContributorRole.ASSIGNEE);
    attributes.setContributorSequence(SequenceType.FIRST);
    ContributorOrcid contributorOrcid = new ContributorOrcid();
    contributorOrcid.setHost("http://test.orcid.org");
    contributorOrcid.setPath("0000-0000-0000-0000");
    contributorOrcid.setUri("https://test.orcid.org/0000-0000-0000-0000");
    Contributor contributor = new Contributor();
    contributor.setContributorAttributes(attributes);
    contributor.setContributorOrcid(contributorOrcid);
    contributor.setCreditName(new CreditName("credit name"));
    contributor.setContributorEmail(new ContributorEmail("email@test.orcid.org"));
    WorkContributors contributors = new WorkContributors(Stream.of(contributor).collect(Collectors.toList()));
    work.setWorkContributors(contributors);
    work.setWorkExternalIdentifiers(getExternalIDs());
    work.setWorkTitle(getWorkTitle());
    work.setWorkType(WorkType.ARTISTIC_PERFORMANCE);
    return work;
}
Also used : PublicationDate(org.orcid.jaxb.model.v3.dev1.common.PublicationDate) ContributorAttributes(org.orcid.jaxb.model.v3.dev1.common.ContributorAttributes) FundingContributorAttributes(org.orcid.jaxb.model.v3.dev1.record.FundingContributorAttributes) WorkContributors(org.orcid.jaxb.model.v3.dev1.record.WorkContributors) Work(org.orcid.jaxb.model.v3.dev1.record.Work) CreditName(org.orcid.jaxb.model.v3.dev1.common.CreditName) Country(org.orcid.jaxb.model.v3.dev1.common.Country) Iso3166Country(org.orcid.jaxb.model.v3.dev1.common.Iso3166Country) Title(org.orcid.jaxb.model.v3.dev1.common.Title) TranslatedTitle(org.orcid.jaxb.model.v3.dev1.common.TranslatedTitle) FundingTitle(org.orcid.jaxb.model.v3.dev1.record.FundingTitle) WorkTitle(org.orcid.jaxb.model.v3.dev1.record.WorkTitle) FundingContributor(org.orcid.jaxb.model.v3.dev1.record.FundingContributor) Contributor(org.orcid.jaxb.model.v3.dev1.common.Contributor) Citation(org.orcid.jaxb.model.v3.dev1.record.Citation) ContributorOrcid(org.orcid.jaxb.model.v3.dev1.common.ContributorOrcid) ContributorEmail(org.orcid.jaxb.model.v3.dev1.common.ContributorEmail) Url(org.orcid.jaxb.model.v3.dev1.common.Url)

Example 43 with Url

use of org.orcid.jaxb.model.v3.dev1.common.Url in project ORCID-Source by ORCID.

the class PeerReviewManagerTest method getPeerReviewSummary.

private PeerReviewSummary getPeerReviewSummary(String titleValue, String extIdValue, Visibility visibility) {
    PeerReviewSummary summary = new PeerReviewSummary();
    summary.setGroupId(titleValue);
    summary.setVisibility(visibility);
    ExternalIDs extIds = new ExternalIDs();
    ExternalID extId = new ExternalID();
    extId.setRelationship(Relationship.SELF);
    extId.setType("doi");
    extId.setUrl(new Url("http://orcid.org"));
    extId.setValue(extIdValue);
    extIds.getExternalIdentifier().add(extId);
    summary.setExternalIdentifiers(extIds);
    return summary;
}
Also used : ExternalIDs(org.orcid.jaxb.model.v3.dev1.record.ExternalIDs) PeerReviewSummary(org.orcid.jaxb.model.v3.dev1.record.summary.PeerReviewSummary) ExternalID(org.orcid.jaxb.model.v3.dev1.record.ExternalID) Url(org.orcid.jaxb.model.v3.dev1.common.Url)

Example 44 with Url

use of org.orcid.jaxb.model.v3.dev1.common.Url in project ORCID-Source by ORCID.

the class PeerReviewManagerTest method getPeerReview.

private PeerReview getPeerReview(String extIdValue) {
    PeerReview peerReview = new PeerReview();
    peerReview.setRole(Role.CHAIR);
    ExternalIDs extIds = new ExternalIDs();
    ExternalID extId = new ExternalID();
    extId.setRelationship(Relationship.SELF);
    extId.setType("doi");
    extId.setUrl(new Url("http://orcid.org"));
    if (extIdValue == null) {
        extId.setValue("ext-id-value");
    } else {
        extId.setValue("ext-id-value-" + extIdValue);
    }
    extIds.getExternalIdentifier().add(extId);
    peerReview.setExternalIdentifiers(extIds);
    if (extIdValue == null) {
        peerReview.setSubjectContainerName(new Title("Peer review title"));
    } else {
        peerReview.setSubjectContainerName(new Title("Peer review title " + extIdValue));
    }
    peerReview.setSubjectExternalIdentifier(extId);
    Organization org = new Organization();
    org.setName("org-name");
    OrganizationAddress address = new OrganizationAddress();
    address.setCity("city");
    address.setCountry(Iso3166Country.US);
    org.setAddress(address);
    DisambiguatedOrganization disambiguatedOrg = new DisambiguatedOrganization();
    disambiguatedOrg.setDisambiguatedOrganizationIdentifier("abc456");
    disambiguatedOrg.setDisambiguationSource("WDB");
    org.setDisambiguatedOrganization(disambiguatedOrg);
    peerReview.setOrganization(org);
    peerReview.setType(PeerReviewType.EVALUATION);
    peerReview.setVisibility(Visibility.PUBLIC);
    return peerReview;
}
Also used : ExternalIDs(org.orcid.jaxb.model.v3.dev1.record.ExternalIDs) Organization(org.orcid.jaxb.model.v3.dev1.common.Organization) DisambiguatedOrganization(org.orcid.jaxb.model.v3.dev1.common.DisambiguatedOrganization) DisambiguatedOrganization(org.orcid.jaxb.model.v3.dev1.common.DisambiguatedOrganization) ExternalID(org.orcid.jaxb.model.v3.dev1.record.ExternalID) OrganizationAddress(org.orcid.jaxb.model.v3.dev1.common.OrganizationAddress) Title(org.orcid.jaxb.model.v3.dev1.common.Title) PeerReview(org.orcid.jaxb.model.v3.dev1.record.PeerReview) Url(org.orcid.jaxb.model.v3.dev1.common.Url)

Example 45 with Url

use of org.orcid.jaxb.model.v3.dev1.common.Url in project ORCID-Source by ORCID.

the class OrcidSecurityManagerTestBase method createResearcherUrl.

protected ResearcherUrl createResearcherUrl(Visibility v, String sourceId) {
    ResearcherUrl r = new ResearcherUrl();
    r.setUrl(new Url("http://orcid.org/test/" + System.currentTimeMillis()));
    r.setVisibility(v);
    setSource(r, sourceId);
    return r;
}
Also used : ResearcherUrl(org.orcid.jaxb.model.v3.dev1.record.ResearcherUrl) ResearcherUrl(org.orcid.jaxb.model.v3.dev1.record.ResearcherUrl) Url(org.orcid.jaxb.model.v3.dev1.common.Url)

Aggregations

Url (org.orcid.jaxb.model.v3.dev1.common.Url)85 Test (org.junit.Test)76 ExternalID (org.orcid.jaxb.model.v3.dev1.record.ExternalID)68 ExternalIDs (org.orcid.jaxb.model.v3.dev1.record.ExternalIDs)50 ResearcherUrl (org.orcid.jaxb.model.v3.dev1.record.ResearcherUrl)42 Response (javax.ws.rs.core.Response)28 DBUnitTest (org.orcid.test.DBUnitTest)28 Title (org.orcid.jaxb.model.v3.dev1.common.Title)23 Work (org.orcid.jaxb.model.v3.dev1.record.Work)23 WorkTitle (org.orcid.jaxb.model.v3.dev1.record.WorkTitle)19 List (java.util.List)16 PeerReview (org.orcid.jaxb.model.v3.dev1.record.PeerReview)13 PersonExternalIdentifier (org.orcid.jaxb.model.v3.dev1.record.PersonExternalIdentifier)13 Funding (org.orcid.jaxb.model.v3.dev1.record.Funding)12 ClientResponse (com.sun.jersey.api.client.ClientResponse)10 DisambiguatedOrganization (org.orcid.jaxb.model.v3.dev1.common.DisambiguatedOrganization)8 TranslatedTitle (org.orcid.jaxb.model.v3.dev1.common.TranslatedTitle)8 WorkSummary (org.orcid.jaxb.model.v3.dev1.record.summary.WorkSummary)8 BaseTest (org.orcid.core.BaseTest)7 Organization (org.orcid.jaxb.model.v3.dev1.common.Organization)6