public Rule getRule(String ruleName) throws NoSuchRuleInRecipeException { for (Rule rule : ruleList) { if (rule.getRuleName().equals(ruleName)) { return rule; } } StringBuilder message = new StringBuilder(); message.append("No rule named "); message.append(ruleName); message.append(" exists in recipe "); message.append(this.getRecipeID()); throw new NoSuchRuleInRecipeException(message.toString()); }
responseBuilder = Response.status(Status.NO_CONTENT); } catch (NoSuchRuleInRecipeException e) { log.error(e.getMessage(), e); responseBuilder = Response.status(Status.NOT_FOUND); } catch (URISyntaxException e) {
responseBuilder = Response.status(Status.NO_CONTENT); } catch (NoSuchRuleInRecipeException e) { log.error(e.getMessage(), e); responseBuilder = Response.status(Status.NOT_FOUND);
public Rule getRule(String ruleName) throws NoSuchRuleInRecipeException { for (Rule rule : ruleList) { if (rule.getRuleName().equals(ruleName)) { return rule; } } StringBuilder message = new StringBuilder(); message.append("No rule named "); message.append(ruleName); message.append(" exists in recipe "); message.append(this.getRecipeID()); throw new NoSuchRuleInRecipeException(message.toString()); }
responseBuilder = Response.status(Status.NO_CONTENT); } catch (NoSuchRuleInRecipeException e) { log.error(e.getMessage(), e); responseBuilder = Response.status(Status.NOT_FOUND); } catch (URISyntaxException e) {
@Override public Rule getRule(IRI ruleID) throws NoSuchRuleInRecipeException { for (Rule rule : ruleList) { if (rule.getRuleID().toString().equals(ruleID.toString())) { return rule; } } StringBuilder message = new StringBuilder(); message.append("No rule with ID "); message.append(ruleID.toString()); message.append(" exists in recipe "); message.append(this.getRecipeID()); throw new NoSuchRuleInRecipeException(message.toString()); }
@Override public Rule getRule(IRI ruleID) throws NoSuchRuleInRecipeException { for (Rule rule : ruleList) { if (rule.getRuleID().toString().equals(ruleID.toString())) { return rule; } } StringBuilder message = new StringBuilder(); message.append("No rule with ID "); message.append(ruleID.toString()); message.append(" exists in recipe "); message.append(this.getRecipeID()); throw new NoSuchRuleInRecipeException(message.toString()); }