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.NodegetBase()org.apache.jena.graph.GraphgetGraph()Collection<org.apache.jena.graph.Node>org.apache.jena.riot.system.PrefixMaporg.apache.jena.shacl.parser.ShapegetShape(org.apache.jena.graph.Node node) Map<org.apache.jena.graph.Node,org.apache.jena.shacl.parser.Shape> org.apache.jena.shacl.engine.TargetsCollection<org.apache.jena.shacl.parser.Shape>Return the shapes with targets.booleanisEmpty()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.intintstatic ShapesLoad the file, parse the graph and return the shapes.static ShapesLoad the file, parse the graph and return the shapes.static Shapesparse(org.apache.jena.graph.Graph graph) Parse the graph and return the shapes connected to the targets.static Shapesparse(org.apache.jena.rdf.model.Model model) Parse the model and return the shapes.static ShapesparseTargets(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, waitMethods 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).