T - The leaf interface of the object concept. For example an EntityType or RelationshipTypeV - The instance of this type. For example Entity or Relationshippublic class TypeImpl<T extends Type,V extends Thing> extends SchemaConceptImpl<T> implements Type
A Type represents any ontological element in the graph.
Types are used to model the behaviour of Thing and how they relate to each other.
They also aid in categorising Thing to different types.
| Modifier and Type | Method and Description |
|---|---|
java.util.stream.Stream<AttributeType> |
attributes() |
void |
delete()
Deletes the concept as type
|
Map<Role,Boolean> |
directPlays() |
static <X extends Type,Y extends Thing> |
from(Type type) |
T |
has(AttributeType attributeType) |
java.util.stream.Stream<V> |
instances() |
Boolean |
isAbstract() |
T |
isAbstract(Boolean isAbstract) |
T |
key(AttributeType attributeType) |
java.util.stream.Stream<AttributeType> |
keys() |
T |
play(Role role,
boolean required) |
java.util.stream.Stream<Role> |
playing() |
T |
plays(Role role) |
T |
property(Schema.VertexProperty key,
Object value) |
T |
unhas(AttributeType attributeType) |
T |
unkey(AttributeType attributeType) |
T |
unplay(Role role) |
from, 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, waitasSchemaConcept, isImplicit, isSchemaConcept, label, labelId, thenRules, whenRulesasAttribute, asAttributeType, asEntity, asEntityType, asRelationship, asRelationshipType, asRole, asRule, asThing, id, isAttribute, isAttributeType, isDeleted, isEntity, isEntityType, isRelationship, isRelationshipType, isRole, isRule, isThing, keyspacefromfrom, registerCache, txCacheClear, txCacheFlushpublic java.util.stream.Stream<Role> playing()
public java.util.stream.Stream<AttributeType> attributes()
attributes in interface Typepublic java.util.stream.Stream<AttributeType> keys()
public void delete()
public java.util.stream.Stream<V> instances()
public Boolean isAbstract()
isAbstract in interface Typepublic T unhas(AttributeType attributeType)
public T unkey(AttributeType attributeType)
public T isAbstract(Boolean isAbstract)
isAbstract in interface TypeisAbstract - Specifies if the concept is abstract (true) or not (false).
If the concept type is abstract it is not allowed to have any instances.public T property(Schema.VertexProperty key, Object value)
public T has(AttributeType attributeType)
public T key(AttributeType attributeType)
Copyright © 2018 Grakn Labs Ltd. All rights reserved.