/** * Return a unique key to be used in caches and similar. * * @return */ public String getKey() { return toString(); }
/** * Return a unique key to be used in caches and similar. * * @return */ public String getKey() { return toString(); }
/** * * @param addedTriples */ private void processRules(final Set<KiWiTriple> addedTriples) throws SQLException, SailException, ReasoningException { updateTaskStatus("processing rules ..."); // select the rules that have at least one matching pattern; the match method will // return a set of variable bindings that we will be used to prepopulate the bindings for(final Pattern pattern : patternRuleMap.keySet()) { for(KiWiTriple triple : addedTriples) { QueryResult match = matches(pattern,triple); if(match != null) { for(Rule rule : patternRuleMap.get(pattern)) { log.debug("REASONER(rule '{}'): pattern {} matched with triple {}", rule.getName(), pattern.toString(), triple.toString()); processRule(rule, match, pattern); } } } } }
/** * * @param addedTriples */ private void processRules(final Set<KiWiTriple> addedTriples) throws SQLException, SailException, ReasoningException { updateTaskStatus("processing rules ..."); // select the rules that have at least one matching pattern; the match method will // return a set of variable bindings that we will be used to prepopulate the bindings for(final Pattern pattern : patternRuleMap.keySet()) { for(KiWiTriple triple : addedTriples) { QueryResult match = matches(pattern,triple); if(match != null) { for(Rule rule : patternRuleMap.get(pattern)) { log.debug("REASONER(rule '{}'): pattern {} matched with triple {}", rule.getName(), pattern.toString(), triple.toString()); processRule(rule, match, pattern); } } } } }