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 Summary
FieldsModifier and TypeFieldDescriptionstatic final AxiomSpecial expression instance with no statements that can be used to indicate that we are explaining inconsistency. -
Method Summary
Modifier and TypeMethodDescriptionactiveGraphs(Collection<IRI> theActiveGraphs) Compute the explanation over the given named graphs ignoring information in other named graphs.The named graphs will be computed for assertions in the explanation.countLimit(int theLimit) Limits the number of explanations returned by the explainer.Merges the explanations if possible by combining shared nodes in a proof and setting thealternatelinks between these nodes.proof()Returns one explanation generated by this explainer ornullif the statement is not inferred.proofs()Returns all the explanations generated by this explainer.Limits the time spent to compute explanations.
-
Field Details
-
INCONSISTENCY
Special expression instance with no statements that can be used to indicate that we are explaining inconsistency.
-
-
Method Details
-
countLimit
Limits the number of explanations returned by the explainer. The default limit is 10.- Returns:
- this explainer
-
timeLimit
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 computingnamed graphsand 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 thealternatelinks between these nodes.- Returns:
- this explainer
-
activeGraphs
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
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
Returns one explanation generated by this explainer ornullif the statement is not inferred. Calling this function will automatically set thecount limitto 1.- Returns:
- a single proof or
nullif there are no proofs - Throws:
StardogException
-