Interface ConjunctiveQuery

All Superinterfaces:
CloseableIterable<Atom>, CloseableIterableWithoutException<Atom>, Iterable<Atom>, Query
All Known Implementing Classes:
DefaultConjunctiveQuery

public interface ConjunctiveQuery extends Query, CloseableIterableWithoutException<Atom>
This interface represents a conjunctive query. A conjunctive query Q is a conjunction of atoms with a distinguished subset of its variables (the answer variables). It is interpreted as the logical formula obtained from Q by existentially quantifying non-distinguished variables. When the set of answer variables is empty, Q is a Boolean query.
Author:
Clément Sipieter (INRIA) <clement@6pi.fr>
  • Method Details

    • getLabel

      String getLabel()
      The label (the name) for this query.
      Specified by:
      getLabel in interface Query
      Returns:
      the label of this query.
    • getAtomSet

      InMemoryAtomSet getAtomSet()
      Get the atom conjunction representing the query.
      Returns:
      an atom set representing the atom conjunction of the query.
    • getAnswerVariables

      List<Term> getAnswerVariables()
      Get the answer variables
      Returns:
      an Collection of Term representing the answer variables.
    • setAnswerVariables

      void setAnswerVariables(List<Term> ans)
      Sets the answer variables of this query.
      Parameters:
      ans - the answer variables
    • iterator

      Return an iterator over the atoms conjunction of the query.
      Specified by:
      iterator in interface CloseableIterable<Atom>
      Specified by:
      iterator in interface CloseableIterableWithoutException<Atom>
      Specified by:
      iterator in interface Iterable<Atom>
      Returns:
      the iterator over the elements
    • appendTo

      void appendTo(StringBuilder sb)
      Appends this object representation to the provided builder.
      Parameters:
      sb - the target builder