T - The leaf interface of the object concept which extends Thing.
For example Entity or Relationship.V - The type of the concept which extends Type of the concept.
For example EntityType or RelationshipTypepublic abstract class ThingImpl<T extends Thing,V extends Type> extends ConceptImpl implements Thing
A data instance in the graph belonging to a specific Type
Instances represent data in the graph.
Every instance belongs to a Type which serves as a way of categorising them.
Instances can relate to one another via Relationship
| Modifier and Type | Method and Description |
|---|---|
T |
attribute(Attribute attribute) |
Relationship |
attributeRelationship(Attribute attribute) |
java.util.stream.Stream<Attribute<?>> |
attributes(AttributeType... attributeTypes) |
void |
delete()
Deletes the concept as an Thing
|
T |
deleteAttribute(Attribute attribute) |
String |
getIndex()
This index is used by concepts such as casting and relations to speed up internal lookups
|
java.util.stream.Stream<Role> |
plays() |
java.util.stream.Stream<Relationship> |
relationships(Role... roles) |
void |
txCacheClear()
Clears the internal
Cache |
V |
type() |
addEdge, baseType, compareTo, createShard, currentShard, deleteNode, equals, getId, getShardCount, hashCode, isDeleted, setShardCount, shards, toString, vertexclone, finalize, getClass, notify, notifyAll, wait, wait, waitasAttribute, asAttributeType, asEntity, asEntityType, asRelationship, asRelationshipType, asRole, asRule, asSchemaConcept, asType, getId, isAttribute, isAttributeType, isDeleted, isEntity, isEntityType, isRelationship, isRelationshipType, isRole, isRule, isSchemaConcept, isTypecompareTofromfrompublic void delete()
delete in interface Conceptdelete in class ConceptImplpublic void txCacheClear()
ContainsTxCacheCachetxCacheClear in interface ContainsTxCachepublic String getIndex()
public java.util.stream.Stream<Attribute<?>> attributes(AttributeType... attributeTypes)
attributes in interface ThingAttribute that this Thing is linked withpublic java.util.stream.Stream<Relationship> relationships(Role... roles)
relationships in interface Thingroles - An optional parameter which allows you to specify the role of the relations you wish to retrieve.public java.util.stream.Stream<Role> plays()
public Relationship attributeRelationship(Attribute attribute)
attributeRelationship in interface Thingpublic T deleteAttribute(Attribute attribute)
deleteAttribute in interface ThingCopyright © 2017 Grakn Labs Ltd. All rights reserved.