public interface Type extends OntologyConcept
A Type represents any ontological element in the graph.
Types are used to model the behaviour of Thing and how they relate to each other.
They also aid in categorising Thing to different types.
EntityType,
Role,
RelationType,
ResourceType,
RuleType| Modifier and Type | Method and Description |
|---|---|
Type |
deletePlays(Role role) |
Type |
deleteScope(Thing scope)
Delete the scope specified.
|
Collection<? extends Thing> |
instances()
Get all indirect instances of this type.
|
Boolean |
isAbstract()
Return if the type is set to abstract.
|
Type |
key(ResourceType resourceType)
Creates a RelationType which allows this type and a resource type to be linked in a strictly one-to-one mapping.
|
Collection<ResourceType> |
keys() |
Collection<Role> |
plays() |
Type |
plays(Role role) |
Type |
resource(ResourceType resourceType)
Creates a RelationType which allows this type and a resource type to be linked.
|
Collection<ResourceType> |
resources() |
Type |
scope(Thing scope)
Classifies the type to a specific scope.
|
Collection<Thing> |
scopes()
Retrieve a list of the Instances that scope this Type.
|
Type |
setAbstract(Boolean isAbstract)
Sets the Entity Type to be abstract - which prevents it from having any instances.
|
Collection<? extends Type> |
subs()
Get all indirect sub-types of this type.
|
Type |
sup() |
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, isTypecompareToType setAbstract(Boolean isAbstract) throws GraphOperationException
isAbstract - Specifies if the concept is to be abstract (true) or not (false).GraphOperationException - if this is a meta-typeType plays(Role role) throws GraphOperationException
role - The Role Type which the instances of this Type are allowed to play.GraphOperationException - if this is a meta-typeType key(ResourceType resourceType) throws GraphOperationException
resourceType - The resource type which instances of this type should be allowed to play.GraphOperationException - if this is a meta-typeType resource(ResourceType resourceType) throws GraphOperationException
resourceType - The resource type which instances of this type should be allowed to play.GraphOperationException - if this is a meta-typeType scope(Thing scope)
scope - The category of this TypeType deleteScope(Thing scope)
scope - The Instances that is currently scoping this Type.Collection<Role> plays()
@CheckReturnValue Collection<ResourceType> resources()
@CheckReturnValue Collection<ResourceType> keys()
@CheckReturnValue Type sup()
sup in interface OntologyConcept@CheckReturnValue Collection<? extends Type> subs()
subs in interface OntologyConcept@CheckReturnValue Collection<? extends Thing> instances()
@CheckReturnValue Boolean isAbstract()
@CheckReturnValue Collection<Thing> scopes()
Copyright © 2017 Grakn Labs Ltd. All rights reserved.