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 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.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
isSatisfiable(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 aexplainer
that can be used to explain why the given statement is inferred.- Specified by:
explain
in interfaceReasoningConnection
- Parameters:
theStmt
- the statement to be explained- Returns:
- An explainer for the inference.
-
explainInconsistency
public final StardogExplainer explainInconsistency()
Returns aexplainer
that can be used to explain why the given statement is inferred.- Specified by:
explainInconsistency
in 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:
isSatisfiable
in 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:
getClasses
in 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:
getUnsatisfiableClasses
in 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:
getObjectProperties
in 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:
getDataProperties
in interfaceReasoningConnection
- Returns:
- the data properties
- Throws:
StardogException
- if there was an error obtaining the properties
-
isConsistent
public final 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.- Specified by:
isConsistent
in interfaceReasoningConnection
- Returns:
- true if the database is consistent, false otherwise
- Throws:
StardogException
-
getSchemaManager
public SchemaManager getSchemaManager()
Description copied from interface:ReasoningConnection
Returns the schema manager for the database- Specified by:
getSchemaManager
in interfaceReasoningConnection
- Returns:
- the schema manager for the database
-
-