use of fr.lirmm.graphik.graal.api.core.AtomSet in project graal by graphik-team.
the class OWLAxiomParser method visit.
@Override
public Iterable<? extends Object> visit(OWLObjectPropertyAssertionAxiom arg) {
freeVarGen.setIndex(0);
Term a = GraalUtils.createTerm(arg.getSubject());
Term b = GraalUtils.createTerm(arg.getObject());
AtomSet atomset = arg.getProperty().accept(new OWLPropertyExpressionVisitorImpl(a, b));
return Collections.singleton(atomset);
}
use of fr.lirmm.graphik.graal.api.core.AtomSet in project graal by graphik-team.
the class BreadthFirstChase method dispatchNewData.
// /////////////////////////////////////////////////////////////////////////
// PRIVATE CLASS
// /////////////////////////////////////////////////////////////////////////
protected void dispatchNewData(Collection<Atom> newData) throws ChaseException {
for (Atom a : newData) {
Predicate p = a.getPredicate();
for (Rule r : ruleSet.getRulesByBodyPredicate(p)) {
if (linearRuleCheck(r)) {
AtomSet set = nextRulesToCheck.get(r);
if (set == null) {
set = new DefaultInMemoryGraphStore();
nextRulesToCheck.put(r, set);
}
try {
set.add(a);
} catch (AtomSetException e) {
throw new ChaseException("Exception while adding data into a tmp store", e);
}
} else {
nextRulesToCheck.put(r, atomSet);
}
}
}
}
Aggregations