@Override public Graph exportRecipe(Recipe recipe) throws NoSuchRecipeException { try { return tcManager.getGraph(recipe.getRecipeID()); } catch (NoSuchEntityException e) { throw new NoSuchRecipeException(recipe.toString()); } }
@GET @Path("/recipe") @Produces(value = {KRFormat.RDF_XML, KRFormat.TURTLE, KRFormat.OWL_XML, KRFormat.RDF_JSON, KRFormat.FUNCTIONAL_OWL, KRFormat.MANCHESTER_OWL}) public Response listRecipes(@Context HttpHeaders headers) { ResponseBuilder responseBuilder = null; try { RecipeList recipeList = getListRecipes(); responseBuilder = Response.ok(recipeList); } catch (NoSuchRecipeException e) { log.error(e.getMessage(), e); responseBuilder = Response.status(Status.NOT_FOUND); } catch (RecipeConstructionException e) { log.error(e.getMessage(), e); responseBuilder = Response.status(Status.INTERNAL_SERVER_ERROR); } // addCORSOrigin(servletContext, responseBuilder, headers); return responseBuilder.build(); }
throw new WebApplicationException(e, INTERNAL_SERVER_ERROR); } catch (NoSuchRecipeException e) { log.error(e.getMessage(), e); responseBuilder = Response.status(NOT_FOUND);
@Override public Graph exportRecipe(Recipe recipe) throws NoSuchRecipeException { try { return tcManager.getGraph(recipe.getRecipeID()); } catch (NoSuchEntityException e) { throw new NoSuchRecipeException(recipe.toString()); } }
log.error(e.getMessage(), e); responseBuilder = Response.status(Status.NOT_FOUND); } catch (RecipeConstructionException e) {
recipeGraph = tcManager.getGraph(recipeID); } catch (NoSuchEntityException e) { throw new NoSuchRecipeException(recipeID.toString());
log.error(e.getMessage(), e); responseBuilder = Response.status(Status.NOT_FOUND); } catch (RecipeConstructionException e) {
recipeGraph = tcManager.getGraph(recipeID); } catch (NoSuchEntityException e) { throw new NoSuchRecipeException(recipeID.toString());
ruleStore.removeRule(rcp, rl); } catch (NoSuchRecipeException e) { log.error(e.getMessage(), e); responseBuilder = Response.status(Status.PRECONDITION_FAILED); } catch (RecipeConstructionException e) {
log.error(e.getMessage(), e); responseBuilder = Response.status(Status.NOT_FOUND); } catch (RecipeConstructionException e) {
log.error(e.getMessage(), e); } catch (RecipeConstructionException e) { rb = Response.status(NO_CONTENT);
} catch (NoSuchRecipeException e) { responseBuilder = Response.status(Status.NO_CONTENT); log.error(e.getMessage(), e); } catch (RecipeConstructionException e) {