Search in sources :

Example 6 with OrcidSearchResults

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

the class OrcidSearchManagerImpl method findOrcidsByQuery.

@Override
public OrcidMessage findOrcidsByQuery(Map<String, List<String>> query) {
    OrcidMessage orcidMessage = new OrcidMessage();
    OrcidSearchResults searchResults = new OrcidSearchResults();
    OrcidSolrResults orcidSolrResults = solrDao.findByDocumentCriteria(query);
    searchResults.setNumFound(orcidSolrResults.getNumFound());
    List<OrcidSolrResult> indexedOrcids = orcidSolrResults.getResults();
    if (indexedOrcids != null && !indexedOrcids.isEmpty()) {
        List<OrcidSearchResult> orcidSearchResults = buildSearchResultsFromPublicProfile(indexedOrcids);
        searchResults.getOrcidSearchResult().addAll(orcidSearchResults);
    }
    orcidMessage.setOrcidSearchResults(searchResults);
    return orcidMessage;
}
Also used : OrcidSearchResult(org.orcid.jaxb.model.message.OrcidSearchResult) OrcidSolrResult(org.orcid.utils.solr.entities.OrcidSolrResult) OrcidSearchResults(org.orcid.jaxb.model.message.OrcidSearchResults) OrcidMessage(org.orcid.jaxb.model.message.OrcidMessage) OrcidSolrResults(org.orcid.utils.solr.entities.OrcidSolrResults)

Aggregations

OrcidSearchResults (org.orcid.jaxb.model.message.OrcidSearchResults)6 OrcidMessage (org.orcid.jaxb.model.message.OrcidMessage)5 OrcidSearchResult (org.orcid.jaxb.model.message.OrcidSearchResult)5 OrcidProfile (org.orcid.jaxb.model.message.OrcidProfile)3 OrcidSolrResult (org.orcid.utils.solr.entities.OrcidSolrResult)3 ArrayList (java.util.ArrayList)2 OrcidSolrResults (org.orcid.utils.solr.entities.OrcidSolrResults)2 VisibilityControl (org.orcid.core.security.visibility.aop.VisibilityControl)1 Orcid (org.orcid.jaxb.model.message.Orcid)1 OrcidIdentifier (org.orcid.jaxb.model.message.OrcidIdentifier)1