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
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
  • Field Summary

    Fields inherited from class org.apache.jena.rdf.model.impl.ResourceImpl

    factory, rdfNodeFactory

    Fields inherited from class org.apache.jena.enhanced.EnhNode

    enhGraph, node
  • Constructor Summary

    Constructors
    Constructor
    Description
    SHShapeImpl(org.apache.jena.graph.Node node, org.apache.jena.enhanced.EnhGraph graph)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.jena.rdf.model.Resource
    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.
    Gets the rules attached to this shape via sh:rule.
    org.apache.jena.rdf.model.Resource
    Returns the sh:severity of this shape, defaulting to sh:Violation.
    boolean
    hasTargetNode(org.apache.jena.rdf.model.RDFNode node)
    Checks if a given node is in the target of this shape.
    boolean
    Checks if this shape has been deactivated.
    boolean
    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.graph.FrontsNode

    asNode

    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
  • 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: SHShape
      Gets the value resource of sh:path or null (for node shapes).
      Specified by:
      getPath in interface SHShape
      Returns:
      the path resource
    • getPropertyShapes

      public List<SHPropertyShape> getPropertyShapes()
      Description copied from interface: SHShape
      Gets all property shapes declared for this shape using either sh:parameter or sh:property.
      Specified by:
      getPropertyShapes in interface SHShape
      Returns:
      the property shapes
    • getPropertyShapes

      public List<SHPropertyShape> getPropertyShapes(org.apache.jena.rdf.model.RDFNode predicate)
      Description copied from interface: SHShape
      Gets all property shapes declared for this shape using either sh:parameter or sh:property that are about a given predicate.
      Specified by:
      getPropertyShapes in interface SHShape
      Parameters:
      predicate - the predicate
      Returns:
      a possibly empty list
    • getRules

      public Iterable<SHRule> getRules()
      Description copied from interface: SHShape
      Gets the rules attached to this shape via sh:rule.
      Specified by:
      getRules in interface SHShape
      Returns:
      the rules
    • getSeverity

      public org.apache.jena.rdf.model.Resource getSeverity()
      Description copied from interface: SHShape
      Returns the sh:severity of this shape, defaulting to sh:Violation.
      Specified by:
      getSeverity in interface SHShape
      Returns:
      the severity
    • hasTargetNode

      public boolean hasTargetNode(org.apache.jena.rdf.model.RDFNode node)
      Description copied from interface: SHShape
      Checks if a given node is in the target of this shape.
      Specified by:
      hasTargetNode in interface SHShape
      Parameters:
      node - the node to test
      Returns:
      true if node is in target
    • isDeactivated

      public boolean isDeactivated()
      Description copied from interface: SHShape
      Checks if this shape has been deactivated.
      Specified by:
      isDeactivated in interface SHShape
      Returns:
      true if deactivated
    • isPropertyShape

      public boolean isPropertyShape()
      Description copied from interface: SHShape
      Checks if this is a property shape, based on the presence or absence of sh:path.
      Specified by:
      isPropertyShape in interface SHShape
      Returns:
      true iff this has a value for sh:path