Search in sources :

Example 1 with WorkTitle

use of org.orcid.jaxb.model.record_rc3.WorkTitle in project ORCID-Source by ORCID.

the class Utils method getWork.

public static Work getWork(String title) {
    Work work = new Work();
    WorkTitle workTitle = new WorkTitle();
    workTitle.setTitle(new Title(title));
    work.setWorkTitle(workTitle);
    work.setWorkType(WorkType.BOOK);
    work.setVisibility(Visibility.PUBLIC);
    ExternalIDs extIds = new ExternalIDs();
    ExternalID extId = new ExternalID();
    extId.setRelationship(Relationship.PART_OF);
    extId.setType(WorkExternalIdentifierType.AGR.value());
    extId.setValue("ext-id-" + System.currentTimeMillis());
    extId.setUrl(new Url("http://thisIsANewUrl.com"));
    extIds.getExternalIdentifier().add(extId);
    work.setWorkExternalIdentifiers(extIds);
    return work;
}
Also used : ExternalIDs(org.orcid.jaxb.model.record_v2.ExternalIDs) WorkTitle(org.orcid.jaxb.model.record_v2.WorkTitle) ExternalID(org.orcid.jaxb.model.record_v2.ExternalID) Work(org.orcid.jaxb.model.record_v2.Work) WorkTitle(org.orcid.jaxb.model.record_v2.WorkTitle) FundingTitle(org.orcid.jaxb.model.record_v2.FundingTitle) Title(org.orcid.jaxb.model.common_v2.Title) Url(org.orcid.jaxb.model.common_v2.Url) ResearcherUrl(org.orcid.jaxb.model.record_v2.ResearcherUrl)

Example 2 with WorkTitle

use of org.orcid.jaxb.model.record_rc3.WorkTitle in project ORCID-Source by ORCID.

the class Utils method getPeerReview.

public static PeerReview getPeerReview() {
    PeerReview peerReview = new PeerReview();
    ExternalIDs weis = new ExternalIDs();
    ExternalID wei1 = new ExternalID();
    wei1.setRelationship(Relationship.PART_OF);
    wei1.setUrl(new Url("http://myUrl.com"));
    wei1.setValue("work-external-identifier-id");
    wei1.setType(WorkExternalIdentifierType.DOI.value());
    weis.getExternalIdentifier().add(wei1);
    peerReview.setExternalIdentifiers(weis);
    peerReview.setGroupId("issn:0000003");
    peerReview.setOrganization(getOrganization());
    peerReview.setRole(Role.CHAIR);
    peerReview.setSubjectContainerName(new Title("subject-container-name"));
    peerReview.setSubjectExternalIdentifier(wei1);
    WorkTitle workTitle = new WorkTitle();
    workTitle.setTitle(new Title("work-title"));
    peerReview.setSubjectName(workTitle);
    peerReview.setSubjectType(WorkType.DATA_SET);
    peerReview.setType(PeerReviewType.EVALUATION);
    return peerReview;
}
Also used : ExternalIDs(org.orcid.jaxb.model.record_v2.ExternalIDs) WorkTitle(org.orcid.jaxb.model.record_v2.WorkTitle) ExternalID(org.orcid.jaxb.model.record_v2.ExternalID) WorkTitle(org.orcid.jaxb.model.record_v2.WorkTitle) FundingTitle(org.orcid.jaxb.model.record_v2.FundingTitle) Title(org.orcid.jaxb.model.common_v2.Title) PeerReview(org.orcid.jaxb.model.record_v2.PeerReview) Url(org.orcid.jaxb.model.common_v2.Url) ResearcherUrl(org.orcid.jaxb.model.record_v2.ResearcherUrl)

Example 3 with WorkTitle

use of org.orcid.jaxb.model.record_rc3.WorkTitle 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 4 with WorkTitle

use of org.orcid.jaxb.model.record_rc3.WorkTitle 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 5 with WorkTitle

use of org.orcid.jaxb.model.record_rc3.WorkTitle 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

WorkTitle (org.orcid.jaxb.model.record_v2.WorkTitle)32 Title (org.orcid.jaxb.model.common_v2.Title)31 Work (org.orcid.jaxb.model.record_v2.Work)22 ExternalID (org.orcid.jaxb.model.record_v2.ExternalID)20 ExternalIDs (org.orcid.jaxb.model.record_v2.ExternalIDs)18 Test (org.junit.Test)16 Url (org.orcid.jaxb.model.common_v2.Url)12 TranslatedTitle (org.orcid.jaxb.model.common_v2.TranslatedTitle)11 FundingTitle (org.orcid.jaxb.model.record_v2.FundingTitle)11 WorkSummary (org.orcid.jaxb.model.record.summary_v2.WorkSummary)8 WorkBulk (org.orcid.jaxb.model.record_v2.WorkBulk)6 ClientResponse (com.sun.jersey.api.client.ClientResponse)5 BaseTest (org.orcid.core.BaseTest)5 ActivitiesSummary (org.orcid.jaxb.model.record.summary_v2.ActivitiesSummary)5 WorkGroup (org.orcid.jaxb.model.record.summary_v2.WorkGroup)5 SourceEntity (org.orcid.persistence.jpa.entities.SourceEntity)5 DBUnitTest (org.orcid.test.DBUnitTest)5 ClientDetailsEntity (org.orcid.persistence.jpa.entities.ClientDetailsEntity)4 List (java.util.List)3 Response (javax.ws.rs.core.Response)3