Package org.apache.jena.shacl
Class Shapes
- java.lang.Object
-
- org.apache.jena.shacl.Shapes
-
- All Implemented Interfaces:
java.lang.Iterable<org.apache.jena.shacl.parser.Shape>
public class Shapes extends java.lang.Object implements java.lang.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
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description NodegetBase()java.lang.StringgetBaseURI()GraphgetGraph()java.util.Collection<Node>getImports()PrefixMapgetPrefixMap()org.apache.jena.shacl.parser.ShapegetShape(Node node)java.util.Map<Node,org.apache.jena.shacl.parser.Shape>getShapeMap()org.apache.jena.shacl.engine.TargetsgetTargets()java.util.Collection<org.apache.jena.shacl.parser.Shape>getTargetShapes()Return the shapes with targets.booleanisEmpty()java.util.Iterator<org.apache.jena.shacl.parser.Shape>iterator()Iterator over the shapes with targetsjava.util.Iterator<org.apache.jena.shacl.parser.Shape>iteratorAll()Iterator over the shapes with targets and with explicit type NodeShape or PropertyShape.intnumRootShapes()intnumShapes()static Shapesparse(java.lang.String fileOrURL)Load the file, parse the graph and return the shapes.static Shapesparse(java.lang.String fileOrURL, boolean withImports)Load the file, parse the graph and return the shapes.static Shapesparse(Graph graph)Parse the graph and return the shapes connected to the targets.static Shapesparse(Model model)Parse the model and return the shapes.static ShapesparseTargets(Graph graph)Deprecated.Useparse(Graph).
-
-
-
Method Detail
-
parse
public static Shapes parse(java.lang.String fileOrURL)
Load the file, parse the graph and return the shapes.
-
parse
public static Shapes parse(java.lang.String fileOrURL, boolean withImports)
Load the file, parse the graph and return the shapes.
-
parse
public static Shapes parse(Graph graph)
Parse the graph and return the shapes connected to the targets.
-
parseTargets
@Deprecated public static Shapes parseTargets(Graph graph)
Deprecated.Useparse(Graph).Parse the graph and return the shapes connected to the targets.
-
isEmpty
public boolean isEmpty()
-
getTargetShapes
public java.util.Collection<org.apache.jena.shacl.parser.Shape> getTargetShapes()
Return the shapes with targets.
-
getImports
public java.util.Collection<Node> getImports()
-
getBase
public Node getBase()
-
getBaseURI
public java.lang.String getBaseURI()
-
getPrefixMap
public PrefixMap getPrefixMap()
-
getGraph
public Graph getGraph()
-
getShape
public org.apache.jena.shacl.parser.Shape getShape(Node node)
-
getShapeMap
public java.util.Map<Node,org.apache.jena.shacl.parser.Shape> getShapeMap()
-
getTargets
public org.apache.jena.shacl.engine.Targets getTargets()
-
numShapes
public int numShapes()
-
numRootShapes
public int numRootShapes()
-
iterator
public java.util.Iterator<org.apache.jena.shacl.parser.Shape> iterator()
Iterator over the shapes with targets- Specified by:
iteratorin interfacejava.lang.Iterable<org.apache.jena.shacl.parser.Shape>
-
iteratorAll
public java.util.Iterator<org.apache.jena.shacl.parser.Shape> iteratorAll()
Iterator over the shapes with targets and with explicit type NodeShape or PropertyShape.
-
-