public class ReasonerAtomicQuery extends ReasonerQueryImpl
Base reasoner atomic query. An atomic query is a query constrained to having at most one rule-resolvable atom together with its accompanying constraints (predicates and types).
checkValid, conjunction, equals, getAtoms, getAtoms, getMultiUnifier, getPattern, getQuery, getRoleSubstitution, getSubstitution, getVarNames, getVarTypeMap, getVarTypeMap, hashCode, idTransform, isEquivalent, isRuleResolvable, isTypeRoleCompatible, requiresReiteration, resolve, subGoals, transformIds, tx, validateOntologicallypublic ReasonerQuery copy()
copy in class ReasonerQueryImplpublic ReasonerAtomicQuery withSubstitution(Answer sub)
withSubstitution in class ReasonerQueryImplsub - substitution to be inserted into the querypublic ReasonerAtomicQuery inferTypes()
inferTypes in class ReasonerQueryImplpublic ReasonerAtomicQuery positive()
positive in class ReasonerQueryImplpublic String toString()
toString in class ReasonerQueryImplpublic boolean isAtomic()
public Atom getAtom()
public Set<Atom> selectAtoms()
ReasonerQueryImplselectAtoms in class ReasonerQueryImplpublic MultiUnifier getMultiUnifier(ReasonerQuery p, UnifierComparison unifierType)
getMultiUnifier in class ReasonerQueryImplp - query for which unifier to unify with should be foundunifierType - unifier typeIllegalArgumentException - if passed a ReasonerQuery that is not a ReasonerAtomicQuery.public java.util.stream.Stream<Answer> materialise(Answer answer)
answer - to be materialisedpublic java.util.stream.Stream<Answer> resolveAndMaterialise(LazyQueryCache<ReasonerAtomicQuery> cache, LazyQueryCache<ReasonerAtomicQuery> dCache)
ReasonerQueryImplpublic ResolutionState subGoal(Answer sub, Unifier u, QueryStateBase parent, Set<ReasonerAtomicQuery> subGoals, QueryCache<ReasonerAtomicQuery> cache)
subGoal in class ReasonerQueryImplsub - partial substitutionu - unifier with parent stateparent - parent statesubGoals - set of visited sub goalscache - query cacheprotected java.util.stream.Stream<ReasonerQueryImpl> getQueryStream(Answer sub)
public Pair<Iterator<ResolutionState>,MultiUnifier> queryStateIterator(QueryStateBase parent, Set<ReasonerAtomicQuery> visitedSubGoals, QueryCache<ReasonerAtomicQuery> cache)
queryStateIterator in class ReasonerQueryImplparent - parent statevisitedSubGoals - set of visited sub goalscache - query cacheCopyright © 2018 Grakn Labs Ltd. All rights reserved.