Type Methods

Type has all the Concept methods plus what follows.

[tab:Java]

Retrieve label

type.label();

Returns

String

Rename label

type.label(Label.of(label));

Renames the label of the type. The new label must not already exist.

Accepts

Param Description Type Required Default

label

The new label to repalce the current one

String

true

N/A

Returns

Type object

Retrieve direct supertype

type.sup();

Retrieves the most immidiate supertype of the type

Returns

Type object

|

null

Change direct supertype

type.sup(Type type);

Changes the most immidiete supertype of the type.

Accepts

Param Description Type Required Default

type

The new type that the given type inherits

EntityType | AttributeType | RelationshipType

true

N/A

Returns

Type object

|

null

Retrieve all supertypes

type.sups();

Retrieves all supertypes of the type.

Returns

Stream of Type objects

Retrieve all subtypes

type.subs();

Retrieves all subtypes of the type.

Returns

Stream of Type objects

Check if type is abstract

type.isAbstract();

Returns

boolean

Toggle abstraction

type.isAbstract(Boolean abstract);

Determines whether or not the type should be abstract.

Accepts

Param Description Type Required Default

abstract

true to be abstracted and false to not.

boolean

true

N/A

Returns

Type object

Retrieve roles

type.playing();

Retrieves all roles that are allowed to be played by the type.

Returns

Stream of Role objectss

Add new role

type.plays(Role role);

Allows the type to play the given role.

Accepts

Param Description Type Required Default

role

The role to be played by the type.

Role

true

N/A

Returns

Type object

Remove role

type.unplay(Role role);

Disallows the type from playing the given role.

Accepts

Param Description Type Required Default

role

The role to not be played by the type.

Role

true

N/A

Returns

Type object

Retrieve attributes

type.attributes();

Retrieves attributes that the type is allowed to own.

Returns

Stream of AttributeType objects

Add attribute

type.has(AttributeType attributeType);

Allows the type to own the given attribute.

Accepts

Param Description Type Required Default

attributeType

The AttributeType to be owned by the type.

AttributeType

true

N/A

Returns

Type object

Remove attribute

type.unhas();

Disallows the type from owning the given attributeType.

Accepts

Param Description Type Required Default

attributeType

The AttributeType to not be owend by the type.

AttributeType

true

N/A

Returns

Type object

Retrieve keys

type.keys();

Returns

Stream of AttributeType objects

Add key

type.key(AttributeType attributeType);

Allows the type to own the given attributeType as its key.

Accepts

Param Description Type Required Default

key

The AttributeType to be owned by the type as its key.

AttributeType

true

N/A

Returns

Type object

Remove key

type.unkey(AttributeType key);

Disallows the type from owning the given attributeType as its key.

Accepts

Param Description Type Required Default

attributeType

the AttributeType to not be owend by the type as its key.

AttributeType

true

N/A

Returns

Type object

Retrieve instances

type.instances();

Returns

Stream of Thing object

[tab:end] [tab:Javascript]

Retrieve label

async type.label();

Returns

String

Rename label

async type.label(label);

Renames the label of the type. The new label must not already exist.

Accepts

Param Description Type Required Default

label

The new label to repalce the current one

String

true

N/A

Returns

void

Retrieve direct supertype

async type.sup();

Retrieves the most immidiate supertype of the type

Returns

Type object

|

null

Change direct supertype

async type.sup(type)

Changes the most immidiete supertype of the type.

Accepts

Param Description Type Required Default

type

The new type that the given type inherits

EntityType | AttributeType | RelationshipType

true

N/A

Returns

void

Retrieve all supertypes

async type.sups()

Retrieves all supertypes of the type.

Returns

Iterator of Type objects

Retrieve all subtypes

async type.subs()

Retrieves all subtypes of the type.

Returns

Iterator of Type objects

Check if type is abstract

async type.isAbstract();

Returns

boolean

Toggle abstraction

async type.isAbstract(abstract);

Determines whether or not the type should be abstract.

Accepts

Param Description Type Required Default

abstract

true to be abstracted and false to not.

boolean

true

N/A

Returns

void

Retrieve roles

