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
,java.lang.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 org.slf4j.Logger
LOGGER
the logger
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractICVConnection(com.complexible.stardog.api.impl.AbstractConnection theConnection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
assertOpen(java.lang.String theMessage)
protected com.complexible.stardog.api.impl.AbstractConnection
getConnection()
boolean
isValid(Constraint... theConstraints)
Returnstrue
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
-
-
-
-
Method Detail
-
isValid
public final boolean isValid(Constraint... theConstraints) throws StardogException
Returnstrue
if the given integrity constraints are violated in the database. If no constraints are given then all thecurrent constraints
in the database are used. This function is equivalent to callingICValidator.isValid(Collection, Constraint...)
withContextSets.LOCAL
as the active graphs.- Specified by:
isValid
in interfaceICValidator
- 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 classcom.complexible.stardog.api.impl.DelegatingConnection
-
assertOpen
protected void assertOpen(java.lang.String theMessage) throws StardogException
- Throws:
StardogException
-
-