public abstract class HasAttributeProperty extends Object
has property on an Thing.
This property can be queried, inserted or deleted.
The property is defined as a Relationship between an Thing and a Attribute, where the
Attribute is of a particular type.
When matching, Schema.EdgeLabel.ROLE_PLAYER edges are used to speed up the traversal. The type of the Relationship does not
matter.
When inserting, an implicit Relationship is created between the instance and the Attribute, using
type labels derived from the label of the AttributeType.| Constructor and Description |
|---|
HasAttributeProperty() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcheckInsertable, checkValid, define, from, undefine, uniquelyIdentifiesConceptgraqlString, implicitInnerVarPatterns, isUniquepublic static final String NAME
public static HasAttributeProperty of(Label attributeType, VarPatternAdmin attribute, VarPatternAdmin relationship)
public abstract Label type()
public abstract VarPatternAdmin attribute()
public abstract VarPatternAdmin relationship()
public String getName()
public String getProperty()
public Collection<EquivalentFragmentSet> match(Var start)
VarPropertyInternalEquivalentFragmentSet to match the given property in the graphmatch in interface VarPropertyInternalpublic java.util.stream.Stream<VarPatternAdmin> innerVarPatterns()
innerVarPatterns in interface VarPropertyinnerVarPatterns in interface VarPropertyInternalpublic Collection<PropertyExecutor> insert(Var var) throws GraqlQueryException
VarPropertyInternalPropertyExecutor that describes how to insert the given VarProperty into.insert in interface VarPropertyInternalGraqlQueryException - if this VarProperty cannot be insertedpublic java.util.stream.Stream<VarPatternAdmin> getTypes()
getTypes in interface VarPropertypublic Atomic mapToAtom(VarPatternAdmin var, Set<VarPatternAdmin> vars, ReasonerQuery parent)
mapToAtom in interface VarPropertypublic void buildString(StringBuilder builder)
buildString in interface VarPropertypublic final void checkValid(GraknTx graph, VarPatternAdmin var) throws GraqlQueryException
VarPropertyInternalMatchcheckValid in interface VarPropertyInternalGraqlQueryExceptionpublic Collection<PropertyExecutor> define(Var var) throws GraqlQueryException
define in interface VarPropertyInternalGraqlQueryExceptionpublic Collection<PropertyExecutor> undefine(Var var) throws GraqlQueryException
undefine in interface VarPropertyInternalGraqlQueryExceptionpublic java.util.stream.Stream<VarPatternAdmin> implicitInnerVarPatterns()
implicitInnerVarPatterns in interface VarPropertyCopyright © 2018 Grakn Labs Ltd. All rights reserved.