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 -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractICVConnection(com.complexible.stardog.api.impl.AbstractConnection theConnection) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidassertOpen(String theMessage) protected com.complexible.stardog.api.impl.AbstractConnectionfinal booleanisValid(Constraint... theConstraints) Returnstrueif 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, updateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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, updateMethods 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 LOGGERthe logger
-
-
Constructor Details
-
AbstractICVConnection
protected AbstractICVConnection(com.complexible.stardog.api.impl.AbstractConnection theConnection)
-
-
Method Details
-
isValid
Returnstrueif the given integrity constraints are violated in the database. If no constraints are given then all thecurrent constraintsin the database are used. This function is equivalent to callingICValidator.isValid(Collection, Constraint...)withContextSets.LOCALas the active graphs.- Specified by:
isValidin 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:
getConnectionin classcom.complexible.stardog.api.impl.DelegatingConnection
-
assertOpen
- Throws:
StardogException
-