datasetIndex = new InitializeDatasetIndexScan(root);
root.addSucceedingOperator(datasetIndex);
// Conclusion auswerten
// TODO: erstmal nur ohne Equality, conjunction, disjunction und exists
PredicateIndexScan conclusionIndex = null;
if (obj.getConclusion() instanceof RulePredicate) {
final RulePredicate predicate = (RulePredicate) obj.getConclusion();
conclusionIndex = new PredicateIndexScan();
root.addSucceedingOperator(conclusionIndex);
Predicate toAdd = null;
if (predicate.isTriple()) {
final Triple triple = (Triple) predicate.toDataStructure();
toAdd = new Predicate();
toAdd.setName(triple.getPredicate());
toAdd.getParameters().addAll(
Arrays.asList(triple.getSubject(), triple.getObject()));
} else
toAdd = (Predicate) predicate.toDataStructure();
conclusionIndex.addPredicateFact(toAdd);
}
// TODO: nur eine Regel enthalten, welche direkt auf die conclusion
// passt,
// sp�ter auswahl der richtigen Regel