public class HasResourceProperty extends Object
has property on an Instance.
This property can be queried, inserted or deleted.
The property is defined as a relationship between an Instance and a Resource, where the
Resource is of a particular type.
When matching, shortcut edges are used to speed up the traversal. The type of the relationship does not matter.
When inserting, an implicit relation is created between the instance and the resource, using type labels derived from
the label of the resource type.clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitcheckInsertable, checkValidgetImplicitInnerVars, graqlString, isUniquepublic static HasResourceProperty of(TypeLabel resourceType, VarPatternAdmin resource)
public TypeLabel getType()
public VarPatternAdmin getResource()
@CheckReturnValue public HasResourceProperty setResource(VarPatternAdmin resource)
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> getInnerVars()
getInnerVars in interface VarPropertygetInnerVars in interface VarPropertyInternalpublic void insert(InsertQueryExecutor insertQueryExecutor, Concept concept) throws IllegalStateException
VarPropertyInternalinsert in interface VarPropertyInternalinsertQueryExecutor - the instance handling the insert queryconcept - the concept to insert a property onIllegalStateExceptionpublic void delete(GraknGraph graph, Concept concept)
VarPropertyInternaldelete in interface VarPropertyInternalgraph - the graph to operate onconcept - the concept to delete properties ofpublic 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(GraknGraph graph, VarPatternAdmin var) throws IllegalStateException
VarPropertyInternalcheckValid in interface VarPropertyInternalIllegalStateExceptionpublic java.util.stream.Stream<VarPatternAdmin> getImplicitInnerVars()
getImplicitInnerVars in interface VarPropertyCopyright © 2017 Grakn Labs Ltd. All rights reserved.