Interface PreparedFOQuery<Formula extends FOFormula, QD extends QueryableData>

Type Parameters:
Formula - the queried formula type
QD - the prepared data-source type
All Superinterfaces:
fr.inria.rules.dlgpemodel.api.sentences.HasItemInfo, fr.inria.rules.dlgpemodel.api.sentences.IPrintable, fr.inria.rules.dlgpemodel.api.sentences.ISentence, Labeled, PreparedQuery<FOQuery<? extends Formula>, QD, Substitution, Substitution>, Query, Sentence
All Known Implementing Classes:
PreparedFOQueryImpl

public interface PreparedFOQuery<Formula extends FOFormula, QD extends QueryableData> extends PreparedQuery<FOQuery<? extends Formula>, QD, Substitution, Substitution>
A prepared first-order query bound to a QueryableData source.
  • Field Summary

    Fields inherited from interface fr.inria.rules.dlgpemodel.api.sentences.HasItemInfo

    IDENT

    Fields inherited from interface fr.inria.rules.dlgpemodel.api.sentences.IPrintable

    WRITER

    Fields inherited from interface Labeled

    NOLABEL
  • Method Summary

    Modifier and Type
    Method
    Description
    Executes the prepared query with an empty substitution.
    default Set<Variable>
    Returns the variables that must be bound before evaluating the query.
    default boolean
    Checks whether the query can be evaluated with the given substitution.

    Methods inherited from interface fr.inria.rules.dlgpemodel.api.sentences.HasItemInfo

    getIdentifier, getInfo, getItemInfo, setIdentifier, setInfo, setItemInfo

    Methods inherited from interface fr.inria.rules.dlgpemodel.api.sentences.IPrintable

    toDLGPE

    Methods inherited from interface fr.inria.rules.dlgpemodel.api.sentences.ISentence

    setPatterns

    Methods inherited from interface Sentence

    getPatterns, setLabel
  • Method Details

    • execute

      default Stream<Substitution> execute() throws EvaluationException
      Executes the prepared query with an empty substitution.
      Returns:
      The answers to the query
      Throws:
      EvaluationException - if execution fails
    • isEvaluableWith

      default boolean isEvaluableWith(Substitution substitution)
      Checks whether the query can be evaluated with the given substitution.
      Parameters:
      substitution - the substitution that associates the values to the parameters of the evaluation
      Returns:
      true iff we can evaluate this query with the given substitution
    • getMandatoryParameters

      default Set<Variable> getMandatoryParameters()
      Returns the variables that must be bound before evaluating the query.
      Returns:
      a set of variables containing the variables that must be substituted