public abstract class Atom extends AtomicBase
AtomicBase extension defining specialised functionalities.
| Modifier | Constructor and Description |
|---|---|
protected |
Atom(Atom a) |
protected |
Atom(VarPattern pattern,
ReasonerQuery par) |
checkValid, containsVar, copy, createCombinedPattern, getCombinedPattern, getParentQuery, getPattern, getVarName, getVarNames, isUserDefined, setParentQuery, toString, txclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitalphaEquivalenceHashCode, isAlphaEquivalent, isCompatibleWith, isRelation, isResource, isSelectable, isStructurallyEquivalent, isType, structuralEquivalenceHashCode, validateOntologicallyprotected Atom(VarPattern pattern, ReasonerQuery par)
protected Atom(Atom a)
public RelationshipAtom toRelationshipAtom()
public boolean isAtom()
public boolean isRuleResolvable()
public boolean isRecursive()
public boolean isGround()
public abstract Class<? extends VarProperty> getVarPropertyClass()
public Set<String> validateAsRuleHead(Rule rule)
validateAsRuleHead in interface AtomicvalidateAsRuleHead in class AtomicBasepublic java.util.stream.Stream<VarProperty> getVarProperties()
public java.util.stream.Stream<IdPredicate> getPartialSubstitutions()
public Set<Var> getRoleExpansionVariables()
public int computePriority(Set<Var> subbedVars)
subbedVars - variables having a substitutionprotected abstract boolean isRuleApplicableViaAtom(Atom headAtom)
protected java.util.stream.Stream<Rule> getPotentialRules()
public java.util.stream.Stream<InferenceRule> getApplicableRules()
public boolean requiresMaterialisation()
public boolean requiresRoleExpansion()
public abstract SchemaConcept getSchemaConcept()
public abstract ConceptId getTypeId()
public abstract Var getPredicateVariable()
public java.util.stream.Stream<Predicate> getPredicates()
public <T extends Predicate> java.util.stream.Stream<T> getPredicates(Class<T> type)
@Nullable public IdPredicate getIdPredicate(Var var)
var - variable of interest@Nullable public <T extends Predicate> T getPredicate(Var var, Class<T> type)
T - predicate type genericvar - variable the predicate refers totype - predicate typepublic abstract java.util.stream.Stream<Predicate> getInnerPredicates()
public <T extends Predicate> java.util.stream.Stream<T> getInnerPredicates(Class<T> type)
public java.util.stream.Stream<TypeAtom> getTypeConstraints()
public <T extends Atomic> java.util.stream.Stream<T> getNeighbours(Class<T> type)
public java.util.stream.Stream<Atomic> getNonSelectableConstraints()
public Set<TypeAtom> getSpecificTypeConstraints()
public Atom inferTypes()
inferTypes in interface AtomicinferTypes in class AtomicBasepublic Atom inferTypes(Answer sub)
inferTypes in class AtomicBasepublic List<Atom> atomOptions(Answer sub)
sub - partial substitutionpublic Atom addType(SchemaConcept type)
public java.util.stream.Stream<Answer> materialise()
public abstract Atom rewriteWithTypeVariable()
protected Atom rewriteWithTypeVariable(Atom parentAtom)
parentAtom - parent atom that triggers rewritepublic Atom rewriteWithRelationVariable()
public abstract Atom rewriteToUserDefined(Atom parentAtom)
parentAtom - parent atom that triggers rewritepublic abstract Unifier getUnifier(Atom parentAtom)
parentAtom - atom to be unified withpublic MultiUnifier getMultiUnifier(Atom parentAtom, UnifierComparison unifierType)
parentAtom - atom to be unified withunifierType - type of unifier to be computedCopyright © 2018 Grakn Labs Ltd. All rights reserved.