Search in sources :

Example 1 with ExpertListSearchResultDTO

use of com.odysseusinc.arachne.portal.api.v1.dto.ExpertListSearchResultDTO in project ArachneCentralAPI by OHDSI.

the class BaseExpertFinderController method list.

@ApiOperation("Get expert list")
@RequestMapping(value = "/api/v1/user-management/users", method = GET)
public JsonResult<ExpertListSearchResultDTO> list(@ModelAttribute SearchExpertListDTO searchDTO) throws IOException, SolrServerException, NoSuchFieldException {
    JsonResult result = new JsonResult<ExpertListSearchResultDTO>(NO_ERROR);
    SolrQuery solrQuery = conversionService.convert(searchDTO, SolrQuery.class);
    SearchResult searchResult = userService.search(solrQuery);
    result.setResult(this.conversionService.convert(searchResult, ExpertListSearchResultDTO.class));
    return result;
}
Also used : ExpertListSearchResultDTO(com.odysseusinc.arachne.portal.api.v1.dto.ExpertListSearchResultDTO) SearchResult(com.odysseusinc.arachne.portal.service.impl.solr.SearchResult) JsonResult(com.odysseusinc.arachne.commons.api.v1.dto.util.JsonResult) SolrQuery(org.apache.solr.client.solrj.SolrQuery) ApiOperation(io.swagger.annotations.ApiOperation) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

JsonResult (com.odysseusinc.arachne.commons.api.v1.dto.util.JsonResult)1 ExpertListSearchResultDTO (com.odysseusinc.arachne.portal.api.v1.dto.ExpertListSearchResultDTO)1 SearchResult (com.odysseusinc.arachne.portal.service.impl.solr.SearchResult)1 ApiOperation (io.swagger.annotations.ApiOperation)1 SolrQuery (org.apache.solr.client.solrj.SolrQuery)1 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)1