use of org.ambraproject.wombat.service.SolrArticleAdapter in project wombat by PLOS.
the class BrowseController method populateAuthors.
private void populateAuthors(Map<String, Object> article, Site site) throws IOException {
ArticleSearchQuery query = SolrArticleAdapter.lookupArticlesByDoisQuery(ImmutableList.of((String) article.get("doi")));
List<SolrArticleAdapter> solrArticles = SolrArticleAdapter.unpackSolrQuery(solrSearchApi.search(query));
article.put("authors", solrArticles.size() > 0 ? solrArticles.get(0).getAuthors() : ImmutableList.of());
}
Aggregations