D - The data type of this resource type.
Supported Types include: String, Long, Double, and Booleanpublic class AttributeImpl<D> extends ThingImpl<Attribute<D>,AttributeType<D>> implements Attribute<D>
Represent a literal resource in the graph.
Acts as an Thing when relating to other instances except it has the added functionality of:
1. It is unique to its AttributeType based on it's value.
2. It has a AttributeType.DataType associated with it which constrains the allowed values.
| Modifier and Type | Method and Description |
|---|---|
static <D> AttributeImpl<D> |
create(VertexElement vertexElement,
AttributeType<D> type,
Object value) |
AttributeType.DataType<D> |
dataType() |
static AttributeImpl |
from(Attribute attribute) |
static <D> AttributeImpl<D> |
get(VertexElement vertexElement) |
D |
getValue() |
String |
innerToString() |
Thing |
owner() |
java.util.stream.Stream<Thing> |
ownerInstances() |
attribute, attributeRelationship, attributes, delete, deleteAttribute, getIndex, plays, relationships, txCacheClear, typeaddEdge, baseType, compareTo, createShard, currentShard, deleteNode, equals, getId, getShardCount, hashCode, isDeleted, setShardCount, shards, toString, vertexclone, finalize, getClass, notify, notifyAll, wait, wait, waitasAttribute, attribute, deleteAttribute, isAttribute, typeasThing, attributeRelationship, attributes, isThing, plays, relationshipsasAttributeType, asEntity, asEntityType, asRelationship, asRelationshipType, asRole, asRule, asSchemaConcept, asType, delete, getId, isAttributeType, isDeleted, isEntity, isEntityType, isRelationship, isRelationshipType, isRole, isRule, isSchemaConcept, isTypecompareTofromfrompublic static <D> AttributeImpl<D> get(VertexElement vertexElement)
public static <D> AttributeImpl<D> create(VertexElement vertexElement, AttributeType<D> type, Object value)
public AttributeType.DataType<D> dataType()
dataType in interface Attribute<D>Attribute's AttributeType.public java.util.stream.Stream<Thing> ownerInstances()
ownerInstances in interface Attribute<D>public D getValue()
public String innerToString()
public static AttributeImpl from(Attribute attribute)
Copyright © 2017 Grakn Labs Ltd. All rights reserved.