Edit on Github

Concept Methods

Concept is inherited and extended by Type and Thing.

[tab:Java]

Get a Remote version of the concept.

concept.asRemote(tx);

The remote version uses the given transaction to execute every method call.

Accepts

Param Description Type Required Default

tx

The transaction to be used to make method calls.

Transaction

true

N/A

Returns

Concept.Remote

Check if concept is a Type (Local)

concept.isType();

Returns

boolean

Check if concept is a Thing (Local)

concept.isThing();

Returns

boolean

Check if concept is an EntityType (Local)

concept.isEntityType();

Returns

boolean

Check if concept is an AttributeType (Local)

concept.isAttributeType();

Returns

boolean

Check if concept is a RelationType (Local)

concept.isRelationType();

Returns

boolean

Check if concept is a RoleType (Local)

concept.isRoleType();

Returns

boolean

Check if concept is an Entity (Local)

concept.isEntity();

Returns

boolean

Check if concept is an Attribute (Local)

concept.isAttribute();

Returns

boolean

Check if concept is a Relation (Local)

concept.isRelation();

Returns

boolean

Cast the concept as Type (Local)

concept.asType();

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

Returns

Cast the concept as Thing (Local)

concept.asThing();

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

Returns

Cast the concept as EntityType (Local)

concept.asEntityType();

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

Returns

Cast the concept as AttributeType (Local)

concept.asAttributeType();

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

Returns

Cast the concept as RelationType (Local)

concept.asRelationType();

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

Returns

Cast the concept as RoleType (Local)

concept.asRoleType();

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

Returns

Cast the concept as Entity (Local)

concept.asEntity();

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

Returns

Cast the concept as Attribute (Local)

concept.asAttribute();

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

Returns

Cast the concept as Relation (Local)

concept.asRelation();

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

Returns

Delete concept

concept.delete();

Returns

void

Check if the concept has been deleted

concept.isDeleted()

Returns

boolean

ConceptManager

Retrieve the root ThingType

transaction.concepts().getRootThingType();

Retrieves the root ThingType, “thing”.

Returns

Retrieve the root EntityType

transaction.concepts().getRootEntityType();

Retrieves the root EntityType, “entity”.

Returns

Retrieve the root RelationType

transaction.concepts().getRootRelationType();

Retrieves the root RelationType, “relation”.

Returns

Retrieve the root AttributeType

transaction.concepts().getRootAttributeType();

Retrieves the root AttributeType, “attribute”.

Returns

Retrieve an EntityType

transaction.concepts().getEntityType(String label);

Retrieves an EntityType by its label.

Accepts

Param Description Type Required Default

label

The label of the EntityType to retrieve.

string

true

N/A

Returns

Create or retrieve an EntityType

transaction.concepts().putEntityType(String label);

Creates a new EntityType if none exists with the given label, otherwise retrieves the existing one.

Accepts

Param Description Type Required Default

label

The label of the EntityType to create or retrive.

string

true

N/A

Returns

Retrieve a RelationType

transaction.concepts().getRelationType(String label);

Retrieves a RelationType by its label.

Accepts

Param Description Type Required Default

label

The label of the RelationType to retrieve.

string

true

N/A

Returns

Create or retrieve a RelationType

transaction.concepts().putRelationType(String label);

Creates a new RelationType if none exists with the given label, otherwise retrieves the existing one.

Accepts

Param Description Type Required Default

label

The label of the RelationType to create or retrive.

string

true

N/A

Returns

Retrieve an AttributeType

transaction.concepts().getAttributeType(String label);

Retrieves an AttributeType by its label.

Accepts

Param Description Type Required Default

label

The label of the AttributeType to retrieve.

string

true

N/A

Returns

Create or retrieve an AttributeType

transaction.concepts().putAttributeType(String label, AttributeType.ValueType valueType)

Creates a new AttributeType if none exists with the given label, or retrieves the existing one.

Accepts

Param Description Type Required Default

label

The label of the AttributeType to create or retrieve.

string

true

N/A

valueType

The value type of the AttributeType to create or retrieve.

AttributeType.ValueType (STRING | DATETIME | LONG | DOUBLE | BOOLEAN)

true

N/A

Returns

Retrieve a Thing

transaction.concepts().getThing(String iid);

Retrieves the Thing that has the given TypeDB internal ID.

Accepts

Param Description Type Required Default

iid

The IID of the concept to retrieve.

string

true

N/A

Returns

Retrieve a ThingType

transaction.concepts().getThingType(String label);

Retrieves a ThingType by its label.

Accepts

Param Description Type Required Default

label

The label of the ThingType to retrieve.

