public class RelationshipEdge extends Object
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() |
static RelationshipEdge |
create(RelationshipType relationshipType,
Role ownerRole,
Role valueRole,
EdgeElement edgeElement) |
void |
delete()
|
static RelationshipEdge |
get(EdgeElement edgeElement) |
ConceptId |
getId() |
boolean |
isDeleted()
Return whether the relationship has been deleted.
|
boolean |
isReified() |
Thing |
owner() |
Role |
ownerRole() |
RelationshipReified |
reify() |
java.util.stream.Stream<Thing> |
rolePlayers(Role... roles) |
String |
toString() |
void |
txCacheClear()
Clears the internal
Cache |
RelationshipType |
type() |
Thing |
value() |
Role |
valueRole() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfrompublic static RelationshipEdge get(EdgeElement edgeElement)
public static RelationshipEdge create(RelationshipType relationshipType, Role ownerRole, Role valueRole, EdgeElement edgeElement)
public ConceptId getId()
ConceptId of the Relationshippublic 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 void txCacheClear()
ContainsTxCacheCachepublic Role ownerRole()
public Thing owner()
public Role valueRole()
public Thing value()
public void delete()
public boolean isDeleted()
Copyright © 2017 Grakn Labs Ltd. All rights reserved.