Interface DatalogDelegable

All Superinterfaces:
Iterable<Atom>, MaterializedData, QueryableData, TermCompound, Writable
All Known Implementing Classes:
RDBMSStore, TripleStoreStore

public interface DatalogDelegable extends MaterializedData, Writable
This interface represents storage systems that can directly apply datalog rules as part of their implementation. Datalog rules are rules without existential variables.
This is extended to the direct evaluation of conjunctive queries.
  • Method Details

    • delegate

      boolean delegate(Collection<FORule> rules) throws Exception
      Apply all the given (datalog) rules.
      Parameters:
      rules - the rules to apply
      Returns:
      true iff at least one atom have been produced by the application of the rules
      Throws:
      Exception - if a given rule is not datalog. The exact type is depending on the implementation
    • delegate

      Iterator<Substitution> delegate(FOQuery<?> query, boolean countAnswersOnly) throws Exception
      Evaluate the given (conjunctive) query
      Parameters:
      query - the query to evaluate
      countAnswersOnly - true iff the query has to return only the number of answers
      Returns:
      an Iterator of Substitution over all the answers of the given query with respect to the query answer variables.
      Throws:
      Exception - if the given query is not conjunctive. The exact type is depending on the implementation
    • delegate

      default Iterator<Substitution> delegate(FOQuery<?> query) throws Exception
      Evaluate the given (conjunctive) query
      Parameters:
      query - the query to evaluate
      Returns:
      an Iterator of Substitution over all the answers of the given query with respect to the query answer variables.
      Throws:
      Exception - if the given query is not conjunctive. The exact type is