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(VarPattern pattern,
Var predicateVar,
IdPredicate predicate,
ReasonerQuery par) |
getTypedPair, unifygetSchemaConceptgetPredicateVariable, getTypeId, getTypePredicate, setParentQuerygetApplicableRules, getIdPredicate, getInnerPredicates, getNeighbours, getNonSelectableConstraints, getPotentialRules, getPredicate, getPredicates, getPredicates, getTypeConstraints, getVarProperties, inferTypes, isAtom, isGround, isRecursive, isRuleResolvable, rewriteWithTypeVariablecontainsVar, getCombinedPattern, getParentQuery, getPattern, getVarName, isUserDefined, txclone, finalize, getClass, notify, notifyAll, wait, wait, waitisCompatibleWith, isResourcepublic RelationshipAtom(VarPattern pattern, Var predicateVar, @Nullable IdPredicate predicate, ReasonerQuery par)
public Class<? extends VarProperty> getVarPropertyClass()
getVarPropertyClass in class IsaAtompublic void checkValid()
checkValid in interface AtomiccheckValid in class Binarypublic RelationshipAtom toRelationshipAtom()
toRelationshipAtom in class Atomprotected Pattern createCombinedPattern()
createCombinedPattern in class IsaAtompublic boolean isAlphaEquivalent(Object obj)
isAlphaEquivalent in interface AtomicisAlphaEquivalent in class Binarypublic int alphaEquivalenceHashCode()
alphaEquivalenceHashCode in interface AtomicalphaEquivalenceHashCode in class Binarypublic boolean isStructurallyEquivalent(Object obj)
isStructurallyEquivalent in interface AtomicisStructurallyEquivalent in class Binarypublic int structuralEquivalenceHashCode()
structuralEquivalenceHashCode in interface AtomicstructuralEquivalenceHashCode 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 Set<String> validateAsRuleHead(Rule rule)
validateAsRuleHead in interface AtomicvalidateAsRuleHead in class Atompublic 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<Type> inferPossibleTypes(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(Answer sub)
inferTypes in class IsaAtompublic List<Atom> atomOptions(Answer sub)
atomOptions in class IsaAtomsub - 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, UnifierComparison unifierType)
AtomgetMultiUnifier in class AtompAtom - atom to be unified withunifierType - type of unifier to be computedpublic java.util.stream.Stream<Answer> materialise()
materialise in class IsaAtompublic RelationshipAtom rewriteWithRelationVariable()
AtomrewriteWithRelationVariable in class Atompublic RelationshipAtom rewriteWithTypeVariable()
rewriteWithTypeVariable in class IsaAtompublic Atom rewriteToUserDefined(Atom parentAtom)
AtomrewriteToUserDefined in class IsaAtomparentAtom - parent atom that triggers rewriteCopyright © 2018 Grakn Labs Ltd. All rights reserved.