public abstract class HasAttributeTypeProperty extends Object
has and key properties on a Type.
This property can be queried or inserted. Whether this is a key is indicated by the
required() field.
This property is defined as an implicit ontological structure between a Type and a AttributeType,
including one implicit RelationshipType and two implicit Roles. The labels of these types are derived
from the label of the AttributeType.
Like HasAttributeProperty, if this is not a key and is used in a Match it will not use the implicit
structure - instead, it will match if there is any kind of relation type connecting the two types.| Constructor and Description |
|---|
HasAttributeTypeProperty() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcheckInsertable, checkValid, from, insert, uniquelyIdentifiesConceptgraqlString, isUniquepublic static HasAttributeTypeProperty of(VarPatternAdmin resourceType, boolean required)
GraqlQueryException - if no label is specified on resourceTypepublic 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> getTypes()
getTypes in interface VarPropertypublic java.util.stream.Stream<VarPatternAdmin> innerVarPatterns()
innerVarPatterns in interface VarPropertyinnerVarPatterns in interface VarPropertyInternalpublic java.util.stream.Stream<VarPatternAdmin> implicitInnerVarPatterns()
implicitInnerVarPatterns in interface VarPropertypublic Collection<PropertyExecutor> define(Var var) throws GraqlQueryException
define in interface VarPropertyInternalGraqlQueryExceptionpublic Collection<PropertyExecutor> undefine(Var var) throws GraqlQueryException
undefine in interface VarPropertyInternalGraqlQueryExceptionpublic 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> insert(Var var) throws GraqlQueryException
VarPropertyInternalPropertyExecutor that describes how to insert the given VarProperty into.insert in interface VarPropertyInternalGraqlQueryException - if this VarProperty cannot be insertedCopyright © 2018 Grakn Labs Ltd. All rights reserved.