java.lang.Object
org.apache.jena.shacl.Shapes
- All Implemented Interfaces:
Iterable<org.apache.jena.shacl.parser.Shape>
A collection of shapes as output by the SHACL parser. Usage:
Shapes myShapes = Shapes.parse(graph);
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.jena.graph.Node
getBase()
org.apache.jena.graph.Graph
getGraph()
Collection<org.apache.jena.graph.Node>
org.apache.jena.riot.system.PrefixMap
org.apache.jena.shacl.parser.Shape
getShape
(org.apache.jena.graph.Node node) Map<org.apache.jena.graph.Node,
org.apache.jena.shacl.parser.Shape> org.apache.jena.shacl.engine.Targets
Collection<org.apache.jena.shacl.parser.Shape>
Return the shapes with targets.boolean
isEmpty()
Iterator<org.apache.jena.shacl.parser.Shape>
iterator()
Iterator over the shapes with targetsIterator<org.apache.jena.shacl.parser.Shape>
Iterator over the shapes with targets and with explicit type NodeShape or PropertyShape.int
int
static Shapes
Load the file, parse the graph and return the shapes.static Shapes
Load the file, parse the graph and return the shapes.static Shapes
parse
(org.apache.jena.graph.Graph graph) Parse the graph and return the shapes connected to the targets.static Shapes
parse
(org.apache.jena.rdf.model.Model model) Parse the model and return the shapes.static Shapes
parseTargets
(org.apache.jena.graph.Graph graph) Deprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
parse
Parse the model and return the shapes. -
parse
Load the file, parse the graph and return the shapes. -
parse
Load the file, parse the graph and return the shapes. -
parse
Parse the graph and return the shapes connected to the targets. -
parseTargets
Deprecated, for removal: This API element is subject to removal in a future version.Useparse(Graph)
.Parse the graph and return the shapes connected to the targets. -
isEmpty
public boolean isEmpty() -
getTargetShapes
Return the shapes with targets. -
getImports
-
getBase
public org.apache.jena.graph.Node getBase() -
getBaseURI
-
getPrefixMap
public org.apache.jena.riot.system.PrefixMap getPrefixMap() -
getGraph
public org.apache.jena.graph.Graph getGraph() -
getShape
public org.apache.jena.shacl.parser.Shape getShape(org.apache.jena.graph.Node node) -
getShapeMap
-
getTargets
public org.apache.jena.shacl.engine.Targets getTargets() -
numShapes
public int numShapes() -
numRootShapes
public int numRootShapes() -
iterator
Iterator over the shapes with targets -
iteratorAll
Iterator over the shapes with targets and with explicit type NodeShape or PropertyShape.
-
parse(Graph)
.