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 |
deletePlays(Role role) |
RuleType |
deleteScope(Thing 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(Role role) |
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(Thing 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 |
sub(RuleType type)
Adds another subtype to this type
|
Collection<RuleType> |
subs()
Get all indirect sub-types of this type.
|
RuleType |
sup() |
RuleType |
sup(RuleType type) |
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, 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(Thing scope)
RuleType deleteScope(Thing 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 sup()
sup in interface OntologyConceptsup in interface TypeRuleType sup(RuleType type)
type - The super type of this Rule TypeRuleType sub(RuleType type)
type - The sub type of this rule typeCollection<RuleType> subs()
Typesubs in interface OntologyConceptsubs in interface TypeRuleType deletePlays(Role role)
deletePlays in interface Typerole - 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.