public final class ConstraintFactory extends Object
Factory to simplify creating constraint objects.
| Modifier and Type | Method and Description |
|---|---|
static Constraint |
constraint(Axiom theExpression)
Create an
integrity constraint from an OWL Axiom. |
static Constraint |
constraint(Iterable<Statement> theStatements)
Create an
integrity constraint from a collection of statements. |
static Constraint |
constraint(String theQuery)
integrity constraint from a SPARQL query or SWRL rule. |
static Set<Constraint> |
constraints(Iterable<Statement> theGraph)
Create a set of
integrity constraints from a collection of statements. |
static Set<Constraint> |
constraints(Iterator<Statement> theGraph)
Create a set of
integrity constraints from a collection of statements. |
public static Constraint constraint(Axiom theExpression)
integrity constraint from an OWL Axiom.theExpression - the constraint axiompublic static Constraint constraint(Iterable<Statement> theStatements)
integrity constraint from a collection of statements. The statements must be
equal to a single OWL axiom.theStatements - the axiom as statementsIllegalArgumentException - if the graph of the statements does not contain a single owl axiom, or contains more
than one.public static Set<Constraint> constraints(Iterable<Statement> theGraph)
integrity constraints from a collection of statements.public static Set<Constraint> constraints(Iterator<Statement> theGraph)
integrity constraints from a collection of statements.public static Constraint constraint(String theQuery) throws StardogException
integrity constraint from a SPARQL query or SWRL rule. The query should return a result when there is
a violation and can only be a select query.theQuery - the IC queryStardogException - if the query was malformed or is not a select queryCopyright © 2010-2016 Stardog Union. All Rights Reserved.