public class HasResourceTypeProperty 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 ResourceType,
including one implicit RelationType and two implicit RoleTypes. The labels of these types are derived
from the label of the ResourceType.
Like HasResourceProperty, if this is not a key and is used in a match query 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 |
|---|
HasResourceTypeProperty(VarPatternAdmin resourceType,
boolean required) |
| Modifier and Type | Method and Description |
|---|---|
default void |
buildString(StringBuilder builder) |
void |
checkValid(GraknGraph graph,
VarPatternAdmin var)
Check if the given property can be used in a match query
|
void |
delete(GraknGraph graph,
Concept concept)
Delete the given property from the graph, if possible.
|
boolean |
equals(Object o) |
java.util.stream.Stream<VarPatternAdmin> |
getImplicitInnerVars() |
java.util.stream.Stream<VarPatternAdmin> |
getInnerVars() |
String |
getName() |
String |
getProperty() |
VarPatternAdmin |
getResourceType() |
java.util.stream.Stream<VarPatternAdmin> |
getTypes() |
int |
hashCode() |
void |
insert(InsertQueryExecutor insertQueryExecutor,
Concept concept)
Insert the given property into the graph, if possible.
|
Atomic |
mapToAtom(VarPatternAdmin var,
Set<VarPatternAdmin> vars,
ReasonerQuery parent) |
Collection<EquivalentFragmentSet> |
match(Var start)
Return a collection of
EquivalentFragmentSet to match the given property in the graph |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitcheckInsertable, checkValid, deletegraqlString, isUniquepublic HasResourceTypeProperty(VarPatternAdmin resourceType, boolean required)
public VarPatternAdmin getResourceType()
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> getTypes()
getTypes in interface VarPropertypublic java.util.stream.Stream<VarPatternAdmin> getInnerVars()
getInnerVars in interface VarPropertygetInnerVars in interface VarPropertyInternalpublic java.util.stream.Stream<VarPatternAdmin> getImplicitInnerVars()
getImplicitInnerVars in interface VarPropertypublic 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 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 void delete(GraknGraph graph, Concept concept)
VarPropertyInternaldelete in interface VarPropertyInternalgraph - the graph to operate onconcept - the concept to delete properties ofCopyright © 2017 Grakn Labs Ltd. All rights reserved.