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.
|
default EntityType |
asEntityType()
Deprecated.
|
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.
|
default boolean |
isEntityType()
Deprecated.
|
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 |
setLabel(Label label)
|
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.
|
asType, isAbstract, isType, keys, plays, resources, scopesasOntologyConcept, getLabel, getLabelId, getRulesOfConclusion, getRulesOfHypothesis, isImplicit, isOntologyConceptasEntity, asRelation, asRelationType, asResource, asResourceType, asRole, asRule, asRuleType, asThing, delete, getId, isEntity, isRelation, isRelationType, isResource, isResourceType, isRole, isRule, isRuleType, isThingcompareToEntityType setLabel(Label label)
EntityType 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)
@Nonnull EntityType sup()
sup in interface OntologyConceptsup in interface TypeCollection<EntityType> subs()
subs in interface OntologyConceptsubs in interface TypeCollection<Entity> instances()
@Deprecated @CheckReturnValue default EntityType asEntityType()
ConceptasEntityType in interface ConceptEntityType if the Concept is an EntityType@Deprecated @CheckReturnValue default boolean isEntityType()
ConceptConcept is an EntityType.isEntityType in interface ConceptConcept is an EntityType.Copyright © 2017 Grakn Labs Ltd. All rights reserved.