public class ReasonerQueryImpl extends Object implements ReasonerQuery
Base reasoner query providing resolution and atom handling facilities for conjunctive graql queries.
public ReasonerQueryImpl inferTypes()
public ReasonerQueryImpl positive()
public ReasonerQuery copy()
copy in interface ReasonerQuerypublic boolean isEquivalent(ReasonerQueryImpl q)
q - query to be compared withpublic GraknTx tx()
tx in interface ReasonerQuerypublic Conjunction<PatternAdmin> getPattern()
getPattern in interface ReasonerQuerypublic Set<String> validateOntologically()
validateOntologically in interface ReasonerQuerypublic boolean isRuleResolvable()
isRuleResolvable in interface ReasonerQuerypublic boolean isTypeRoleCompatible(Var typedVar, Type parentType)
typedVar - variable of interestparentType - to be checkedpublic Set<Atomic> getAtoms()
getAtoms in interface ReasonerQuerypublic <T extends Atomic> java.util.stream.Stream<T> getAtoms(Class<T> type)
getAtoms in interface ReasonerQueryT - the type of Atomic to returntype - the class of Atomic to returnpublic Set<Var> getVarNames()
getVarNames in interface ReasonerQuerypublic MultiUnifier getMultiUnifier(ReasonerQuery parent)
getMultiUnifier in interface ReasonerQuerypublic GetQuery getQuery()
getQuery in interface ReasonerQueryGetQuerypublic com.google.common.collect.ImmutableMap<Var,Type> getVarTypeMap()
getVarTypeMap in interface ReasonerQuerypublic com.google.common.collect.ImmutableMap<Var,Type> getVarTypeMap(Answer sub)
getVarTypeMap in interface ReasonerQuery@Nullable public IdPredicate getIdPredicate(Var var)
var - variable namepublic Answer getSubstitution()
public Answer getRoleSubstitution()
public boolean isGround()
public java.util.stream.Stream<Answer> resolve(boolean materialise)
resolve in interface ReasonerQuerypublic QueryState subGoal(Answer sub, Unifier u, QueryState parent, Set<ReasonerAtomicQuery> subGoals, QueryCache<ReasonerAtomicQuery> cache)
sub - partial substitutionu - unifier with parent stateparent - parent statesubGoals - set of visited sub goalscache - query cachepublic LinkedList<QueryState> subGoals(Answer sub, Unifier u, QueryState parent, Set<ReasonerAtomicQuery> subGoals, QueryCache<ReasonerAtomicQuery> cache)
sub - partial substitutionu - unifier with parent stateparent - parent statesubGoals - set of visited sub goalscache - query cachepublic boolean requiresReiteration()
Copyright © 2017 Grakn Labs Ltd. All rights reserved.