public interface RoleType extends Type
An ontological element which defines a role which can be played in a relation type.
This ontological element defines the roles which make up a RelationType.
It behaves similarly to Type when relating to other types.
It has some additional functionality:
1. It cannot play a role to itself.
2. It is special in that it is unique to relation types.
| Modifier and Type | Method and Description |
|---|---|
RoleType |
copy() |
RoleType |
deletePlays(RoleType roleType)
Removes the RoleType to prevent instances from playing it
|
RoleType |
deleteScope(Instance scope)
Delete the scope specified.
|
RoleType |
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<Type> |
playedByTypes()
Returns a collection of the Types that can play this RoleType.
|
RoleType |
plays(RoleType roleType)
Sets the RoleType which instances of this Type may play.
|
Collection<RelationType> |
relationTypes()
Returns the RelationTypes that this RoleType takes part in.
|
RoleType |
resource(ResourceType resourceType)
Creates a RelationType which allows this type and a resource type to be linked.
|
RoleType |
scope(Instance scope)
Classifies the type to a specific scope.
|
RoleType |
setAbstract(Boolean isAbstract)
Sets the RoleType to be abstract - which prevents it from having any instances.
|
RoleType |
subType(RoleType type)
Adds another subtype to this type
|
Collection<RoleType> |
subTypes()
Returns the subtypes of this RoleType.
|
RoleType |
superType()
Returns the supertype of this RoleType.
|
RoleType |
superType(RoleType type)
Sets the supertype of this RoleType.
|
getLabel, getRulesOfConclusion, getRulesOfHypothesis, instances, 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, isTypecompareToRoleType setAbstract(Boolean isAbstract)
setAbstract in interface TypeisAbstract - Specifies if the RoleType is to be abstract (true) or not (false).RoleType superType(RoleType type)
type - The supertype of this RoleTypeRoleType subType(RoleType type)
type - The sub type of this role typeRoleType deletePlays(RoleType roleType)
deletePlays in interface TyperoleType - The RoleType which the instances of this Type should no longer be allowed to play.RoleType scope(Instance scope)
RoleType deleteScope(Instance scope)
deleteScope in interface Typescope - The Instances that is currently scoping this Type.RoleType key(ResourceType resourceType)
RoleType resource(ResourceType resourceType)
RoleType superType()
Collection<RoleType> subTypes()
Collection<RelationType> relationTypes()
RelationTypeCollection<Type> playedByTypes()
TypeCopyright © 2017 Grakn Labs Ltd. All rights reserved.