public class ReasonerQueryImpl extends Object implements ReasonerQuery
Base reasoner query providing resolution and atom handling facilities for conjunctive graql queries.
| Modifier | Constructor and Description |
|---|---|
protected |
ReasonerQueryImpl(Atom atom) |
|
ReasonerQueryImpl(Conjunction<VarAdmin> pattern,
GraknGraph graph) |
|
ReasonerQueryImpl(ReasonerQueryImpl q) |
public ReasonerQueryImpl(Conjunction<VarAdmin> pattern, GraknGraph graph)
public ReasonerQueryImpl(ReasonerQueryImpl q)
protected ReasonerQueryImpl(Atom atom)
public ReasonerQuery copy()
copy in interface ReasonerQuerypublic GraknGraph graph()
graph in interface ReasonerQuerypublic Conjunction<PatternAdmin> getPattern()
getPattern in interface ReasonerQuerypublic boolean isRuleResolvable()
isRuleResolvable in interface ReasonerQuerypublic Set<Atomic> getAtoms()
getAtoms in interface ReasonerQuerypublic Set<IdPredicate> getIdPredicates()
public Set<ValuePredicate> getValuePredicates()
public Set<TypeAtom> getTypeConstraints()
public Set<NotEquals> getFilters()
public Set<VarName> getVarNames()
getVarNames in interface ReasonerQuerypublic boolean containsEquivalentAtom(Atomic atom)
atom - in questionpublic Unifier getUnifier(ReasonerQuery parent)
getUnifier in interface ReasonerQuerypublic void unify(VarName from, VarName to)
unify in interface ReasonerQueryfrom - variable name to be changedto - new variable namepublic void unify(Unifier unifier)
unify in interface ReasonerQueryunifier - (variable mappings) to be appliedpublic MatchQuery getMatchQuery()
getMatchQuery in interface ReasonerQuerypublic Map<VarName,Type> getVarTypeMap()
getVarTypeMap in interface ReasonerQuerypublic IdPredicate getIdPredicate(VarName var)
var - variable namepublic boolean addAtomic(Atomic atom)
atom - to be addedpublic boolean removeAtomic(Atomic atom)
atom - to be removedpublic void addAtomConstraints(Set<? extends Atomic> cstrs)
cstrs - set of constraintspublic Atom findNextJoinable(Atom atom)
atom - for which the neighbour is to be foundpublic boolean isEquivalent(ReasonerQueryImpl q)
q - query to be compared withpublic java.util.stream.Stream<Answer> resolve(boolean materialise, boolean explanation)
ReasonerQueryresolve in interface ReasonerQuerymaterialise - materialisation flagexplanation - whether to provide explanationpublic java.util.stream.Stream<Answer> resolve(boolean materialise, boolean explanation, LazyQueryCache<ReasonerAtomicQuery> cache, LazyQueryCache<ReasonerAtomicQuery> dCache)
materialise - materialisation flagpublic ReasonerQueryIterator iterator(Answer sub, Set<ReasonerAtomicQuery> subGoals, QueryCache<ReasonerAtomicQuery> cache)
Copyright © 2017 Grakn Labs Ltd. All rights reserved.