public class ValidationEngine extends Object implements NodeExpressionContext
| Modifier | Constructor and Description |
|---|---|
protected |
ValidationEngine(org.apache.jena.query.Dataset dataset,
URI shapesGraphURI,
ShapesGraph shapesGraph,
org.apache.jena.rdf.model.Resource report)
Constructs a new ValidationEngine.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addResultMessage(org.apache.jena.rdf.model.Resource result,
org.apache.jena.rdf.model.Literal message,
org.apache.jena.query.QuerySolution bindings) |
void |
applyEntailments()
Ensures that the data graph includes any entailed triples inferred by the regime
specified using sh:entailment in the shapes graph.
|
org.apache.jena.rdf.model.Resource |
createResult(org.apache.jena.rdf.model.Resource type,
Constraint constraint,
org.apache.jena.rdf.model.RDFNode focusNode) |
org.apache.jena.query.Dataset |
getDataset() |
Function<org.apache.jena.rdf.model.RDFNode,String> |
getLabelFunction() |
ProgressMonitor |
getProgressMonitor() |
org.apache.jena.rdf.model.Resource |
getReport()
Gets the validation report as a Resource in the report Model.
|
ShapesGraph |
getShapesGraph() |
URI |
getShapesGraphURI() |
List<org.apache.jena.rdf.model.RDFNode> |
getValueNodes(Constraint constraint,
org.apache.jena.rdf.model.RDFNode focusNode) |
void |
setFocusNodeFilter(Predicate<org.apache.jena.rdf.model.RDFNode> value)
Sets a filter that can be used to skip certain focus node from validation.
|
void |
setLabelFunction(Function<org.apache.jena.rdf.model.RDFNode,String> value) |
void |
setProgressMonitor(ProgressMonitor value) |
void |
updateConforms() |
org.apache.jena.rdf.model.Resource |
validateAll()
Validates all target nodes against all of their shapes.
|
org.apache.jena.rdf.model.Resource |
validateNode(org.apache.jena.graph.Node focusNode)
Validates a given focus node against all of the shapes that have matching targets.
|
org.apache.jena.rdf.model.Resource |
validateNodesAgainstShape(List<org.apache.jena.rdf.model.RDFNode> focusNodes,
org.apache.jena.graph.Node shape)
Validates a given list of focus node against a given Shape.
|
protected ValidationEngine(org.apache.jena.query.Dataset dataset,
URI shapesGraphURI,
ShapesGraph shapesGraph,
org.apache.jena.rdf.model.Resource report)
dataset - the Dataset to operate onshapesGraphURI - the URI of the shapes graph (must be in the dataset)shapesGraph - the ShapesGraph with the shapes to validate againstreport - the sh:ValidationReport object in the results Model, or null to create a new onepublic void applyEntailments()
throws InterruptedException
InterruptedExceptionpublic org.apache.jena.query.Dataset getDataset()
getDataset in interface NodeExpressionContextpublic void setLabelFunction(Function<org.apache.jena.rdf.model.RDFNode,String> value)
public ProgressMonitor getProgressMonitor()
public void setProgressMonitor(ProgressMonitor value)
public void addResultMessage(org.apache.jena.rdf.model.Resource result,
org.apache.jena.rdf.model.Literal message,
org.apache.jena.query.QuerySolution bindings)
public org.apache.jena.rdf.model.Resource createResult(org.apache.jena.rdf.model.Resource type,
Constraint constraint,
org.apache.jena.rdf.model.RDFNode focusNode)
public ShapesGraph getShapesGraph()
getShapesGraph in interface NodeExpressionContextpublic URI getShapesGraphURI()
getShapesGraphURI in interface NodeExpressionContextpublic org.apache.jena.rdf.model.Resource getReport()
public List<org.apache.jena.rdf.model.RDFNode> getValueNodes(Constraint constraint, org.apache.jena.rdf.model.RDFNode focusNode)
public void setFocusNodeFilter(Predicate<org.apache.jena.rdf.model.RDFNode> value)
value - the new filterpublic void updateConforms()
public org.apache.jena.rdf.model.Resource validateAll()
throws InterruptedException
setFocusNodeFilter(Predicate).InterruptedExceptionpublic org.apache.jena.rdf.model.Resource validateNode(org.apache.jena.graph.Node focusNode)
throws InterruptedException
focusNode - the node to validateInterruptedExceptionpublic org.apache.jena.rdf.model.Resource validateNodesAgainstShape(List<org.apache.jena.rdf.model.RDFNode> focusNodes, org.apache.jena.graph.Node shape)
focusNodes - the nodes to validateshape - the sh:Shape to validate againstCopyright © 2017 TopQuadrant, Inc.. All rights reserved.