Package org.topbraid.shacl.model.impl
Class SHShapeImpl
- java.lang.Object
-
- org.apache.jena.enhanced.Polymorphic<org.apache.jena.rdf.model.RDFNode>
-
- org.apache.jena.enhanced.EnhNode
-
- org.apache.jena.rdf.model.impl.ResourceImpl
-
- org.topbraid.shacl.model.impl.SHResourceImpl
-
- org.topbraid.shacl.model.impl.SHParameterizableInstanceImpl
-
- org.topbraid.shacl.model.impl.SHShapeImpl
-
- All Implemented Interfaces:
org.apache.jena.graph.FrontsNode,org.apache.jena.rdf.model.RDFNode,org.apache.jena.rdf.model.Resource,SHParameterizableInstance,SHResource,SHShape
- Direct Known Subclasses:
SHNodeShapeImpl,SHPropertyShapeImpl
public abstract class SHShapeImpl extends SHParameterizableInstanceImpl implements SHShape
-
-
Constructor Summary
Constructors Constructor Description SHShapeImpl(org.apache.jena.graph.Node node, org.apache.jena.enhanced.EnhGraph graph)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 class org.topbraid.shacl.model.impl.SHParameterizableInstanceImpl
addBindings, getParameterizable, getParameterMapByVarNames
-
Methods inherited from class org.apache.jena.rdf.model.impl.ResourceImpl
abort, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, asLiteral, asResource, begin, commit, getId, getLocalName, getModel, getModelCom, getNameSpace, getProperty, getProperty, getPropertyResourceValue, getRequiredProperty, getRequiredProperty, getStmtTerm, getURI, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasProperty, hasProperty, hasProperty, hasProperty, hasURI, inModel, listProperties, listProperties, listProperties, mustHaveModel, removeAll, removeProperties, toString, visitWith
-
Methods inherited from class org.apache.jena.enhanced.EnhNode
as, asNode, canAs, canSupport, convertTo, equals, getGraph, getPersonality, hashCode, isAnon, isLiteral, isResource, isStmtResource, isURIResource, isValid, viewAs
-
Methods inherited from class org.apache.jena.enhanced.Polymorphic
addView, alreadyHasView, asInternal, supports
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
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
-
Methods inherited from interface org.topbraid.shacl.model.SHShape
getContext
-
-
-
-
Method Detail
-
getPath
public org.apache.jena.rdf.model.Resource getPath()
Description copied from interface:SHShapeGets the value resource of sh:path or null (for node shapes).
-
getPropertyShapes
public List<SHPropertyShape> getPropertyShapes()
Description copied from interface:SHShapeGets all property shapes declared for this shape using either sh:parameter or sh:property.- Specified by:
getPropertyShapesin interfaceSHShape- Returns:
- the property shapes
-
getPropertyShapes
public List<SHPropertyShape> getPropertyShapes(org.apache.jena.rdf.model.RDFNode predicate)
Description copied from interface:SHShapeGets all property shapes declared for this shape using either sh:parameter or sh:property that are about a given predicate.- Specified by:
getPropertyShapesin interfaceSHShape- Parameters:
predicate- the predicate- Returns:
- a possibly empty list
-
getRules
public Iterable<SHRule> getRules()
Description copied from interface:SHShapeGets the rules attached to this shape via sh:rule.
-
getSeverity
public org.apache.jena.rdf.model.Resource getSeverity()
Description copied from interface:SHShapeReturns the sh:severity of this shape, defaulting to sh:Violation.- Specified by:
getSeverityin interfaceSHShape- Returns:
- the severity
-
hasTargetNode
public boolean hasTargetNode(org.apache.jena.rdf.model.RDFNode node)
Description copied from interface:SHShapeChecks if a given node is in the target of this shape.- Specified by:
hasTargetNodein interfaceSHShape- Parameters:
node- the node to test- Returns:
- true if node is in target
-
isDeactivated
public boolean isDeactivated()
Description copied from interface:SHShapeChecks if this shape has been deactivated.- Specified by:
isDeactivatedin interfaceSHShape- Returns:
- true if deactivated
-
isPropertyShape
public boolean isPropertyShape()
Description copied from interface:SHShapeChecks if this is a property shape, based on the presence or absence of sh:path.- Specified by:
isPropertyShapein interfaceSHShape- Returns:
- true iff this has a value for sh:path
-
-