Search in sources :

Example 11 with Affiliation

use of org.orcid.jaxb.model.record_v2.Affiliation in project ORCID-Source by ORCID.

the class OrcidRecordToSolrDocumentTest method testOrgIDAndGrantNumber.

@Test
public void testOrgIDAndGrantNumber() throws JAXBException {
    Record record = getRecord("/v20record.xml");
    OrcidRecordToSolrDocument v20 = new OrcidRecordToSolrDocument(false);
    OrcidSolrDocument v20Doc = v20.convert(record, new ArrayList<Funding>());
    Assert.assertTrue(v20Doc.getOrganisationIds().containsKey("ringgold-org-id"));
    Assert.assertTrue(v20Doc.getOrganisationIds().get("ringgold-org-id").contains("5488"));
    Assert.assertTrue(v20Doc.getOrganisationIds().get("ringgold-org-id").contains("4925"));
    Assert.assertTrue(v20Doc.getOrganisationNames().get("affiliation-org-name").contains("Open University"));
    Assert.assertTrue(v20Doc.getOrganisationNames().get("affiliation-org-name").contains("British Library"));
/*
        Assert.assertTrue(v20Doc.getOrganisationNames().get("funding-org-name").contains("THOR - Technical and Human Infrastructure for Open Research"));
        Assert.assertTrue(v20Doc.getGrantNumbers().contains("H2020-EU.1.4.1.3."));
        */
}
Also used : OrcidRecordToSolrDocument(org.orcid.listener.solr.OrcidRecordToSolrDocument) Funding(org.orcid.jaxb.model.record_v2.Funding) OrcidSolrDocument(org.orcid.utils.solr.entities.OrcidSolrDocument) Record(org.orcid.jaxb.model.record_v2.Record) Test(org.junit.Test)

Aggregations

Affiliation (org.orcid.jaxb.model.record_v2.Affiliation)7 ArrayList (java.util.ArrayList)4 Education (org.orcid.jaxb.model.record_v2.Education)3 Name (org.orcid.jaxb.model.record_v2.Name)3 OrgAffiliationRelationEntity (org.orcid.persistence.jpa.entities.OrgAffiliationRelationEntity)3 HashMap (java.util.HashMap)2 LinkedHashMap (java.util.LinkedHashMap)2 DisambiguatedOrganization (org.orcid.jaxb.model.common_v2.DisambiguatedOrganization)2 Organization (org.orcid.jaxb.model.common_v2.Organization)2 OrganizationAddress (org.orcid.jaxb.model.common_v2.OrganizationAddress)2 Biography (org.orcid.jaxb.model.record_v2.Biography)2 Employment (org.orcid.jaxb.model.record_v2.Employment)2 FamilyName (org.orcid.jaxb.model.record_v2.FamilyName)2 Funding (org.orcid.jaxb.model.record_v2.Funding)2 GivenNames (org.orcid.jaxb.model.record_v2.GivenNames)2 EmailEntity (org.orcid.persistence.jpa.entities.EmailEntity)2 ProfileEntity (org.orcid.persistence.jpa.entities.ProfileEntity)2 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)2 JsonGenerationException (com.fasterxml.jackson.core.JsonGenerationException)1 JsonMappingException (com.fasterxml.jackson.databind.JsonMappingException)1