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 |
|---|---|
default Rule |
asRule()
Deprecated.
|
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 |
getThen()
Retrieves the Right Hand Side of the rule.
|
Pattern |
getWhen()
Retrieves the Left Hand Side of the rule.
|
default boolean |
isRule()
Deprecated.
|
Rule |
resource(Resource resource)
Creates a relation from this instance to the provided resource.
|
RuleType |
type()
Return the Type of the Concept.
|
asThing, isThing, plays, relations, resourcesasEntity, asEntityType, asOntologyConcept, asRelation, asRelationType, asResource, asResourceType, asRole, asRuleType, asType, delete, getId, isEntity, isEntityType, isOntologyConcept, isRelation, isRelationType, isResource, isResourceType, isRole, isRuleType, isTypecompareToRule resource(Resource resource)
@CheckReturnValue Pattern getWhen()
@CheckReturnValue Pattern getThen()
@CheckReturnValue Collection<Type> getHypothesisTypes()
@CheckReturnValue Collection<Type> getConclusionTypes()
@Deprecated @CheckReturnValue default Rule asRule()
Concept@Deprecated @CheckReturnValue default boolean isRule()
ConceptCopyright © 2017 Grakn Labs Ltd. All rights reserved.