D - The data type of this resource type.
Supported Types include: String, Long, Double, and Booleanpublic class AttributeTypeImpl<D> extends TypeImpl<AttributeType<D>,Attribute<D>> implements AttributeType<D>
An ontological element which models and categorises the various Attribute in the graph.
This ontological element behaves similarly to Type when defining how it relates to other
types. It has two additional functions to be aware of:
1. It has a AttributeType.DataType constraining the data types of the values it's instances may take.
2. Any of it's instances are unique to the type.
For example if you have a AttributeType modelling month throughout the year there can only be one January.
AttributeType.DataType<D>| Modifier and Type | Method and Description |
|---|---|
Attribute<D> |
attribute(D value) |
Attribute<D> |
create(D value) |
static <D> AttributeTypeImpl<D> |
create(VertexElement vertexElement,
AttributeType<D> type,
AttributeType.DataType<D> dataType) |
AttributeType.DataType<D> |
dataType() |
static AttributeTypeImpl |
from(AttributeType attributeType) |
static <D> AttributeTypeImpl<D> |
get(VertexElement vertexElement) |
Attribute<D> |
putAttributeInferred(D value) |
String |
regex() |
AttributeType<D> |
regex(String regex) |
AttributeType<D> |
sup(AttributeType<D> superType)
This method is overridden so that we can check that the regex of the new super type (if it has a regex)
can be applied to all the existing instances.
|
attributes, delete, directPlays, from, has, instances, isAbstract, isAbstract, key, keys, play, playing, plays, property, unhas, unkey, unplayfrom, innerToString, isImplicit, label, label, labelId, subs, sup, sups, thenRules, whenRulesbaseType, caches, createShard, currentShard, deleteNode, equals, hashCode, id, isDeleted, keyspace, shardCount, shards, toString, vertexclone, finalize, getClass, notify, notifyAll, wait, wait, waitasAttributeType, has, instances, isAbstract, isAttributeType, key, label, plays, subs, sup, sups, unhas, unkey, unplayasType, attributes, isAbstract, isType, keys, playingasSchemaConcept, isImplicit, isSchemaConcept, label, labelId, thenRules, whenRulesasAttribute, asEntity, asEntityType, asRelationship, asRelationshipType, asRole, asRule, asThing, delete, id, isAttribute, isDeleted, isEntity, isEntityType, isRelationship, isRelationshipType, isRole, isRule, isThing, keyspacefromfrom, registerCache, txCacheClear, txCacheFlushpublic static <D> AttributeTypeImpl<D> get(VertexElement vertexElement)
public static <D> AttributeTypeImpl<D> create(VertexElement vertexElement, AttributeType<D> type, AttributeType.DataType<D> dataType)
public AttributeType<D> sup(AttributeType<D> superType)
sup in interface AttributeType<D>sup in class SchemaConceptImpl<AttributeType<D>>superType - This type's super typepublic AttributeType<D> regex(String regex)
regex in interface AttributeType<D>regex - The regular expression which instances of this resource must conform to.AttributeType itself.public Attribute<D> attribute(D value)
attribute in interface AttributeType<D>public AttributeType.DataType<D> dataType()
dataType in interface AttributeType<D>public String regex()
regex in interface AttributeType<D>public static AttributeTypeImpl from(AttributeType attributeType)
Copyright © 2018 Grakn Labs Ltd. All rights reserved.