@GET
@Produces(value = {MediaType.APPLICATION_JSON, KRFormat.RDF_XML, KRFormat.TURTLE, KRFormat.OWL_XML,
KRFormat.RDF_JSON, KRFormat.FUNCTIONAL_OWL, KRFormat.MANCHESTER_OWL,
MediaType.TEXT_PLAIN})
@Path("/find/recipes")
public Response findRecipes(@QueryParam("description") String description) {
log.info("Searching for recipes with description like to {}.", description);
RecipeList recipes = ruleStore.findRecipesByDescription(description);
log.info("The recipe list is emplty? {} ", recipes.isEmpty());
if (recipes.isEmpty()) {
return Response.status(Status.NOT_FOUND).build();
}
return Response.ok(recipes).build();
}