public interface ICValidator extends AutoCloseable
End-user interface for Integrity Constraint Validation support on a Stardog database. This is for users who wish to check validations, view violations, etc. separately from the database management and use of IC's. Particularly, if the user is operating in lax mode in which invalid data is allowed into the database, this can be used to query and find the violations and to otherwise resolve them.
All operations which modify the constraints for a database are atomic.
Modifier and Type | Method and Description |
---|---|
void |
close() |
Set<Constraint> |
getConstraints()
Return all of the constraints in the database
|
default StatementIterator |
getValidationReport(Collection<IRI> theActiveGraphs,
Constraint... theConstraints)
Returns the SHACL validation report for the given SHACL constraints in the specified set of named graphs.
|
StatementIterator |
getValidationReport(Collection<IRI> theActiveGraphs,
Options theOptions,
Constraint... theConstraints)
Returns the SHACL validation report for the given SHACL constraints in the specified set of named graphs.
|
default StatementIterator |
getValidationReport(Constraint... theConstraints)
Returns the SHACL validation report for the given SHACL constraints validated over the whole database.
|
CloseableIterator<ConstraintViolation<BindingSet>> |
getViolationBindings(Collection<IRI> theActiveGraphs,
Constraint... theConstraints)
Returns the violations for the given integrity constraints in the specified set of named graphs as binding sets.
|
default CloseableIterator<ConstraintViolation<BindingSet>> |
getViolationBindings(Constraint... theConstraints)
Returns the violations for the given integrity constraints in the whole database as binding sets.
|
boolean |
isValid(Collection<IRI> theActiveGraphs,
Constraint... theConstraints)
Returns
true if the given integrity constraints are violated in the specified set of named graphs. |
default boolean |
isValid(Constraint... theConstraints)
Returns
true if the given integrity constraints are violated in the database. |
ValidationReporter |
reporter()
Returns a validation reporter that can be used to retrieve the SHACL validation reports.
|
default boolean isValid(Constraint... theConstraints) throws StardogException
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 isValid(Collection, Constraint...)
with ContextSets.LOCAL
as the active
graphs.theConstraints
- the constraints to check. If no constraints are given, the defined constraints will be used.StardogException
- if there was an error while checking the validity of the data in the databaseboolean isValid(Collection<IRI> theActiveGraphs, Constraint... theConstraints) throws StardogException
true
if the given integrity constraints are violated in the specified set of named graphs.
If no constraints are given then all the current constraints
in the database are
used.theActiveGraphs
- the contexts to use in the validation. If the default context is to be used then
ContextSets.DEFAULT_ONLY
must be used. If all contexts are to be used, then
ContextSets.LOCAL
must be usedtheConstraints
- the constraints to check. If no constraints are given, the defined constraints will be used.StardogException
- if there was an error while checking the validity of the data in the databasedefault CloseableIterator<ConstraintViolation<BindingSet>> getViolationBindings(Constraint... theConstraints) throws StardogException
current constraints
in the database are used.This
function is equivalent to calling getViolationBindings(Collection, Constraint...)
with
ContextSets.LOCAL
as the active graphs.theConstraints
- the constraints to check. If no constraints are given, the defined constraints will be used.StardogException
- if there was an error calculating the violationsCloseableIterator<ConstraintViolation<BindingSet>> getViolationBindings(Collection<IRI> theActiveGraphs, Constraint... theConstraints) throws StardogException
current constraints
in the database are used.theActiveGraphs
- the contexts to use in the validation. If the default context is to be used then
ContextSets.DEFAULT_ONLY
must be used. If all contexts are to be used, then
ContextSets.LOCAL
must be usedtheConstraints
- the constraints to check. If no constraints are given, the current constraints will be used.StardogException
- if there was an error calculating the violationsdefault StatementIterator getValidationReport(Constraint... theConstraints) throws StardogException
in the database
are used.
Non-SHACL constraints are ignored by this function.theConstraints
- the SHACL constraints to validate. If no constraints are given, the constraints in the database will be used.StardogException
- if there was an error calculating the violationsdefault StatementIterator getValidationReport(Collection<IRI> theActiveGraphs, Constraint... theConstraints) throws StardogException
in the database
are used.
Non-SHACL constraints are ignored by this function.theActiveGraphs
- the contexts to use in the validation. If the default context is to be used then
ContextSets.DEFAULT_ONLY
must be used. If all contexts are to be used, then
ContextSets.LOCAL
must be usedtheConstraints
- the SHACL constraints to validate. If no constraints are given, the constraints in the database will be used.StardogException
- if there was an error calculating the violationsStatementIterator getValidationReport(Collection<IRI> theActiveGraphs, Options theOptions, Constraint... theConstraints) throws StardogException
in the database
are used.
Non-SHACL constraints are ignored by this function.theActiveGraphs
- the contexts to use in the validation. If the default context is to be used then
ContextSets.DEFAULT_ONLY
must be used. If all contexts are to be used, then
ContextSets.LOCAL
must be usedtheOptions
- the options used to tune the validation process.theConstraints
- the SHACL constraints to validate. If no constraints are given, the constraints in the database will be used.StardogException
- if there was an error calculating the violationsValidationReporter reporter()
Set<Constraint> getConstraints() throws StardogException
StardogException
- if there was an error obtaining the constraintsvoid close()
close
in interface AutoCloseable
Copyright © 2010-2016 Stardog Union. All Rights Reserved.