Search in sources :

Example 16 with WorkExternalIdentifiers

use of org.orcid.jaxb.model.message.WorkExternalIdentifiers in project ORCID-Source by ORCID.

the class OrcidIndexManagerImplTest method getStandardOrcidWithDoiInformation.

private OrcidProfile getStandardOrcidWithDoiInformation() {
    OrcidProfile orcidProfile = getStandardOrcid();
    OrcidWork orcidWork1 = orcidProfile.retrieveOrcidWorks().getOrcidWork().get(0);
    OrcidWork orcidWork2 = orcidProfile.retrieveOrcidWorks().getOrcidWork().get(1);
    OrcidWork orcidWork3 = orcidProfile.retrieveOrcidWorks().getOrcidWork().get(2);
    WorkExternalIdentifiers work1ExternalIdentifiers = new WorkExternalIdentifiers();
    WorkExternalIdentifier work1ExternalIdentifier1 = new WorkExternalIdentifier();
    work1ExternalIdentifier1.setWorkExternalIdentifierType(WorkExternalIdentifierType.DOI);
    work1ExternalIdentifier1.setWorkExternalIdentifierId(new WorkExternalIdentifierId("work1-doi1"));
    WorkExternalIdentifier work1ExternalIdentifier2 = new WorkExternalIdentifier();
    work1ExternalIdentifier2.setWorkExternalIdentifierType(WorkExternalIdentifierType.PMID);
    work1ExternalIdentifier2.setWorkExternalIdentifierId(new WorkExternalIdentifierId("work1-pmid"));
    work1ExternalIdentifiers.getWorkExternalIdentifier().add(work1ExternalIdentifier1);
    work1ExternalIdentifiers.getWorkExternalIdentifier().add(work1ExternalIdentifier2);
    orcidWork1.setWorkExternalIdentifiers(work1ExternalIdentifiers);
    WorkExternalIdentifiers work2ExternalIdentifiers = new WorkExternalIdentifiers();
    WorkExternalIdentifier work2ExternalIdentifier1 = new WorkExternalIdentifier();
    work2ExternalIdentifier1.setWorkExternalIdentifierType(WorkExternalIdentifierType.DOI);
    work2ExternalIdentifier1.setWorkExternalIdentifierId(new WorkExternalIdentifierId("work2-doi1"));
    WorkExternalIdentifier work2ExternalIdentifier2 = new WorkExternalIdentifier();
    work2ExternalIdentifier2.setWorkExternalIdentifierType(WorkExternalIdentifierType.DOI);
    work2ExternalIdentifier2.setWorkExternalIdentifierId(new WorkExternalIdentifierId("work2-doi2"));
    work2ExternalIdentifiers.getWorkExternalIdentifier().add(work2ExternalIdentifier1);
    work2ExternalIdentifiers.getWorkExternalIdentifier().add(work2ExternalIdentifier2);
    orcidWork2.setWorkExternalIdentifiers(work2ExternalIdentifiers);
    WorkExternalIdentifiers work3ExternalIdentifiers = new WorkExternalIdentifiers();
    WorkExternalIdentifier work3ExternalIdentifier1 = new WorkExternalIdentifier();
    work3ExternalIdentifier1.setWorkExternalIdentifierType(WorkExternalIdentifierType.DOI);
    work3ExternalIdentifier1.setWorkExternalIdentifierId(new WorkExternalIdentifierId("work3-doi1"));
    WorkExternalIdentifier work3ExternalIdentifier2 = new WorkExternalIdentifier();
    work3ExternalIdentifier2.setWorkExternalIdentifierType(WorkExternalIdentifierType.DOI);
    work3ExternalIdentifier2.setWorkExternalIdentifierId(new WorkExternalIdentifierId("work3-doi2"));
    work3ExternalIdentifiers.getWorkExternalIdentifier().add(work3ExternalIdentifier1);
    work3ExternalIdentifiers.getWorkExternalIdentifier().add(work3ExternalIdentifier2);
    orcidWork3.setWorkExternalIdentifiers(work3ExternalIdentifiers);
    return orcidProfile;
}
Also used : OrcidProfile(org.orcid.jaxb.model.message.OrcidProfile) WorkExternalIdentifiers(org.orcid.jaxb.model.message.WorkExternalIdentifiers) OrcidWork(org.orcid.jaxb.model.message.OrcidWork) WorkExternalIdentifierId(org.orcid.jaxb.model.message.WorkExternalIdentifierId) WorkExternalIdentifier(org.orcid.jaxb.model.message.WorkExternalIdentifier)

Aggregations

WorkExternalIdentifier (org.orcid.jaxb.model.message.WorkExternalIdentifier)16 WorkExternalIdentifiers (org.orcid.jaxb.model.message.WorkExternalIdentifiers)16 WorkExternalIdentifierId (org.orcid.jaxb.model.message.WorkExternalIdentifierId)15 OrcidWork (org.orcid.jaxb.model.message.OrcidWork)11 Title (org.orcid.jaxb.model.message.Title)10 WorkTitle (org.orcid.jaxb.model.message.WorkTitle)10 FundingTitle (org.orcid.jaxb.model.message.FundingTitle)8 OrcidProfile (org.orcid.jaxb.model.message.OrcidProfile)8 OrcidWorks (org.orcid.jaxb.model.message.OrcidWorks)7 OrcidActivities (org.orcid.jaxb.model.message.OrcidActivities)6 Test (org.junit.Test)5 OrcidMessage (org.orcid.jaxb.model.message.OrcidMessage)5 OrcidIdentifier (org.orcid.jaxb.model.message.OrcidIdentifier)4 DBUnitTest (org.orcid.test.DBUnitTest)4 Transactional (org.springframework.transaction.annotation.Transactional)3 Response (javax.ws.rs.core.Response)2 CreditName (org.orcid.jaxb.model.message.CreditName)2 Source (org.orcid.jaxb.model.message.Source)2 ClientResponse (com.sun.jersey.api.client.ClientResponse)1 ArrayList (java.util.ArrayList)1