Package com.complexible.stardog.api.reasoning

# Class AbstractReasoningConnection

java.lang.Object
com.complexible.stardog.api.impl.DelegatingConnection
com.complexible.stardog.api.reasoning.AbstractReasoningConnection

All Implemented Interfaces:
  `Connection`, `ReasoningConnection`, `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

  Modifier and Type
  Method
  Description
  `final StardogExplainer`
  `explain(Statement theStmt)`
  Returns a `explainer` that can be used to explain why the given statement is inferred.
  `final StardogExplainer`
  `explainInconsistency()`
  Returns a `explainer` that can be used to explain why the given statement is inferred.
  `final Collection<IRI>`
  `getClasses()`
  Returns the collection of classes in the current KB.
  `final Collection<IRI>`
  `getDataProperties()`
  Returns the collection of data properties in the current KB.
  `final Collection<IRI>`
  `getObjectProperties()`
  Returns the collection of object properties in the current KB.
  `SchemaManager`
  `getSchemaManager()`
  Returns the schema manager for the database
  `final Collection<IRI>`
  `getUnsatisfiableClasses()`
  Returns the collection of unsatisfiable classes in the current KB.
  `final boolean`
  `isConsistent()`
  Checks the consistency of the database with the current reasoning flag.
  `final 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 Details

  - ### AbstractReasoningConnection

    public AbstractReasoningConnection(Connection theConnection)

- ## Method Details

  - ### explain

    public final StardogExplainer explain(Statement theStmt)
    Returns a `explainer` that can be used to explain why the given statement is inferred.
    Specified by:
      `explain` in interface `ReasoningConnection`
    Parameters:
      `theStmt` - the statement to be explained
    Returns:
      An explainer for the inference.

  - ### explainInconsistency

    public final StardogExplainer explainInconsistency()
    Returns a `explainer` that can be used to explain why the given statement is inferred.
    Specified by:
      `explainInconsistency` in interface `ReasoningConnection`
    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 interface `ReasoningConnection`
    Parameters:
      `theClass` - the class
    Returns:
      true if the class is satisfiable, false otherwise
    Throws:
      `StardogException`

  - ### getClasses

    public final Collection<IRI> getClasses() throws StardogException
    Returns the collection of classes in the current KB.
    Specified by:
      `getClasses` in interface `ReasoningConnection`
    Throws:
      `StardogException`

  - ### getUnsatisfiableClasses

    public final Collection<IRI> getUnsatisfiableClasses() throws StardogException
    Returns the collection of unsatisfiable classes in the current KB.
    Specified by:
      `getUnsatisfiableClasses` in interface `ReasoningConnection`
    Throws:
      `StardogException`

  - ### getObjectProperties

    public final Collection<IRI> getObjectProperties() throws StardogException
    Returns the collection of object properties in the current KB.
    Specified by:
      `getObjectProperties` in interface `ReasoningConnection`
    Returns:
      the object properties
    Throws:
      `StardogException` - if there was an error obtaining the properties

  - ### getDataProperties

    public final Collection<IRI> getDataProperties() throws StardogException
    Returns the collection of data properties in the current KB.
    Specified by:
      `getDataProperties` in interface `ReasoningConnection`
    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 the `isConsistent(ContextSets.LOCAL)` call.
    Specified by:
      `isConsistent` in interface `ReasoningConnection`
    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 interface `ReasoningConnection`
    Returns:
      the schema manager for the database