public class RuleUtils extends Object
Convenience class providing methods for operating with the rule graph.
| Constructor and Description |
|---|
RuleUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Set<InferenceRule> |
getDependentRules(ReasonerQueryImpl query) |
static java.util.stream.Stream<Rule> |
getRules(GraknTx graph) |
static java.util.stream.Stream<Rule> |
getRulesWithType(SchemaConcept type,
GraknTx graph) |
static boolean |
hasRules(GraknTx graph) |
static boolean |
subGraphHasRulesWithHeadSatisfyingBody(Set<InferenceRule> rules) |
static boolean |
subGraphIsCyclical(Set<InferenceRule> rules,
GraknTx graph) |
public static java.util.stream.Stream<Rule> getRules(GraknTx graph)
graph - of interestpublic static boolean hasRules(GraknTx graph)
graph - of interestpublic static java.util.stream.Stream<Rule> getRulesWithType(SchemaConcept type, GraknTx graph)
type - for which rules containing it in the head are soughtgraph - of interestpublic static boolean subGraphIsCyclical(Set<InferenceRule> rules, GraknTx graph)
rules - set of rules of interest forming a rule subgraphgraph - of interestpublic static boolean subGraphHasRulesWithHeadSatisfyingBody(Set<InferenceRule> rules)
rules - set of rules of interest forming a rule subgraphpublic static Set<InferenceRule> getDependentRules(ReasonerQueryImpl query)
query - top queryCopyright © 2018 Grakn Labs Ltd. All rights reserved.