public interface Rule extends Thing
A rule which defines how implicit knowledge can extracted.
It can behave like any other Thing but primarily serves as a way of extracting
implicit data from the graph. By defining the LHS (if statment) and RHS (then conclusion) it is possible to
automatically materialise new concepts based on these rules.
| Modifier and Type | Method and Description |
|---|---|
Collection<Type> |
getConclusionTypes()
Retrieve a set of Types that constitue a part of the conclusion of the Rule.
|
Collection<Type> |
getHypothesisTypes()
Retrieve a set of Types that constitute a part of the hypothesis of this Rule.
|
Pattern |
getLHS()
Retrieves the Left Hand Side of a Graql query.
|
Pattern |
getRHS()
Retrieves the Right Hand Side of a Graql query.
|
Rule |
resource(Resource resource)
Creates a relation from this instance to the provided resource.
|
RuleType |
type()
Return the Type of the Concept.
|
asEntity, 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 resource(Resource resource)
@CheckReturnValue Pattern getLHS()
@CheckReturnValue Pattern getRHS()
@CheckReturnValue Collection<Type> getHypothesisTypes()
@CheckReturnValue Collection<Type> getConclusionTypes()
Copyright © 2017 Grakn Labs Ltd. All rights reserved.