Interface StardogExplainer
-
public interface StardogExplainerInterface 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 usingReasoningConnections.- Since:
- 0.7.3
- Version:
- 4.0
- Author:
- Evren Sirin, Michael Grove
-
-
Field Summary
Fields Modifier and Type Field Description static AxiomINCONSISTENCYSpecial 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 StardogExplaineractiveGraphs(java.util.Collection<IRI> theActiveGraphs)Compute the explanation over the given named graphs ignoring information in other named graphs.StardogExplainercomputeNamedGraphs()The named graphs will be computed for assertions in the explanation.StardogExplainercountLimit(int theLimit)Limits the number of explanations returned by the explainer.StardogExplainermergeExplanations()Merges the explanations if possible by combining shared nodes in a proof and setting thealternatelinks between these nodes.Proofproof()Returns one explanation generated by this explainer ornullif the statement is not inferred.java.lang.Iterable<Proof>proofs()Returns all the explanations generated by this explainer.StardogExplainertimeLimit(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 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
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 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
-
-