public class RelationshipAtom extends IsaAtom
Atom implementation defining a relation atom corresponding to a combined RelationshipProperty
and (optional) IsaProperty. The relation atom is a TypeAtom with relationship players.
| Constructor and Description |
|---|
RelationshipAtom(VarPatternAdmin pattern,
Var predicateVar,
IdPredicate predicate,
ReasonerQuery par) |
getTypedPair, unifygetSchemaConceptgetCombinedPattern, getPredicateVariable, getTypeId, getTypePredicate, setParentQuerybaseResolutionPriority, getApplicableRules, getIdPredicate, getInnerPredicates, getNeighbours, getNonSelectableConstraints, getPredicate, getPredicates, getPredicates, getTypeConstraints, getVarProperties, isAtom, isRecursive, isRuleResolvablecontainsVar, getParentQuery, getPattern, getVarName, isUserDefined, txclone, finalize, getClass, notify, notifyAll, wait, wait, waitisPredicate, isResourcepublic RelationshipAtom(VarPatternAdmin pattern, Var predicateVar, @Nullable IdPredicate predicate, ReasonerQuery par)
public RelationshipAtom toRelationshipAtom()
toRelationshipAtom in class Atompublic boolean isEquivalent(Object obj)
isEquivalent in interface AtomicisEquivalent in class Binarypublic int equivalenceHashCode()
equivalenceHashCode in interface AtomicequivalenceHashCode in class Binarypublic boolean isRelation()
public boolean isSelectable()
isSelectable in interface AtomicisSelectable in class TypeAtompublic boolean isType()
public boolean requiresMaterialisation()
requiresMaterialisation in class TypeAtompublic boolean requiresRoleExpansion()
requiresRoleExpansion in class Atompublic boolean isAllowedToFormRuleHead()
isAllowedToFormRuleHead in interface AtomicisAllowedToFormRuleHead in class IsaAtompublic int computePriority(Set<Var> subbedVars)
AtomcomputePriority in class TypeAtomsubbedVars - variables having a substitutionpublic java.util.stream.Stream<IdPredicate> getPartialSubstitutions()
getPartialSubstitutions in class Atompublic java.util.stream.Stream<IdPredicate> getRolePredicates()
public boolean isRuleApplicableViaAtom(Atom ruleAtom)
isRuleApplicableViaAtom in class TypeAtompublic RelationshipAtom addType(SchemaConcept type)
public com.google.common.collect.ImmutableList<RelationshipType> inferPossibleRelationTypes(Answer sub)
RelationshipTypes that this RelationshipAtom can potentially have
NB: EntityTypes and link Roles are treated separately as they behave differently:
EntityTypes only play the explicitly defined Roles (not the relevant part of the hierarchy of the specified Role) and the Role inherited from parentRelationshipTypes this atom can have ordered by the number of compatible Rolespublic RelationshipAtom inferTypes()
inferTypes in interface AtomicinferTypes in class Atompublic List<Atom> atomOptions(Answer sub)
atomOptions in class Atomsub - partial substitutionpublic Set<Var> getVarNames()
getVarNames in interface AtomicgetVarNames in class Binarypublic Set<Var> getRoleExpansionVariables()
getRoleExpansionVariables in class Atompublic Set<TypeAtom> getSpecificTypeConstraints()
getSpecificTypeConstraints in class Atompublic java.util.stream.Stream<Predicate> getInnerPredicates()
getInnerPredicates in class Binarypublic com.google.common.collect.Multimap<Role,Var> getRoleVarMap()
public Unifier getUnifier(Atom pAtom)
getUnifier in class BinarypAtom - atom to be unified withpublic MultiUnifier getMultiUnifier(Atom pAtom, boolean exact)
AtomgetMultiUnifier in class AtompAtom - atom to be unified withexact - flag indicating whether unification should be exactpublic Atom rewriteToUserDefined(Atom parentAtom)
AtomrewriteToUserDefined in class AtomparentAtom - parent atom that triggers rewriteCopyright © 2017 Grakn Labs Ltd. All rights reserved.