|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.clarkparsia.stardog.icv.ICV
public final class ICV
Set of utility functions for dealing with Stardog ICV support.
| Field Summary | |
|---|---|
static boolean |
ENFORCE_MEMBERSHIP
|
static URI |
ID
|
static String |
PERMISSION_ICV
|
static String |
PERMISSION_ICV_GUARD
|
| Method Summary | |
|---|---|
static Iteration<Resource,StardogException> |
asIndividuals(Iteration<BindingSet,StardogException> theViolations)
The individual violating the constraint will pulled from the BindingSet and returned. |
static Set<Constraint> |
constraintsFromGraph(Graph theGraph)
|
static com.clarkparsia.stardog.rdf.StatementSource<Exception> |
constraintsToSource(Iterable<Constraint> theConstraints)
|
static Set<Constraint> |
convertToExpressions(Graph theStatements)
Deprecated. Use ConstraintFactory.constraints(Graph) instead |
static Pair<Set<Statement>,Set<Statement>> |
getExplanation(Constraint theConstraint,
BindingSet theBinding)
Returns the explanation for a specific constraint violation as two sets of statements. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String PERMISSION_ICV
public static final String PERMISSION_ICV_GUARD
public static final boolean ENFORCE_MEMBERSHIP
public static final URI ID
| Method Detail |
|---|
@Deprecated public static Set<Constraint> convertToExpressions(Graph theStatements)
ConstraintFactory.constraints(Graph) instead
public static Iteration<Resource,StardogException> asIndividuals(Iteration<BindingSet,StardogException> theViolations)
throws StardogException
theViolations - the violation bindings
StardogException - if there was an error converting a BindingSet
public static Pair<Set<Statement>,Set<Statement>> getExplanation(Constraint theConstraint,
BindingSet theBinding)
Returns the explanation for a specific constraint violation as two sets of statements. The first set in the pair is the existing statements in the database that caused the violation. The second set is the statements that were missing in the database that caused the violation. Since the statements in the second set do not exist they may contain auto-generated URIs to indicate unknown values. Depending on the type of constraint the first or the second set may be empty.
All the statements in the first set are guaranteed to be inferrable by the contents of the database. This mean they are either in the explicitly in the database or they are inferred by other statements in the database. On the other hand, some of the statements in the second set MAY BE in the database but there is at least one statement in this set that is not in the database.
The explanation for a violation can be used as a guide to fix a violation. Either removing one or more statements of the first set from the database or adding all the statements from the second set would fix this violation
theConstraint - the constraint that is violatedtheBinding - the binding returned by the ConstraintViolation for this constraint
public static Set<Constraint> constraintsFromGraph(Graph theGraph)
throws StardogException
StardogExceptionpublic static com.clarkparsia.stardog.rdf.StatementSource<Exception> constraintsToSource(Iterable<Constraint> theConstraints)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||