use of com.vaticle.typedb.core.logic.resolvable.Negated in project grakn by graknlabs.
the class ConjunctionResolver method initialiseDownstreamResolvers.
@Override
protected void initialiseDownstreamResolvers() {
LOG.debug("{}: initialising downstream resolvers", name());
Set<Concludable> concludables = concludablesTriggeringRules();
Set<Retrievable> retrievables = Retrievable.extractFrom(conjunction(), concludables);
resolvables.addAll(concludables);
resolvables.addAll(retrievables);
iterate(resolvables).forEachRemaining(resolvable -> {
try {
downstreamResolvers.put(resolvable, registry.registerResolvable(resolvable));
} catch (TypeDBException e) {
terminate(e);
}
});
for (Negation negation : conjunction().negations()) {
Negated negated = new Negated(negation);
try {
downstreamResolvers.put(negated, registry.negated(negated, conjunction()));
negateds.add(negated);
} catch (TypeDBException e) {
terminate(e);
}
}
if (!isTerminated())
isInitialised = true;
}
Aggregations