public class AtomicMatchQuery extends AtomicQuery
Atomic reasoner query providing resolution streaming facilities.
| Constructor and Description |
|---|
AtomicMatchQuery(AtomicQuery query,
QueryAnswers ans) |
AtomicMatchQuery(Atom atom,
Set<VarName> vars) |
AtomicMatchQuery(MatchQuery query,
GraknGraph graph) |
| Modifier and Type | Method and Description |
|---|---|
QueryAnswers |
answer(Set<AtomicQuery> subGoals,
QueryCache cache,
boolean materialise)
answer the query by providing combined lookup/rule resolutions
|
void |
DBlookup()
resolve the query by performing a db lookup
|
QueryAnswers |
getAnswers() |
QueryAnswers |
getNewAnswers() |
void |
lookup(QueryCache cache)
resolve the query by performing either a db or memory lookup, depending on which is more appropriate
|
QueryAnswers |
materialise() |
void |
memoryLookup(QueryCache cache)
resolve the query by performing a memory (cache) lookup
|
void |
propagateAnswers(QueryCache cache)
propagate answers to relation resolutions in the cache
|
java.util.stream.Stream<Map<VarName,Concept>> |
resolve(boolean materialise)
resolves the query
|
void |
resolveViaRule(Rule rl,
Set<AtomicQuery> subGoals,
QueryCache cache,
boolean materialise)
attempt query resolution via application of a specific rule
|
addAtom, equals, establishRelation, getAtom, getChildren, getParent, materialise, removeAtom, selectAtoms, unifyaddAtomConstraints, containsAtom, containsEquivalentAtom, getAtoms, getFilters, getIdPredicate, getIdPredicates, getMatchQuery, getPattern, getResources, getSelectedNames, getTypeConstraints, getValuePredicates, getVarSet, getVarTypeMap, graph, hashCode, isEquivalent, isRuleResolvable, selectAppend, toString, unifypublic AtomicMatchQuery(MatchQuery query, GraknGraph graph)
public AtomicMatchQuery(AtomicQuery query, QueryAnswers ans)
public QueryAnswers getAnswers()
getAnswers in class Querypublic QueryAnswers getNewAnswers()
getNewAnswers in class Querypublic void lookup(QueryCache cache)
Querypublic void DBlookup()
Querypublic void memoryLookup(QueryCache cache)
QuerymemoryLookup in class Querycache - container of already performed query resolutionspublic void propagateAnswers(QueryCache cache)
QuerypropagateAnswers in class Querycache - container of already performed query resolutionspublic QueryAnswers materialise()
materialise in class AtomicQuerypublic void resolveViaRule(Rule rl, Set<AtomicQuery> subGoals, QueryCache cache, boolean materialise)
AtomicQueryresolveViaRule in class AtomicQueryrl - rule through which to resolve the querysubGoals - set of visited subqueriescache - collection of performed query resolutionsmaterialise - materialisation flagpublic QueryAnswers answer(Set<AtomicQuery> subGoals, QueryCache cache, boolean materialise)
AtomicQueryanswer in class AtomicQuerysubGoals - set of visited subqueriescache - collection of performed query resolutionsmaterialise - materialisation flagCopyright © 2017 Grakn Labs Ltd. All rights reserved.