Search in sources :

Example 6 with ContributorEmail

use of org.orcid.jaxb.model.common_v2.ContributorEmail 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("http://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.common_v2.PublicationDate) FundingContributorAttributes(org.orcid.jaxb.model.record_v2.FundingContributorAttributes) ContributorAttributes(org.orcid.jaxb.model.common_v2.ContributorAttributes) WorkContributors(org.orcid.jaxb.model.record_v2.WorkContributors) Work(org.orcid.jaxb.model.record_v2.Work) CreditName(org.orcid.jaxb.model.common_v2.CreditName) Country(org.orcid.jaxb.model.common_v2.Country) Iso3166Country(org.orcid.jaxb.model.common_v2.Iso3166Country) WorkTitle(org.orcid.jaxb.model.record_v2.WorkTitle) TranslatedTitle(org.orcid.jaxb.model.common_v2.TranslatedTitle) FundingTitle(org.orcid.jaxb.model.record_v2.FundingTitle) Title(org.orcid.jaxb.model.common_v2.Title) FundingContributor(org.orcid.jaxb.model.record_v2.FundingContributor) Contributor(org.orcid.jaxb.model.common_v2.Contributor) Citation(org.orcid.jaxb.model.record_v2.Citation) ContributorOrcid(org.orcid.jaxb.model.common_v2.ContributorOrcid) ContributorEmail(org.orcid.jaxb.model.common_v2.ContributorEmail) Url(org.orcid.jaxb.model.common_v2.Url)

Aggregations

ContributorEmail (org.orcid.jaxb.model.common_v2.ContributorEmail)6 CreditName (org.orcid.jaxb.model.common_v2.CreditName)6 FundingContributor (org.orcid.jaxb.model.record_v2.FundingContributor)6 ContributorOrcid (org.orcid.jaxb.model.common_v2.ContributorOrcid)4 Contributor (org.orcid.jaxb.model.common_v2.Contributor)3 WorkContributors (org.orcid.jaxb.model.record_v2.WorkContributors)3 FundingContributorAttributes (org.orcid.jaxb.model.record_v2.FundingContributorAttributes)2 FundingContributors (org.orcid.jaxb.model.record_v2.FundingContributors)2 URI (java.net.URI)1 URISyntaxException (java.net.URISyntaxException)1 ContributorAttributes (org.orcid.jaxb.model.common_v2.ContributorAttributes)1 Country (org.orcid.jaxb.model.common_v2.Country)1 Iso3166Country (org.orcid.jaxb.model.common_v2.Iso3166Country)1 PublicationDate (org.orcid.jaxb.model.common_v2.PublicationDate)1 Title (org.orcid.jaxb.model.common_v2.Title)1 TranslatedTitle (org.orcid.jaxb.model.common_v2.TranslatedTitle)1 Url (org.orcid.jaxb.model.common_v2.Url)1 Citation (org.orcid.jaxb.model.record_v2.Citation)1 FundingTitle (org.orcid.jaxb.model.record_v2.FundingTitle)1 Work (org.orcid.jaxb.model.record_v2.Work)1