Interface StardogExplainer


  • public interface StardogExplainer
    Interface for explainer that can provide explanations for inferences made by a Stardog reasoner. An explainer is specific to one inference (or inconsistency). Explainer interfaces can be created using ReasoningConnections.
    Since:
    0.7.3
    Version:
    4.0
    Author:
    Evren Sirin, Michael Grove
    • Field Detail

      • INCONSISTENCY

        static final Axiom INCONSISTENCY
        Special expression instance with no statements that can be used to indicate that we are explaining inconsistency.
    • Method Detail

      • countLimit

        StardogExplainer countLimit​(int theLimit)
        Limits the number of explanations returned by the explainer. The default limit is 10.
        Returns:
        this explainer
      • timeLimit

        StardogExplainer timeLimit​(long theLimit,
                                   java.util.concurrent.TimeUnit theUnit)
        Limits the time spent to compute explanations. The time limit does not constraint the time spent for communication between the client and the server, or the time spent for computing named graphs and merging explanations. The default limit is 30sec.
        Returns:
        this explainer
      • computeNamedGraphs

        StardogExplainer computeNamedGraphs()
        The named graphs will be computed for assertions in the explanation.
        Returns:
        this explainer
      • mergeExplanations

        StardogExplainer mergeExplanations()
        Merges the explanations if possible by combining shared nodes in a proof and setting the alternate links between these nodes.
        Returns:
        this explainer
      • activeGraphs

        StardogExplainer activeGraphs​(java.util.Collection<IRI> theActiveGraphs)
        Compute the explanation over the given named graphs ignoring information in other named graphs. Note that, the schema graphs will always be considered in explanations and cannot be excluded with this command.
        Returns:
        this explainer
      • proofs

        java.lang.Iterable<Proof> proofs()
                                  throws StardogException
        Returns all the explanations generated by this explainer. The result will be empty if the statement is not inferred.
        Returns:
        zero or more proofs
        Throws:
        StardogException
      • proof

        Proof proof()
             throws StardogException
        Returns one explanation generated by this explainer or null if the statement is not inferred. Calling this function will automatically set the count limit to 1.
        Returns:
        a single proof or null if there are no proofs
        Throws:
        StardogException