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
-
Field Summary
Fields inherited from class org.apache.jena.rdf.model.impl.ResourceImpl
factory, rdfNodeFactoryFields inherited from class org.apache.jena.enhanced.EnhNode
enhGraph, node -
Constructor Summary
ConstructorsConstructorDescriptionSHShapeImpl(org.apache.jena.graph.Node node, org.apache.jena.enhanced.EnhGraph graph) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.jena.rdf.model.ResourcegetPath()Gets the value resource of sh:path or null (for node shapes).Gets all property shapes declared for this shape using either sh:parameter or sh:property.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.getRules()Gets the rules attached to this shape via sh:rule.org.apache.jena.rdf.model.ResourceReturns 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.booleanChecks if this shape has been deactivated.booleanChecks 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, getParameterMapByVarNamesMethods 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, visitWithMethods inherited from class org.apache.jena.enhanced.EnhNode
as, asNode, canAs, canSupport, convertTo, equals, getGraph, getPersonality, hashCode, isAnon, isLiteral, isResource, isStmtResource, isURIResource, isValid, viewAsMethods inherited from class org.apache.jena.enhanced.Polymorphic
addView, alreadyHasView, asInternal, supportsMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.jena.graph.FrontsNode
asNodeMethods inherited from interface org.apache.jena.rdf.model.RDFNode
as, asLiteral, asResource, canAs, getModel, isAnon, isLiteral, isResource, isStmtResource, isURIResource, visitWithMethods 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, toStringMethods inherited from interface org.topbraid.shacl.model.SHShape
getContext
-
Constructor Details
-
SHShapeImpl
public SHShapeImpl(org.apache.jena.graph.Node node, org.apache.jena.enhanced.EnhGraph graph)
-
-
Method Details
-
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
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
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
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
-