@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);
}
}
SearchController.java 文件源码
java
阅读 43
收藏 0
点赞 0
评论 0
项目:catalog-search-service
作者:
评论列表
文章目录