Search in sources :

Example 16 with ResearcherUrl

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

the class JpaJaxbEntityAdapterToOrcidProfileTest method checkOrcidProfile.

private void checkOrcidProfile(OrcidBio orcidBio) {
    checkPersonalDetails(orcidBio.getPersonalDetails());
    assertNotNull(orcidBio.getContactDetails());
    checkContactDetails(orcidBio.getContactDetails());
    assertNotNull(orcidBio.getExternalIdentifiers());
    checkExternalIdentifiers(orcidBio.getExternalIdentifiers());
    assertNotNull(orcidBio.getDelegation());
    checkDelegation(orcidBio.getDelegation());
    assertNull(orcidBio.getScope());
    //		Applications are not linked with OrcidProfile object anymore.
    //        assertNotNull(orcidBio.getApplications());
    //        checkApplications(orcidBio.getApplications());
    ResearcherUrls researcherUrls = orcidBio.getResearcherUrls();
    List<ResearcherUrl> urls = researcherUrls.getResearcherUrl();
    Collections.sort(urls);
    assertEquals(6, urls.size());
    Url url1 = urls.get(0).getUrl();
    String url1Name = urls.get(0).getUrlName().getContent();
    assertEquals(url1Name, "443_1");
    assertEquals("http://www.researcherurl2.com?id=1", url1.getValue());
    Url url2 = urls.get(1).getUrl();
    String url2Name = urls.get(1).getUrlName().getContent();
    assertEquals(url2Name, "443_2");
    assertEquals("http://www.researcherurl2.com?id=2", url2.getValue());
    Url url3 = urls.get(2).getUrl();
    String url3Name = urls.get(2).getUrlName().getContent();
    assertEquals(url3Name, "443_3");
    assertEquals("http://www.researcherurl2.com?id=5", url3.getValue());
    Url url4 = urls.get(3).getUrl();
    String url4Name = urls.get(3).getUrlName().getContent();
    assertEquals(url4Name, "443_4");
    assertEquals("http://www.researcherurl2.com?id=6", url4.getValue());
    Url url5 = urls.get(4).getUrl();
    String url5Name = urls.get(4).getUrlName().getContent();
    assertEquals(url5Name, "443_5");
    assertEquals("http://www.researcherurl2.com?id=7", url5.getValue());
    Url url6 = urls.get(5).getUrl();
    String url6Name = urls.get(5).getUrlName().getContent();
    assertEquals(url6Name, "443_6");
    assertEquals("http://www.researcherurl2.com?id=8", url6.getValue());
    checkKeywords(orcidBio.getKeywords());
}
Also used : ResearcherUrls(org.orcid.jaxb.model.message.ResearcherUrls) ResearcherUrl(org.orcid.jaxb.model.message.ResearcherUrl) Url(org.orcid.jaxb.model.message.Url) ResearcherUrl(org.orcid.jaxb.model.message.ResearcherUrl)

Aggregations

ResearcherUrl (org.orcid.jaxb.model.message.ResearcherUrl)16 ResearcherUrls (org.orcid.jaxb.model.message.ResearcherUrls)12 Url (org.orcid.jaxb.model.message.Url)12 OrcidBio (org.orcid.jaxb.model.message.OrcidBio)10 Keyword (org.orcid.jaxb.model.message.Keyword)9 ExternalIdentifier (org.orcid.jaxb.model.message.ExternalIdentifier)8 OrcidProfile (org.orcid.jaxb.model.message.OrcidProfile)8 Keywords (org.orcid.jaxb.model.message.Keywords)7 OtherNames (org.orcid.jaxb.model.message.OtherNames)7 PersonalDetails (org.orcid.jaxb.model.message.PersonalDetails)7 ContactDetails (org.orcid.jaxb.model.message.ContactDetails)6 Email (org.orcid.jaxb.model.message.Email)6 ExternalIdCommonName (org.orcid.jaxb.model.message.ExternalIdCommonName)6 ExternalIdReference (org.orcid.jaxb.model.message.ExternalIdReference)6 ExternalIdentifiers (org.orcid.jaxb.model.message.ExternalIdentifiers)6 FamilyName (org.orcid.jaxb.model.message.FamilyName)6 GivenNames (org.orcid.jaxb.model.message.GivenNames)6 WorkExternalIdentifier (org.orcid.jaxb.model.message.WorkExternalIdentifier)6 Test (org.junit.Test)5 Biography (org.orcid.jaxb.model.message.Biography)5