public interface Rule extends Instance
| Modifier and Type | Method and Description |
|---|---|
Rule |
addConclusion(Type type)
Add a conclusion of the specified Type to the Rule.
|
Rule |
addHypothesis(Type type)
Add a hypothesis of the specified Type to the Rule.
|
Collection<Type> |
getConclusionTypes()
Retrieve a set of Types that constitue a part of the conclusion of the Rule.
|
Boolean |
getExpectation()
Returns a boolean representing the expectation setting of this 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.
|
Boolean |
isMaterialise()
Returns whether the Rule is materialised.
|
Rule |
setExpectation(boolean expectation)
Set the expectation of this Rule to be true or false.
|
Rule |
setMaterialise(boolean materialise)
Sets whether the Rule should be materialised.
|
RuleType |
type()
Return the Type of the Concept.
|
hasResource, playsRoles, relations, resourcesasEntity, asEntityType, asInstance, asRelation, asRelationType, asResource, asResourceType, asRoleType, asRule, asRuleType, asType, delete, getId, isEntity, isEntityType, isInstance, isRelation, isRelationType, isResource, isResourceType, isRoleType, isRule, isRuleType, isTypecompareToRule setExpectation(boolean expectation)
expectation - A boolean parameter representing the expectation setting.Rule setMaterialise(boolean materialise)
materialise - A boolean representing whether the Rule should be materialised.Pattern getLHS()
Pattern getRHS()
Boolean getExpectation()
Boolean isMaterialise()
Rule addHypothesis(Type type)
type - The Type which this Rule applies to.Rule addConclusion(Type type)
type - The Type which is the conclusion of this Rule.Collection<Type> getHypothesisTypes()
Collection<Type> getConclusionTypes()
Copyright © 2017 Grakn Labs Ltd. All rights reserved.