Edit on Github

Concept Methods & Props

Concept is inherited and extended by Type, Rule and Thing.

[tab:Java]

Retrieve the identifier

concept.id();

Retrieves the identifier of the concept generated by Grakn.

Returns

ConceptId

Check if concept is a Type

concept.isType();

Returns

boolean

Check if concept is a Thing

concept.isThing();

Returns

boolean

Check if concept is an EntityType

concept.isEntityType();

Returns

boolean

Check if concept is an AttributeType

concept.isAttributeType();

Returns

boolean

Check if concept is a RelationType

concept.isRelationType();

Returns

boolean

Check if concept is an Entity

concept.isEntity();

Returns

boolean

Check if concept is an Attribute

concept.isAttribute();

Returns

boolean

Check if concept is a Relation

concept.isRelation();

Returns

boolean

Check if concept is a Rule

concept.isRule();

Returns

boolean

Cast the concept as Type

concept.asType();

Casts the concept as Type so that we can call the Type methods on it.

Returns

Type object

Cast the concept as Thing

concept.asThing();

Casts the concept as Thing so that we can call the Thing methods on it.

Returns

Thing object

Cast the concept as EntityType

concept.asEntityType();

Casts the concept as EntityType so that we can call the EntityType methods on it.

Returns

EntityType object

Cast the concept as AttributeType

concept.asAttributeType();

Casts the concept as AttributeType so that we can call the AttributeType methods on it.

Returns

AttributeType object

Cast the concept as RelationType

concept.asRelationType();

Casts the concept as RelationType so that we can call the RelationType methods on it.

Returns

RelationType object

Cast the concept as Entity

concept.asEntity();

Casts the concept as Entity so that we can call the Entity methods on it.

Returns

Entity object

Cast the concept as Attribute

concept.asAttribute();

Casts the concept as Attribute so that we can call the Attribute methods on it.

Returns

Attribute object

Cast the concept as Relation

concept.asRelation();

Casts the concept as Relation so that we can call the Relation methods on it.

Returns

Relation object

[tab:end] [tab:Javascript]

Retrieve the identifier

concept[“id”];

Retrieves the identifier of the concept generated by Grakn.

Returns

String

Check if concept is a Type

concept.isType();

Returns

boolean

Check if concept is a Thing

concept.isThing();

Returns

boolean

Check if concept is an EntityType

concept.isEntityType();

Returns

boolean

Check if concept is an AttributeType

concept.isAttributeType();

Returns

boolean

Check if concept is a RelationType

concept.isRelationType();

Returns

boolean

Check if concept is an Entity

concept.isEntity();

Returns

boolean

Check if concept is an Attribute

concept.isAttribute();

Returns

boolean

Check if concept is a Relation

concept.isRelation();

Returns

boolean

Check if concept is a Rule

concept.isRule();

Returns

boolean

[tab:end] [tab:Python]

Retrieve the identifier

concept.id

Retrieves the identifier of the concept generated by Grakn.

Returns

String

Check if concept is a Type

concept.is_type()

Returns

boolean

Check if concept is a Thing

concept.is_thing()

Returns

boolean

Check if concept is an EntityType

concept.is_entity_type()

Returns

boolean

Check if concept is an AttributeType

concept.is_attribute_type()

Returns

boolean

Check if concept is a RelationType

concept.is_relation_type()

Returns

boolean

Check if concept is an Entity

concept.is_entity()

Returns

boolean

Check if concept is an Attribute

concept.is_attribute()

Returns

boolean

Check if concept is a Relation

concept.is_relation()

Returns

boolean

Check if concept is a Rule

concept.is_rule()

Returns

boolean

[tab:end]