string

true

N/A

Returns

[tab:end] [tab:Javascript]

Get a Remote version of the concept.

concept.asRemote(tx);

The remote version uses the given transaction to execute every method call.

Accepts

Param Description Type Required Default

tx

The transaction to be used to make method calls.

Transaction

true

N/A

Returns

Concept.Remote

Check if concept is a Type (Local)

concept.isType();

Returns

boolean

Check if concept is a Thing (Local)

concept.isThing();

Returns

boolean

Check if concept is an EntityType (Local)

concept.isEntityType();

Returns

boolean

Check if concept is an AttributeType (Local)

concept.isAttributeType();

Returns

boolean

Check if concept is a RelationType (Local)

concept.isRelationType();

Returns

boolean

Check if concept is a RoleType (Local)

concept.isRoleType();

Returns

boolean

Check if concept is an Entity (Local)

concept.isEntity();

Returns

boolean

Check if concept is an Attribute (Local)

concept.isAttribute();

Returns

boolean

Check if concept is a Relation (Local)

concept.isRelation();

Returns

boolean

Cast the concept as Type (Local)

concept.asType();

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

Returns

Cast the concept as Thing (Local)

concept.asThing();

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

Returns

Cast the concept as EntityType (Local)

concept.asEntityType();

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

Returns

Cast the concept as AttributeType (Local)

concept.asAttributeType();

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

Returns

Cast the concept as RelationType (Local)

concept.asRelationType();

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

Returns

Cast the concept as RoleType (Local)

concept.asRoleType();

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

Returns

Cast the concept as Entity (Local)

concept.asEntity();

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

Returns

Cast the concept as Attribute (Local)

concept.asAttribute();

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

Returns

Cast the concept as Relation (Local)

concept.asRelation();

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

Returns

Delete concept

await concept.delete();

Returns

void

Check if the concept has been deleted

await concept.isDeleted();

Returns

boolean

ConceptManager

Retrieve the root ThingType

await transaction.concepts().getRootThingType();

Retrieves the root ThingType, “thing”.

Returns

Retrieve the root EntityType

await transaction.concepts().getRootEntityType();

Retrieves the root EntityType, “entity”.

Returns

Retrieve the root RelationType

await transaction.concepts().getRootRelationType();

Retrieves the root RelationType, “relation”.

Returns

Retrieve the root AttributeType

await transaction.concepts().getRootAttributeType();

Retrieves the root AttributeType, “attribute”.

Returns

Retrieve an EntityType

await transaction.concepts().getEntityType(label);

Retrieves an EntityType by its label.

Accepts

Param Description Type Required Default

label

The label of the EntityType to retrieve.

string

true

N/A

Returns

Create or retrieve an EntityType

await transaction.concepts().putEntityType(label);

Creates a new EntityType if none exists with the given label, otherwise retrieves the existing one.

Accepts

Param Description Type Required Default

label

The label of the EntityType to create or retrive.

string

true

N/A

Returns

Retrieve a RelationType

await transaction.concepts().getRelationType(label);

Retrieves a RelationType by its label.

Accepts

Param Description Type Required Default

label

The label of the RelationType to retrieve.

string

true

N/A

Returns

Create or retrieve a RelationType

await transaction.concepts().putRelationType(label);

Creates a new RelationType if none exists with the given label, otherwise retrieves the existing one.

Accepts

Param Description Type Required Default

label

The label of the RelationType to create or retrive.

string

true

N/A

Returns

Retrieve an AttributeType

await transaction.concepts().getAttributeType(label);

Retrieves an AttributeType by its label.

Accepts

Param Description Type Required Default

label

The label of the AttributeType to retrieve.

string

true

N/A

Returns

Create or retrieve an AttributeType

await transaction.concepts().putAttributeType(label, valueType)

Creates a new AttributeType if none exists with the given label, or retrieves the existing one.

Accepts

Param Description Type Required Default

label

The label of the AttributeType to create or retrieve.

string

true

N/A

valueType

The value type of the AttributeType to create or retrieve.

AttributeType.ValueType (STRING | DATETIME | LONG | DOUBLE | BOOLEAN)

true

N/A

Returns

Retrieve a Thing

await transaction.concepts().getThing(iid);

Retrieves the Thing that has the given TypeDB internal ID.

Accepts

Param Description Type Required Default

iid

The IID of the concept to retrieve.

string

true

N/A

Returns

Retrieve a ThingType

await transaction.concepts().getThingType(label);

Retrieves a ThingType by its label.

Accepts

Param Description Type Required Default

label

The label of the ThingType to retrieve.

string

true

N/A

