public interface Type extends Concept
A Type represents any ontological element in the graph.
Types are used to model the behaviour of Instance and how they relate to each other.
They also aid in categorising Instance to different types.
EntityType,
RoleType,
RelationType,
ResourceType,
RuleType| Modifier and Type | Method and Description |
|---|---|
Type |
deletePlaysRole(RoleType roleType) |
TypeName |
getName()
Returns the name of this Type.
|
Collection<Rule> |
getRulesOfConclusion()
Return the collection of Rules for which this Type serves as a conclusion.
|
Collection<Rule> |
getRulesOfHypothesis()
Return the collection of Rules for which this Type serves as a hypothesis.
|
RelationType |
hasResource(ResourceType resourceType)
Creates a RelationType which allows this type and a resource type to be linked.
|
Collection<? extends Instance> |
instances() |
Boolean |
isAbstract()
Return if the type is set to abstract.
|
Boolean |
isImplicit()
Return whether the Type was created implicitly.
|
RelationType |
key(ResourceType resourceType)
Creates a RelationType which allows this type and a resource type to be linked in a strictly one-to-one mapping.
|
Type |
playsRole(RoleType roleType) |
Collection<RoleType> |
playsRoles() |
Type |
setAbstract(Boolean isAbstract)
Sets the Entity Type to be abstract - which prevents it from having any instances.
|
Collection<? extends Type> |
subTypes() |
Type |
superType() |
asEntity, asEntityType, asInstance, asRelation, asRelationType, asResource, asResourceType, asRoleType, asRule, asRuleType, asType, delete, getId, isEntity, isEntityType, isInstance, isRelation, isRelationType, isResource, isResourceType, isRoleType, isRule, isRuleType, isTypecompareToType setAbstract(Boolean isAbstract)
isAbstract - Specifies if the concept is to be abstract (true) or not (false).Type playsRole(RoleType roleType)
roleType - The Role Type which the instances of this Type are allowed to play.RelationType key(ResourceType resourceType)
resourceType - The resource type which instances of this type should be allowed to play.RelationType hasResource(ResourceType resourceType)
resourceType - The resource type which instances of this type should be allowed to play.TypeName getName()
Collection<RoleType> playsRoles()
Type superType()
Collection<? extends Type> subTypes()
Collection<? extends Instance> instances()
Boolean isAbstract()
Boolean isImplicit()
hasResource(ai.grakn.concept.ResourceType)Collection<Rule> getRulesOfHypothesis()
RuleCollection<Rule> getRulesOfConclusion()
RuleCopyright © 2017 Grakn Labs Ltd. All rights reserved.