public class RelationAtom extends IsaAtom
Atom implementation defining a relation atom corresponding to a combined RelationProperty
and (optional) IsaProperty. The relation atom is a TypeAtom with relation players.
| Constructor and Description |
|---|
RelationAtom(VarPatternAdmin pattern,
Var predicateVar,
IdPredicate predicate,
ReasonerQuery par) |
| Modifier and Type | Method and Description |
|---|---|
RelationAtom |
addType(OntologyConcept type) |
int |
computePriority(Set<Var> subbedVars)
compute resolution priority based on provided substitution variables
|
Atomic |
copy() |
boolean |
equals(Object obj) |
int |
equivalenceHashCode() |
Set<IdPredicate> |
getPartialSubstitutions() |
Set<Unifier> |
getPermutationUnifiers(Atom headAtom) |
Set<Var> |
getRolePlayers() |
com.google.common.collect.Multimap<Role,Var> |
getRoleVarMap() |
Set<TypeAtom> |
getSpecificTypeConstraints() |
Unifier |
getUnifier(Atom pAtom)
find unifier with parent atom
|
Set<Var> |
getVarNames() |
int |
hashCode() |
List<RelationType> |
inferPossibleRelationTypes(Answer sub)
infer relation types that this relation atom can potentially have
NB: entity types and role types are treated separately as they behave differently:
entity types only play the explicitly defined roles (not the relevant part of the hierarchy of the specified role)
|
Atom |
inferTypes()
infers types (type, role types) fo the atom if applicable/possible
|
boolean |
isAllowedToFormRuleHead() |
boolean |
isEquivalent(Object obj) |
boolean |
isRelation() |
boolean |
isRuleApplicable(InferenceRule child) |
boolean |
isSelectable() |
boolean |
isType() |
boolean |
requiresMaterialisation() |
Atom |
rewriteToUserDefined()
rewrites the atom to one with user defined name
|
String |
toString() |
getOntologyConceptgetCombinedPattern, getPredicate, getPredicateVariable, getTypeId, hasEquivalentPredicatesWith, setParentQuerybaseResolutionPriority, getApplicableRules, getIdPredicates, getNeighbours, getNonSelectableConstraints, getPredicates, getTypeConstraints, getValuePredicates, isAtom, isRecursive, isResource, isRuleResolvablecontainsVar, getParentQuery, getPattern, getVarName, graph, isUserDefinedNameclone, finalize, getClass, notify, notifyAll, wait, wait, waitisPredicatepublic RelationAtom(VarPatternAdmin pattern, Var predicateVar, IdPredicate predicate, ReasonerQuery par)
public boolean isEquivalent(Object obj)
isEquivalent in interface AtomicisEquivalent in class Binarypublic int equivalenceHashCode()
equivalenceHashCode in interface AtomicequivalenceHashCode in class Binarypublic boolean isRelation()
isRelation in class Atompublic boolean isSelectable()
isSelectable in interface AtomicisSelectable in class TypeAtompublic boolean isType()
public boolean requiresMaterialisation()
requiresMaterialisation in class TypeAtompublic boolean isAllowedToFormRuleHead()
isAllowedToFormRuleHead in class TypeAtompublic int computePriority(Set<Var> subbedVars)
AtomcomputePriority in class TypeAtomsubbedVars - variables having a substitutionpublic Set<IdPredicate> getPartialSubstitutions()
getPartialSubstitutions in class Atompublic boolean isRuleApplicable(InferenceRule child)
isRuleApplicable in class TypeAtompublic RelationAtom addType(OntologyConcept type)
type - to be added to this relationpublic List<RelationType> inferPossibleRelationTypes(Answer sub)
public Atom inferTypes()
AtominferTypes in class Atompublic Set<Var> getVarNames()
getVarNames in interface AtomicgetVarNames in class Binarypublic Set<TypeAtom> getSpecificTypeConstraints()
getSpecificTypeConstraints in class Atompublic Set<Unifier> getPermutationUnifiers(Atom headAtom)
getPermutationUnifiers in class AtomheadAtom - unification reference atompublic Unifier getUnifier(Atom pAtom)
AtomgetUnifier in class BinarypAtom - atom to be unified withpublic Atom rewriteToUserDefined()
AtomrewriteToUserDefined in class AtomCopyright © 2017 Grakn Labs Ltd. All rights reserved.