Interface ReasoningConnection
-
- All Superinterfaces:
java.lang.AutoCloseable
,Connection
- All Known Implementing Classes:
AbstractReasoningConnection
public interface ReasoningConnection extends Connection
SNARL Connection which exposes reasoning specific functionality such as explanations and consistency checking.
- Since:
- 0.7.3
- Version:
- 6.0
- Author:
- Michael Grove, Hector Perez-Urbina
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StardogExplainer
explain(Axiom theExpr)
Returns aexplainer
that can be used to explain why the given expression is inferred.StardogExplainer
explain(Statement theStmt)
Returns aexplainer
that can be used to explain why the given statement is inferred.StardogExplainer
explainInconsistency()
Returns aexplainer
that can be used to explain why the given statement is inferred.java.lang.Iterable<Statement>
exportSchema()
Returns the contents of the currentlyselected schema
.java.util.Collection<IRI>
getClasses()
Returns the collection of classes in the current KB.java.util.Collection<IRI>
getDataProperties()
Returns the collection of data properties in the current KB.java.util.Collection<IRI>
getObjectProperties()
Returns the collection of object properties in the current KB.SchemaManager
getSchemaManager()
Returns the schema manager for the databasejava.util.Collection<IRI>
getUnsatisfiableClasses()
Returns the collection of unsatisfiable classes in the current KB.boolean
isConsistent()
Checks the consistency of the database with the current reasoning flag.boolean
isConsistent(java.util.Collection<IRI> theActiveGraphs)
Checks the consistency of the specified named graphs with the current reasoning flag.boolean
isSatisfiable(IRI theClass)
Checks whether the class is satisfiable with respect to the current KB and reasoning flag-
Methods inherited from interface com.complexible.stardog.api.Connection
add, admin, as, ask, ask, begin, close, commit, currentStatus, export, generateModel, get, getOption, getSchema, graph, graph, graphAliases, isOpen, isReasoningEnabled, name, namespaces, paths, paths, remove, rollback, select, select, selectPlan, selectPlan, size, transactions, update, update
-
-
-
-
Method Detail
-
isConsistent
boolean isConsistent() throws StardogException
Checks the consistency of the database with the current reasoning flag. If the consistency check has been performed before and the database has not changed this function will return the previously computed result immediately. Besides this caching functionality, this function always returns the same result as theisConsistent(ContextSets.LOCAL)
call.- Returns:
- true if the database is consistent, false otherwise
- Throws:
StardogException
-
isConsistent
boolean isConsistent(java.util.Collection<IRI> theActiveGraphs) throws StardogException
Checks the consistency of the specified named graphs with the current reasoning flag. The consistency results for arbitrary set of named graphs are not cached so this function will perform a new consistency check over at each invocation.- Returns:
- true if the database is consistent, false otherwise
- Throws:
StardogException
-
isSatisfiable
boolean isSatisfiable(IRI theClass) throws StardogException
Checks whether the class is satisfiable with respect to the current KB and reasoning flag- Parameters:
theClass
- the class- Returns:
- true if the class is satisfiable, false otherwise
- Throws:
StardogException
-
getClasses
java.util.Collection<IRI> getClasses() throws StardogException
Returns the collection of classes in the current KB.- Throws:
StardogException
-
getUnsatisfiableClasses
java.util.Collection<IRI> getUnsatisfiableClasses() throws StardogException
Returns the collection of unsatisfiable classes in the current KB.- Throws:
StardogException
-
getObjectProperties
java.util.Collection<IRI> getObjectProperties() throws StardogException
Returns the collection of object properties in the current KB.- Returns:
- the object properties
- Throws:
StardogException
- if there was an error obtaining the properties
-
getDataProperties
java.util.Collection<IRI> getDataProperties() throws StardogException
Returns the collection of data properties in the current KB.- Returns:
- the data properties
- Throws:
StardogException
- if there was an error obtaining the properties
-
explain
StardogExplainer explain(Statement theStmt)
Returns aexplainer
that can be used to explain why the given statement is inferred.- Parameters:
theStmt
- the statement to be explained- Returns:
- An explainer for the inference.
-
explain
StardogExplainer explain(Axiom theExpr)
Returns aexplainer
that can be used to explain why the given expression is inferred.- Parameters:
theExpr
- the expression to be explained- Returns:
- An explainer for the inference.
-
explainInconsistency
StardogExplainer explainInconsistency()
Returns aexplainer
that can be used to explain why the given statement is inferred.- Returns:
- An explainer for inconsistency.
-
exportSchema
java.lang.Iterable<Statement> exportSchema() throws StardogException
Returns the contents of the currentlyselected schema
.- Returns:
- the contents of the schema
- Throws:
StardogException
-
getSchemaManager
SchemaManager getSchemaManager()
Returns the schema manager for the database- Returns:
- the schema manager for the database
-
-