@Override public void addRule(Rule rule) { ruleList.add(rule); }
if (subset.length == 1) { provenlist.add(subset.getFirst()); } else if (!i.hasNext()) { provenlist.add(subset.getFirst()); } else Key key = subset.combineRulesInListToKey() if (!doneKeys.containts(key)) { getProven(subset, provenlist, i);
/** * Create a new {@code RecipeImpl} from a set of rule expressed in KReS rule syntax. * * @param recipeID * @param recipeDescription * @param ruleList */ public RecipeImpl(IRI recipeID, String recipeDescription, RuleList ruleList) { this.recipeID = recipeID; this.recipeDescription = recipeDescription; if ( ruleList != null ) { this.ruleList.addAll( ruleList ); } }
public KB(String ruleNamespace) { log.debug("Setting up a KReSKB"); prefixes = new Hashtable<String,String>(); prefixes.put("var", Symbols.variablesPrefix); prefixes.put("rmi2", ruleNamespace); ruleList = new RuleList(); }
@Override public void removeRule(Rule rule) { ruleList.remove(rule); }
final public AtomList atomListRest() throws ParseException { AtomList atomList = new AtomList(); RuleAtom kReSAtom; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AND: jj_consume_token(AND); atomList = atomList(); {if (true) return atomList;} break; default: jj_la1[3] = jj_gen; {if (true) return atomList;} } throw new Error("Missing return statement in function"); }
public Iterator<Rule> iterator() { return new RuleIterator(this); }
public Iterator<RuleAtom> iterator() { return new AtomIterator(this); }
public Iterator<Recipe> iterator() { return new RecipeIterator(this); }
public boolean retainAll(Collection<?> c) { Recipe[] recipesCopy = null; Recipe[] recipesTMP = null; for (Object o : c) { if (o instanceof Recipe) { if (contains(o)) { if (recipesCopy == null) { recipesCopy = new Recipe[1]; recipesCopy[0] = (Recipe) o; } else { recipesTMP = new Recipe[recipesCopy.length + 1]; System.arraycopy(recipesCopy, 0, recipesTMP, 0, recipesCopy.length); recipesTMP[recipesTMP.length - 1] = (Recipe) o; recipesCopy = recipesTMP; } } } } recipes = recipesCopy; return true; }
@Override public void addRule(Rule rule) { ruleList.add(rule); }
/** * Create a new {@code RecipeImpl} from a set of rule expressed in KReS rule syntax. * * @param recipeID * @param recipeDescription * @param ruleList */ public RecipeImpl(IRI recipeID, String recipeDescription, RuleList ruleList) { this.recipeID = recipeID; this.recipeDescription = recipeDescription; if ( ruleList != null ) { this.ruleList.addAll( ruleList ); } }
public KB(String ruleNamespace) { log.debug("Setting up a KReSKB"); prefixes = new Hashtable<String,String>(); prefixes.put("var", Symbols.variablesPrefix); prefixes.put("rmi2", ruleNamespace); ruleList = new RuleList(); }
@Override public void removeRule(Rule rule) { ruleList.remove(rule); }
final public AtomList atomListRest() throws ParseException { AtomList atomList = new AtomList(); RuleAtom kReSAtom; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AND: jj_consume_token(AND); atomList = atomList(); {if (true) return atomList;} break; default: jj_la1[3] = jj_gen; {if (true) return atomList;} } throw new Error("Missing return statement in function"); }
public void addRule(Rule rule) { ruleList.add(rule); }
public void addRule(Rule rule) { ruleList.add(rule); }