public interface RuleType extends Type
An ontological element used to model and categorise different types of Rule.
An ontological element used to define different types of Rule.
Currently supported rules include GraknAdmin.getMetaRuleInference()
and GraknAdmin.getMetaRuleConstraint()
| Modifier and Type | Method and Description |
|---|---|
RuleType |
copy() |
RuleType |
deletePlays(RoleType roleType) |
RuleType |
deleteScope(Instance scope)
Delete the scope specified.
|
Collection<Rule> |
instances()
Get all indirect instances of this type.
|
RuleType |
key(ResourceType resourceType)
Creates a RelationType which allows this type and a resource type to be linked in a strictly one-to-one mapping.
|
RuleType |
plays(RoleType roleType) |
Rule |
putRule(Pattern lhs,
Pattern rhs)
Adds a new Rule if it does not exist otherwise returns the existing rule.
|
RuleType |
resource(ResourceType resourceType)
Creates a RelationType which allows this type and a resource type to be linked.
|
RuleType |
scope(Instance scope)
Classifies the type to a specific scope.
|
RuleType |
setAbstract(Boolean isAbstract)
Sets the Entity Type to be abstract - which prevents it from having any instances.
|
RuleType |
subType(RuleType type)
Adds another subtype to this type
|
Collection<RuleType> |
subTypes()
Get all indirect sub-types of this type.
|
RuleType |
superType() |
RuleType |
superType(RuleType type) |
getLabel, getRulesOfConclusion, getRulesOfHypothesis, 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, isTypecompareToRule putRule(Pattern lhs, Pattern rhs)
lhs - A string representing the left hand side Graql query.rhs - A string representing the right hand side Graql query.PatternRuleType scope(Instance scope)
RuleType deleteScope(Instance scope)
deleteScope in interface Typescope - The Instances that is currently scoping this Type.RuleType key(ResourceType resourceType)
RuleType resource(ResourceType resourceType)
RuleType setAbstract(Boolean isAbstract)
TypesetAbstract in interface TypeisAbstract - Specifies if the concept is abstract (true) or not (false).
If the concept type is abstract it is not allowed to have any instances.RuleType superType()
RuleType superType(RuleType type)
type - The super type of this Rule TypeRuleType subType(RuleType type)
type - The sub type of this rule typeCollection<RuleType> subTypes()
TypeRuleType deletePlays(RoleType roleType)
deletePlays in interface TyperoleType - The Role Type which the instances of this Type should no longer be allowed to play.Collection<Rule> instances()
TypeCopyright © 2017 Grakn Labs Ltd. All rights reserved.