SearchController.java 文件源码

java
阅读 43 收藏 0 点赞 0 评论 0

项目:catalog-search-service 作者:
@CrossOrigin
@RequestMapping(value = "/detectMeaningLanguageSpecific", method = RequestMethod.GET)
HttpEntity<Object> detectMeaningLanguageSpecific(@RequestParam("inputAsJson") String inputAsJson) {
    try {
        Logger.getAnonymousLogger().log(Level.INFO, "Invoke: detectMeaningLanguageSpecific: " + inputAsJson);
        Gson gson = new Gson();
        InputParameterdetectMeaningLanguageSpecific inputParameterdetectMeaningLanguageSpecific = gson
                .fromJson(inputAsJson, InputParameterdetectMeaningLanguageSpecific.class);
        List<Entity> concepts = sparqlDerivation.detectPossibleConceptsLanguageSpecific(
                inputParameterdetectMeaningLanguageSpecific.getKeyword(),
                inputParameterdetectMeaningLanguageSpecific.getLanguage());
        MeaningResult meaningResult = new MeaningResult();

        meaningResult.setConceptOverview(concepts);
        meaningResult.setSearchTyp("ExplorativeSearch");

        Gson output = new Gson();
        String result = "";
        result = output.toJson(meaningResult);

        return new ResponseEntity<Object>(result, HttpStatus.OK);
    } catch (Exception e) {
        return new ResponseEntity<Object>(e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR);
    }

}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号