| Modifier and Type | Method and Description |
|---|---|
Entity |
addEntity()
Creates and returns a new Entity instance, whose direct type will be this type.
|
EntityType |
copy() |
EntityType |
deletePlays(RoleType roleType)
Removes the RoleType to prevent instances of this EntityType from playing it.
|
EntityType |
deleteScope(Instance scope)
Delete the scope specified.
|
Collection<Entity> |
instances()
Returns a collection of all Entity instances for this EntityType.
|
EntityType |
key(ResourceType resourceType)
Creates a RelationType which allows this type and a resource type to be linked in a strictly one-to-one mapping.
|
EntityType |
plays(RoleType roleType)
Sets the RoleType which instances of this EntityType may play.
|
EntityType |
resource(ResourceType resourceType)
Creates a RelationType which allows this type and a resource type to be linked.
|
EntityType |
scope(Instance scope)
Classifies the type to a specific scope.
|
EntityType |
setAbstract(Boolean isAbstract)
Sets the EntityType to be abstract - which prevents it from having any instances.
|
EntityType |
subType(EntityType type)
Adds another subtype to this type
|
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 direct supertype of the EntityType to be the EntityType specified.
|
getLabel, getRulesOfConclusion, getRulesOfHypothesis, isAbstract, isImplicit, keys, plays, resources, scopesasEntity, asEntityType, asInstance, asRelation, asRelationType, asResource, asResourceType, asRoleType, asRule, asRuleType, asType, delete, getId, isEntity, isEntityType, isInstance, isRelation, isRelationType, isResource, isResourceType, isRoleType, isRule, isRuleType, isTypecompareToEntityType 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 EntityTypeConceptException - if this is a meta typeConceptException - if the given supertype is already an indirect subtype of this typeEntityType subType(EntityType type)
type - The sub type of this entity typeConceptException - if the sub type is a meta typeConceptException - if the given subtype is already an indirect supertype of this typeEntityType plays(RoleType roleType)
EntityType deletePlays(RoleType roleType)
deletePlays in interface TyperoleType - The Role Type which the instances of this EntityType should no longer be allowed to play.Entity addEntity()
ConceptException - if this is a meta typeEntityEntityType scope(Instance scope)
EntityType deleteScope(Instance scope)
deleteScope in interface Typescope - The Instances that is currently scoping this Type.EntityType key(ResourceType resourceType)
EntityType resource(ResourceType resourceType)
EntityType superType()
Collection<EntityType> subTypes()
Collection<Entity> instances()
EntityType copy()
Copyright © 2017 Grakn Labs Ltd. All rights reserved.