public class RelationshipTypeImpl extends TypeImpl<RelationshipType,Relationship> implements RelationshipType
An ontological element which categorises how instances may relate to each other.
A relation type defines how Type may relate to one another.
They are used to model and categorise n-ary relationships.
| Modifier and Type | Method and Description |
|---|---|
Relationship |
addRelationship(boolean isInferred) |
Relationship |
addRelationshipInferred() |
Relationship |
create() |
static RelationshipTypeImpl |
create(VertexElement vertexElement,
RelationshipType type) |
void |
delete()
Deletes the concept as type
|
static RelationshipTypeImpl |
from(RelationshipType relationshipType) |
static RelationshipTypeImpl |
get(VertexElement vertexElement) |
java.util.stream.Stream<Relationship> |
instancesDirect() |
RelationshipType |
relates(Role role) |
java.util.stream.Stream<Role> |
roles() |
RelationshipType |
unrelate(Role role) |
attributes, directPlays, from, has, instances, isAbstract, isAbstract, key, keys, play, playing, plays, property, unhas, unkey, unplayfrom, innerToString, isImplicit, label, label, labelId, subs, sup, sup, sups, thenRules, whenRulesbaseType, caches, createShard, currentShard, deleteNode, equals, hashCode, id, isDeleted, keyspace, shardCount, shards, toString, vertexclone, finalize, getClass, notify, notifyAll, wait, wait, waitasRelationshipType, has, instances, isAbstract, isRelationshipType, key, label, plays, subs, sup, sup, sups, unhas, unkey, unplayasType, attributes, isAbstract, isType, keys, playingasSchemaConcept, isImplicit, isSchemaConcept, label, labelId, thenRules, whenRulesasAttribute, asAttributeType, asEntity, asEntityType, asRelationship, asRole, asRule, asThing, id, isAttribute, isAttributeType, isDeleted, isEntity, isEntityType, isRelationship, isRole, isRule, isThing, keyspacefromfrom, registerCache, txCacheClear, txCacheFlushpublic static RelationshipTypeImpl get(VertexElement vertexElement)
public static RelationshipTypeImpl create(VertexElement vertexElement, RelationshipType type)
public Relationship create()
create in interface RelationshipTypepublic Relationship addRelationshipInferred()
public Relationship addRelationship(boolean isInferred)
public java.util.stream.Stream<Role> roles()
roles in interface RelationshipTypepublic RelationshipType relates(Role role)
relates in interface RelationshipTypepublic RelationshipType unrelate(Role role)
unrelate in interface RelationshipTyperole - The Role to delete from this RelationshipType.Relationship Type itself.public void delete()
TypeImpldelete in interface Conceptdelete in class TypeImpl<RelationshipType,Relationship>public java.util.stream.Stream<Relationship> instancesDirect()
public static RelationshipTypeImpl from(RelationshipType relationshipType)
Copyright © 2018 Grakn Labs Ltd. All rights reserved.