public interface EntityType extends Type
Ontology element used to represent categories.
An ontological element which represents categories instances can fall within.
Any instance of a Entity Type is called an Entity.
| Modifier and Type | Method and Description |
|---|---|
Entity |
addEntity()
Creates and returns a new Entity instance, whose direct type will be this type.
|
EntityType |
deletePlays(Role role)
Removes the Role to prevent instances of this EntityType from playing it.
|
EntityType |
deleteScope(Thing 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(Role role)
Sets the Role 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(Thing 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 |
sub(EntityType type)
Adds another subtype to this type
|
Collection<EntityType> |
subs()
Returns a collection of subtypes of this EntityType.
|
EntityType |
sup()
Returns the supertype of this EntityType.
|
EntityType |
sup(EntityType type)
Sets the direct supertype of the EntityType to be the EntityType specified.
|
getLabel, getRulesOfConclusion, getRulesOfHypothesis, getTypeId, isImplicitasEntity, asEntityType, asInstance, asOntologyConcept, asRelation, asRelationType, asResource, asResourceType, asRoleType, asRule, asRuleType, asType, delete, getId, isEntity, isEntityType, isInstance, isOntologyConcept, 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 sup(EntityType type)
type - The supertype of this EntityTypeGraphOperationException - if this is a meta typeGraphOperationException - if the given supertype is already an indirect subtype of this typeEntityType sub(EntityType type)
type - The sub type of this entity typeGraphOperationException - if the sub type is a meta typeGraphOperationException - if the given subtype is already an indirect supertype of this typeEntityType plays(Role role)
EntityType deletePlays(Role role)
deletePlays in interface Typerole - The Role Type which the instances of this EntityType should no longer be allowed to play.Entity addEntity()
GraphOperationException - if this is a meta typeEntityEntityType scope(Thing scope)
EntityType deleteScope(Thing scope)
deleteScope in interface Typescope - The Instances that is currently scoping this Type.EntityType key(ResourceType resourceType)
EntityType resource(ResourceType resourceType)
EntityType sup()
sup in interface OntologyConceptsup in interface TypeCollection<EntityType> subs()
subs in interface OntologyConceptsubs in interface TypeCollection<Entity> instances()
Copyright © 2017 Grakn Labs Ltd. All rights reserved.