Edit on Github

Thing Methods

Thing has all the Concept methods plus what follows.

[tab:Java]

Retrieve type

thing.type();

Retrieves the type which this Thing belongs to.

Returns

Type object

Retrieve relations

thing.relations(Role… roles);

Retrieves all the Relations which this Thing plays a role in, optionally filtered by one or more given roles.

Accepts

Param Description Type Required Default

roles

The list of roles to filter the relations by.

Varargs of Role objects

false

N/A

Returns

Stream of Relation objects

Retrieve roles

thing.roles();

Retrieves the roles that this Thing plays.

Returns

Stream of Role objects

Retrieve attributes

thing.attributes(AttributeType… attributeTypes));

Retrieves the Attributes that this Thing owns, optionally filtered by one or ore AttributeTypes.

Accepts

Param Description Type Required Default

attributeTypes

The AttributeTypes to filter the attributes by.

Varargs of AttributeTypes

false

N/A

Returns

Stream of Attribute objects

Retrieve keys

thing.keys(AttributeType… attributeTypes);

Retrieves the Attributes that this Thing owns as its keys, optionally filtered by one or ore AttributeTypes.

Accepts

Param Description Type Required Default

attributeTypes

The AttributeTypes to filter the keys by.

Array of AttributeTypes

false

N/A

Returns

Stream of Attribute objects

Assign attribute

thing.has(Attribute attribute);

Assigns an Attribute to be owned by this Thing.

Accepts

Param Description Type Required Default

attribute

The Attribute to be owned by this Thing.

Attribute

true

N/A

Returns

Thing object

Unassign attribute

thing.unhas(Attribute attribute);

Unassigns an Attribute from this Thing.

Accepts

Param Description Type Required Default

attribute

The Attribute to be disowned from this Thing.

Attribute

true

N/A

Returns

Thing object

Check if inferred

thing.isInferred();

Checks if this Thing is inferred by a Reasoning Rule.

Returns

boolean

[tab:end] [tab:Javascript]

Retrieve type

await thing.type();

Retrieves the type which this Thing belongs to.

Returns

Type object

Retrieve relations

await thing.relations(roles);

Retrieves all the Relations which this Thing plays a role in, optionally filtered by one or more given roles.

Accepts

Param Description Type Required Default

roles

The list of roles to filter the relations by.

Array of Roles

false

N/A

Returns

Iterator of Relation objects

Retrieve roles

await thing.roles();

Retrieves the roles that this Thing plays.

Returns

Iterator of Role objects

Retrieve attributes

await thing.attributes(attributeTypes);

Retrieves the Attributes that this Thing owns, optionally filtered by one or ore AttributeTypes.

Accepts

Param Description Type Required Default

attributeTypes

The AttributeTypes to filter the attributes by.

Array of AttributeTypes

false

N/A

Returns

Iterator of Attribute objects

Retrieve keys

await thing.keys(attributeTypes);

Retrieves the Attributes that this Thing owns as its keys, optionally filtered by one or ore AttributeTypes.

Accepts

Param Description Type Required Default

attributeTypes

The AttributeTypes to filter the keys by.

Array of AttributeTypes

false

N/A

Returns

Iterator of Attribute objects

Assign attribute

await thing.has(attribute);

Assigns an Attribute to be owned by this Thing.

Accepts

Param Description Type Required Default

attribute

The Attribute to be owned by this Thing.

Attribute

true

N/A

Returns

Thing object

Unassign attribute

await thing.unhas(attribute);

Unassigns an Attribute from this Thing.

Accepts

Param Description Type Required Default

attribute

The Attribute to be disowned from this Thing.

Attribute

true

N/A

Returns

Thing object

Check if inferred

await thing.isInferred();

Checks if this Thing is inferred by a Reasoning Rule.

Returns

boolean

[tab:end] [tab:Python]

Retrieve type

thing.type()

Retrieves the type which this Thing belongs to.

Returns

Type object

Retrieve relations

thing.relations(roles)

Retrieves all the Relations which this Thing plays a role in, optionally filtered by one or more given roles.

Accepts

Param Description Type Required Default

roles

The list of roles to filter the relations by.

List of Roles

false

N/A

Returns

Iterator of Relation objects

Retrieve roles

thing.roles()

Retrieves the roles that this Thing plays.

Returns

Iterator of Role objects

Retrieve attributes

thing.attributes(attribute_types)

Retrieves the Attributes that this Thing owns, optionally filtered by one or ore AttributeTypes.

Accepts

Param Description Type Required Default

attribute_types

The AttributeTypes to filter the attributes by.

List of AttributeTypes

false

N/A

Returns

Iterator of Attribute objects

Retrieve keys

thing.keys(attribute_types)

Retrieves the Attributes that this Thing owns as its keys, optionally filtered by one or ore AttributeTypes.

