public class SPINConstraints extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
SPINConstraints.QueryWrapper |
| Constructor and Description |
|---|
SPINConstraints() |
| Modifier and Type | Method and Description |
|---|---|
protected static void |
addClassContraints(org.apache.jena.rdf.model.Statement stmt,
org.apache.jena.rdf.model.Property predicate,
Map<org.apache.jena.rdf.model.Resource,List<SPINConstraints.QueryWrapper>> class2Query) |
static void |
addConstraintViolationsRDF(List<ConstraintViolation> cvs,
org.apache.jena.rdf.model.Model result,
boolean createSource)
Creates an RDF representation (instances of spin:ConstraintViolation) from a
collection of ConstraintViolation Java objects.
|
static List<ConstraintViolation> |
check(org.apache.jena.ontology.OntModel model)
Checks all instances in a given Model against all spin:constraints and
returns a List of constraint violations.
|
static List<ConstraintViolation> |
check(org.apache.jena.ontology.OntModel model,
org.apache.jena.rdf.model.Property predicate)
Checks all instances in a given Model and returns a List of constraint violations.
|
protected static Map<org.apache.jena.rdf.model.Resource,List<SPINConstraints.QueryWrapper>> |
class2Query(org.apache.jena.ontology.OntModel model,
org.apache.jena.rdf.model.Property predicate) |
protected static SPINConstraints.QueryWrapper |
createWrapper(org.apache.jena.rdf.model.Resource constraint) |
static String |
getLabel(org.apache.jena.rdf.model.Resource resource)
Gets the label for a given Resource.
|
protected static Set<org.apache.jena.rdf.model.Resource> |
getSubClasses(org.apache.jena.rdf.model.Resource cls) |
protected static Set<org.apache.jena.rdf.model.Resource> |
getSuperClasses(org.apache.jena.rdf.model.Resource cls) |
protected static List<ConstraintViolation> |
runQueryOnClass(SPINConstraints.QueryWrapper wrapper,
org.apache.jena.rdf.model.Resource cls,
org.apache.jena.rdf.model.Model model) |
public static List<ConstraintViolation> check(org.apache.jena.ontology.OntModel model)
model - the Model to operate onpublic static List<ConstraintViolation> check(org.apache.jena.ontology.OntModel model, org.apache.jena.rdf.model.Property predicate)
model - the Model to operate onpredicate - the system property, e.g. a sub-property of spin:constraintprotected static Set<org.apache.jena.rdf.model.Resource> getSubClasses(org.apache.jena.rdf.model.Resource cls)
protected static Set<org.apache.jena.rdf.model.Resource> getSuperClasses(org.apache.jena.rdf.model.Resource cls)
protected static Map<org.apache.jena.rdf.model.Resource,List<SPINConstraints.QueryWrapper>> class2Query(org.apache.jena.ontology.OntModel model, org.apache.jena.rdf.model.Property predicate)
protected static void addClassContraints(org.apache.jena.rdf.model.Statement stmt,
org.apache.jena.rdf.model.Property predicate,
Map<org.apache.jena.rdf.model.Resource,List<SPINConstraints.QueryWrapper>> class2Query)
protected static SPINConstraints.QueryWrapper createWrapper(org.apache.jena.rdf.model.Resource constraint)
protected static List<ConstraintViolation> runQueryOnClass(SPINConstraints.QueryWrapper wrapper, org.apache.jena.rdf.model.Resource cls, org.apache.jena.rdf.model.Model model)
public static void addConstraintViolationsRDF(List<ConstraintViolation> cvs, org.apache.jena.rdf.model.Model result, boolean createSource)
cvs - the violation objectsresult - the Model to add the results tocreateSource - true to also create the spin:violationSourcepublic static String getLabel(org.apache.jena.rdf.model.Resource resource)
resource - the Resource to get the label ofCopyright © 2020. All rights reserved.