public interface EntityType extends Type
This class allows you to set and retrieve information about the EntityType, such as its sub- and supertypes.
| Modifier and Type | Method and Description |
|---|---|
Entity |
addEntity()
Creates and returns a new Entity instance.
|
EntityType |
deletePlaysRole(RoleType roleType)
Removes the RoleType to prevent instances of this EntityType from playing it.
|
Collection<Entity> |
instances()
Returns a collection of all Entity instances for this EntityType.
|
EntityType |
playsRole(RoleType roleType)
Sets the RoleType which instances of this EntityType may play.
|
EntityType |
setAbstract(Boolean isAbstract)
Sets the EntityType to be abstract - which prevents it from having any instances.
|
Collection<EntityType> |
subTypes()
Returns a collection of subtypes of this EntityType.
|
EntityType |
superType()
Returns the supertype of this EntityType.
|
EntityType |
superType(EntityType type)
Sets the supertype of the EntityType to be the EntityType specified.
|
getName, getRulesOfConclusion, getRulesOfHypothesis, hasResource, isAbstract, isImplicit, key, playsRolesasEntity, asEntityType, asInstance, asRelation, asRelationType, asResource, asResourceType, asRoleType, asRule, asRuleType, asType, delete, getId, isEntity, isEntityType, isInstance, isRelation, isRelationType, isResource, isResourceType, isRoleType, isRule, isRuleType, isType, typecompareToEntityType setAbstract(Boolean isAbstract)
setAbstract in interface TypeisAbstract - Specifies if the EntityType is to be abstract (true) or not (false).EntityType superType(EntityType type)
type - The supertype of this EntityTypeEntityType playsRole(RoleType roleType)
EntityType deletePlaysRole(RoleType roleType)
deletePlaysRole in interface TyperoleType - The Role Type which the instances of this EntityType should no longer be allowed to play.Entity addEntity()
EntityEntityType superType()
Collection<EntityType> subTypes()
Collection<Entity> instances()
Copyright © 2016 Grakn Labs Ltd. All rights reserved.