public class ResourceAtom extends Binary
Atom implementation defining a resource atom corresponding to a HasAttributeProperty.
The resource structure is the following:
has($varName, $predicateVariable = resource variable), type($predicateVariable)
or in graql terms:
$varName has
| Constructor and Description |
|---|
ResourceAtom(VarPattern pattern,
Var attributeVar,
Var relationVariable,
IdPredicate idPred,
Set<ValuePredicate> ps,
ReasonerQuery par) |
checkValid, getPredicateVariable, getSchemaConcept, getTypeId, getTypePredicate, isAlphaEquivalent, isStructurallyEquivalent, structuralEquivalenceHashCodeaddType, atomOptions, getApplicableRules, getIdPredicate, getInnerPredicates, getMultiUnifier, getNeighbours, getNonSelectableConstraints, getPartialSubstitutions, getPotentialRules, getPredicate, getPredicates, getPredicates, getRoleExpansionVariables, getTypeConstraints, getVarProperties, inferTypes, inferTypes, isAtom, isGround, isRecursive, isRuleResolvable, requiresRoleExpansion, rewriteWithTypeVariablecontainsVar, getCombinedPattern, getParentQuery, getPattern, getVarName, isUserDefined, txclone, finalize, getClass, notify, notifyAll, wait, wait, waitisCompatibleWith, isRelation, isTypepublic ResourceAtom(VarPattern pattern, Var attributeVar, Var relationVariable, @Nullable IdPredicate idPred, Set<ValuePredicate> ps, ReasonerQuery par)
public Class<? extends VarProperty> getVarPropertyClass()
getVarPropertyClass in class Atompublic RelationshipAtom toRelationshipAtom()
toRelationshipAtom in class Atompublic String toString()
toString in class AtomicBasepublic int alphaEquivalenceHashCode()
alphaEquivalenceHashCode in interface AtomicalphaEquivalenceHashCode in class Binarypublic void setParentQuery(ReasonerQuery q)
setParentQuery in interface AtomicsetParentQuery in class Binarypublic Set<ValuePredicate> getMultiPredicate()
public Var getRelationVariable()
protected Pattern createCombinedPattern()
createCombinedPattern 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 requiresMaterialisation()
requiresMaterialisation in class Atompublic Set<String> validateAsRuleHead(Rule rule)
validateAsRuleHead in interface AtomicvalidateAsRuleHead in class Atompublic Set<Var> getVarNames()
getVarNames in interface AtomicgetVarNames in class Binarypublic int computePriority(Set<Var> subbedVars)
AtomcomputePriority in class AtomsubbedVars - variables having a substitutionpublic 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 Atompublic java.util.stream.Stream<Answer> materialise()
materialise in class Atompublic ResourceAtom rewriteWithRelationVariable()
AtomrewriteWithRelationVariable in class Atompublic Atom rewriteWithTypeVariable()
rewriteWithTypeVariable in class Atompublic Atom rewriteToUserDefined(Atom parentAtom)
AtomrewriteToUserDefined in class AtomparentAtom - parent atom that triggers rewriteCopyright © 2018 Grakn Labs Ltd. All rights reserved.