public interface RelationType extends Type
| Modifier and Type | Method and Description |
|---|---|
Relation |
addRelation()
Adds a new empty Relation.
|
RelationType |
deleteHasRole(RoleType roleType)
Delete a RoleType from this RelationType
|
RelationType |
deletePlaysRole(RoleType roleType)
Removes the RoleType to prevent instances of this RelationType from playing it.
|
RelationType |
hasRole(RoleType roleType)
Sets a new RoleType for this RelationType.
|
Collection<RoleType> |
hasRoles()
Retrieves a list of the RoleTypes that make up this RelationType.
|
Collection<Relation> |
instances()
Retrieve all the Relation instances of this RelationType
|
RelationType |
playsRole(RoleType roleType)
Sets the RoleType which instances of this RelationType may play.
|
RelationType |
setAbstract(Boolean isAbstract)
Sets the RelationType to be abstract - which prevents it from having any instances.
|
Collection<RelationType> |
subTypes()
Returns a collection of subtypes of this RelationType.
|
RelationType |
superType()
Returns the supertype of this RelationType.
|
RelationType |
superType(RelationType type)
Sets the supertype of the RelationType to be the EntityType specified.
|
getName, getRulesOfConclusion, getRulesOfHypothesis, hasResource, isAbstract, isImplicit, key, playsRolesasEntity, asEntityType, asInstance, asRelation, asRelationType, asResource, asResourceType, asRoleType, asRule, asRuleType, asType, delete, getId, isEntity, isEntityType, isInstance, isRelation, isRelationType, isResource, isResourceType, isRoleType, isRule, isRuleType, isTypecompareToRelation addRelation()
RelationCollection<RoleType> hasRoles()
RoleTypeRelationType hasRole(RoleType roleType)
roleType - A new role which is part of this relationship.RoleTypeRelationType deleteHasRole(RoleType roleType)
roleType - The RoleType to delete from the RelationType.RoleTypeRelationType setAbstract(Boolean isAbstract)
setAbstract in interface TypeisAbstract - Specifies if the concept is to be abstract (true) or not (false).RelationType superType()
RelationType superType(RelationType type)
type - The supertype of this RelationTypeCollection<RelationType> subTypes()
RelationType playsRole(RoleType roleType)
RelationType deletePlaysRole(RoleType roleType)
deletePlaysRole in interface TyperoleType - The RoleType which the instances of this Type should no longer be allowed to play.Collection<Relation> instances()
Copyright © 2016 Grakn Labs Ltd. All rights reserved.