public class RelationProperty extends Object implements UniqueVarProperty
($x, $y) or (wife: $x, husband: $y)) on a Relation.
This property can be queried and inserted.
This propert is comprised of instances of RelationPlayer, which represents associations between a
role-player Thing and an optional Role.| Constructor and Description |
|---|
RelationProperty(com.google.common.collect.ImmutableMultiset<RelationPlayer> relationPlayers) |
| Modifier and Type | Method and Description |
|---|---|
void |
buildString(StringBuilder builder)
Build a Graql string representation of this property
|
void |
checkInsertable(VarPatternAdmin var)
Check if the given property can be inserted
|
void |
checkValid(GraknGraph graph,
VarPatternAdmin var)
Check if the given property can be used in a match query
|
void |
checkValidProperty(GraknGraph graph,
VarPatternAdmin var) |
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()
Get a stream of any inner
VarPatternAdmin within this `VarProperty`, including any that may have been
implicitly created (such as with "has"). |
java.util.stream.Stream<VarPatternAdmin> |
getInnerVars()
Get a stream of any inner
VarPatternAdmin within this `VarProperty`. |
java.util.stream.Stream<RelationPlayer> |
getRelationPlayers() |
java.util.stream.Stream<VarPatternAdmin> |
getTypes()
Get a stream of
VarPatternAdmin that must be types. |
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)
maps this var property to a reasoner atom
|
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, waitisUniquegetImplicitInnerVars, graqlStringpublic RelationProperty(com.google.common.collect.ImmutableMultiset<RelationPlayer> relationPlayers)
public java.util.stream.Stream<RelationPlayer> getRelationPlayers()
public void buildString(StringBuilder builder)
VarPropertybuildString in interface VarPropertybuilder - a string builder to append topublic Collection<EquivalentFragmentSet> match(Var start)
VarPropertyInternalEquivalentFragmentSet to match the given property in the graphmatch in interface VarPropertyInternalpublic java.util.stream.Stream<VarPatternAdmin> getTypes()
VarPropertyVarPatternAdmin that must be types.getTypes in interface VarPropertypublic java.util.stream.Stream<VarPatternAdmin> getInnerVars()
VarPropertyVarPatternAdmin within this `VarProperty`.getInnerVars in interface VarPropertygetInnerVars in interface VarPropertyInternalpublic void checkValidProperty(GraknGraph graph, VarPatternAdmin var) throws GraqlQueryException
GraqlQueryExceptionpublic void checkInsertable(VarPatternAdmin var) throws GraqlQueryException
VarPropertyInternalcheckInsertable in interface VarPropertyInternalGraqlQueryExceptionpublic void insert(InsertQueryExecutor insertQueryExecutor, Concept concept) throws GraqlQueryException
VarPropertyInternalinsert in interface VarPropertyInternalinsertQueryExecutor - the instance handling the insert queryconcept - the concept to insert a property onGraqlQueryExceptionpublic Atomic mapToAtom(VarPatternAdmin var, Set<VarPatternAdmin> vars, ReasonerQuery parent)
VarPropertymapToAtom in interface VarPropertyvar - VarPatternAdmin this property belongs tovars - VarAdmins constituting the pattern this property belongs toparent - reasoner query this atom should belong topublic final void checkValid(GraknGraph graph, VarPatternAdmin var) throws GraqlQueryException
VarPropertyInternalcheckValid in interface VarPropertyInternalGraqlQueryExceptionpublic 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> getImplicitInnerVars()
VarPropertyVarPatternAdmin within this `VarProperty`, including any that may have been
implicitly created (such as with "has").getImplicitInnerVars in interface VarPropertyCopyright © 2017 Grakn Labs Ltd. All rights reserved.