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 | Field and Description |
|---|---|
protected org.slf4j.Logger |
LOG |
| Modifier and Type | Method and Description |
|---|---|
T |
attribute(AttributeType attributeType) |
java.util.stream.Stream<AttributeType> |
attributes() |
void |
delete()
Deletes the concept as type
|
T |
deleteAttribute(AttributeType attributeType) |
T |
deleteKey(AttributeType attributeType) |
T |
deletePlays(Role role) |
Map<Role,Boolean> |
directPlays() |
static <X extends Type,Y extends Thing> |
from(Type type) |
java.util.stream.Stream<V> |
instances() |
Boolean |
isAbstract() |
T |
key(AttributeType attributeType) |
java.util.stream.Stream<AttributeType> |
keys() |
java.util.stream.Stream<Role> |
plays() |
T |
plays(Role role) |
T |
plays(Role role,
boolean required) |
T |
property(Schema.VertexProperty key,
Object value) |
T |
setAbstract(Boolean isAbstract) |
void |
txCacheClear()
Clears the internal transaction caches
|
void |
txCacheFlush()
Flushes the internal transaction caches so they can refresh with persisted graph
|
from, getLabel, getLabelId, getRulesOfConclusion, getRulesOfHypothesis, innerToString, isImplicit, setLabel, sub, subs, sup, sup, superSetaddEdge, baseType, compareTo, createShard, currentShard, deleteNode, equals, getId, getShardCount, hashCode, isDeleted, setShardCount, shards, toString, vertexclone, finalize, getClass, notify, notifyAll, wait, wait, waitasSchemaConcept, getLabel, getLabelId, getRulesOfConclusion, getRulesOfHypothesis, isImplicit, isSchemaConceptasAttribute, asAttributeType, asEntity, asEntityType, asRelationship, asRelationshipType, asRole, asRule, asThing, getId, isAttribute, isAttributeType, isDeleted, isEntity, isEntityType, isRelationship, isRelationshipType, isRole, isRule, isThingcompareTofromfrompublic void txCacheFlush()
txCacheFlush in class SchemaConceptImpl<T extends Type>public void txCacheClear()
txCacheClear in interface ContainsTxCachetxCacheClear in class SchemaConceptImpl<T extends Type>public java.util.stream.Stream<Role> plays()
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 deletePlays(Role role)
deletePlays in interface Typepublic T deleteAttribute(AttributeType attributeType)
deleteAttribute in interface Typepublic T deleteKey(AttributeType attributeType)
public T setAbstract(Boolean isAbstract)
setAbstract 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 attribute(AttributeType attributeType)
public T key(AttributeType attributeType)
Copyright © 2017 Grakn Labs Ltd. All rights reserved.