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 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 Map<VarName,VarName> getUnifiers(ReasonerQuery parent)
getUnifiers in interface ReasonerQuerypublic void unify(VarName from, VarName to)
unify in interface ReasonerQueryfrom - variable name to be changedto - new variable namepublic void unify(Map<VarName,VarName> unifiers)
unify in interface ReasonerQueryunifiers - contain unifiers (variable mappings) to be appliedpublic MatchQuery getMatchQuery()
public Map<VarName,Type> getVarTypeMap()
getVarTypeMap in interface ReasonerQuerypublic IdPredicate getIdPredicate(VarName var)
var - variable namepublic boolean addAtom(Atomic atom)
atom - to be addedpublic boolean removeAtom(Atomic atom)
atom - to be removedpublic void addAtomConstraints(Set<? extends Atomic> cstrs)
cstrs - set of constraintspublic boolean isEquivalent(ReasonerQueryImpl q)
q - query to be compared withpublic java.util.stream.Stream<Map<VarName,Concept>> resolve(boolean materialise)
resolve in interface ReasonerQuerymaterialise - materialisation flagCopyright © 2017 Grakn Labs Ltd. All rights reserved.