/** TODO */ private OrgDisambiguatedEntity findByDetails(RDFOrganization org) { Iso3166Country country = StringUtils.isBlank(org.country) ? null : Iso3166Country.valueOf(org.country); // Find the org by name, city, country and state OrgDisambiguatedEntity existingEntity = orgDisambiguatedDao.findByNameCityRegionCountryAndSourceType( org.name, org.stateCode, org.stateCode, country, FUNDREF_SOURCE_TYPE); // If no match is found, try with the doi and source type if (existingEntity == null) { existingEntity = orgDisambiguatedDao.findBySourceIdAndSourceType(org.doi, FUNDREF_SOURCE_TYPE); } return existingEntity; }