Returns

[tab:end] [tab:Python]

Get a Remote version of the concept.

concept.as_remote(tx)

The remote version uses the given transaction to execute every method call.

Accepts

Param Description Type Required Default

tx

The transaction to be used to make method calls.

Transaction

true

N/A

Returns

RemoteConcept

Check if concept is a Type (Local)

concept.is_type()

Returns

boolean

Check if concept is a Thing (Local)

concept.is_thing()

Returns

boolean

Check if concept is an EntityType (Local)

concept.is_entity_type()

Returns

boolean

Check if concept is an AttributeType (Local)

concept.is_attribute_type()

Returns

boolean

Check if concept is a RelationType (Local)

concept.is_relation_type()

Returns

boolean

Check if concept is a RoleType (Local)

concept.is_role_type()

Returns

boolean

Check if concept is an Entity (Local)

concept.is_entity()

Returns

boolean

Check if concept is an Attribute (Local)

concept.is_attribute()

Returns

boolean

Check if concept is a Relation (Local)

concept.is_relation()

Returns

boolean

Cast the concept as Type (Local)

concept.as_type();

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

Returns

Cast the concept as Thing (Local)

concept.as_thing();

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

Returns

Cast the concept as EntityType (Local)

concept.as_entity_type();

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

Returns

Cast the concept as AttributeType (Local)

concept.as_attribute_type();

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

Returns

Cast the concept as RelationType (Local)

concept.as_relation_type();

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

Returns

Cast the concept as RoleType (Local)

concept.as_role_type();

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

Returns

Cast the concept as Entity (Local)

concept.as_entity();

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

Returns

Cast the concept as Attribute (Local)

concept.as_attribute();

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

Returns

Cast the concept as Relation (Local)

concept.as_relation();

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

Returns

Delete concept

concept.delete()

Returns

None

Check if the concept has been deleted

concept.is_deleted()

Returns

boolean

ConceptManager

Retrieve the root ThingType

transaction.concepts().get_root_thing_type()

Retrieves the root ThingType, “thing”.

Returns

Retrieve the root EntityType

transaction.concepts().get_root_entity_type()

Retrieves the root EntityType, “entity”.

Returns

Retrieve the root RelationType

transaction.concepts().get_root_relation_type()

Retrieves the root RelationType, “relation”.

Returns

Retrieve the root AttributeType

transaction.concepts().get_root_attribute_type()

Retrieves the root AttributeType, “attribute”.

Returns

Retrieve an EntityType

transaction.concepts().get_entity_type(label)

Retrieves an EntityType by its label.

Accepts

Param Description Type Required Default

label

The label of the EntityType to retrieve.

string

true

N/A

Returns

Create or retrieve an EntityType

transaction.concepts().put_entity_type(label)

Creates a new EntityType if none exists with the given label, otherwise retrieves the existing one.

Accepts

Param Description Type Required Default

label

The label of the EntityType to create or retrive.

string

true

N/A

Returns

Retrieve a RelationType

transaction.concepts().get_relation_type(label)

Retrieves a RelationType by its label.

Accepts

Param Description Type Required Default

label

The label of the RelationType to retrieve.

string

true

N/A

Returns

Create or retrieve a RelationType

transaction.concepts().put_relation_type(label)

Creates a new RelationType if none exists with the given label, otherwise retrieves the existing one.

Accepts

Param Description Type Required Default

label

The label of the RelationType to create or retrive.

string

true

N/A

Returns

Retrieve an AttributeType

transaction.concepts().get_attribute_type(label)

Retrieves an AttributeType by its label.

Accepts

Param Description Type Required Default

label

The label of the AttributeType to retrieve.

string

true

N/A

Returns

Create or retrieve an AttributeType

await transaction.concepts().put_attribute_type(label, value_type)

Creates a new AttributeType if none exists with the given label, or retrieves the existing one.

Accepts

Param Description Type Required Default

label

The label of the AttributeType to create or retrieve.

string

true

N/A

value_type

The value type of the AttributeType to create or retrieve.

ValueType (STRING | DATETIME | LONG | DOUBLE | BOOLEAN)

true

N/A

Returns

Retrieve a Thing

transaction.concepts().get_thing(iid)

Retrieves the Thing that has the given TypeDB internal ID.

Accepts

Param Description Type Required Default

iid

The IID of the concept to retrieve.

string

true

N/A

Returns

Retrieve a ThingType

transaction.concepts().get_thing_type(label)

Retrieves a ThingType by its label.

Accepts

Param Description Type Required Default

label

The label of the ThingType to retrieve.

string

true

N/A

Returns

[tab:end]