Accepts

Param Description Type Required Default

attribute_types

The AttributeTypes to filter the keys by.

List of AttributeTypes

false

N/A

Returns

Iterator of Attribute objects

Assign attribute

thing.has(attribute)

Assigns an Attribute to be owned by this Thing.

Accepts

Param Description Type Required Default

attribute

The Attribute to be owned by this Thing.

Attribute

true

N/A

Returns

Thing object

Unassign attribute

thing.unhas(attribute)

Unassigns an Attribute from this Thing.

Accepts

Param Description Type Required Default

attribute

The Attribute to be disowned from this Thing.

Attribute

true

N/A

Returns

Thing object

Check if inferred

thing.is_inferred()

Checks if this Thing is inferred by a Reasoning Rule.

Returns

boolean

[tab:end]

Attribute Methods

Attribute has all the Thing methods plus what follows.

[tab:Java]

Retrieve value

attribute.value();

Retrieves the value which the Attribute instance holds.

Retrieve owners

attribute.owners();

Retrieves the instances that own this Attribute.

[tab:end] [tab:Javascript]

Retrieve value

await attribute.value();

Retrieves the value which the Attribute instance holds.

Retrieve owners

await attribute.owners();

Retrieves the instances that own this Attribute.

[tab:end] [tab:Python]

Retrieve value

attribute.value()

Retrieves the value which the Attribute instance holds.

Retrieve owners

attribute.owners()

Retrieves the instances that own this Attribute.

[tab:end]

Relation Methods

Relation has all the Thing methods plus what follows.

[tab:Java]

Retrieve roleplayers per role

relation.rolePlayersMap();

Retrieves a map of all instances involved in the Relation and the role each play.

Returns

Map<Role, Set<Thing»

Retrieve roleplayers

relation.rolePlayers(Role role);

Retrieves all roleplayers of this this Relation, optionally filtered by given a role.

Accepts

Param Description Type Required Default

role

The role to filter the roleplayers by.

Role

false

N/A

Returns

Stream of Thing objects

Add roleplayer

relation.assign(Role role, Thing thing);

Adds a new roleplayer to play the given role in this Relation.

Accepts

Param Description Type Required Default

role

The role to be played by the thing

Role

true

N/A

thing

The thing to play the role

Thing

true

N/A

Returns

Relation object

Remove a roleplayer

relation.unassign(Role role, Thing thing);

Removes the association of the given instance that plays the given role in this Relation.

Accepts

Param Description Type Required Default

role

The role to no longer be played by the thing in this Relation.

Role

true

N/A

thing

The instance to no longer play the role in this Relation.

Thing

true

N/A

Returns

Relation object

[tab:end] [tab:Javascript]

Retrieve roleplayers per role

await relation.rolePlayersMap();

Retrieves a map of all instances involved in the Relation and the role each play.

Returns

Map<Role, Set<Thing»

Retrieve roleplayers

await relation.rolePlayers(role);

Retrieves all roleplayers of this this Relation, optionally filtered by given a role.

Accepts

Param Description Type Required Default

role

The role to filter the roleplayers by.

Role

false

N/A

Returns

Iterator of Thing objects

Add roleplayer

await relation.assign(role, thing);

Adds a new roleplayer to play the given role in this Relation.

Accepts

Param Description Type Required Default

role

The role to be played by the thing

Role

true

N/A

thing

The thing to play the role

Thing

true

N/A

Returns

void

Remove a roleplayer

await relation.unassign(role, thing);

Removes the association of the given instance that plays the given role in this Relation.

Accepts

Param Description Type Required Default

role

The role to no longer be played by the thing in this Relation.

Role

true

N/A

thing

The instance to no longer play the role in this Relation.

Thing

true

N/A

Returns

void

[tab:end] [tab:Python]

Retrieve roleplayers per role

relation.role_players_map()

Retrieves a map of all instances involved in the Relation and the role each play.

Returns

Dict[Role, set[Thing]]

Retrieve roleplayers

relation.role_players(role)

Retrieves all roleplayers of this this Relation, optionally filtered by given a role.

Accepts

Param Description Type Required Default

role

The role to filter the roleplayers by.

Role

false

N/A

Returns

Iterator of Thing objects

Add roleplayer

relation.assign(role, thing)

Adds a new roleplayer to play the given role in this Relation.

Accepts

Param Description Type Required Default

role

The role to be played by the thing

Role

true

N/A

thing

The thing to play the role

Thing

true

N/A

Returns

Relation object

Remove a roleplayer

relation.unassign(role, thing)

Removes the association of the given instance that plays the given role in this Relation.

Accepts

Param Description Type Required Default

role

The role to no longer be played by the thing in this Relation.

Role

true

N/A

thing

The instance to no longer play the role in this Relation.

Thing

true

N/A

Returns

Relation object

[tab:end]