Package org.topbraid.shacl.model
Interface SHShape
-
- All Superinterfaces:
org.apache.jena.graph.FrontsNode,org.apache.jena.rdf.model.RDFNode,org.apache.jena.rdf.model.Resource,SHResource
- All Known Subinterfaces:
SHNodeShape,SHParameter,SHPropertyShape
- All Known Implementing Classes:
SHNodeShapeImpl,SHParameterImpl,SHPropertyShapeImpl,SHShapeImpl
public interface SHShape extends SHResource
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.apache.jena.rdf.model.ResourcegetContext()Returns either sh:NodeShape or sh:PropertyShape.org.apache.jena.rdf.model.ResourcegetPath()Gets the value resource of sh:path or null (for node shapes).List<SHPropertyShape>getPropertyShapes()Gets all property shapes declared for this shape using either sh:parameter or sh:property.List<SHPropertyShape>getPropertyShapes(org.apache.jena.rdf.model.RDFNode predicate)Gets all property shapes declared for this shape using either sh:parameter or sh:property that are about a given predicate.Iterable<SHRule>getRules()Gets the rules attached to this shape via sh:rule.org.apache.jena.rdf.model.ResourcegetSeverity()Returns the sh:severity of this shape, defaulting to sh:Violation.booleanhasTargetNode(org.apache.jena.rdf.model.RDFNode node)Checks if a given node is in the target of this shape.booleanisDeactivated()Checks if this shape has been deactivated.booleanisPropertyShape()Checks if this is a property shape, based on the presence or absence of sh:path.-
Methods inherited from interface org.apache.jena.rdf.model.RDFNode
as, asLiteral, asResource, canAs, getModel, isAnon, isLiteral, isResource, isStmtResource, isURIResource, visitWith
-
Methods inherited from interface org.apache.jena.rdf.model.Resource
abort, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addProperty, addProperty, addProperty, addProperty, begin, commit, equals, getId, getLocalName, getNameSpace, getProperty, getProperty, getPropertyResourceValue, getRequiredProperty, getRequiredProperty, getStmtTerm, getURI, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasProperty, hasProperty, hasProperty, hasProperty, hasURI, inModel, listProperties, listProperties, listProperties, removeAll, removeProperties, toString
-
-
-
-
Method Detail
-
getContext
org.apache.jena.rdf.model.Resource getContext()
Returns either sh:NodeShape or sh:PropertyShape.- Returns:
- the context
-
getPath
org.apache.jena.rdf.model.Resource getPath()
Gets the value resource of sh:path or null (for node shapes).- Returns:
- the path resource
-
getPropertyShapes
List<SHPropertyShape> getPropertyShapes()
Gets all property shapes declared for this shape using either sh:parameter or sh:property.- Returns:
- the property shapes
-
getPropertyShapes
List<SHPropertyShape> getPropertyShapes(org.apache.jena.rdf.model.RDFNode predicate)
Gets all property shapes declared for this shape using either sh:parameter or sh:property that are about a given predicate.- Parameters:
predicate- the predicate- Returns:
- a possibly empty list
-
getRules
Iterable<SHRule> getRules()
Gets the rules attached to this shape via sh:rule.- Returns:
- the rules
-
getSeverity
org.apache.jena.rdf.model.Resource getSeverity()
Returns the sh:severity of this shape, defaulting to sh:Violation.- Returns:
- the severity
-
hasTargetNode
boolean hasTargetNode(org.apache.jena.rdf.model.RDFNode node)
Checks if a given node is in the target of this shape.- Parameters:
node- the node to test- Returns:
- true if node is in target
-
isDeactivated
boolean isDeactivated()
Checks if this shape has been deactivated.- Returns:
- true if deactivated
-
isPropertyShape
boolean isPropertyShape()
Checks if this is a property shape, based on the presence or absence of sh:path.- Returns:
- true iff this has a value for sh:path
-
-