Package com.complexible.stardog.icv.api

# Class AbstractICVConnection

java.lang.Object
com.complexible.stardog.api.impl.DelegatingConnection
com.complexible.stardog.icv.api.AbstractICVConnection

All Implemented Interfaces:
  `Connection`, `ICVConnection`, `ICValidator`, `AutoCloseable`

public abstract class AbstractICVConnection extends com.complexible.stardog.api.impl.DelegatingConnection implements ICVConnection

Abstract base implementation for a SNARL API Connection which supports ICV. This handles the oracle/validation bits by creating the ICV queries and delegating them to the parent connection. Also handles IO bits for changing constraints, but otherwise leaves constraint manipulation to the implementing classes.

Since:
  0.8
Version:
  4.1
Author:
  Michael Grove

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected static final org.slf4j.Logger`
  `LOGGER`
  the logger

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `AbstractICVConnection(com.complexible.stardog.api.impl.AbstractConnection theConnection)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `assertOpen(String theMessage)`
  `protected com.complexible.stardog.api.impl.AbstractConnection`
  `getConnection()`
  `final boolean`
  `isValid(Constraint... theConstraints)`
  Returns `true` if the given integrity constraints are violated in the database.

  ### Methods inherited from class com.complexible.stardog.api.impl.DelegatingConnection

  `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 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.icv.ICValidator

  `close, getConstraints, getValidationReport, getValidationReport, getValidationReport, getViolationBindings, getViolationBindings, isValid, reporter`

- ## Field Details

  - ### LOGGER

    protected static final org.slf4j.Logger LOGGER
    the logger

- ## Constructor Details

  - ### AbstractICVConnection

    protected AbstractICVConnection(com.complexible.stardog.api.impl.AbstractConnection theConnection)

- ## Method Details

  - ### isValid

    public final boolean isValid(Constraint... theConstraints) throws StardogException
    Returns `true` if the given integrity constraints are violated in the database. If no constraints are given then all the `current constraints` in the database are used. This function is equivalent to calling `ICValidator.isValid(Collection, Constraint...)` with `ContextSets.LOCAL` as the active graphs.
    Specified by:
      `isValid` in interface `ICValidator`
    Parameters:
      `theConstraints` - the constraints to check. If no constraints are given, the defined constraints will be used.
    Returns:
      true if the constraints are violated, false otherwise
    Throws:
      `StardogException` - if there was an error while checking the validity of the data in the database

  - ### getConnection

    protected com.complexible.stardog.api.impl.AbstractConnection getConnection()
    Overrides:
      `getConnection` in class `com.complexible.stardog.api.impl.DelegatingConnection`

  - ### assertOpen

    protected void assertOpen(String theMessage) throws StardogException
    Throws:
      `StardogException`