public class RelationshipEdge extends Object implements CacheOwner
Encapsulates The Relationship as a EdgeElement
This wraps up a Relationship as a EdgeElement. It is used to represent any binary Relationship.
This also includes the ability to automatically reify a RelationshipEdge into a RelationshipReified.
| Modifier and Type | Method and Description |
|---|---|
Map<Role,Set<Thing>> |
allRolePlayers() |
Collection<Cache> |
caches() |
static RelationshipEdge |
create(RelationshipType relationshipType,
Role ownerRole,
Role valueRole,
EdgeElement edgeElement) |
void |
delete()
|
static RelationshipEdge |
get(EdgeElement edgeElement) |
ConceptId |
id() |
boolean |
isDeleted()
Return whether the relationship has been deleted.
|
boolean |
isInferred()
Used to indicate if this
Relationship has been created as the result of a Rule inference. |
boolean |
isReified() |
Keyspace |
keyspace()
Used for determining which
Keyspace a RelationshipStructure was created in and is bound to. |
Thing |
owner() |
Role |
ownerRole() |
RelationshipReified |
reify() |
java.util.stream.Stream<Thing> |
rolePlayers(Role... roles) |
String |
toString() |
RelationshipType |
type() |
Thing |
value() |
Role |
valueRole() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfrom, registerCache, txCacheClear, txCacheFlushpublic static RelationshipEdge get(EdgeElement edgeElement)
public static RelationshipEdge create(RelationshipType relationshipType, Role ownerRole, Role valueRole, EdgeElement edgeElement)
public ConceptId id()
ConceptId of the Relationshippublic Keyspace keyspace()
Keyspace a RelationshipStructure was created in and is bound to.Keyspace this RelationshipStructure belongs to.public RelationshipReified reify()
public boolean isReified()
Relationship has been reified meaning it can support n-ary relationshipspublic RelationshipType type()
RelationshipType of the Relationshippublic java.util.stream.Stream<Thing> rolePlayers(Role... roles)
public Role ownerRole()
public Thing owner()
public Role valueRole()
public Thing value()
public void delete()
public boolean isDeleted()
public boolean isInferred()
Relationship has been created as the result of a Rule inference.Relationship exists due to a ruleRulepublic Collection<Cache> caches()
caches in interface CacheOwnerCacheOwnerCopyright © 2018 Grakn Labs Ltd. All rights reserved.