use of org.orcid.jaxb.model.common_v2.Contributor in project ORCID-Source by ORCID.
the class ContributorUtilsTest method testFilterContributorPrivateDataForWorkWithNoOrcidRecord.
@Test
public void testFilterContributorPrivateDataForWorkWithNoOrcidRecord() {
Work work = getWorkWithContributorWithoutOrcid();
contributorUtils.filterContributorPrivateData(work);
Contributor contributor = work.getWorkContributors().getContributor().get(0);
assertNull(contributor.getContributorEmail());
assertEquals("original credit name", contributor.getCreditName().getContent());
}
use of org.orcid.jaxb.model.common_v2.Contributor in project ORCID-Source by ORCID.
the class ContributorUtilsTest method getWorkContributorWithOrcid.
private WorkContributors getWorkContributorWithOrcid() {
ContributorOrcid contributorOrcid = new ContributorOrcid();
contributorOrcid.setPath("0000-0003-4902-6327");
contributorOrcid.setHost("orcid.org");
contributorOrcid.setUri("http://orcid.org/0000-0003-4902-6327");
Contributor contributor = new Contributor();
contributor.setContributorOrcid(contributorOrcid);
contributor.setContributorEmail(new ContributorEmail("never@show.this"));
contributor.setCreditName(new CreditName("original credit name"));
return new WorkContributors(Arrays.asList(contributor));
}
use of org.orcid.jaxb.model.common_v2.Contributor in project ORCID-Source by ORCID.
the class ContributorUtilsTest method getFundingWithContributorWithoutOrcid.
private Funding getFundingWithContributorWithoutOrcid() {
Funding funding = new Funding();
FundingTitle fundingTitle = new FundingTitle();
fundingTitle.setTitle(new Title("funding with contributor without ORCID record"));
funding.setTitle(fundingTitle);
funding.setContributors(getFundingContributorWithoutOrcid());
return funding;
}
use of org.orcid.jaxb.model.common_v2.Contributor in project ORCID-Source by ORCID.
the class ContributorUtilsTest method getWorkWithOrcidContributor.
private Work getWorkWithOrcidContributor() {
Work work = new Work();
WorkTitle workTitle = new WorkTitle();
workTitle.setTitle(new Title("work with contributor who has ORCID record"));
work.setWorkTitle(workTitle);
work.setWorkContributors(getWorkContributorWithOrcid());
return work;
}
use of org.orcid.jaxb.model.common_v2.Contributor in project ORCID-Source by ORCID.
the class ContributorUtilsTest method getFundingWithOrcidContributor.
private Funding getFundingWithOrcidContributor() {
Funding funding = new Funding();
FundingTitle fundingTitle = new FundingTitle();
fundingTitle.setTitle(new Title("work with contributor who has ORCID record"));
funding.setTitle(fundingTitle);
funding.setContributors(getFundingContributorWithOrcid());
return funding;
}
Aggregations