public class ResourceAtom extends Binary
Atom implementation defining a resource atom corresponding to a HasResourceProperty.
The resource structure is the following:
has($varName, $predicateVariable = resource variable), type($predicateVariable)
or in graql terms:
$varName has
| Constructor and Description |
|---|
ResourceAtom(VarPatternAdmin pattern,
Var attributeVar,
Var relationVariable,
IdPredicate idPred,
Set<ValuePredicate> ps,
ReasonerQuery par) |
| Modifier and Type | Method and Description |
|---|---|
int |
computePriority(Set<Var> subbedVars)
compute resolution priority based on provided substitution variables
|
Atomic |
copy() |
boolean |
equals(Object obj) |
int |
equivalenceHashCode() |
PatternAdmin |
getCombinedPattern() |
java.util.stream.Stream<Predicate> |
getInnerPredicates() |
Set<ValuePredicate> |
getMultiPredicate() |
Var |
getRelationVariable() |
Set<TypeAtom> |
getSpecificTypeConstraints() |
Unifier |
getUnifier(Atom parentAtom) |
Set<Var> |
getVarNames() |
int |
hashCode() |
boolean |
isAllowedToFormRuleHead() |
boolean |
isResource() |
boolean |
isRuleApplicableViaAtom(Atom ruleAtom) |
boolean |
isSelectable() |
boolean |
isUserDefined() |
boolean |
requiresMaterialisation() |
Atom |
rewriteToUserDefined(Atom parentAtom)
rewrites the atom to one with user defined name
|
void |
setParentQuery(ReasonerQuery q) |
RelationshipAtom |
toRelationshipAtom() |
String |
toString() |
Set<String> |
validateOntologically() |
getPredicateVariable, getSchemaConcept, getTypeId, getTypePredicate, isEquivalentaddType, atomOptions, baseResolutionPriority, getApplicableRules, getIdPredicate, getInnerPredicates, getMultiUnifier, getNeighbours, getNonSelectableConstraints, getPartialSubstitutions, getPredicate, getPredicates, getPredicates, getRoleExpansionVariables, getTypeConstraints, getVarProperties, inferTypes, isAtom, isRecursive, isRuleResolvable, requiresRoleExpansioncontainsVar, getParentQuery, getPattern, getVarName, txclone, finalize, getClass, notify, notifyAll, wait, wait, waitisPredicate, isRelation, isTypepublic ResourceAtom(VarPatternAdmin pattern, Var attributeVar, Var relationVariable, @Nullable IdPredicate idPred, Set<ValuePredicate> ps, ReasonerQuery par)
public RelationshipAtom toRelationshipAtom()
toRelationshipAtom in class Atompublic String toString()
toString in class AtomicBasepublic int equivalenceHashCode()
equivalenceHashCode in interface AtomicequivalenceHashCode in class Binarypublic void setParentQuery(ReasonerQuery q)
setParentQuery in interface AtomicsetParentQuery in class Binarypublic Set<ValuePredicate> getMultiPredicate()
public Var getRelationVariable()
public PatternAdmin getCombinedPattern()
getCombinedPattern in interface AtomicgetCombinedPattern in class Binarypublic boolean isRuleApplicableViaAtom(Atom ruleAtom)
isRuleApplicableViaAtom in class Atompublic Atomic copy()
copy in interface Atomiccopy in class AtomicBasepublic boolean isResource()
public boolean isSelectable()
public boolean isUserDefined()
isUserDefined in interface AtomicisUserDefined in class AtomicBasepublic boolean requiresMaterialisation()
requiresMaterialisation in class Atompublic boolean isAllowedToFormRuleHead()
public Set<Var> getVarNames()
getVarNames in interface AtomicgetVarNames in class Binarypublic int computePriority(Set<Var> subbedVars)
AtomcomputePriority in class AtomsubbedVars - variables having a substitutionpublic Atom rewriteToUserDefined(Atom parentAtom)
AtomrewriteToUserDefined in class AtomparentAtom - parent atom that triggers rewritepublic Unifier getUnifier(Atom parentAtom)
getUnifier in class BinaryparentAtom - atom to be unified withpublic java.util.stream.Stream<Predicate> getInnerPredicates()
getInnerPredicates in class Binarypublic Set<TypeAtom> getSpecificTypeConstraints()
getSpecificTypeConstraints in class AtomCopyright © 2017 Grakn Labs Ltd. All rights reserved.