use of org.orcid.pojo.OrgDisambiguated in project ORCID-Source by ORCID.
the class OrgDisambiguatedManagerImpl method findInDB.
@Override
public OrgDisambiguated findInDB(Long id) {
OrgDisambiguatedEntity orgDisambiguatedEntity = orgDisambiguatedDao.find(id);
OrgDisambiguated org = new OrgDisambiguated();
org.setValue(orgDisambiguatedEntity.getName());
org.setCity(orgDisambiguatedEntity.getCity());
org.setRegion(orgDisambiguatedEntity.getRegion());
org.setCountry(orgDisambiguatedEntity.getCountry().value());
org.setOrgType(orgDisambiguatedEntity.getOrgType());
org.setSourceId(orgDisambiguatedEntity.getSourceId());
org.setSourceType(orgDisambiguatedEntity.getSourceType());
return org;
}
use of org.orcid.pojo.OrgDisambiguated in project ORCID-Source by ORCID.
the class OrgDisambiguatedManagerImpl method searchOrgsFromSolr.
@Override
public List<OrgDisambiguated> searchOrgsFromSolr(String searchTerm, int firstResult, int maxResult, boolean fundersOnly) {
List<OrgDisambiguatedSolrDocument> docs = orgDisambiguatedSolrDao.getOrgs(searchTerm, firstResult, maxResult, fundersOnly);
List<OrgDisambiguated> ret = new ArrayList<OrgDisambiguated>();
for (OrgDisambiguatedSolrDocument doc : docs) {
OrgDisambiguated org = new OrgDisambiguated();
org.setValue(doc.getOrgDisambiguatedName());
org.setCity(doc.getOrgDisambiguatedCity());
org.setRegion(doc.getOrgDisambiguatedRegion());
org.setCountry(doc.getOrgDisambiguatedCountry());
org.setOrgType(doc.getOrgDisambiguatedType());
org.setDisambiguatedAffiliationIdentifier(Long.toString(doc.getOrgDisambiguatedId()));
ret.add(org);
}
return ret;
}
Aggregations