コード例 #1
0
ファイル: LPRuleStore.java プロジェクト: hmottestad/jena
 /**
  * Return true if the given predicated is tabled, currently this is true if the predicate is a
  * tabled predicate or the predicate is a wildcard and some tabled predictes exist.
  */
 public boolean isTabled(Node predicate) {
   if (allTabled) return true;
   if (predicate.isVariable() && !tabledPredicates.isEmpty()) {
     return true;
   } else {
     return tabledPredicates.contains(predicate);
   }
 }
コード例 #2
0
ファイル: LPRuleStore.java プロジェクト: hmottestad/jena
 /**
  * Register an RDF predicate as one whose presence in a goal should force the goal to be tabled.
  */
 public synchronized void tablePredicate(Node predicate) {
   tabledPredicates.add(predicate);
   if (predicate == Node.ANY) allTabled = true;
 }
コード例 #3
0
ファイル: LPRuleStore.java プロジェクト: hmottestad/jena
 /** Add all the rules and tabling instructions from an existing rulestore into this one. */
 public void addAll(LPRuleStore store) {
   super.addAll(store);
   tabledPredicates.addAll(store.tabledPredicates);
   allTabled = tabledPredicates.contains(Node.ANY);
 }