Search in sources :

Example 6 with Title

use of org.orcid.jaxb.model.common_rc2.Title 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;
}
Also used : Funding(org.orcid.jaxb.model.record_v2.Funding) FundingTitle(org.orcid.jaxb.model.record_v2.FundingTitle) WorkTitle(org.orcid.jaxb.model.record_v2.WorkTitle) Title(org.orcid.jaxb.model.common_v2.Title) FundingTitle(org.orcid.jaxb.model.record_v2.FundingTitle)

Example 7 with Title

use of org.orcid.jaxb.model.common_rc2.Title in project ORCID-Source by ORCID.

the class ContributorUtilsTest method getWorkWithoutContributors.

private Work getWorkWithoutContributors() {
    Work work = new Work();
    WorkTitle workTitle = new WorkTitle();
    workTitle.setTitle(new Title("work without contributors"));
    work.setWorkTitle(workTitle);
    return work;
}
Also used : WorkTitle(org.orcid.jaxb.model.record_v2.WorkTitle) Work(org.orcid.jaxb.model.record_v2.Work) FundingTitle(org.orcid.jaxb.model.record_v2.FundingTitle) WorkTitle(org.orcid.jaxb.model.record_v2.WorkTitle) Title(org.orcid.jaxb.model.common_v2.Title)

Example 8 with Title

use of org.orcid.jaxb.model.common_rc2.Title 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;
}
Also used : WorkTitle(org.orcid.jaxb.model.record_v2.WorkTitle) Work(org.orcid.jaxb.model.record_v2.Work) FundingTitle(org.orcid.jaxb.model.record_v2.FundingTitle) WorkTitle(org.orcid.jaxb.model.record_v2.WorkTitle) Title(org.orcid.jaxb.model.common_v2.Title)

Example 9 with Title

use of org.orcid.jaxb.model.common_rc2.Title 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;
}
Also used : Funding(org.orcid.jaxb.model.record_v2.Funding) FundingTitle(org.orcid.jaxb.model.record_v2.FundingTitle) WorkTitle(org.orcid.jaxb.model.record_v2.WorkTitle) Title(org.orcid.jaxb.model.common_v2.Title) FundingTitle(org.orcid.jaxb.model.record_v2.FundingTitle)

Example 10 with Title

use of org.orcid.jaxb.model.common_rc2.Title in project ORCID-Source by ORCID.

the class WorksTest method getWork.

private Work getWork(String title, boolean randomExtId, String extIdValue) {
    Long time = System.currentTimeMillis();
    Work work = new Work();
    WorkTitle workTitle = new WorkTitle();
    Title wTitle = new Title(title);
    workTitle.setTranslatedTitle(new TranslatedTitle(title, "en"));
    workTitle.setTitle(wTitle);
    work.setWorkTitle(workTitle);
    work.setWorkType(WorkType.BOOK);
    ExternalID extId = new ExternalID();
    extId.setRelationship(Relationship.SELF);
    if (randomExtId) {
        extId.setValue("work-ext-id-" + (Math.random() * 1000) + "-" + time);
    } else {
        extId.setValue("work-ext-id-" + extIdValue);
    }
    extId.setType("doi");
    ExternalIDs extIds = new ExternalIDs();
    extIds.getExternalIdentifier().add(extId);
    work.setWorkExternalIdentifiers(extIds);
    return work;
}
Also used : ExternalIDs(org.orcid.jaxb.model.record_rc4.ExternalIDs) TranslatedTitle(org.orcid.jaxb.model.common_rc4.TranslatedTitle) WorkTitle(org.orcid.jaxb.model.record_rc4.WorkTitle) ExternalID(org.orcid.jaxb.model.record_rc4.ExternalID) Work(org.orcid.jaxb.model.record_rc4.Work) TranslatedTitle(org.orcid.jaxb.model.common_rc4.TranslatedTitle) Title(org.orcid.jaxb.model.common_rc4.Title) WorkTitle(org.orcid.jaxb.model.record_rc4.WorkTitle)

Aggregations

Title (org.orcid.jaxb.model.common_v2.Title)43 WorkTitle (org.orcid.jaxb.model.record_v2.WorkTitle)37 ExternalID (org.orcid.jaxb.model.record_v2.ExternalID)28 Test (org.junit.Test)26 ExternalIDs (org.orcid.jaxb.model.record_v2.ExternalIDs)24 Url (org.orcid.jaxb.model.common_v2.Url)23 FundingTitle (org.orcid.jaxb.model.record_v2.FundingTitle)23 Work (org.orcid.jaxb.model.record_v2.Work)22 ClientResponse (com.sun.jersey.api.client.ClientResponse)19 TranslatedTitle (org.orcid.jaxb.model.common_v2.TranslatedTitle)12 Funding (org.orcid.jaxb.model.record_v2.Funding)11 ArrayList (java.util.ArrayList)8 List (java.util.List)7 Visibility (org.orcid.jaxb.model.common_rc2.Visibility)7 Map (java.util.Map)6 PeerReview (org.orcid.jaxb.model.record_v2.PeerReview)6 ExternalID (org.orcid.jaxb.model.record_rc2.ExternalID)5 Url (org.orcid.jaxb.model.common_rc2.Url)4 ContributorOrcid (org.orcid.jaxb.model.common_v2.ContributorOrcid)4 BaseTest (org.orcid.core.BaseTest)3