|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ICValidator
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.
| Method Summary | |
|---|---|
void |
addConstraint(Constraint... theConstraint)
Add the specified integrity constraint(s) to the database. |
IO |
addConstraints()
Return an IO which can add a constraint ontology specified in RDF to the database. |
void |
clearConstraints()
Remove all IC's defined for this database |
String |
convertConstraint(Collection<URI> theActiveGraphs,
Constraint theConstraint)
Returns the SPARQL query representation for this constraint over the given named graphs. |
String |
convertConstraint(Constraint theConstraint)
Returns the SPARQL query representation for the given constraint. |
Set<Constraint> |
getConstraints()
Return all of the constraints in the database |
Iteration<ConstraintViolation<BindingSet>,StardogException> |
getViolationBindings(Collection<URI> theActiveGraphs,
Constraint... theConstraints)
Returns the violations for the given integrity constraints in the specified set of named graphs as binding sets. |
Iteration<ConstraintViolation<BindingSet>,StardogException> |
getViolationBindings(Constraint... theConstraints)
Returns the violations for the given integrity constraints in the whole database as binding sets. |
boolean |
isValid(Collection<URI> theActiveGraphs,
Constraint... theConstraints)
Returns true if the given integrity constraints are violated in the specified set of named graphs. |
boolean |
isValid(Constraint... theConstraints)
Returns true if the given integrity constraints are violated in the database. |
void |
removeConstraint(Constraint... theConstraint)
Remove the specified integrity constraint(s) from the database |
IO |
removeConstraints()
Return a IO which can be used to remove constraints specified in RDF from the database. |
| Method Detail |
|---|
IO addConstraints()
throws StardogException
IO which can add a constraint ontology specified in RDF to the database.
Specifying the context in the IO object has no effect, you cannot put the integrity constraints into a specific named
graph in the database.
StardogException - a handle to IO could not be obtained to add constraints
void addConstraint(Constraint... theConstraint)
throws StardogException
theConstraint - the IC(s) to add
StardogException - the constraint could not be added
IO removeConstraints()
throws StardogException
IO which can be used to remove constraints specified in RDF from the database. Specifying the context
in the IO object has no effect, you cannot remove the integrity constraints from a specific named graph in the database.
StardogException - a handle to the IO could not be obtained to remove constraints
void removeConstraint(Constraint... theConstraint)
throws StardogException
theConstraint - the IC(s) to remove
StardogException - the constraint could not be removed
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.ALL 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 database
boolean isValid(Collection<URI> 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.ALL 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 database
Iteration<ConstraintViolation<BindingSet>,StardogException> getViolationBindings(Constraint... theConstraints)
throws StardogException
current constraints in the database are used.This
function is equivalent to calling getViolationBindings(Collection, Constraint...) with
ContextSets.ALL 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 violations
Iteration<ConstraintViolation<BindingSet>,StardogException> getViolationBindings(Collection<URI> 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.ALL 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 violations
Set<Constraint> getConstraints()
throws StardogException
StardogException - if there was an error obtaining the constraints
void clearConstraints()
throws StardogException
StardogException - if there was an error while removing the constraints
String convertConstraint(Constraint theConstraint)
throws StardogException
StardogException
String convertConstraint(Collection<URI> theActiveGraphs,
Constraint theConstraint)
throws StardogException
StardogException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||