async type.playing();

Retrieves all roles that are allowed to be played by the type.

Returns

Iterator of Role objects

Add new role

async type.plays(role);

Allows the type to play the given role.

Accepts

Param Description Type Required Default

role

The role to be played by the type.

Role

true

N/A

Returns

void

Remove role

async type.unplay(role);

Disallows the type from playing the given role.

Accepts

Param Description Type Required Default

role

The role to not be played by the type.

Role

true

N/A

Returns

void

Retrieve attributes

async type.attributes();

Retrieves attributes that the type is allowed to own.

Returns

Iterator of AttributeType objects

Add attribute

async type.has(attributeType);

Allows the type to own the given attribute.

Accepts

Param Description Type Required Default

attributeType

The AttributeType to be owned by the type.

AttributeType

true

N/A

Returns

void

Remove attribute

async type.unhas();

Disallows the type from owning the given attributeType.

Accepts

Param Description Type Required Default

attributeType

The AttributeType to not be owend by the type.

AttributeType

true

N/A

Returns

void

Retrieve keys

async type.keys();

Returns

Iterator of AttributeType objects

Add key

async type.key(attributeType);

Allows the type to own the given attributeType as its key.

Accepts

Param Description Type Required Default

key

The AttributeType to be owned by the type as its key.

AttributeType

true

N/A

Returns

void

Remove key

async type.unkey(attributeType);

Disallows the type from owning the given attributeType as its key.

Accepts

Param Description Type Required Default

attributeType

the AttributeType to not be owend by the type as its key.

AttributeType

true

N/A

Returns

void

Retrieve instances

async type.instances();

Returns

Iterator of Thing object

[tab:end] [tab:Python]

Retrieve label

type.label()

Returns

String

Rename label

type.label(label)

Renames the label of the type. The new label must not already exist.

Accepts

Param Description Type Required Default

label

The new label to repalce the current one

String

true

N/A

Returns

Type object

Retrieve direct supertype

type.sup()

Retrieves the most immidiate supertype of the type

Returns

Type object

|

None

Change direct supertype

type.sup(type)

Changes the most immidiete supertype of the type.

Accepts

Param Description Type Required Default

type

The new type that the given type inherits

EntityType | AttributeType | RelationshipType

true

N/A

Returns

Type object

|

None

Retrieve all supertypes

type.sups()

Retrieves all supertypes of the type.

Returns

Iterator of Type objects

Retrieve all subtypes

type.subs()

Retrieves all subtypes of the type.

Returns

Iterator of Type objects

Check if type is abstract

type.is_abstract()

Returns

boolean

Toggle abstraction

type.is_abstract(abstract)

Determines whether or not the type should be abstract.

Accepts

Param Description Type Required Default

abstract

true to be abstracted and false to not.

boolean

true

N/A

Returns

Type object

Retrieve roles

type.playing()

Retrieves all roles that are allowed to be played by the type.

Returns

Iterator of Role objects

Add new role

type.plays(role)

Allows the type to play the given role.

Accepts

Param Description Type Required Default

role

The role to be played by the type.

Role

true

N/A

Returns

Type object

Remove role

type.unplay(role)

Disallows the type from playing the given role.

Accepts

Param Description Type Required Default

role

The role to not be played by the type.

Role

true

N/A

Returns

Type object

Retrieve attributes

type.attributes()

Retrieves attributes that the type is allowed to own.

Returns

Iterator of AttributeType objects

Add attribute

type.has(attribute_type)

Allows the type to own the given attribute.

Accepts

Param Description Type Required Default

attribute_type

The AttributeType to be owned by the type.

AttributeType

true

N/A

Returns

Type object

Remove attribute

type.unhas()

Disallows the type from owning the given attributeType.

Accepts

Param Description Type Required Default

attribute_type

The AttributeType to not be owend by the type.

AttributeType

true

N/A

Returns

Type object

Retrieve keys

type.keys()

Returns

Iterator of AttributeType objects

Add key

type.key(attributeType)

Allows the type to own the given attributeType as its key.

Accepts

Param Description Type Required Default

key

The AttributeType to be owned by the type as its key.

