Class ConjunctiveQueryRuleAdapter

java.lang.Object
fr.lirmm.graphik.integraal.core.AbstractRule
fr.lirmm.graphik.integraal.core.ConjunctiveQueryRuleAdapter
All Implemented Interfaces:
Rule, Comparable<Rule>

public class ConjunctiveQueryRuleAdapter extends AbstractRule
Adapts a conjunctive query so it can be manipulated through the Rule API.
Author:
Clément Sipieter (INRIA) <clement@6pi.fr>
  • Constructor Details

    • ConjunctiveQueryRuleAdapter

      public ConjunctiveQueryRuleAdapter(ConjunctiveQuery query)
      Creates an adapter over the body and label of the specified conjunctive query.
      Parameters:
      query - the query to adapt
    • ConjunctiveQueryRuleAdapter

      public ConjunctiveQueryRuleAdapter(InMemoryAtomSet query)
      Creates an adapter over the specified atom set with an empty label.
      Parameters:
      query - the atom set used as rule body
  • Method Details

    • getLabel

      public String getLabel()
      Description copied from interface: Rule
      Get the label (the name) of this rule.
      Returns:
      the label of this rule.
    • setLabel

      public void setLabel(String label)
      Description copied from interface: Rule
      Set the label (the name) of this rule.
      Parameters:
      label - the new rule label
    • getBody

      public InMemoryAtomSet getBody()
      Description copied from interface: Rule
      Get the body (the hypothesis) of this rule.
      Returns:
      the body of this rule.
    • getHead

      public InMemoryAtomSet getHead()
      Description copied from interface: Rule
      Get the head (the conclusion) of this rule.
      Returns:
      the head of this rule.
    • getFrontier

      public Set<Variable> getFrontier()
      Description copied from interface: Rule
      Compute and return the set of frontier variables of this rule.
      Returns:
      a Set containing the frontier variables of this rule.
    • getExistentials

      public Set<Variable> getExistentials()
      Description copied from interface: Rule
      Compute and return the set of existential variables of this rule.
      Returns:
      a Set containing the existential variables of this rule.
    • getTerms

      public Set<Term> getTerms(Term.Type type)
      Description copied from interface: Rule
      Get terms by Type.
      Parameters:
      type - the term type to collect
      Returns:
      a Set of all Term of the specified type related to this Rule.
    • getVariables

      public Set<Variable> getVariables()
      Description copied from interface: Rule
      Get all variables of this rule.
      Returns:
      a Set of all variables related to this Rule.
    • getConstants

      public Set<Constant> getConstants()
      Description copied from interface: Rule
      Get all constants of this rule.
      Returns:
      a Set of all constants related to this Rule.
    • getLiterals

      public Set<Literal> getLiterals()
      Description copied from interface: Rule
      Get all literals of this rule.
      Returns:
      a Set of all literals related to this Rule.
    • getTerms

      public Set<Term> getTerms()
      Description copied from interface: Rule
      Get all terms of this rule.
      Returns:
      a Set of all Term related to this Rule.