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 usingReasoningConnection
s.- Since:
- 0.7.3
- Version:
- 4.0
- Author:
- Evren Sirin, Michael Grove
-
-
Field Summary
Fields Modifier and Type Field Description static Axiom
INCONSISTENCY
Special expression instance with no statements that can be used to indicate that we are explaining inconsistency.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StardogExplainer
activeGraphs(java.util.Collection<IRI> theActiveGraphs)
Compute the explanation over the given named graphs ignoring information in other named graphs.StardogExplainer
computeNamedGraphs()
The named graphs will be computed for assertions in the explanation.StardogExplainer
countLimit(int theLimit)
Limits the number of explanations returned by the explainer.StardogExplainer
mergeExplanations()
Merges the explanations if possible by combining shared nodes in a proof and setting thealternate
links between these nodes.Proof
proof()
Returns one explanation generated by this explainer ornull
if the statement is not inferred.java.lang.Iterable<Proof>
proofs()
Returns all the explanations generated by this explainer.StardogExplainer
timeLimit(long theLimit, java.util.concurrent.TimeUnit theUnit)
Limits the time spent to compute explanations.
-
-
-
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 computingnamed 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 thealternate
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 ornull
if the statement is not inferred. Calling this function will automatically set thecount limit
to 1.- Returns:
- a single proof or
null
if there are no proofs - Throws:
StardogException
-
-