AttributeType

true

N/A

Returns

Type object

Remove key

type.unkey(attribute_type)

Disallows the type from owning the given attributeType as its key.

Accepts

Param Description Type Required Default

attribute_type

the AttributeType to not be owend by the type as its key.

AttributeType

true

N/A

Returns

Type object

Retrieve instances

type.instances()

Returns

Iterator of Thing object

[tab:end]

EntityType Methods

EntityType has all the Type methods plus what follows.

[tab:Java]

Create instance

entityType.create();

Returns

Entity object

[tab:end] [tab:Javascript]

Create instance

async entityType.create();

Returns

Entity object

[tab:end] [tab:Python]

Create instance

entity_type.create()

Returns

Entity object

[tab:end]

AttributeType Methods

AttributeType has all the Type methods plus what follows.

[tab:Java]

Create instance

attributeType.create(Object value);

Accepts

Param Description Type Required Default

value

The value for the new attribute instance to hold

String | boolean | integer | float | date

true

N/A

Returns

Attribute object

Retrieve instance by value

attributeType.attribute(Object value);

Accepts

Param Description Type Required Default

value

The value for the attribute instance to retrieve

String | boolean | integer | float | date

true

N/A

Returns

Attribute object

|

null

Retrieve datatype

attributeType.dataType();

Returns

String

Retrieve regex

attributeType.regex();

Retrueves the regex that all instacnes of the attribute type must conform to.

Returns

String

|

null

Set regex

attributeType.regex(String regex);

Set the regex that all instacnes of the attribute type must conform to.

Accepts

Param Description Type Required Default

regex

The regex that all instances of the attribute type must conform to.

String

true

N/A

Returns

AttributeType object

[tab:end] [tab:Javascript]

Create instance

async attributeType.create(value);

Accepts

Param Description Type Required Default

value

The value for the new attribute instance to hold

String | boolean | integer | float | date

true

N/A

Returns

Attribute object

Retrieve instance by value

async attributeType.attribute(value);

Accepts

Param Description Type Required Default

value

The value for the attribute instance to retrieve

String | boolean | integer | float | date

true

N/A

Returns

Attribute object

|

null

Retrieve datatype

async attributeType.dataType();

Returns

String

Retrieve regex

async attributeType.regex();

Retrueves the regex that all instacnes of the attribute type must conform to.

Returns

String

|

None

Set regex

async attributeType.regex(regex);

Set the regex that all instacnes of the attribute type must conform to.

Accepts

Param Description Type Required Default

regex

The regex that all instances of the attribute type must conform to.

String

true

N/A

Returns

void

[tab:end] [tab:Python]

Create instance

attribute_type.create(value)

Accepts

Param Description Type Required Default

value

The value for the new attribute instance to hold

String | boolean | integer | float | date

true

N/A

Returns

Attribute object

Retrieve instance by value

attribute_type.attribute(value)

Accepts

Param Description Type Required Default

value

The value for the attribute instance to retrieve

String | boolean | integer | float | date

true

N/A

Returns

Attribute object

|

None

Retrieve datatype

attributeType.dataType()

Returns

String

Retrieve regex

attribute_type.regex()

Retrueves the regex that all instacnes of the attribute type must conform to.

Returns

String

|

null

Set regex

attribute_type.regex(regex)

Set the regex that all instacnes of the attribute type must conform to.

Accepts

Param Description Type Required Default

regex

The regex that all instances of the attribute type must conform to.

String

true

N/A

Returns

AttributeType object

[tab:end]

RelationshipType Methods

RelationshipType has all the Type methods plus what follows.

[tab:Java]

Create instance

relationshipType.create();

Returns

Relationship object

Retrieve roles

relationshipType.roles();

Returns

Stream of Role objects

Sets new role

relationshipType.relates(Role role);

Accepts

Param Description Type Required Default

role

The new role for the relationship type to relate to.

Role

true

N/A

Returns

Remove role

relationshipType.unrelate(Role role);

Disallows the type from relating to the given role.

Accepts

Param Description Type Required Default

role

The role to not relate to the relationship type.

Role

true

N/A

Returns

