Class AbstractReasoningConnection
- java.lang.Object
-
- com.complexible.stardog.api.impl.DelegatingConnection
-
- com.complexible.stardog.api.reasoning.AbstractReasoningConnection
-
- All Implemented Interfaces:
Connection,ReasoningConnection,java.lang.AutoCloseable
public abstract class AbstractReasoningConnection extends com.complexible.stardog.api.impl.DelegatingConnection implements ReasoningConnection
- Since:
- 5.0
- Version:
- 6.0
- Author:
- Michael Grove
-
-
Constructor Summary
Constructors Constructor Description AbstractReasoningConnection(Connection theConnection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StardogExplainerexplain(Statement theStmt)Returns aexplainerthat can be used to explain why the given statement is inferred.StardogExplainerexplainInconsistency()Returns aexplainerthat can be used to explain why the given statement is inferred.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.SchemaManagergetSchemaManager()Returns the schema manager for the databasejava.util.Collection<IRI>getUnsatisfiableClasses()Returns the collection of unsatisfiable classes in the current KB.booleanisConsistent()Checks the consistency of the database with the current reasoning flag.booleanisSatisfiable(IRI theClass)Checks whether the class is satisfiable with respect to the current KB and reasoning flag-
Methods inherited from class com.complexible.stardog.api.impl.DelegatingConnection
add, admin, as, ask, ask, begin, close, commit, currentStatus, export, generateModel, get, getConnection, getOption, getSchema, graph, graph, graphAliases, isOpen, isReasoningEnabled, name, namespaces, paths, paths, remove, rollback, select, select, selectPlan, selectPlan, size, transactions, update, update
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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
-
Methods inherited from interface com.complexible.stardog.api.reasoning.ReasoningConnection
explain, exportSchema, isConsistent
-
-
-
-
Constructor Detail
-
AbstractReasoningConnection
public AbstractReasoningConnection(Connection theConnection)
-
-
Method Detail
-
explain
public final StardogExplainer explain(Statement theStmt)
Returns aexplainerthat can be used to explain why the given statement is inferred.- Specified by:
explainin interfaceReasoningConnection- Parameters:
theStmt- the statement to be explained- Returns:
- An explainer for the inference.
-
explainInconsistency
public final StardogExplainer explainInconsistency()
Returns aexplainerthat can be used to explain why the given statement is inferred.- Specified by:
explainInconsistencyin interfaceReasoningConnection- Returns:
- An explainer for inconsistency.
-
isSatisfiable
public final boolean isSatisfiable(IRI theClass) throws StardogException
Checks whether the class is satisfiable with respect to the current KB and reasoning flag- Specified by:
isSatisfiablein interfaceReasoningConnection- Parameters:
theClass- the class- Returns:
- true if the class is satisfiable, false otherwise
- Throws:
StardogException
-
getClasses
public final java.util.Collection<IRI> getClasses() throws StardogException
Returns the collection of classes in the current KB.- Specified by:
getClassesin interfaceReasoningConnection- Throws:
StardogException
-
getUnsatisfiableClasses
public final java.util.Collection<IRI> getUnsatisfiableClasses() throws StardogException
Returns the collection of unsatisfiable classes in the current KB.- Specified by:
getUnsatisfiableClassesin interfaceReasoningConnection- Throws:
StardogException
-
getObjectProperties
public final java.util.Collection<IRI> getObjectProperties() throws StardogException
Returns the collection of object properties in the current KB.- Specified by:
getObjectPropertiesin interfaceReasoningConnection- Returns:
- the object properties
- Throws:
StardogException- if there was an error obtaining the properties
-
getDataProperties
public final java.util.Collection<IRI> getDataProperties() throws StardogException
Returns the collection of data properties in the current KB.- Specified by:
getDataPropertiesin interfaceReasoningConnection- Returns:
- the data properties
- Throws:
StardogException- if there was an error obtaining the properties
-
isConsistent
public final boolean isConsistent() throws StardogExceptionChecks 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.- Specified by:
isConsistentin interfaceReasoningConnection- Returns:
- true if the database is consistent, false otherwise
- Throws:
StardogException
-
getSchemaManager
public SchemaManager getSchemaManager()
Description copied from interface:ReasoningConnectionReturns the schema manager for the database- Specified by:
getSchemaManagerin interfaceReasoningConnection- Returns:
- the schema manager for the database
-
-