[tab:end] [tab:Javascript]

Create instance

async relationshipType.create();

Returns

Relationship object

Retrieve roles

async relationshipType.roles();

Returns

Iterator of Role objects

Sets new role

async relationshipType.relates(role);

Accepts

Param Description Type Required Default

role

The new role for the relationship type to relate to.

Role

true

N/A

Returns

void

Remove role

async relationshipType.unrelate(role);

Disallows the type from relating to the given role.

Accepts

Param Description Type Required Default

role

The role to not relate to the relationship type.

Role

true

N/A

Returns

void

[tab:end] [tab:Python]

Create instance

relationship_type.create()

Returns

Relationship object

Retrieve roles

relationship_type.roles()

Returns

Iterator of Role objects

Sets new role

relationship_type.relates(role)

Accepts

Param Description Type Required Default

role

The new role for the relationship type to relate to.

Role

true

N/A

Returns

Remove role

relationship_type.unrelate(role)

Disallows the type from relating to the given role.

Accepts

Param Description Type Required Default

role

The role to not relate to the relationship type.

Role

true

N/A

Returns

[tab:end]

Role Methods

Role has all the Concept methods plus what follows.

[tab:Java]
[Important] At the moment, `Role` inherits an intermediary class which, for the sake of simplicity, has not been documented. Therefore, besides the `Concept` methods, Role inherits the following methods from the `Type` class. - [label();](?lang=java#concept-api-java-method-retrieve-the-label) - [type.label(Label.of(label));](?lang=java#concept-api-java-method-rename-the-label) - [sup();](?lang=java#concept-api-java-method-retrieve-direct-supertype) - [sup(Type type);](?lang=java#concept-api-java-method-change-direct-supertype) - [sups();](?lang=java#concept-api-java-method-retrieve-all-supertypes) - [subs();](?lang=java#concept-api-java-method-retrieve-all-subtypes)

Retrieve relationships

role.relationships();

Retrieves the relationships that the role relates to.

Returns

Stream of Relationship objects

Retrieve roleplayers

role.players();

Retrieves the types that play the role.

Returns

Stream of Type objects

[tab:end] [tab:Javascript]
[Important] At the moment, `Role` inherits an intermediary class which, for the sake of simplicity, has not been documented. Therefore, besides the `Concept` methods, Role inherits the following methods from the `Type` class. - [label();](?lang=javascript#concept-api-nodejs-method-retrieve-the-label) - [type.label(Label.of(label));](?lang=javascript#concept-api-nodejs-method-rename-the-label) - [sup();](?lang=javascript#concept-api-nodejs-method-retrieve-direct-supertype) - [sup(Type type);](?lang=javascript#concept-api-nodejs-method-change-direct-supertype) - [sups();](?lang=javascript#concept-api-nodejs-method-retrieve-all-supertypes) - [subs();](?lang=javascript#concept-api-nodejs-method-retrieve-all-subtypes)

Retrieve relationships

async role.relationships();

Retrieves the relationships that the role relates to.

Returns

Iterator of Relationship objects

Retrieve roleplayers

async role.players();

Retrieves the types that play the role.

Returns

Iterator of Type objects

[tab:end] [tab:Python]
[Important] At the moment, `Role` inherits an intermediary class which, for the sake of simplicity, has not been documented. Therefore, besides the `Concept` methods, Role inherits the following methods from the `Type` class. - [label();](?lang=python#concept-api-python-method-retrieve-the-label) - [type.label(Label.of(label));](?lang=python#concept-api-python-method-rename-the-label) - [sup();](?lang=python#concept-api-python-method-retrieve-direct-supertype) - [sup(Type type);](?lang=python#concept-api-python-method-change-direct-supertype) - [sups();](?lang=python#concept-api-python-method-retrieve-all-supertypes) - [subs();](?lang=python#concept-api-python-method-retrieve-all-subtypes)

Retrieve relationships

role.relationships()

Retrieves the relationships that the role relates to.

Returns

Iterator of Relationship objects

Retrieve roleplayers

role.players()

Retrieves the types that play the role.

Returns

Iterator of Type objects

[tab:end]